Closed marco95thb closed 1 month ago
You can't. This is just how BLE works. A non encrypted characteristic will not request pin. Only way to pair/bond is to request to read/write an encrypted characteristic.
I think what you really want is not that, rather whitelisting. But I have found that certain devices are ridiculously buggy with regards to that.
This can be done by calling NimBLEDevice::startSecurity
in the onConnect callback.
Hi, I added the PIN protection to a single characteristic thanks to the issue https://github.com/h2zero/NimBLE-Arduino/issues/158 but I want to protect with PIN the entire connection. Now I'm connecting with BLE scanner, and when I try to read the app is asking me for the password. What I want to achieve is that the APP asks me for password when I try to connect. How can I implement the PIN code onConnection and not on characteristic reading?
Thanks, Marco