arduino-BLEPeripheral icon indicating copy to clipboard operation
arduino-BLEPeripheral copied to clipboard

Android don't work with this libraries

Open Egauss opened this issue 7 years ago • 10 comments

Hello, I am using sparkfun nrf52832, ble400, boards with this libraries, I can make it work with serial monitor app but when I am trying pair with phone it's saying pairing rejected by "device". Tryed with 10 different androids all examples, iPhone can't see at oll my device in Bt connection. Any advice? By the way android have bluetoorh4.1

https://learn.sparkfun.com/tutorials/nrf52832-breakout-board-hookup-guide?_ga=2.49106918.1940597512.1532724155-901196869.1531785596

None of this example don't work with same hardware apart led blinking and uart app as well

I have one device which has nrf51822 inside and it's pairs with phone perfectly

Egauss avatar Aug 08 '18 06:08 Egauss

Can you post the code, especially the void setup() part?

paveljanecek avatar Aug 09 '18 08:08 paveljanecek

Examples/temp sensor -no modifications try pair with android

Egauss avatar Aug 09 '18 09:08 Egauss

I'll second this, iPhones can connect and the Androids I tested can't. I just tested serial.ino on an nRF52DK that has had SoftDevice S132 successfully flashed and have attempted pairing with both an Android 8.0 and 5.0, and when connecting to nRF Toolbox -> UART -> Connect, I get a message saying The device does not have required services.

I checked the same procedure using a friend's iPhone 7 and after swiping right to expose a serial terminal style view in nRF Toolbox, I sent and received messages from the Arduino serial terminal and the iPhone 7: iPhone 7 nRF Toolbox screenshot

Oddly enough, when using Android 8.0 I'm able to bond using nRF Connect, and it shows these services (?), but I'm not able to send or receive data from the phone: Android 8.0 nRF Connect screenshot

When viewing the same screen in nRF Connect on the iPhone, I'm greeted first with the services screen: iPhone 7 nRF Connect Services screenshot Clicking through shows only the 2 relevant characteristics: iPhone 7 nRF Connect Characteristics screenshot

I've also checked with Play Store's "Serial Bluetooth Terminal" app with no luck connecting.

Not sure what is causing this, moving forward I think I'll try tweaking code in BLEPeripheral.h since this seems to be a problem with all the examples I have tried.

Any ideas how to get Android to view Nordic UART RX and Nordic UART TX characteristics?

austinfennacy avatar Aug 10 '18 20:08 austinfennacy

I think maybe I found answer, the soft devices is not compatible, you can find this on softdevice documentation if library was made for v2 and now we using v6 we are here like is, as simple man who write code can't answer why library dosnt work

Egauss avatar Aug 11 '18 16:08 Egauss

@Egauss it's not apparent to me that the softdevices were ever patched to support Android in the documentation for nRF52832 SoftDevice versions, which makes me think that they are intended to support Android. What gives you the idea that S132v2 doesn't support Android and S132v6 does?

It looks like a user had problems with Android in issue #136 back in 2017, and that issue is still open so I'm not sure if this core+softdevice+library have ever worked for Android... @bossesand were you ever able to get your code working with Android?

@sandeepmistry I'll do my best to take a stab at this problem but before I go down the wrong rabbit hole, do you have any guesses why this core+softdevice+library are unable to connect to Android, or which part of the chain is failing? In a comment above I documented how iOS vs Android view services/characteristics after the serial.ino example is uploaded, if that's of any help.

I'd love to help get this figured out

austinfennacy avatar Aug 15 '18 00:08 austinfennacy

@austinfennacy I want to say softdevice documentation saying what different versions not supported, to use that you need update softdevice and recompile code, I think this library was made for one version of softdevice and didnt work as need update library code, with Keil just recompile.

Try SoftDevice S132 v2.0.1

Egauss avatar Aug 16 '18 01:08 Egauss

I tried so many ways so I do not remember what worked or not. But my first successes was using android and serial to test concept.

MY requirement is to run using Linux, windows and OSX Also.

I am currently using the adafruit libraries for blueprint to connect the serial using node.js at host. Have not tested the js on android, only the ble terminals.

Bosse

Den ons 15 aug. 2018 02:18Austin Fennacy [email protected] skrev:

@Egauss https://github.com/Egauss it's not apparent to me that the softdevices were ever patched to support Android in the documentation for nRF52832 SoftDevice versions https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832, which makes me think that they are intended to support Android. What gives you the idea that S132v2 doesn't support Android and S132v6 does?

It looks like a user had problems with Android in issue #136 https://github.com/sandeepmistry/arduino-BLEPeripheral/issues/136 back in 2017, and that issue is still open so I'm not sure if this core+softdevice+library have ever worked for Android... @bossesand https://github.com/bossesand were you ever able to get your code working with Android?

@sandeepmistry https://github.com/sandeepmistry I'll do my best to take a stab at this problem but before I go down the wrong rabbit hole, do you have any guesses why this core+softdevice+library are unable to connect to Android, or which part of the chain is failing? In a comment above I documented how iOS vs Android view services/characteristics after the serial.ino example is uploaded, if that's of any help.

I'd love to help get this figured out

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sandeepmistry/arduino-BLEPeripheral/issues/241#issuecomment-413056041, or mute the thread https://github.com/notifications/unsubscribe-auth/AP-yb1ngWXOucPfDATd7Z2nqk2HM42m0ks5uQ2i5gaJpZM4VzYDp .

bossesand avatar Aug 16 '18 06:08 bossesand

Serial monitor on Android works as no need pairing

Egauss avatar Aug 16 '18 06:08 Egauss

Not blueprint Bluefruit it should be. I hate spell checker on android.

Den tor 16 aug. 2018 08:28Bo-Erik Sandholm [email protected] skrev:

I tried so many ways so I do not remember what worked or not. But my first successes was using android and serial to test concept.

MY requirement is to run using Linux, windows and OSX Also.

I am currently using the adafruit libraries for blueprint to connect the serial using node.js at host. Have not tested the js on android, only the ble terminals.

Bosse

Den ons 15 aug. 2018 02:18Austin Fennacy [email protected] skrev:

@Egauss https://github.com/Egauss it's not apparent to me that the softdevices were ever patched to support Android in the documentation for nRF52832 SoftDevice versions https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832, which makes me think that they are intended to support Android. What gives you the idea that S132v2 doesn't support Android and S132v6 does?

It looks like a user had problems with Android in issue #136 https://github.com/sandeepmistry/arduino-BLEPeripheral/issues/136 back in 2017, and that issue is still open so I'm not sure if this core+softdevice+library have ever worked for Android... @bossesand https://github.com/bossesand were you ever able to get your code working with Android?

@sandeepmistry https://github.com/sandeepmistry I'll do my best to take a stab at this problem but before I go down the wrong rabbit hole, do you have any guesses why this core+softdevice+library are unable to connect to Android, or which part of the chain is failing? In a comment above I documented how iOS vs Android view services/characteristics after the serial.ino example is uploaded, if that's of any help.

I'd love to help get this figured out

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sandeepmistry/arduino-BLEPeripheral/issues/241#issuecomment-413056041, or mute the thread https://github.com/notifications/unsubscribe-auth/AP-yb1ngWXOucPfDATd7Z2nqk2HM42m0ks5uQ2i5gaJpZM4VzYDp .

bossesand avatar Aug 16 '18 07:08 bossesand

Any update on this issue?

Mboudali avatar Jul 28 '23 04:07 Mboudali