Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue connecting to iOS app #1

Open
stopshinal opened this issue Nov 27, 2014 · 6 comments
Open

Issue connecting to iOS app #1

stopshinal opened this issue Nov 27, 2014 · 6 comments
Assignees

Comments

@stopshinal
Copy link

Has this library been tested against iOS connectivity yet?

I've been successful connecting the nRF8001 to an Arduino and interacting with it via various nRF8001 iOS bluetooth apps ie: Adafruit's Bluefruit LE

However, I have not been successful while using the spark core as the microcontroller and using the nRF UART not v2 app.

img_4373
img_4374
img_4375

@trond-snekvik trond-snekvik self-assigned this Nov 27, 2014
@gotnull
Copy link

gotnull commented Jan 14, 2015

Okay, phew! I thought it was just me. I have the exact same Adafruit BLE module and a SparkCore and I'm also able to connect to the Adafruit Bluefruit LE Connect iOS app, however am not able to connect to the official nRF UART iOS app when using the SparkCore.

I get the exact same issue you're getting when it just sits there saying "Scanning..."

One thing I did test out was using an Arduino UNO instead of the SparkCore. This seems to work fine on nRF UART and the Adafruit BLE app.

The strange thing is that when tapping "Connect" on the Adafruit BLE app it brings up a menu asking you to select: "Info, UART, Pin I/O" whereas when connected to the SparkCore these menus simply don't appear.

img_4468

@trond-snekvik
Copy link
Contributor

Sorry for the delay on this issue.
In order to enable dynamic name setting for the Spark version of the framework, the GATT service list was moved from the advertisements to the scan response to provide more space. The Android application (nRF UART 2.0) handles this just fine, but the iOS application only connects to devices which advertise the UART Service, and would just ignore the Spark version of the framework.

I just pushed a fix for this issue by putting the GATT service list back in the advertisement message, which appears to solve the issue. I've tested and verified it with an iPhone 4S running iOS7.1, and will push the fix to the spark.io/build library as version 0.6.1. @stopshinal , @gotnull , if any of you could verify that 0.6.1 fixes your problem, I think we can close this issue.

@gotnull
Copy link

gotnull commented Jan 14, 2015

Thanks for the quick bug fix @trond-snekvik. Much appreciated.

I've flashed the 0.6.1 library to the SparkCore and the menu options are now appearing in the Adafruit BLE app.

The problem now is that when I select UART and connect my SparkCore to Termite (I'm using v3.1) I'm not seeing any serial data to/from.

I've triple checked the port, baud rate, data bits and stop bits, etc and they're fine. I've also left the pins in the default configuration and triple checked them also.

Can you confirm you're receiving serial data to/from?

@trond-snekvik
Copy link
Contributor

That sounds a bit strange. It works for me, but the Spark seems to be kind of picky about the UART connection, and I sometimes have to setup Termite and then restart the Spark Core before I am actually able to communicate (Termite seems to be left in some zombie state occasionally, where it looks like it is connected, but it won't respond). You could try some local serial stuff on your Spark Core without the BLE, as this sounds like an issue with the Spark. The spark.io forums might be of better help if this is the case.

When you have verified that your Serial communication works between the Spark and your computer, try to connect with the official nRF UART app. I'm not too familiar with the Adafruit app, and it is not officially supported for this port.

I have Termite set for 115200 baud, 8/1, no parity and RTS/CTS flow. When I connect with the nRF UART app, the Spark sends "Sending: Spark Core says hello!" to the computer terminal.

@gotnull
Copy link

gotnull commented Jan 14, 2015

I can successfully change the name of the device by doing "name=foo" and that works just fine.

Serial output:
Name set. New name: foo

The serial TX/RX still doesn't seem to be working though. I'll keep at it.

@trond-snekvik
Copy link
Contributor

Yes, that seems strange. You could try connecting with a more generic BLE app (such as LightBlue), and write to the TX characteristic (UUID 6E400002-B5A3-F393-E0A9-E50E24DCCA9E).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants