jonny1947
Posts: 15
Joined: Fri Aug 19, 2016 12:41 pm

Re: Update Bluez version PI 3

Tue Aug 23, 2016 3:13 pm

Hi,

No Not really. Thats the problem. Also once I reboot my Pi 3 hciconfig returns nothing. But once I run that last command (Step10). it shows me adapter and hci commands starts working. Did you have chance to check about bluetoothctl and two copies of bluetoothd?

jonathanCCC
Posts: 23
Joined: Thu Apr 21, 2016 7:56 am

Re: Update Bluez version PI 3

Tue Aug 23, 2016 3:24 pm

When you run the last command, did you get this message ?
bcm43xx_init
Set Controller UART speed to 921600bit/s
Flash firmware /lib/firmware/BCM43430A1.hcd
Set Controller UART speed to 921600bit/s
Device setup complete
Also once I reboot my Pi 3 hciconfig returns nothing.
That's normal, you have to run the last command after each reboot.

I don't have bluetoothd in /usr/bin I have it in bluez-5.39/src.
bluetoothctl is working.

Could you give me what returns the command ?

Code: Select all

sudo systemctl status bluetooth

jonny1947
Posts: 15
Joined: Fri Aug 19, 2016 12:41 pm

Re: Update Bluez version PI 3

Tue Aug 23, 2016 4:25 pm

Hi,

Yes I get that message after running the last command.

1. I think I'm making progress. I can confirm that under bluez-5.39/src I have bluetoothd.
2. where is bluetoothctl located ? for me its not working
3. after sudo reboot I issues step 10 command and checked the status of bluetooth service and it was inactive. So i used the command "sudo systemctl start bluetooth" and then checked the status again and i got the something shown in attached photo.
4. I think system kernel cant see the installed bluez and so systemd cant find bluetoothd and bluetoothctl programs. If you have any idea about this please share.

It appears to me that we have to tell the system that we have installed the bluez 5.39 and the bluetoothd, blueoothctl and other programs are located here. I dont know how to do this. If you know please share.

Thanks a lot for getting me this far. Really appreciate your help.
Attachments
Captureccc.PNG
Captureccc.PNG (45.51 KiB) Viewed 8234 times

jonny1947
Posts: 15
Joined: Fri Aug 19, 2016 12:41 pm

Re: Update Bluez version PI 3

Tue Aug 23, 2016 6:23 pm

Good news,

Finally figured it out and now bluez5.39 is up and running on my Pi3.

here are the steps for all the others who suffer the same problem. Note that I'm no expert in linux and so I might not have all the answer to the questions that you have, but if you are lucky enough to make it work using my steps then I'm happy.

The questions i dont have answers are
1. when u reboot the Pi 3, and issue command bluetoothctl , it will say waiting to connect to bluetoothd. Dont know why. (if any one has answer to this question please let me know)
2. when you check bluez version using "dpkg --status bluez | grep '^Version:'", it will say bluez is not installed. Well the fact is , bluez is up and running. (You can confirm this once follow my guide)

Guide:
Follow the steps below.

1. uninstall bluez 5.23 ==> sudo apt-get purge bluez
2. Download the bluez 5.39 (it works with 5.41)
wget http://www.kernel.org/pub/linux/bluetoo ... .39.tar.xz
or
wget http://www.kernel.org/pub/linux/bluetoo ... .41.tar.xz

3. unzip or untar the bluez 5.39 and change directory to it (From this point onwards you will remain inside bluez directory)
tar xvf bluez-5.39.tar.xz
cd bluez-5.39/

4. Download the patch for 5.39 and unzip inside bluez5.39 directory (Most important to put patch inside it)
wget wttps://gist.github.com/pelwell/c8230c48ea24698527cd/archive/3b07a1eb296862da889609a84f8e10b299b7442d.zip
unzip 3b07a1eb296862da889609a84f8e10b299b7442d.zip

5. before configuring and compiling bluez 5.39, apply patch
git apply -v c8230c48ea24698527cd-3b07a1eb296862da889609a84f8e10b299b7442d/*

6. configure, compile and install bluez 5.39
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd

6.1 make
6.2 sudo make install

7. Run the commands :
sudo systemctl unmask bluetooth.service
sudo systemctl start bluetooth

8. Paste the fw for the BCM module in /lib/firmware/brcm
Do this once only (If you already have brcmfmac43430-sdio.sbin and brcmfmac43430-sdio.txt then copy BCM43430A1.hcd only)

9. sudo reboot

10. Run the commands : (You'll need to issue this command everytime you bootup the RPi 3. after issuing this command bluetoothctl will work nicely and from that you can say bluez is installed)
/usr/bin/hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
sudo hciconfig hci0 up

Also Make sure that you have edited the following files in correct manner.

1. At this location /lib/systemd/system/ edit the bluetooth.service file and add -- experimental flag. (follow adafruit guide https://learn.adafruit.com/install-blue ... stallation)

2. Duplicate the root section in bluetooth.conf file located at /etc/dbus-1/system.d/bluetooth.conf. (Follow this guide. http://blog.mrgibbs.io/bluez-5-39-ble-s ... pberry-pi/)

3.you can also issue "sudo systemctl enable bluetooth" to start bluetooth service at bootup (apparently this is what Adafruit guide says but its not starting by default after bootup)

I have tried my best to make this guide clear cut. Hope this helps. I find that the key is to apply patch, put firmware files correctly and have correct files in correct manner as mentioned in last section of guide.

Once again, Big thanks to JonathanCCC. Thanks a lot man.

Next goal:
1. how to make bluetooth running by default without issuing commands in step 10 everytime after boot up

User avatar
Douglas6
Posts: 4711
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Update Bluez version PI 3

Tue Aug 23, 2016 6:37 pm

You might try adding an 'ExecStartPre' lines in your bluetooth.service unit. Something like

Code: Select all

ExecStartPre=/usr/bin/hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
ExecStartPre=/usr/bin/hciconfig hci0 up
That's untested.

jonny1947
Posts: 15
Joined: Fri Aug 19, 2016 12:41 pm

Re: Update Bluez version PI 3

Tue Aug 23, 2016 7:04 pm

Hi,

I made a shell script that includes step 10 commands and made it executable. and then after boot up i just run the script.
I'll try your solution too.

jonathanCCC
Posts: 23
Joined: Thu Apr 21, 2016 7:56 am

Re: Update Bluez version PI 3

Wed Aug 24, 2016 7:38 am

Glad to hear that it's working for you ! I past several days to make it working too, it's why I am trying to help ;)
I included the step10 in /etc/rc.local.
Douglas: I tried your solution with ExecStartPre but it's not working.

recklessfb
Posts: 37
Joined: Wed Jul 06, 2016 12:26 am

Re: Update Bluez version PI 3

Mon Nov 14, 2016 11:49 am

Hello,
I have been thinking about updating the Bluez on my Pi3 since I have been experiencing hang ups with my bluetooth speaker. I have read this thread a couple of times and understand most of the update process. My question is what does the patching do and is it still required if I am compiling and installing 5.43(released in October) ?
Edit:
When I purge/remove bluez it will also remove pi-bluetooth and pulseaudio-module-bluetooth. I wouldn't really need pi-bluetooth but would need pulseaudio-module-bluetooth. Installing pulseaudio-module-bluetooth also installs bluez again and that would be bluez 5.23. So can I have both version of bluez installed?

recklessfb
Posts: 37
Joined: Wed Jul 06, 2016 12:26 am

Re: Update Bluez version PI 3

Tue Nov 15, 2016 4:10 pm

I compiled and installed bluez 5.43. I can conifrm that it works.
Now I need to find a way to install the pulseaudio bluetooth module without reinstalling the bluez dependency. If I run apt-get pulseaudio module it wants to install bluez again and that will downgrade my bluez version again.

User avatar
Douglas6
Posts: 4711
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Update Bluez version PI 3

Tue Nov 15, 2016 5:47 pm

You could try the '--no-install-recommends' flag, but I suspect that won't work. I'm guessing the PulseAudio Bluetooth modules depend on a specific version of BlueZ, and may not even work with a newer version.
You could let it reinstall BlueZ 5.23, and then adjust it so it loads your newer version of the bluetoothd daemon nstead of the one it just installed. Again, no guarantees.
You could try building the PulseAudio modules from source.

I'm curious, is Bluetooth working now? Is the adapter recognized and powered up?

recklessfb
Posts: 37
Joined: Wed Jul 06, 2016 12:26 am

Re: Update Bluez version PI 3

Tue Nov 15, 2016 6:00 pm

Douglas6 wrote:You could try the '--no-install-recommends' flag, but I suspect that won't work. I'm guessing the PulseAudio Bluetooth modules depend on a specific version of BlueZ, and may not even work with a newer version.
You could let it reinstall BlueZ 5.23, and then adjust it so it loads your newer version of of the bluetoothd daemon nstead of the one it just installed. Again, no guarantees.
You could try building the PulseAudio modules from source.

I'm curious, is Bluetooth working now? Is the adapter recognized and powered up?
I tried the no install flag yesterday but that didn't work.
My Pi 3 is up to date using pixel. Prior to compiling and installing bluez 5.43 I purged bluez and blueman. My pi still has rpi-bluetooth installed. So when I rebooted after installing 5.43 and executed the command in step 10 my bluetooth speaker connected automatically. So the bluetooth connection is working, it's just that I can't switch the audio. I will try compiling pulseaudio following the steps listed in this post. viewtopic.php?f=29&t=87138#p619713

My question now is should I compile Puleaudio 5 or go for a higher version?

Appologies if this post seems a bit disconnected, I'm posting from my phone from work. I'll play around with it this evening.

recklessfb
Posts: 37
Joined: Wed Jul 06, 2016 12:26 am

Re: Update Bluez version PI 3

Wed Nov 16, 2016 11:32 am

I compiled and installed Pulseaudio 5.0 last night. I however still had the same problem because it didn't come with pulseaudio-module-bluetooth. So I had to run

Code: Select all

apt-get install pulseaduio-module-bluetooth
which also installed bluez 5.23 and used this line to remove it

Code: Select all

sudo dpkg -P --force-depends bluez
. I'm guessing it did remove bluez 5.23 because I get an error when checking for the bluez version

Code: Select all

[email protected]:~$ dpkg --status bluez | grep '^Version:'
dpkg-query: package 'bluez' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
[email protected]:~$ sudo bluetoothd -v
sudo: bluetoothd: command not found

elshiftos
Posts: 6
Joined: Thu Dec 15, 2016 10:09 pm

Re: Update Bluez version PI 3

Sun Feb 05, 2017 12:00 am

Thanks for the detailed post jonny1947, but the ./configure.... line ends with the following error:
checking for ICAL... no
configure: error: libical is required

I attempted to install libical versions 1 and 2 but they too threw up errors, the latter could find libxml.

This is all getting a little convoluted for me and my very limited knowledge of compiling!

UPDATE:
Answering my own question here, I had to apt install libical-dev and libreadline-dev to get the configure command to complete without errors.

rpi3_447
Posts: 2
Joined: Sun Feb 19, 2017 10:47 am

Re: Update Bluez version PI 3

Thu Feb 23, 2017 7:05 am

Thanks for the messages and help. Have a fundamental question regarding this patch. Wondering why this isn't part of the out of the box bluez release (I tried to use 5.43 and Bluetooth was disabled). Is it a change needed from the raspberian to make a fix to get it integrated? I understand that idea of the patch but am unclear about the future when a new release of bluez arrives. Does the fix become integral of bluez?


jonathanCCC wrote:Hi jimmylee,

I upgraded successfully bluez 5.39 on my pi 3.
You can follow the section "Patch Bluez source" of this link to install bluez 5.39 and the patch : https://github.com/ukBaz/python-bluezero/issues/30

Then check the bluetooth service with the following command :

Code: Select all

sudo systemctl status bluetooth
if the service is masked, you can unmask it and start it with :

Code: Select all

sudo systemctl unmask bluetooth.service
sudo systemctl start bluetooth.service
After configured, compiled and installed bluez, download the fw required for the BCM module and drop the files in /lib/firmware/brcm. Here is the link for the files : http://forums.openmediavault.org/index. ... /?pageNo=2
Then attach the module with this commad :

Code: Select all

hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
You should see this message :
bcm43xx_init
Flash firmware /lib/firmware/brcm/BCM43430A1.hcd
Set Controller UART speed to 921600 bit/s
Device setup complete

And bluetooth is finally working with bluez 5.39 !

Abhijith Kini
Posts: 5
Joined: Sat Mar 25, 2017 8:05 am

Re: Update Bluez version PI 3

Tue Mar 28, 2017 10:52 am

Check bluez version using command " bluetoothctl --version" when you upgrade to BlueZ 5

Jones
Posts: 12
Joined: Sun Jun 17, 2012 10:34 pm

Re: Update Bluez version PI 3

Mon Apr 03, 2017 3:30 pm

Hi all,

I think I've succeeded in installing 5.41 as well, only my Gatttool does not work :(
My application uses gatttool a lot! Did you make this work with gatttool also?

Gatttool error when trying to connect to device:
Error: connect: Connection refused (111)

This error even occurs when the device address doesn't make sense. So it doesn't even try.
Hcitool i working fine.

UPDATE:
Got it working. You have to run command: "systemctl start bluetooth" first. Then the "bluetoothctl" command also works afterwards.

martijnk
Posts: 10
Joined: Thu Mar 23, 2017 7:33 pm

Re: Update Bluez version PI 3

Thu Apr 06, 2017 6:50 am

Many thanks Jonny1947 and jonathanCCC for putting together a great step-by-step instructions.

I do have one question: when building Bluez (v5.44), it doesn't build the tools like hciattach and hciconfig from the bluez/tools folder. When executing step #10, I get a file not found error on both the hciattach and hciconfig commands.

Any help is very much appreciated.
Thanks,
Martijn

jonathanCCC
Posts: 23
Joined: Thu Apr 21, 2016 7:56 am

Re: Update Bluez version PI 3

Thu Apr 06, 2017 7:14 am

Hello martijnk,

What gives you the command "sudo systemctl status bluetooth" ?
Did you try to run the command hciattach directly from the bluez/tools folder ?

martijnk
Posts: 10
Joined: Thu Mar 23, 2017 7:33 pm

Re: Update Bluez version PI 3

Thu Apr 06, 2017 8:22 am

Hi jonathanCCC,

Thanks for the quick reply. Here are the exact steps I'm executing, but getting stuck at the level where hciattach cannot be found:

Code: Select all

sudo su -
sudo apt-get purge -y bluez
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.44.tar.xz
tar -xvf bluez-5.44.tar.xz
cd bluez-5.*

# Download and apply bluetooth patch
wget https://gist.github.com/pelwell/c8230c48ea24698527cd/archive/3b07a1eb296862da889609a84f8e10b299b7442d.zip
unzip 3b07a1eb296862da889609a84f8e10b299b7442d.zip
git apply -v c8230c48ea24698527cd-3b07a1eb296862da889609a84f8e10b299b7442d/*

# Build bluez
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental --enable-tools --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd
sudo make
sudo make install

# Unmask, enable and restart bluetooth
sudo systemctl status bluetooth
sudo systemctl unmask bluetooth
sudo systemctl enable bluetooth
sudo systemctl restart bluetooth
sudo systemctl status bluetooth

# Download BCM43430A1.hcd into /lib/firmware/brcm
wget https://github.com/OpenELEC/misc-firmware/blob/master/firmware/brcm/BCM43430A1.hcd -O /lib/firmware/brcm/BCM43430A1.hcd

# Create bluetooth service file and point to bluez 5.44
vi /lib/systemd/system/bluetooth.service

[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth
 
[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/local/libexec/bluetooth/bluetoothd --experimental               
NotifyAccess=main
#WatchdogSec=10
#Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
 
[Install]
WantedBy=bluetooth.target
Alias=dbus-org.bluez.service

# Reboot
sudo reboot

# Execute hciattach & hciconfig
sudo hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
sudo hciconfig hci0 up
Where both hciattach and hciconfig cannot be found on the Pi:

Code: Select all

[email protected]:~/bluez-5.44# sudo find / -name "hciattach"
/usr/share/bash-completion/completions/hciattach
Additional info:

Code: Select all

[email protected]:~/bluez-5.44# dpkg --list|grep blue
ii  bluez-firmware                 1.2-3+rpi1                 all          Firmware for Bluetooth devices

Code: Select all

[email protected]:~# sudo systemctl status bluetooth
● bluetooth.service
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: timeout) since Wed 2017-04-05 15:13:19 CEST; 18h ago
 Main PID: 876 (code=exited, status=0/SUCCESS)
   Status: "Quitting"

Apr 05 15:11:49 MKMPI02 bluetoothd[876]: Bluetooth daemon 5.44
Apr 05 15:11:49 MKMPI02 bluetoothd[876]: Starting SDP server
Apr 05 15:11:49 MKMPI02 bluetoothd[876]: Bluetooth management interface 1.10 initialized
Apr 05 15:13:19 MKMPI02 systemd[1]: bluetooth.service start operation timed out. Terminating.
Apr 05 15:13:19 MKMPI02 bluetoothd[876]: Terminating
Apr 05 15:13:19 MKMPI02 systemd[1]: Failed to start Bluetooth service.
Apr 05 15:13:19 MKMPI02 systemd[1]: Unit bluetooth.service entered failed state.
Apr 05 15:52:21 MKMPI02 systemd[1]: Stopped Bluetooth service.

jonathanCCC
Posts: 23
Joined: Thu Apr 21, 2016 7:56 am

Re: Update Bluez version PI 3

Thu Apr 06, 2017 8:41 am

Maybe your configure is wrong if you don't have hciattach.
Here is my configure :
./configure --prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-experimental \
--enable-maintainer-mode

martijnk
Posts: 10
Joined: Thu Mar 23, 2017 7:33 pm

Re: Update Bluez version PI 3

Thu Apr 06, 2017 11:20 am

Tried your configure but unfortunately still no hciattach unfortunately. output of my make && make install command:

Code: Select all

make --no-print-directory all-am
  GEN      src/bluetooth.service
  CCLD     src/bluetoothd
  GEN      obexd/src/obex.service
make --no-print-directory install-am
 /bin/mkdir -p '/usr/bin'
  /bin/bash ./libtool   --mode=install /usr/bin/install -c client/bluetoothctl monitor/btmon tools/rctest tools/l2test tools/l2ping tools/bccmd tools/bluemoon tools/hex2hcd tools/mpris-proxy tools/btattach '/usr/bin'
libtool: install: /usr/bin/install -c client/bluetoothctl /usr/bin/bluetoothctl
libtool: install: /usr/bin/install -c monitor/btmon /usr/bin/btmon
libtool: install: /usr/bin/install -c tools/rctest /usr/bin/rctest
libtool: install: /usr/bin/install -c tools/l2test /usr/bin/l2test
libtool: install: /usr/bin/install -c tools/l2ping /usr/bin/l2ping
libtool: install: /usr/bin/install -c tools/bccmd /usr/bin/bccmd
libtool: install: /usr/bin/install -c tools/bluemoon /usr/bin/bluemoon
libtool: install: /usr/bin/install -c tools/hex2hcd /usr/bin/hex2hcd
libtool: install: /usr/bin/install -c tools/mpris-proxy /usr/bin/mpris-proxy
libtool: install: /usr/bin/install -c tools/btattach /usr/bin/btattach
 /bin/mkdir -p '/usr/libexec/bluetooth'
  /bin/bash ./libtool   --mode=install /usr/bin/install -c src/bluetoothd obexd/src/obexd '/usr/libexec/bluetooth'
libtool: install: /usr/bin/install -c src/bluetoothd /usr/libexec/bluetooth/bluetoothd
libtool: install: /usr/bin/install -c obexd/src/obexd /usr/libexec/bluetooth/obexd
 /bin/mkdir -p '/usr/lib/cups/backend'
  /bin/bash ./libtool   --mode=install /usr/bin/install -c profiles/cups/bluetooth '/usr/lib/cups/backend'
libtool: install: /usr/bin/install -c profiles/cups/bluetooth /usr/lib/cups/backend/bluetooth
 /bin/mkdir -p '/etc/dbus-1/system.d'
 /usr/bin/install -c -m 644 src/bluetooth.conf '/etc/dbus-1/system.d'
 /bin/mkdir -p '/usr/share/dbus-1/services'
 /usr/bin/install -c -m 644 obexd/src/org.bluez.obex.service '/usr/share/dbus-1/services'
 /bin/mkdir -p '/usr/share/dbus-1/system-services'
 /usr/bin/install -c -m 644 src/org.bluez.service '/usr/share/dbus-1/system-services'
 /bin/mkdir -p '/usr/share/man/man1'
 /usr/bin/install -c -m 644 tools/rctest.1 tools/l2ping.1 tools/bccmd.1 tools/btattach.1 tools/hid2hci.1 '/usr/share/man/man1'
 /bin/mkdir -p '/usr/share/man/man8'
 /usr/bin/install -c -m 644 src/bluetoothd.8 '/usr/share/man/man8'
 /bin/mkdir -p '/usr/lib/bluetooth/plugins'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   plugins/external-dummy.la '/usr/lib/bluetooth/plugins'
libtool: install: /usr/bin/install -c plugins/.libs/external-dummy.so /usr/lib/bluetooth/plugins/external-dummy.so
libtool: install: /usr/bin/install -c plugins/.libs/external-dummy.lai /usr/lib/bluetooth/plugins/external-dummy.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/lib/bluetooth/plugins
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib/bluetooth/plugins

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/lib/udev/rules.d'
 /usr/bin/install -c -m 644 tools/97-hid2hci.rules '/lib/udev/rules.d'
 /bin/mkdir -p '/lib/systemd/system'
 /usr/bin/install -c -m 644 src/bluetooth.service '/lib/systemd/system'
 /bin/mkdir -p '/usr/lib/systemd/user'
 /usr/bin/install -c -m 644 obexd/src/obex.service '/usr/lib/systemd/user'
 /bin/mkdir -p '/lib/udev'
  /bin/bash ./libtool   --mode=install /usr/bin/install -c tools/hid2hci '/lib/udev'
libtool: install: /usr/bin/install -c tools/hid2hci /lib/udev/hid2hci
[email protected]:~/bluez-5.44#

jonathanCCC
Posts: 23
Joined: Thu Apr 21, 2016 7:56 am

Re: Update Bluez version PI 3

Thu Apr 06, 2017 11:49 am

I am sorry, I don't know how I could help you to get it working.
Try to install an older version of bluez like bluez 5.41, I tested it and it worked.

martijnk
Posts: 10
Joined: Thu Mar 23, 2017 7:33 pm

Re: Update Bluez version PI 3

Thu Apr 06, 2017 4:55 pm

You're right, both bluez 5.41 and 5.43 do result in hci tools being build, whereas in case of bluez 5.44 they don't

Now when trying to run the hciattach command I'm getting a timeout:
[email protected]:~# sudo hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
bcm43xx_init
Initialization timed out.

Which can be right because the bluetoothd service isn't running:
[email protected]:~# /usr/libexec/bluetooth/bluetoothd -v
5.43
[email protected]:~# sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: inactive (dead)
Docs: man:bluetoothd(8)
Apr 06 18:47:47 MKMPI02 systemd[1]: Started Bluetooth service.
Apr 06 18:47:48 MKMPI02 systemd[1]: Started Bluetooth service.

No matter what I try, the bluetooth service keeps reporting itself dead/inactive without any logging. From journalctl:

Apr 06 18:51:38 MKMPI02 systemd[1]: Started Bluetooth service.
-- Subject: Unit bluetooth.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
-- Unit bluetooth.service has finished starting up.
-- The start-up result is done.

jonathanCCC
Posts: 23
Joined: Thu Apr 21, 2016 7:56 am

Re: Update Bluez version PI 3

Fri Apr 07, 2017 8:02 am

You need to enter the following command :
"sudo systemctl start bluetooth"
and you need to do it after each reboot.

martijnk
Posts: 10
Joined: Thu Mar 23, 2017 7:33 pm

Re: Update Bluez version PI 3

Fri Apr 07, 2017 8:52 am

I did, but unfortunately it immediately reports itself inactive/dead:

Code: Select all

[email protected]:~# sudo systemctl restart bluetooth
[email protected]:~# sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(8)

Apr 06 18:47:47 MKMPI02 systemd[1]: Started Bluetooth service.
Apr 06 18:47:48 MKMPI02 systemd[1]: Started Bluetooth service.
Apr 06 18:51:26 MKMPI02 systemd[1]: Started Bluetooth service.
Apr 06 18:51:38 MKMPI02 systemd[1]: Started Bluetooth service.
Apr 07 10:49:36 MKMPI02 systemd[1]: Started Bluetooth service.
Apr 07 10:49:51 MKMPI02 systemd[1]: Started Bluetooth service.

Return to “General discussion”