Removing Bluetooth device doesn't remove cache

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:

  1. Power on and pair handsfree 1
  2. Make a call and use the handsfree to see it works OK
  3. Shut down handsfree 1
  4. Remove handsfree 1 from paired devices
  5. Power on and pair handsfree 2
  6. Make a call and use the handsfree to see if it works

EXPECTED RESULT:

  1. No remnants of handsfree 1 in /var/lib/bluetooth/cache
  2. The device works as expected

ACTUAL RESULT:

  1. Obsolete cache item in /var/lib/bluetooth/cache
  2. The call is router to handsfree
  3. It works for a second or two, then disconnects
  4. 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.

Thanks!

3 Likes

Good possible that this is a bluetooth (bluez5) issue unrelated to SFOS version

Jolla-internal bug filed about this. It is a healthy principle to delete the data related to an object after it was removed.

1 Like