-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Pairing Confirmation When Peripheral Does Not Use Secure Connections #592
Comments
There are two levels of prompting that a pairing delegate can participate in:
So it seems that just implementing |
In the case that the I call
For
https://github.com/google/bumble/blob/main/bumble/smp.py#L1800-L1807
|
This is the
This is the one that results in confirmation:
|
It is normal that the |
I'm currently seeing confirmations for initiated pairings when the peripheral has secure connections set (
Shouldn't |
3 and 4 should behave the same, both without confirmation (that's what NOTE: on an Android device, you'll see a pairing acceptance dialog in all cases (whether initiated by the phone or not), because that's a security measure to ensure that you don't have an app-triggered pairing without the user knowing it. That initial confirmation happens before the pairing protocol runs, regardless of the details of the pairing process that happens after (assuming the user accepts). That's the equivalent of the |
Thanks for digging into this @barbibulle . I was able to root cause the issue. The peripheral with Secure Connections set is sending a |
Ok, this makes sense. I can see now that the "security request" support isn't quite complete enough and needs improvement. |
One more quick note: for your specific use case, you probably don't need to wait for this enhancement. You can simply handle the |
Summary
I'm working with two peripherals; one that is running on BLE 5, and one that uses BLE 4. I have
bumble
set up as the Central. On the BLE 5 peripheral, Secure Connections are enabled. On the BLE 4 peripheral they are not. When running a pairing test, thePairingDelegate
gets prompted for user confirmation inon_smp_pairing_random_command_secure_connections()
: https://github.com/google/bumble/blob/main/bumble/smp.py#L1794. This does not happen inon_smp_pairing_random_command_legacy()
: https://github.com/google/bumble/blob/main/bumble/smp.py#L1653.When either peripheral is used with a mobile device (iOS or Android), the mobile device will always prompt the user for confirmation, regardless of if the software initiated pairing (Android).
Request
Would it be possible to have
on_smp_pairing_random_command_legacy()
also prompt for confirmation of pairing when the pairing method isJUST_WORKS
? This would be closer to how pairing is handled on mobile devices where user confirmation is always requested.The text was updated successfully, but these errors were encountered: