Nano2 bluetooth pairing issues with HRM example from Arduino IDE build


#1

I’ve been having trouble pairing the Nano2 up with my phone when using the HRM example that’s built from the Arduino IDE (v1.8.5).

I believe the IDE is set up properly (board set to BLE_Nano2, programmer set to RBL_DAPLink, port set correctly).

37

I think IDE does compile correctly to some extent; I can see the device name changing on my phone (in Bluetooth → Available devices) when I change the DEVICE_NAME macro, and the Blink example also works (after setting the LED_BUILTIN to D13). However with the HRM example that’s built, I cannot pair to the device; it tries pairing for about 10 seconds then says ‘cannot communicate with Nordic_HRM’.

I don’t think this is an issue with anything hardware related because when I drag the hex file over from the example provided (https://github.com/redbear/nRF5x/blob/master/nRF52832/test/nRF52_HRM.hex) , I am able to pair fine and see the results fine in nRF Toolbox.

Any tips or advice on what to try next would be greatly appreciated!

Eddie

Update: It turns out I can actually connect to the devices using the nRF Toolbox directly where they come up as unidentified device names, but am still having difficulty in pairing with them without using the app. I’ll continue looking into the issue (I’ve been testing them on Android devices - a Google Pixel on Android P and a Samsung Galaxy Note on Android 6) but just FYI


#2

Have you checked to see if the example uses the correct UUID’s to work with the app?


#3

Hi jbooth, thanks for your reply. Which UUIDs are these, is it the ones for the services? I’m having better luck now using another app called LightBlue to interface with them, where the names do show up.

My current hypothesis is that the built-in bluetooth scanners for the phones I’ve tested are just not great and might be caching something incorrectly, as a colleague’s iPhone’s default bluetooth scanner seems to be working fine as well. I don’t know if any other people have add issues pairing with these on Android devices using the OS interface?


#4

Yes, the service UUIDs and the Characteristic UUIDs need to match. Sadly these are not always the same for every application (especially with hobbyist apps like the examples) so the HRM app that you are using to connect to the BLE device sees that the device does not contain the correct UUIDs and decides that it can’t communicate with that device. I do not think it has to do with android. Just the app you are using. I have come across this before many times with the examples from ResBear not working with the Nordic apps and vice versa.