This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Connecting with nfc_ble_pair_lib

I am using the ble_app_hrs_nfc_pairing example (sdk 14.0.0) on my NRF52840 with the s140 soft device. I am able to bond with my phone (Android 8.0.0 Oreo) by tapping the sensor, and BLE_GAP_EVT_CONNECTED and BLE_GAP_EVT_CONN_SEC_UPDATE handlers are called on the device. However nRF Connect on the phone says bonded, not connected. I am thus unable to manipulate services from the app. Because the nfc library causes advertising to halt after the bonding, I am unable to manually connect. My only work around has been to reset the device to get advertising started again and then connect from the phone.

Is this a problem with the library or my phone?

Parents
  • So after copying over the examples main.c and sdk_config.h into my project and still having issues I figured out that the problem was in my build system (I'm using cmake and gcc). After a diffing I found that I compiled uECC.c but the example did not. For some reason including uECC.c created the DHKEY_FAILURE. Removing it from the sources list has fixed my issue. Just to be sure I added it back in and the DH failures returned.

    Interestingly enough I remember setting up micro-ecc to fix a unresolved symbol error in the past. Perhaps it was required in 14.0.0 but is now unnecessary and in fact detrimental to 14.1.0. Very strange.

    Hopefully if someone else stumbles upon this they won't spend the hours I did on it.

Reply
  • So after copying over the examples main.c and sdk_config.h into my project and still having issues I figured out that the problem was in my build system (I'm using cmake and gcc). After a diffing I found that I compiled uECC.c but the example did not. For some reason including uECC.c created the DHKEY_FAILURE. Removing it from the sources list has fixed my issue. Just to be sure I added it back in and the DH failures returned.

    Interestingly enough I remember setting up micro-ecc to fix a unresolved symbol error in the past. Perhaps it was required in 14.0.0 but is now unnecessary and in fact detrimental to 14.1.0. Very strange.

    Hopefully if someone else stumbles upon this they won't spend the hours I did on it.

Children
No Data
Related