I would like to use the Bluetooth functionality of the Raspberry Pi Zero W which is part of the RAK 7246 gateway but it seems to be disabled. Even after enabling in the boot configuration it isn’t available. I fear that the ports are shared with the LoRa hat. Is there any chance to get Bluetooth working?
Remove the line
"dtoverlay = disable-bt" from /boot/config.txt.
I’ve done that and rebooted afterwards. But no change.
[email protected]:~# lsmod | grep bt btbcm 16384 0 bluetooth 409600 8 bnep,btbcm [email protected]:~# lsmod | grep blu bluetooth 409600 8 bnep,btbcm ecdh_generic 28672 1 bluetooth rfkill 28672 6 bluetooth,cfg80211 [email protected]:~# dmesg | grep Blue [ 232.376504] Bluetooth: Core ver 2.22 [ 232.376767] Bluetooth: HCI device and connection manager initialized [ 232.376796] Bluetooth: HCI socket layer initialized [ 232.376811] Bluetooth: L2CAP socket layer initialized [ 232.376877] Bluetooth: SCO socket layer initialized [ 245.702938] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 245.702953] Bluetooth: BNEP filters: protocol multicast [ 245.702985] Bluetooth: BNEP socket layer initialized [email protected]:~# systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2020-05-15 12:39:51 BST; 3min 26s ago Docs: man:bluetoothd(8) Main PID: 799 (bluetoothd) Status: "Running" Memory: 2.9M CGroup: /system.slice/bluetooth.service └─799 /usr/lib/bluetooth/bluetoothd May 15 12:39:50 rak-gateway systemd: Starting Bluetooth service... May 15 12:39:51 rak-gateway bluetoothd: Bluetooth daemon 5.50 May 15 12:39:51 rak-gateway systemd: Started Bluetooth service. May 15 12:39:51 rak-gateway bluetoothd: Starting SDP server May 15 12:39:51 rak-gateway bluetoothd: Bluetooth management interface 1.14 initialized [email protected]:~# systemctl status hciuart ● hciuart.service - Configure Bluetooth Modems connected by UART Loaded: loaded (/lib/systemd/system/hciuart.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2020-05-15 12:42:13 BST; 1min 6s ago Process: 894 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE) May 15 12:41:43 rak-gateway systemd: Starting Configure Bluetooth Modems connected by UART... May 15 12:42:13 rak-gateway btuart: Initialization timed out. May 15 12:42:13 rak-gateway btuart: bcm43xx_init May 15 12:42:13 rak-gateway systemd: hciuart.service: Control process exited, code=exited, status=1/FAILURE May 15 12:42:13 rak-gateway systemd: hciuart.service: Failed with result 'exit-code'. May 15 12:42:13 rak-gateway systemd: Failed to start Configure Bluetooth Modems connected by UART. [email protected]:~# grep bt /boot/config.txt #dtoverlay=disable-bt [email protected]:~# hcitool dev Devices: [email protected]:~#
Here introduces the use of Bluetooth through the bluetoothctl tool, I think you can try it.
Another idea would be to temporarily put in a different uSD card with a stock Raspbian or whatever and try all your experiments on that first without it trying to be a gateway. If you get bluetooth working there, then you know that there’s an issue of different configuration between the OS images, and you can try to identify the issue. But if it doesn’t work on a stock image, then the problem is likely a mistake in the attempt to use bluetooth…
Worst case you could also start with a stock image and follow the many instructions for turning a pi into a gateway.
That is a good idea, will try that and report back (will take some time!)