RPi-Distro / pi-bluetooth

Loads BCM43430A1 firmware on boot
42 stars 34 forks source link

Do not wait for hciuart before staring bluetoothd #4

Closed maxnet closed 6 years ago

maxnet commented 6 years ago

Closes #3

XECDesign commented 6 years ago

Works for me, but there are some things to run by @spl237 and @pelwell, both of whom are away right now.

Aug 09 13:47:20 serge-poehat bluealsa[361]: /usr/bin/bluealsa: No HCI device available
Aug 09 13:47:20 serge-poehat systemd[1]: bluealsa.service: Main process exited, code=exited, status=1/FAILURE
Aug 09 13:47:20 serge-poehat systemd[1]: bluealsa.service: Unit entered failed state.
Aug 09 13:47:20 serge-poehat systemd[1]: bluealsa.service: Failed with result 'exit-code'.
...
Aug 09 13:47:27 serge-poehat bluetoothd[709]: Failed to set privacy: Rejected (0x0b)
...
Aug 09 13:50:10 serge-poehat systemd[1]: Started Raspberry Pi bluetooth helper.
Aug 09 13:50:16 serge-poehat systemd[1]: Started Raspberry Pi bluetooth helper.
Aug 09 13:50:16 serge-poehat bluetoothd[709]: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
Aug 09 13:50:16 serge-poehat bluetoothd[709]: Endpoint registered: sender=:1.4 path=/A2DP/SBC/Source/2
Aug 09 13:50:21 serge-poehat bluealsa[710]: /usr/bin/bluealsa: Unsupported AT message: SET: command:+CLIP, value:1
Aug 09 13:50:21 serge-poehat bluealsa[710]: /usr/bin/bluealsa: Unsupported AT message: CMD: command:+CLCC, value:(null)
Aug 09 13:51:23 serge-poehat bluetoothd[709]: /org/bluez/hci0/dev_08_DF_1F_81_E4_41/fd0: fd(26) ready
Aug 09 13:55:24 serge-poehat systemd[1]: Started Raspberry Pi bluetooth helper.
Aug 09 13:55:30 serge-poehat systemd[1]: Started Raspberry Pi bluetooth helper.
Aug 09 13:55:56 serge-poehat systemd[1]: Started Raspberry Pi bluetooth helper.
Aug 09 13:56:37 serge-poehat systemd[1]: Started Raspberry Pi bluetooth helper.

Looks like mostly problems with bluealsa, but bthelper runs multiple times. there's @hci0 and instances like @hci0:11, which I'm guessing is for each connected device.

EDIT: typo

maxnet commented 6 years ago

Looks like mostly problems with bluealsa, but bthelper runs multiple times. there's @hci0 and instanced like @hci0:11

Strange. Would expect KERNEL=="hci[0-9]*" to only match hci0, hci1, etc.

maxnet commented 6 years ago

My bad, thought udev supported regular expressions. But * means shell style wildcard.

maxnet commented 6 years ago

Aug 09 13:47:20 serge-poehat bluealsa[361]: /usr/bin/bluealsa: No HCI device available

Bluealsa is being run before there is a hci0 due to WantedBy=multi-user.target here: https://github.com/raspberrypi-ui/bluealsa/blob/master/debian/bluealsa.service#L12 You should be able to remove that, as it is already started by udev rule as well: https://github.com/raspberrypi-ui/bluealsa/blob/master/debian/bluealsa.udev

No need to have it started in two different ways.

XECDesign commented 6 years ago

Thanks, Floris. Should show up in the repo shortly.