[3.4.0 onwards] Bluetooth turning on doesn't work

In my case, the main problem with turning off bluetooth was, that the hciattach process could not be closed by bluetooth-rfkill-event.

Okt 31 11:34:34 Sailfish bluetooth_rfkill_event[654]: free_hci(bluetooth_rfkill_event.c:906): killing hciattach failed

If the process hciattach was ended manually after switching off the bluetooth (kill -15 hciattach), the reactivation of bluetooth worked without any problems.

The reason why the hciattach process cannot be closed by bluetooth-rfkill-event is likely following:
The bluetooth_rfkill_event uses the command ‘killall --wait hciattach’ to end the hciattach process.
Because of the switch to BusyBox, the killall command from BusyBox is used instead of the killall command from the psmisc-tools package.
However, the BusyBox ‘killall’ command does not support the ‘–wait’ option, so it generates an error and will not be executed.

As a workaround, I installed the psmisc-tools package.

devel-su pkcon remove busybox-symlinks-psmisc

The hciattach process is now correctly terminated by bluetooth-rfkill-event

Okt 31 17:28:38 Sailfish bluetooth_rfkill_event[10297]: free_hci(bluetooth_rfkill_event.c:906): killing hciattach succeeded

Switching Bluetooth on and off now works properly again.

Tested on Xperia X (F5121) Sailfish 4.2.0.21 (Verla)

12 Likes