balena-labs-projects / bluetooth

Optimized bluetooth agent for balenaOS. Based on BlueZ 5.0.
https://hub.balena.io/blocks
23 stars 11 forks source link

Problem when trying to re-pair device after unpairing - balena device retains pairing #28

Open rcooke-warwick opened 2 years ago

rcooke-warwick commented 2 years ago

We have seen problems when trying to re-pair devices: https://github.com/balenalabs/balena-sound/issues/526

To reproduce (pi3, android phone, oneplus 7T):

  1. pair phone to pi
  2. unpair
  3. When my pi3's containers came back online, I was unable to pair to it from my phone, getting couldn't pair with balenaOS 0687 because of an incorrect pin or passkey error.
  4. I ssh'd into the bluetoothcontainer and with bluetoothctl paired-devices i saw: Device 48:01:C5:7B:61:78 OnePlus 7T - so the device was listing my phone as paired, when they were not paired.
  5. I then removed my phone from the bluetooth blocks paired devices list with bluetoothctl remove 48:01:C5:7B:61:78 - I then was able to pair my phone to the pi again!

So it seems like there's a problem with the balena device retaining the other device as being paired, even when its not, which causes some funkyness when that other device tries to re-pair

jellyfish-bot commented 2 years ago

[rcooke-warwick] This issue has attached support thread https://jel.ly.fish/830551c7-b0d6-4016-bcdf-7cb7e906053f

jellyfish-bot commented 2 years ago

[rcooke-warwick] This issue has attached support thread https://jel.ly.fish/17452ac7-ef2b-4552-a872-53e9bc577a34