pi-bluetooth snap cannot install on UC22 beta
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When trying to install pi-bluetooth on UC22 beta images, the btuart service fails to start with the following errors and apparmor denials:
```
Apr 25 22:08:46 ubuntu pi-bluetooth.
Apr 25 22:08:46 ubuntu pi-bluetooth.
Apr 25 22:08:46 ubuntu systemd[1]: snap.pi-
Apr 25 22:08:46 ubuntu systemd[1]: snap.pi-
Apr 25 22:08:46 ubuntu systemd[1]: Failed to start Service for snap application pi-bluetooth.
Apr 25 22:08:46 ubuntu systemd[1]: Stopped Service for snap application pi-bluetooth.
jawn-smith@
[ 0.807741] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[ 147.269834] audit: type=1400 audit(165092512
[ 147.628686] audit: type=1400 audit(165092512
```
Installing the snap with --devmode resolves these errors.
Changed in snapd: | |
status: | New → Confirmed |
$ snap download pi-bluetooth
$ cat pi-bluetooth_ 17.assert 65iIsHajyVeJDam 9a control: auto-connection : true auto-connection : true auto-connection : true u6jLGS94CU6Q9jx yi
...
type: snap-declaration
format: 1
authority-id: canonical
revision: 3
series: 16
snap-id: MllPrJmz2tNjFQk
plugs:
bluetooth-
allow-
hardware-observe:
allow-
network-observe:
allow-
publisher-id: GSbfkPqUcv3x9U4
...
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 brcm/BCM4345C0. hcd bthelper
bcm43xx_init
Flash firmware /lib/firmware/
Set Controller UART speed to 3000000 bit/s
Device setup complete
$ sudo pi-bluetooth.
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.