REPRODUCIBILITY: unknown%
BUILD ID = OS VERSION: 4.1.0.24
HARDWARE: XA2 Ultra
UI LANGUAGE: Finnish
REGRESSION: no (probably)
DESCRIPTION:
Removing paired Bluetooth device doesn’t remove cache item from /var/lib/bluetooth/cache which can lead to confusion.
PRECONDITIONS:
Have two identical handsfrees at hand
STEPS TO REPRODUCE:
Power on and pair handsfree 1
Make a call and use the handsfree to see it works OK
Shut down handsfree 1
Remove handsfree 1 from paired devices
Power on and pair handsfree 2
Make a call and use the handsfree to see if it works
EXPECTED RESULT:
No remnants of handsfree 1 in /var/lib/bluetooth/cache
The device works as expected
ACTUAL RESULT:
Obsolete cache item in /var/lib/bluetooth/cache
The call is router to handsfree
It works for a second or two, then disconnects
The Bluetooth device is connected but the call can’t be routed to it
ADDITIONAL INFORMATION:
After step 5) there are two files in /var/lib/bluetooth/cache folder with different MAC addresses and same name (tested with JBL TUNE750BTNC). Removing device 2 and re-pairing it doesn’t fix the issue.
I fixed the issue by removing all Bluetooth devices, turning off Bluetooth, clearing all files from the cache dir, powering on Bluetooth and pairing the device once again. Removing only the device may well be enough though, I just didn’t bother grepping the files using the on screen keyboard.
This is likely not a regression but a long time bug. I remember hitting the same bug (or close) in Sailfish 3.x and clearing the cache did the trick.
An educated but still blind suggestion: purge the cache directory of non-paired devices when Bluetooth is turned on.
cache files are still not removed on 4.4.0.68 ( the cache path is /var/lib/bluetooth/xx:xx:xx:xx:xx:xx/cache where xx:xx:xx:xx:xx:xx is the BT mac address of the phone)
I had to manually remove “orphan” entries for the phone to work again with the car.
Otherwise the car was displaying empty ("") phone name after pairing and connection would work only once. For it to re-connect I had to remove pairing on both car and phone then re-pair
unfortunately this is how the linux bluetooth stack is working. I am not sure if this request is here at the right place and if someone would take care of filing your request to the bluez development team.
But you can not request something like this in that way. If it works for you, it doesn’t mean it is good for me. Perhaps sometimes this cache is needed and reused. I do not think this or the other is the better way. May be there should be an option to remove cache if desired, when you delete the device and you decide what to do with the cache.
I experienced a same behaviour with a deleted company WLAN-Accesspoint. After removing the white dot (enable/disable) it comes up and connected next time. Then i use the “Forget Network”, still the same. I had to do it at home, then it worked.