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

how to set the password for connection

Hello everyone

i am trying to set the password for connection whenever its start advertsing but the static passkey option will set the pssword only for bonding not for connection can anyone suggest me how to set the password for paring (connect)

Thank you prabhu

Parents
  • It will set the password for both pairing and bonding, but it seems you are talking about connection establishment.

    It seems you want to filter out connection requests from central devices that doesn't have the password.

    There is no password included in a connection request, so this is not possible directly.

    You can add the addresses/IRKs of the devices you would like to be able to connect to your device by adding them to a whitelist. Then you will only receive connection requests from these devices.

    The other option is to do the filtering in the application. Let the central device connect, then expect it to write the password to a certain characteristic value, and disconnect if the correct password isn't written.

Reply
  • It will set the password for both pairing and bonding, but it seems you are talking about connection establishment.

    It seems you want to filter out connection requests from central devices that doesn't have the password.

    There is no password included in a connection request, so this is not possible directly.

    You can add the addresses/IRKs of the devices you would like to be able to connect to your device by adding them to a whitelist. Then you will only receive connection requests from these devices.

    The other option is to do the filtering in the application. Let the central device connect, then expect it to write the password to a certain characteristic value, and disconnect if the correct password isn't written.

Children
No Data
Related