Skip to content
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

Connecting to the device, then forgetting / removing it on the phone makes the pi unconnectable. #177

Open
DestinyofYeet opened this issue Oct 6, 2024 · 0 comments

Comments

@DestinyofYeet
Copy link

DestinyofYeet commented Oct 6, 2024

Once you connect your phone to the pi and then re-install your phone / forget the device / anything that makes the bluetooth data inconsistent between the pi and the phone makes the pi completely unconnectable.

Connections and their data are stored in /var/lib/bluetooth/<BT-Adapater-Mac>/<device-id> and /var/lib/bluetooth/<BT-Adapter-Mac>/cache/<device-id>, but don't seem to be removed / replaced with new data from the device.

That results in the error message "Couldn't pair with becuase of an incorrect PIN or passkey".

Removing the above directories and then running sudo systemctl restart bluetooth makes the pi reconnectable.

It's possible to replace the keys using bluetoothctl. But idk how to properly integrate it. Maybe it could be stuck into the reconnect script. #7

bluetoothctl
# remove old keys
remove <device-id>
scan on 
# wait for 5 secs
# requires device to be broadcasting it's id AKA Searching for new devices
scan off 
trust <device-id>
connect <device-id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant