Tuesday, November 12, 2019

How to make Raspberry Pi 3 Bluetooth work on Arch Linux or Rune Audio

Problem / Outcome Summary

  • This how to guide will show you how to install a working Bluetooth driver for Arch Linux on the Raspberry Pi 3
  • Please see the ‘Summary Overview’ tab below for a high level view of the objectives this ‘how to’ will achieve.

This guide applies to:

  • Arch Linux on Raspberry Pi 3

Why might I want to do this?

  • Because currently Arch Linux does not supply a working bluetooth driver for Raspberry Pi 3
  • Because you want to add Bluetooth Capability to Rune Audio, which uses Arch Linux
  • Just because

Foreword

To be clear, why do I need to do this?

Sometimes distrubutions such as Arch Linux are not able to provide drivers as quickly as the public would like, new hardware comes out all the time and sometimes there are difficulties getting things to work.  It is important to make things work in an official way, which is why this uide uses AUR, the official Arch Linux User Repository.  In this way this should work until such time as Arch makes this official.

Full credit must go to Huulivoide from the Arch Linux User Repositories for creating these modified packages.

Pre-Requisites

Software Dependencies

  • Arch Linux or a derivative

Hardware Dependencies

  • Raspberry Pi 3

Tools Required

  • SSH if you have a headless based Arch Linux system such as Rune or other Arch Linux system

Other Dependencies

  • A working Internet connection

High Level Summary Steps

The below lists the high level summary of steps we’re about to take to get the Raspberry Pi 3 Bluetooth driver working in Arch Linux

  • Install software pre-requisites
  • Install Updated drivers
  • enable updated drivers
  • Test

Implementation

Install software pre-requisites

ssh into your Raspberry Pi 3 or start up a local console

Note that Rune Audio doesn’t really have an ordinary user account which therefore must be created, if you’re doing this on a rune Audio device, please see the next steps specific to Rune Audio.  If you don’t have a rune, just skip these.

Create an ordinary User Account for Rune Audio

# useradd -G wheel -m rune
# nano /etc/sudoers (uncomment the below line by taking the hash out)
# %wheel ALL=(ALL) NOPASSWD: ALL
# passwd rune (then enter your preferred password)
# su rune
$ cd /home/rune, then perform the below steps as this new ordinary user

$ sudo pacman -Syu (Note that this mostly will break Rune Audio, on Rune just omit the u to prevent a full system upgrade)

Install the build essentials

$ sudo pacman -S kernel26-headers file base-devel abs (Press Enter to accept default=all)
Press Y to proceed with installation.  If you get any errors about missing files, sometimes the pacman -Sy command fails, just repeat it and retry.

Arch will now retrieve any necessary package updates and install them.

Get the modified Raspberry Pi files that enable bluetooth

$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/hciattach-rpi3.tar.gz
$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/pi-bluetooth.tar.gz

( note watch your permissions here, for me I ended up downloading as root and doing a chown rune.rune on them to get it to work – Arch seems a bit ‘funky’ at times…

Also – check you have spare disk space ($df -h) if not, follow this disk space article here. You may also need to install the libutil-linux package if you get an fdisk error aka # pacman -Sy libutil-linux

Install updated drivers

$ tar -zxvf hciattach*
$ tar -zxvf pi-blue*
$ cd hciattach-rpi3
$makepkg -cs
Press Y to compile the package
$ sudo pacman -U hciattach-rpi3-5.38.1-armv7h.pkg.tar.xz (or your equivalent version which may change)
Press Y to install this newly compiled package

$ cd ..
$cd pi-bluetooth
$makepkg -cs
Press Y to compile the package
$ sudo pacman -U pi-bluetooth-1-1-armv7h.pkg.tar.xz
Press Y to install the package you just compiled
[spacer color=”429d4a” icon=”fa-angle-double-down” style=”3″]

Enable updated drivers

$ sudo systemctl enable brcm43438.service
$ sudo reboot

Essentially, this guide is now complete, after the reboot we will confirm that.

Test

$ hcitool dev

This command should output something like:

[rune@runeaudio pi-bluetooth]$ hcitool dev

Devices:

hci0 xx:xx:xx:xx:xx:xx

Final Word

You should now have a completely installed, automatically starting, bluetooth module.  The world is your oyster!  Enjoy.

If you have any issues or questions, hit me up in the comment section below.

Marshalleq

Popular Articles

Raspberry Pi 3

Raspberry Pi Disk Images – Definitive List

This page attempts to list all the Raspberry Pi disk images known to currently exist from around the web, providing direct links to download...
Raspberry Pi Audio Hardware

Raspberry Pi audio HAT’s (Hardware Attached on Top) – Definitive List

Summary Back in July 2014, Raspberry Pi announced the then new, Raspberry Pi 2 followed soon after by the announcement of HaTs (Hardware Attached on...
How to set Plex permissions on Linux / NAS devices

How to set Plex permissions on linux or NAS devices

Problem / Outcome SummaryThis how to guide will show you how to properly set up Linux file permissions for Plex Media Server Please...
Plex Media Server

How to install Plex Media Server on Ubuntu Server Headless

This howto will enable you to install the Plex Media Server on Ubuntu Server For how to install Plex Media Server on another...
How to set up Plex on Raspberry Pi 2 or Raspberry Pi 3

How to Install Official Plex Media Player on Raspberry Pi 2 / Pi 3

This ‘How To’ article will show you step by step how to set up and install the official Plex Media Player on a...

Related Stories

Stay on op - Ge the daily news in your inbox