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

PINCODE

Hi everyone,

Somebody knows if its possible and how to configure a Pin code to establish the connection between the nRF51 peripheral and a phone as a central? Something like 4 or 5 digit pass code.

Thanks!

Parents
  • With BLE, it isn't really possible to use a passkey for bonding as long as one of the devices doesn't have a keyboard or display. Table 2.4 in the Bluetooth Core Specification, Volume 3, Part H, section 2.3.5.1 shows which bonding methods are doable depending on the I/O capabilities of the devices in question.

    It could in principle be possible to implement something similar to a passkey in the application, but this could easily become quite complicated, and isn't something I'd normally recommend.

    (Just for completeness: If you have complete control over both ends, you could in principle set both devices to be KeyboardOnly, in which case the table would give Numeric comparison as the method. This means that the user is supposed to enter the same passkey on both devices, and this could in principle then be done by having a static passkey label on one of them and asking the user to enter this on the other device. However, most Central devices (smartphones, tablets, PCs) don't give you such control over the I/O capabilities, making this impossible for most practical use cases.)

  • Thank you very much for the answer.

    I see that is much more complicated than I was thinking. Could you recommend me another way to do something similar? The peripheral to "authorize" the central on the first connection.

Reply Children
No Data
Related