Bluetooth powered on on boot

I have bluetooth working, and am able to pair and communicate with devices on my snappy core pc, but am not able to get the pc to boot with the bluetooth module in the powered on state.
Currently I’m required to start bluetoothctl and power on the device each boot. Is there a configuration option in bluetoothctl or the core snap to have the bluetooth module powered on on boot?

Perhaps @koza has an idea here … i would have thought the bluez snap saves the state on reboots…

If bluez saves the state on reboot it would be fine, but I’d still prefer a way to have bluetooth on automatically on first boot. Most of what I’ve been able to find online for how to do this doesn’t seem to apply to running in snaps.

It may be there is something deeper within my image that is causing the issue too. In trying to resolve this problem I saw that bluetooth defaulting to off wasn’t uncommon for server of non GUI distributions so I wanted to check if this was a simple configuration option.

I think I’m seeing other behavior that may be related, but am unsure. Much of what I saw suggested using:

sudo hciconfig hciX up

to enable the bluetooth module. This always returns:

Can't open HCI socket.: Permission denied

The snap service that utilizes the bluetooth fails to run with the message:

[error][daemon] 'hcitool clock' returned error. Make sure your bluetooth device is powered up with 'hciconfig hciX up'

Once the power on command is issued through bluetoothctl, the ds4drv service works as expected.

Hey, I have been away on a conference for the whole past week thus missed this one however let me answer this question soon. @cratliff stay tuned!

There is “AutoEnable” boolean parameter in the bluez configuration file available which should fix this. Not sure why it happened but it is not shipped with bluez snap. I will create a bug about it and will find out.

@cratliff as for now it is required to ‘power on’ the adapter.

1 Like

Thanks for looking into it. That was one of the suggestions I saw to fix it, but the file did not exist and could not be created in the expected location.
Could you post the link to the logged bug so I can follow it? Thanks.

@cratliff Here you go https://bugs.launchpad.net/snappy-hwe-snaps/+bug/1706649

This bug still exists? So there’s no way to have bluetooth turned on automatically on startup? Seems like this is crucial for many embedded system applications…