Comment 1 for bug 1970432

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

$ snap download pi-bluetooth

$ cat pi-bluetooth_17.assert
...
type: snap-declaration
format: 1
authority-id: canonical
revision: 3
series: 16
snap-id: MllPrJmz2tNjFQk65iIsHajyVeJDam9a
plugs:
  bluetooth-control:
    allow-auto-connection: true
  hardware-observe:
    allow-auto-connection: true
  network-observe:
    allow-auto-connection: true
publisher-id: GSbfkPqUcv3x9U4u6jLGS94CU6Q9jxyi
...

But the serial-port plug that pi-bluetooth declares is not auto-connected. I created a snap removing the daemon declarations, so bt* are normal commands. I could install it, and then I connected the plugs, including the serial port with:

$ snap connect pi-bluetooth:serial-port pi:bt-serial

Then I could run successfully the commands:

$ sudo pi-bluetooth.btuart
bcm43xx_init
Flash firmware /lib/firmware/brcm/BCM4345C0.hcd
Set Controller UART speed to 3000000 bit/s
Device setup complete
$ sudo pi-bluetooth.bthelper
hci0: Routing SCO packets to HCI

So to fix this we need to ask the store admins to add an auto-connection for the serial port to the snap declaration. Not sure how this was working in the past though.