Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NFC BLE pairing issues

Hi,

Can anyone check if my understanding about this NFC-BLE pairing feature is correct?

1.Before connecting, two BLE devices will exchange some keys or info for secure communication, this step is called pairing.

2.If the pairing info (keys etc.) is stored, it is called bonded. Next time two bonded devices can directly get connected without pairing.

3.On smartphones under setting->bluetooth, My Devices or Paired Devices actually means 'bonded' (not necessarily connected).

4.The 'ble_nfc_pairing_reference' example will start a pairing request on the phone, like what it's said on infocenter , but the LED will switch to BSP_INDICATE_CONNECTED(led1 always on) state if we confirm the pairing request on phone, to get further connected, we need to use the app nRF Connect (smartphone built in Bluetooth cannot directly connect to this example).

5.If the bonded info on the phone is deleted, this example won't work (cannot paired with smartphone again by touching NFC) until the stored info on the board is cleared by a reset.

6.The 'ble_nfc_pairing_reference' example can only pair the board with the smartphone. We can't connect the device by NFC without other implementation.

Please correct me if I misunderstand any concept. Thanks.

Parents
  • Hi

    1. Correct.

    2. Correct.

    3. Yes, on some phones it's called paired devices rather than bonded devices once bonded.

    4. Depending on the phone you have, the Bluetooth settings can connect over NFC pairing as well I think. Or that you can be prompted to do use the "regular" Bluetooth settings in some phones.

    5. Correct. Same goes if the bonding information is removed from the nRF device and not the phone. Then the phone won't be able to connect because it thinks it is bonded already.

    6. I'm not sure I understand what you're asking here. It's not restricted to connect to a smartphone, as you could make a device of your own with an NFC reader and a BLE device that is able to connect and pair to this device.

    Best regards,

    Simon

Reply
  • Hi

    1. Correct.

    2. Correct.

    3. Yes, on some phones it's called paired devices rather than bonded devices once bonded.

    4. Depending on the phone you have, the Bluetooth settings can connect over NFC pairing as well I think. Or that you can be prompted to do use the "regular" Bluetooth settings in some phones.

    5. Correct. Same goes if the bonding information is removed from the nRF device and not the phone. Then the phone won't be able to connect because it thinks it is bonded already.

    6. I'm not sure I understand what you're asking here. It's not restricted to connect to a smartphone, as you could make a device of your own with an NFC reader and a BLE device that is able to connect and pair to this device.

    Best regards,

    Simon

Children
  • Thanks a lot!

    About Q6 and the second half of Q4, I mean some (I guess most) smartphones(I tried with HuaweiP30, iPhone12 and one model of Samsung) cannot directly connect to the nRF. After pairing, nRF will show in the Paired Devices list but not connected, if you click to connect it will say something like 'This device needs its app to connect'. So if I wanna build an app like nRF Connect to connect the board, I need to implement the process between 'after pairing' and 'connected', right? 

  • Yes, it's a good idea to make a specific app on the phone side that know how and what it wants to connect/pair to a device. The nRFConnect app specifically is not open-source I'm afraid, but the Android BLE library it is built on is open source, and available here.

    Best regards,

    Simon

    PS: Since you have "verified" my answer, I don't get notifications on updates on this case as it is considered "resolved", so it was a coincidence that I saw your follow-up question.

Related