6 years, 6 months ago.

BLE Authentification

Hi,

I'm using ble-EddystoneService exemple for Nrf 52832 and i want to add an authentification for the person who connects. there are an exemple of Mbed authentifaction ?

Thank's for your help.

Hi Jan, thank you for your reply iit's very useful. I also want to ask if it is possible to creat a service who countain one characteristic called Password for exemple and if i don't writ the password if this characteristic and can't read or writ characteristic of the other's Services. If yes how i do that. Thant you.

posted by Zakaria AIT BOUALI 28 Sep 2017

1 Answer

6 years, 6 months ago.

There's multiple ways to add security.

  1. Secure the pairing with the SecurityManager. An example app is here (it's mbed 2, but I think the API is still the same).
  2. Secure characteristics by calling requireSecurity (see here).

Accepted Answer

Hi,

Thank's for your answer, when i added SecurityManager and initializeSecurity for a passkey. this is what i get : _ i can connect with the target. _ when i wan't to read or write data from the the secure service the ask me to associate with the Bleutooth. _ When I want to associate with it, first i can't find the Passkey and it's mentioned either 0000 or 1234. But the len of passkey is 6 and all passkey don't work. It's normal. Thank's again.

posted by Zakaria AIT BOUALI 27 Sep 2017

You can set the passcode on device through init method of SecurityManager (fourth argument). By default it generates random passcode which you can see on device by attaching on the onPasskeyDisplay function.

posted by Jan Jongboom 27 Sep 2017

Hi Jan, thank you for your reply iit's very useful. I also want to ask if it is possible to creat a service who countain one characteristic called Password for exemple and if i don't writ the password if this characteristic and can't read or writ characteristic of the other's Services. If yes how i do that. Thant you.

posted by Zakaria AIT BOUALI 28 Sep 2017

Maybe you can remove requireSecurity when the right valid is written to the characteristic, but I'm not sure.

posted by Jan Jongboom 28 Sep 2017