MAC address remnant after device unpairing

I have a balena sound fleet with 1 device (a RPi3 B+) running balenaOS 2.83.21+rev1. The way I intend to use this device primarily is via Bluetooth. I have successfully paired and connected multiple devices to this RPi several times and all of them produce audio - no problem. However, there was a point in its trajectory when I noticed that sometimes the balenaOS device doesn’t show up in the list of available devices - and even when it does, I am unable to pair any device.

After some digging (i.e. checking the list of connected devices in the bluetoothctl by issuing the command paired-devices) I noticed that the devices that I had previously unpaired were still listed with their MAC addresses as if they were still paired. So I thought, that would explain why a device that is already listed as paired would NOT be able to create a new pairing connection. Whenever I remove a Bluetooth device from its settings, I notice in the bluetoothctl console that it issues a paired-devices command and the list of devices that are paired includes the device I just unpaired. I am able to remove the devices manually in the terminal, but this feels rather laborious if I ever want to unpair a device.

Just some extra context: In my troubleshooting steps, I have tried both WiFi and ethernet connections, I am currently using an ASUS bluetooth USB dongle and have tried with and without, I have tried different PSUs that are all rated for 2.5 amps, and I have done enough reboots and service restarts that I’ve lost count. And, of course, I have tried unpairing bluetooth devices which is how this all started.

I guess my question is whether or not this is a known issue or if there is some other way to troubleshoot that I’m not aware of?

TL;DR Bluetooth pairing/connectivity status on the balenaOS side is unreliable - showing devices are still paired after they have been unpaired - and causes moderate annoyance.

Hi @jeliot,

Thanks for reporting this. Your assessment is 100% correct, this is a bug and I wasn’t aware of it (I’m the lead dev for balenaSound). If you don’t mind, can you submit this as a GitHub issue here Sign in to GitHub · GitHub ? I can do it too if you don’t have an account too.

I went ahead and created the issue here: bluetooth: unreliable bluetooth pairing status on balenaSound · Issue #526 · balenalabs/balena-sound · GitHub. I’ll see if I can reproduce and fix soon.