Moode Forum
[SOLVED] Unable to use onboard bluetooth on Pi Zero 2 W (due to a defective board) - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [SOLVED] Unable to use onboard bluetooth on Pi Zero 2 W (due to a defective board) (/showthread.php?tid=4597)

Pages: 1 2


Unable to use onboard bluetooth on Pi Zero 2 W (due to a defective board) - jenzd - 12-04-2021

Hi all,

I am running Moode 7.6.0 on a Raspberry Pi 2 W (fresh installation). Everything works fine, except the onboard bluetooth adapter which I haven't managed to activate.

Symptom: After starting the bluetooth renderer, I am no longer able to access the web interface. An external bluetooth adapter connected via USB works fine though.

System info shows:

moOde release = 7.6.0 2021-11-20
RaspiOS = 10.6
Linux kernel = 5.4.77-v7+ #1371
Platform = Pi-Zero 2 W 1.0 512MB
Architecture = armv7l (32-bit)
System uptime = up 10 hours, 1 minute
Timezone = Europe/Berlin
Current time = 2021-12-04 11:32:43
[...]

Onboard WiFi = None
Onboard BT = None


Which is strange since the Pi Zero 2 W should have both onboard Wifi & BT and I am actually using the onboard WiFi interface for the WLAN connection.
Moreover I have seen posts on this forum where other users seem to be using the onboard BT interface ...

Any idea what I am doing wrong?

Thanks & best regards
Jens


RE: Unable to use onboard bluetooth on Pi Zero 2 W - TheOldPresbyope - 12-04-2021

Hi, Jens.

Your issue has two parts to it.

1) the System info report claims there is no WiFi or BT adapter on the Zero 2 W. This information is generated from [ed] knowledge of the board model and, for some, their CPU Revision code. The relevant moOde code hasn't been updated to include the Zero 2 W, which of course contains both adapters.

2) you say you haven't managed to activate the Bluetooth adapter.

---

I just checked my Zero 2 W, also running moOde 7.6.0. I can repro 1) but I can't repro 2). When I enable the Bluetooth renderer on the Audio config screen I see lots of healthy Bluetooth controller activation-related messages in /var/log/syslog and I can pair with my Google Pixel 3a phone.

Regards,
Kent

@Tim Curtis

FYI, cat /proc/cpuinfo returns the final stanza for my Zero 2 W

Code:
Hardware    : BCM2835
Revision    : 902120
Serial        : 00000000xxxxxxxx
Model        : Raspberry Pi Zero 2 Rev 1.0



RE: Unable to use onboard bluetooth on Pi Zero 2 W - Tim Curtis - 12-04-2021

Looks like a bug in sysinfo.sh.

What's the output of the command below on your Zero 2 W ?
Code:
/var/www/command/pirev.py



RE: Unable to use onboard bluetooth on Pi Zero 2 W - TheOldPresbyope - 12-04-2021

(12-04-2021, 02:33 PM)Tim Curtis Wrote: Looks like a bug in sysinfo.sh.

What's the output of the command below on your Zero 2 W ?
Code:
/var/www/command/pirev.py

It looks ok.

Code:
pi@testzero2w:~ $ /var/www/command/pirev.py
0x902120    Zero 2 W    1.0    512MB    Sony UK    BCM2837



RE: Unable to use onboard bluetooth on Pi Zero 2 W - jenzd - 12-04-2021

(12-04-2021, 03:23 PM)TheOldPresbyope Wrote:
Code:
pi@testzero2w:~ $ /var/www/command/pirev.py
0x902120    Zero 2 W    1.0    512MB    Sony UK    BCM2837

I get the same result for /var/command/pirev.py

And this is what actually happens in /var/log/syslog when I switch on the bluetooth renderer:

Code:
Dec  5 00:10:00 test-audio systemd[1]: Starting Configure Bluetooth Modems connected by UART...
Dec  5 00:10:00 test-audio kernel: [  131.589882] uart-pl011 3f201000.serial: no DMA platform data
Dec  5 00:10:30 test-audio btuart[1339]: Initialization timed out.
Dec  5 00:10:30 test-audio btuart[1339]: bcm43xx_init
Dec  5 00:10:30 test-audio systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE
Dec  5 00:10:30 test-audio systemd[1]: hciuart.service: Failed with result 'exit-code'.
Dec  5 00:10:30 test-audio systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
Dec  5 00:10:30 test-audio systemd[1]: Condition check resulted in Bluetooth service being skipped.
Dec  5 00:10:30 test-audio systemd[1]: Condition check resulted in Bluetooth service being skipped.
Dec  5 00:10:30 test-audio systemd[1]: Started BluezAlsa proxy.
Dec  5 00:10:30 test-audio dbus-daemon[331]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.15' (uid=0 pid=1396 comm="/usr/bin/bluealsa -p a2dp-source -p a2dp-sink ")
Dec  5 00:10:30 test-audio dbus-daemon[331]: [system] Activation via systemd failed for unit 'dbus-org.bluez.service': Unit dbus-org.bluez.service not found.
Dec  5 00:10:30 test-audio bluealsa[1396]: /usr/bin/bluealsa: W: Couldn't get managed objects: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit dbus-org.bluez.service not found.



RE: Unable to use onboard bluetooth on Pi Zero 2 W - Tim Curtis - 12-04-2021

Try a fresh 7.6.0 image. The file exists at the location below.

Code:
pi@moode:~ $ stat /var/lib/systemd/deb-systemd-helper-enabled/dbus-org.bluez.service
  File: /var/lib/systemd/deb-systemd-helper-enabled/dbus-org.bluez.service
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: b302h/45826d    Inode: 44911       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-12-02 07:55:44.310775210 -0500
Modify: 2020-12-02 07:41:08.830137566 -0500
Change: 2020-12-02 07:55:44.310775210 -0500
 Birth: -



RE: Unable to use onboard bluetooth on Pi Zero 2 W - TheOldPresbyope - 12-05-2021

Here's a snippet of /var/log/syslog beginning when I clicked "Set" to enable the BT renderer:

Code:
Dec  4 19:10:36 testzero2w bluetoothd[2009]: Bluetooth daemon 5.50
Dec  4 19:10:36 testzero2w systemd[1]: Started Bluetooth service.
Dec  4 19:10:36 testzero2w systemd[1]: Starting Raspberry Pi bluetooth helper...
Dec  4 19:10:36 testzero2w bluetoothd[2009]: Starting SDP server
Dec  4 19:10:36 testzero2w kernel: [  192.899339] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Dec  4 19:10:36 testzero2w kernel: [  192.899351] Bluetooth: BNEP filters: protocol multicast
Dec  4 19:10:36 testzero2w kernel: [  192.899370] Bluetooth: BNEP socket layer initialized
Dec  4 19:10:36 testzero2w bluetoothd[2009]: Bluetooth management interface 1.14 initialized
Dec  4 19:10:36 testzero2w dbus-daemon[308]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.15' (uid=0 pid=2009 comm="/usr/sbin/bluetoothd --noplugin=sap ")
Dec  4 19:10:36 testzero2w systemd[1]: Starting Hostname Service...
Dec  4 19:10:36 testzero2w systemd[1]: Started BluezAlsa proxy.
Dec  4 19:10:36 testzero2w bluetoothd[2009]: Endpoint registered: sender=:1.16 path=/org/bluez/hci0/A2DP/SBC/Source/1
Dec  4 19:10:36 testzero2w bluetoothd[2009]: Endpoint registered: sender=:1.16 path=/org/bluez/hci0/A2DP/SBC/Source/2
Dec  4 19:10:36 testzero2w bluetoothd[2009]: Endpoint registered: sender=:1.16 path=/org/bluez/hci0/A2DP/SBC/Sink/1
Dec  4 19:10:36 testzero2w bluetoothd[2009]: Endpoint registered: sender=:1.16 path=/org/bluez/hci0/A2DP/SBC/Sink/2
Dec  4 19:10:36 testzero2w dbus-daemon[308]: [system] Successfully activated service 'org.freedesktop.hostname1'
Dec  4 19:10:36 testzero2w systemd[1]: Started Hostname Service.
Dec  4 19:10:38 testzero2w systemd[1]: Started Raspberry Pi bluetooth helper.
Dec  4 19:10:38 testzero2w bthelper[2055]: Raspberry Pi BDADDR already set
Dec  4 19:10:38 testzero2w bthelper[2055]: Changing power off succeeded
Dec  4 19:10:38 testzero2w kernel: [  195.096020] debugfs: File 'le_min_key_size' in directory 'hci0' already present!
Dec  4 19:10:38 testzero2w kernel: [  195.096041] debugfs: File 'le_max_key_size' in directory 'hci0' already present!
Dec  4 19:10:38 testzero2w bthelper[2055]: [#033[0;93mCHG#033[0m] Controller B8:27:EB:04:B0:0F Class: 0x000c041c
Dec  4 19:10:38 testzero2w bthelper[2055]: Changing power on succeeded
Dec  4 19:10:38 testzero2w systemd[1]: bthelper@hci0.service: Succeeded.
Dec  4 19:10:41 testzero2w systemd[1]: systemd-rfkill.service: Succeeded.



RE: Unable to use onboard bluetooth on Pi Zero 2 W - jenzd - 12-05-2021

(12-04-2021, 11:33 PM)Tim Curtis Wrote: Try a fresh 7.6.0 image. The file exists at the location below.

Code:
pi@moode:~ $ stat /var/lib/systemd/deb-systemd-helper-enabled/dbus-org.bluez.service
  File: /var/lib/systemd/deb-systemd-helper-enabled/dbus-org.bluez.service
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: b302h/45826d    Inode: 44911       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-12-02 07:55:44.310775210 -0500
Modify: 2020-12-02 07:41:08.830137566 -0500
Change: 2020-12-02 07:55:44.310775210 -0500
 Birth: -

Tried again with a fresh 7.6.0 image (double checked MD5 checksum) using rufus to transfer the image to the SD card. No additional devices connected to the Raspberry Pi - only the official power supply. And did exactly the following:

1) Connect to the device via WLAN (AP mode - SSID "Moode").
2) Open a ssh session to 172.24.1.1 and run "tail -f /var/log/syslog" to watch the log.
3) Switch on bluetooth renderer via web interface.

Result: I got the same error messages as already posted.

Code:
Dec  5 02:28:42 moode systemd[1]: Starting Configure Bluetooth Modems connected by UART...
Dec  5 02:28:42 moode kernel: [  651.551453] uart-pl011 3f201000.serial: no DMA platform data
Dec  5 02:29:12 moode btuart[1759]: Initialization timed out.
Dec  5 02:29:12 moode btuart[1759]: bcm43xx_init
Dec  5 02:29:12 moode systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE
Dec  5 02:29:12 moode systemd[1]: hciuart.service: Failed with result 'exit-code'.
Dec  5 02:29:12 moode systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
Dec  5 02:29:12 moode systemd[1]: Condition check resulted in Bluetooth service being skipped.
Dec  5 02:29:13 moode systemd[1]: Condition check resulted in Bluetooth service being skipped.
Dec  5 02:29:13 moode systemd[1]: Started BluezAlsa proxy.
Dec  5 02:29:13 moode dbus-daemon[305]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.15' (uid=0 pid=1817 comm="/usr/bin/bluealsa -p a2dp-source -p a2dp-sink ")
Dec  5 02:29:13 moode dbus-daemon[305]: [system] Activation via systemd failed for unit 'dbus-org.bluez.service': Unit dbus-org.bluez.service not found.
Dec  5 02:29:13 moode bluealsa[1817]: /usr/bin/bluealsa: W: Couldn't get managed objects: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit dbus-org.bluez.service not found.

By the way I also had a look at
Code:
stat /var/lib/systemd/deb-systemd-helper-enabled/dbus-org.bluez.service

which exists and shows the same result as you posted above.

Very strange. Maybe I have a defect device?


RE: Unable to use onboard bluetooth on Pi Zero 2 W - TheOldPresbyope - 12-05-2021

Oops, I wasn't paying attention to how I captured my previous snippet and left off the beginning messages related to BT hardware initialization.

Here's the missing bits (different boot/test but same configuration as before)

Code:
Dec  5 07:53:30 testzero2w systemd[1]: Starting Configure Bluetooth Modems connected by UART...
Dec  5 07:53:30 testzero2w kernel: [  627.743375] uart-pl011 3f201000.serial: no DMA platform data
Dec  5 07:53:36 testzero2w kernel: [  633.185900] Bluetooth: Core ver 2.22
Dec  5 07:53:36 testzero2w kernel: [  633.186006] NET: Registered protocol family 31
Dec  5 07:53:36 testzero2w kernel: [  633.186017] Bluetooth: HCI device and connection manager initialized
Dec  5 07:53:36 testzero2w kernel: [  633.186047] Bluetooth: HCI socket layer initialized
Dec  5 07:53:36 testzero2w kernel: [  633.186065] Bluetooth: L2CAP socket layer initialized
Dec  5 07:53:36 testzero2w kernel: [  633.186097] Bluetooth: SCO socket layer initialized
Dec  5 07:53:36 testzero2w kernel: [  633.198897] Bluetooth: HCI UART driver ver 2.3
Dec  5 07:53:36 testzero2w kernel: [  633.198917] Bluetooth: HCI UART protocol H4 registered
Dec  5 07:53:36 testzero2w kernel: [  633.199034] Bluetooth: HCI UART protocol Three-wire (H5) registered
Dec  5 07:53:36 testzero2w kernel: [  633.199338] Bluetooth: HCI UART protocol Broadcom registered
Dec  5 07:53:36 testzero2w btuart[1621]: bcm43xx_init
Dec  5 07:53:36 testzero2w btuart[1621]: Flash firmware /lib/firmware/brcm/BCM43430B0.hcd
Dec  5 07:53:36 testzero2w btuart[1621]: Set BDADDR UART: b8:27:eb:04:b0:0f
Dec  5 07:53:36 testzero2w btuart[1621]: Set Controller UART speed to 3000000 bit/s
Dec  5 07:53:36 testzero2w btuart[1621]: Device setup complete
...remainder is the same as I posted previously, beginning with
...Starting Configure Bluetooth Modems connected by UART

Your log includes messages I don't see


Code:
Dec  5 02:29:12 moode btuart[1759]: Initialization timed out.
Dec  5 02:29:12 moode btuart[1759]: bcm43xx_init
Dec  5 02:29:12 moode systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE


I don't know a good way to test the hypothesis that the BT transceiver (or supporting firmware) on your board is defective.

Incidentally, I noticed you ran your test with moOde in AP mode. I repeated my test in this mode just to be sure the hostapd package isn't interfering somehow. On my system, at least, it isn't.

Searching the InterWeb™ on the error messages turned up all sorts of hits but the ones I read dealt with different circumstances and different hardware and didn't cause the penny to drop for me. Maybe they would for someone else.

Regards,
Kent


RE: Unable to use onboard bluetooth on Pi Zero 2 W - Tim Curtis - 12-05-2021

Maybe try the official Raspberry Pi imager
https://www.raspberrypi.com/news/raspberry-pi-imager-imaging-utility/