[SOLVED] how to use Bluetooth on Pi3/Zero with bluez5.44+?

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

[SOLVED] how to use Bluetooth on Pi3/Zero with bluez5.44+?

Postby keithspg » Sat Apr 07, 2018 2:24 pm

There are numerous posts and pages describing how to enable hcitool to use the native BT module on the Pi 3/Zer0. How about a post showing just how to load the firmware or driver so you can use the current Bluez5? I have searched and cannot find anything succinct. The most in-depth articles are these, but I have not figured out how to just get the module out of this so it is available to bluetoothd.
http://rpmfind.net/linux/RPM/sourceforge/f/fe/fedberry/releases/27/packages/armhfp/stable/bcm43438-firmware-20160627-2.a7491de.fc27.noarch.html
http://projects-raspberry.com/connect-bluetooth-headset-raspberry-pi-3-a2dp-hsp/
Last edited by keithspg on Wed Apr 11, 2018 2:16 pm, edited 1 time in total.
keithspg
 
Posts: 26
Joined: Mon Feb 23, 2015 4:14 pm

Re: how to use Bluetooth on Pi3/Zero with bluez5?

Postby keithspg » Wed Apr 11, 2018 1:53 am

Ok, so I spent a lot more time researching this and, to the best that I can understand, the bluetooth device needs to have the firmware loaded before it can become available and the only way this has been done previously is with the hcitool and bluez <5.44. So, how might this be done with bluez=>5.44? I'd rather not downgraded bluez just for this hack. I tried just putting the hcd file in the /lib/firmware/brcm folder, but still no notice of a bluetooth device in the boot messages.

Any hints, here? All the howtos are with an old version of bluez and most seem to be concerned about using uart. I'm interested in keyboards, mice and speakers (a2dp) and would like to use the onboard hardware as opposed to a BT dongle...
keithspg
 
Posts: 26
Joined: Mon Feb 23, 2015 4:14 pm

Re: how to use Bluetooth on Pi3/Zero with bluez5?

Postby keithspg » Wed Apr 11, 2018 2:16 pm

I think I finally figured this out. I hope this helps someone. Install Bluez. Then modify the PKGFILE and build and install bluez-utils-compat(AUR) then modify, slightly, the pi-bluetooth(AUR) and build it.
bluez-utils-compat does not list armv6h, but, just edit the PKGFILE and add it to the architectures list it will build successfully.
The PKGFILE for pi-bluetooth needs a bit more help. First edit the .service file to change "hciattach-rpi3" to "hciattach", delete the *.rules file and the references to it.

Installs and works on a PiZero. Will be testing on a Pi3 tonight

Code: Select all
# Maintainer: Jesse Jaara <jesse.jaara: gmail.com>
# edited to use generic hciattach to be compatible with
# bluez-utils-compat (AUR) - kg

pkgname=pi-bluetooth
pkgver=1
pkgrel=1
pkgdesc="Services, firmware and udev rules to get integrated bluetooth running in Raspberry Pi 3"
arch=('armv6h' 'armv7h' 'aarch64')
url=""
license=('multiple')
depends=('bluez-utils-compat')
install=pi-bluetooth.install
source=(BCM43430A1.hcd
        brcm43438.service
        LICENCE.broadcom_bcm43xx)
md5sums=('b95ee9032a723daa25ab9608a515e984'
        'a06149bb47486629f71e9370051a35a9'
        '3160c14df7228891b868060e1951dfbc')

package() {
  cd "${srcdir}"

  mkdir -p "${pkgdir}/usr/lib/systemd/system"
  mkdir -p "${pkgdir}/etc/firmware"
  mkdir -p "${pkgdir}/usr/share/licences"

  cp BCM43430A1.hcd "${pkgdir}/etc/firmware/"
  cp brcm43438.service "${pkgdir}/usr/lib/systemd/system/"
  cp LICENCE.broadcom_bcm43xx "${pkgdir}/usr/share/licences/"
keithspg
 
Posts: 26
Joined: Mon Feb 23, 2015 4:14 pm

Re: [SOLVED] how to use Bluetooth on Pi3/Zero with bluez5.44

Postby RoEdAl » Sun Apr 29, 2018 6:43 am

You may try bluetooth-raspberrypi package from http://github.com/RoEdAl/alarm-bluetooth-raspberrypi.

It works well on Raspberry Pi 3B/3B+. Raspberry Pi Zero W wasn't tested.
RoEdAl
 
Posts: 6
Joined: Sun Apr 29, 2018 6:35 am

Re: [SOLVED] how to use Bluetooth on Pi3/Zero with bluez5.44

Postby RoEdAl » Mon Apr 30, 2018 7:17 am

bluetooth-raspberrypi works on Raspberry Pi Zero W too.
RoEdAl
 
Posts: 6
Joined: Sun Apr 29, 2018 6:35 am


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 4 guests