Auto-connection request: pi-bluetooth

An upcoming kernel change requires that the pi-bluetooth snap additionally auto-connect the bluetooth-control interface in order to continue working.

In the course of debugging this last week, I also discovered that the bthelper script currently included in the snap was non-functional partly because it also required the network-observe interface to be connected in order for the hcitool binary that it calls to operate successfully.

Would it be possible to add these two interfaces to the set that pi-bluetooth will auto-connect?

For reference:

Some additional context regarding the bluetooth-control connection may be found in LP: #1949869

I wonder what in particular has changed in the kernel to necessitate bluetooth-control? However given that this snap is designed to configure bluetooth on the RPi I don’t believe this is an unreasonable or unexpected request.

+1 from me for auto-connect both bluetooth-control and network-observe for pi-bluetooth. It would be good to know however what changed here so we can understand if other snaps etc may be impacted.

I’ve dug out an IRC message from @juergh who works on the kernel for our Pi based images:

[…] That raspi bluetooth problem is due to a kernel commit that now requires the process that opens the hci device to have the CAP_NET_ADMIN capability. Which doesn’t seem to be the case on core. Do we support bluetooth on core on any other devices than raspi? Because I expect them to fail as well. That commit landed in pretty much every kernel.

I suspect the concern about other devices is unnecessary given bluez already auto-connects bluetooth-control (presumably? I haven’t actually checked that, but would be rather surprised if it weren’t the case), so it’s just pi-bluetooth (as an additional requirement to bluez on the RPi) that requires tweaking.

The kernel commit mentioned was reverted to allow time for this change, but obviously that’s a temporary situation.

Argh, I’m afraid my fat-fingers hit “Solution” on this and now I’m just seeing “500 internal server error” when trying to unmark it; please ignore!

Hey @waveform, apologize for the delay.

+1 from me as well for auto-connect bluetooth-control and network-observe to pi-bluetooth. +2 votes for, 0 votes against, this is now live.