Bluetooth on Archlinux on the Pi Zero W

Bluetooth doesn’t work out the box for Archlinux but thankfully a helpful user has created packages to support the Pi 3 which also work on the Zero W (see forum post). There’s a couple of caveats to getting them working I’ll step through.

First install bluez and bluez-utils older than 5.44 - you must get them from an archive. The reason being hcitool is required and it’s been dropped from bluez 5.44.

$ wget http://tardis.tiny-vps.com/aarm/packages/b/bluez/bluez-5.43-2-armv6h.pkg.tar.xz
$ wget http://tardis.tiny-vps.com/aarm/packages/b/bluez-utils/bluez-utils-5.43-2-armv6h.pkg.tar.xz
$ sha256sum bluez-*.pkg.tar.xz
d32a759d4e4d7904de95b432249a68b414b4ebc818996dec5d3b8830a191e37d  bluez-5.43-2-armv6h.pkg.tar.xz
5017487e5544dc781aadd9ee87a2538182b613f02026a9a46d33435b88f3ca0d  bluez-utils-5.43-2-armv6h.pkg.tar.xz
$ sudo pacman -U bluez-*.pkg.tar.xz

Also you’ll want to edit /etc/pacman.conf adding:

IgnorePkg = bluez bluez-utils

This ensures they aren’t inadvertently upgraded.

Next install hciattach-rpi3 and pi-bluetooth, you need base-devel too:

$ sudo pacman -S base-devel
$ packer -S hciattach-rpi3
$ packer -S pi-bluetooth

At the prompt to edit PKGBUILD for both packages, say yes, and you need to add armv6h to the arch setting (I’ve notified the maintainer)

Note: arch in the packages has been fixed now

These will take a while to build on the humble little Pi Zero.

Now enable/start the services:

$ sudo systemctl enable --now bluetooth brcm43438

And finally you’ll need to manually bring up the bluetooth interface (there’s an issue where it doesn’t appear at power on, the workaround is to run this manually):

$ sudo hciconfig hci0 up

Verify it’s working:

$ hcitool scan

Comments

blogroll

social