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

how to use button press for authentication?

Hi, Is it possible to use button press(button on slave) as an authentication key to establish the connection. Since our device does not have an display or keyboard, we are planning to use the button press as a permission for the master to connect with the device. If it is not possible suggest me alternative ways, which can make easy authentication.

Regards, Balaji

  • Hi Balaji

    I guess there are several ways to do something like that. For instance, you can start advertising only when you press the button, but then the device won't even be discoverable unless you press the button.

    You might also be able to switch from non-connectable to connectable advertising when pressing the button, if you want the device to be discoverable also when the button is not pressed.

    Please keep in mind that this wouldn't make the connection process much safer, you are still vulnerable to 'man in the middle' attacks unless you use a passkey.

    Someone else should probably chime in here, but I think it is possible to show a passkey on the master side, and have the slave acknowledge it when you press the button. This might be a way to support passkey pairing without a display or keyboard on the slave, but I am not sure.

    Best regards Torbjørn

  • Thank you for the reply Torbjorn, as you said we are k with switching between non connectable to connectable advertising mode, If possible please tell us how to implement it.

Related