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

Security feature in Bluetooth Protocol of nrf 8001

Hi

I have a module of nrf 8001 and i am successfully communicating with nrf 8001 low energy bluetooth chip. I want to know is there any security feature defined in the protocol of this chip. As i want that whenever a user wants to connect to peripheral through iPhone it must ask for a password before connecting like the normal bluetooth does. Is there any provision for this?

And can i pair any peripheral to iPhone like we do in normal bluetooth? And if it is then how?

Thanks

  • This is correct , If your unique ID is the address of the peripheral, the CBPeripheral suggestion is ok. CBperipheral can be a standin for the the address itself that is is not exposed to the app when it receives advertising packets. You would still need to check that (random static) addresses are all unique if your app absolutely requires them to be unique across all produced devices. However this is not a problem unless you are using the device address for traceability.

    However if you choose to have any other method of unique numbers you would need to store the uniqueness in the app in the first time connection.

    If you choose to use encryption using the ble_proximity_template it would detect the correct iPhone as soon as the link is encrypted, the ACI Pipe Status Event is used to detect this. This encryption is the first step the iPhone does after a connection when the phone has a bond with the device i.e. ACI Connected Event.

    So if you do not want other no other phones to connect, your data is secured as the ACI pipes will never become available until the link is encrypted, so you cannot send/recieve any data on a non-encrypted connection.

    You run a timer for a few seconds (less then 5s) that starts on receipt of ACI Connected Event so if the ACI Pipe in ACI Pipe Status Event does not become available before the timer exipres, you treat the phone as not the correct phone and send an ACI Disconnect (lib_aci_disconnect). Do this only on the connections after the device and phone have been bonded. I.e. connections after ACI Bond Status (Success) has been received.

  • For your application, I'd recommend you to use bonding. Once your device is initially bonded with a Central, you'll receive the Bond Status Event. After this, on each reconnection to this Central, encryption will automatically started, and once it's finished you'll get the Pipe Status Event. I'd therefore recommend you to use a timeout on receiving this event after connecting, and disconnect manually, from the nRF8001 side, if you don't get this event within a couple of seconds after connection. You can do a disconnect with the Disconnect command, as is explained below.

Related