-
Notifications
You must be signed in to change notification settings - Fork 6
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
Problem resolving a previously bound device's random address to its public address after a reboot. #1
Comments
I don't own an iOS device so can't test this, but you might look into:
E.g. https://stackoverflow.com/a/22313844 or for the lecc options https://devzone.nordicsemi.com/f/... |
This continues to be an issue in version 2 of blePeripheral as I think it is an unresolved issue with the Raspberry Pi firmware. The workaround continues to be to restart bluetooth on the Pi after a reboot. |
I am also getting the "Failed to set mode" errors. I have tried restarting bluetooth on the Pi after a reboot but the errors still persist. sudo systemctl status bluetooth Jun 24 20:47:58 securetrans bluetoothd[483]: Excluding (cli) hostname |
If you reboot the Raspberry Pi, and the random address of a bound device (iPad in this example) changes, that device can no longer read or write a secure characteristic.
Symptom 1) The buetoothd daemon has an error during boot, the easiest way to see it is to issue a
sudo systemctl status bluetooth
. There will be three errors just after the initialized line:Symptom 2) When your iPhone connects the
sudo btmon
log doesn't show any errors. It just doesn't resolve the iPhone's random address back to public as it did before the reboot. Here is a screen shot of what that looks like:Symptom 3) When you iPhone tries to access a secure characteristic it gets an Insufficient Encryption error and then makes a LE Long Term Key Request. BlueZ responds with LE Long Term Key Request Neg Reply as shown below:
Workaround
If you restart bluetootd after a reboot
sudo systemctl restart bluetooth
this all goes away. The address will be resolved correctly. In the following screen shot of the log fromsudo btmon
you can see my iPad's random address B4:F6:1C:53:EF:B3 gets correctly resolved to its public address of B4:F6:1C:53:EF:B3.I don't think this problem has anything to do with my node app. It has something to do with BlueZ and the Raspberry Pi. Looking for pointer on where to focus my troubleshooting efforts!
The text was updated successfully, but these errors were encountered: