shaunakvyas1
Posts: 21
Joined: Wed Dec 16, 2015 1:35 pm
Location: Ahmedabad
Contact: AOL

Bluetooth not working in Raspberry Pi 3B+ with Xubuntu 18.04

Tue Oct 02, 2018 12:39 pm

I am using Raspberry Pi with Xubuntu 18.04 running in it. When I enable the bluetooth using its icon, I am not able to open the bluetooth adaptor for detecting and connecting bluetooth devices.

The

Code: Select all

hciconfig -a
command gives following output:

Code: Select all

shaunak@Xubuntu-RPi:~$ hciconfig -a
hci0:	Type: Primary  Bus: SDIO
	BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
	DOWN 
	RX bytes:0 acl:0 sco:0 events:0 errors:0
	TX bytes:0 acl:0 sco:0 commands:0 errors:0
	Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	Packet type: DM1 DH1 HV1 
	Link policy: 
	Link mode: SLAVE ACCEPT 
The

Code: Select all

sudo hciconfig hci0 up
command gives following output:

Code: Select all

shaunak@Xubuntu-RPi:~$ sudo hciconfig hci0 up
[sudo] password for shaunak: 
Can't init device hci0: Input/output error (5)
I referred and applied the solutions given in following links, but there is no result:
1. https://www.raspberrypi.org/forums/view ... p?t=171999
2. https://www.raspberrypi.org/forums/view ... hp?t=96001
Shaunak
A Beautiful Mind

shaunakvyas1
Posts: 21
Joined: Wed Dec 16, 2015 1:35 pm
Location: Ahmedabad
Contact: AOL

Re: Bluetooth not working in Raspberry Pi 3B+

Wed Oct 03, 2018 11:42 am

I also tried few more commands. Here are the results:

Code: Select all

shaunak@Xubuntu-RPi:~$ hcitool dev
Devices:  ["Blank Line"]

Code: Select all

shaunak@Xubuntu-RPi:~$ bluetoothd
D-Bus setup failed: Connection ":1.59" is not allowed to own the service "org.bluez" due to security policies in the configuration file

[/code]

Code: Select all

shaunak@Xubuntu-RPi:~$ bluetoothd -d -n
bluetoothd[2906]: Bluetooth daemon 5.48
bluetoothd[2906]: src/main.c:parse_config() parsing /etc/bluetooth/main.conf
bluetoothd[2906]: src/main.c:parse_config() Key file does not have key “DiscoverableTimeout” in group “General”
bluetoothd[2906]: src/main.c:parse_config() Key file does not have key “PairableTimeout” in group “General”
bluetoothd[2906]: src/main.c:parse_config() Key file does not have key “Privacy” in group “General”
bluetoothd[2906]: src/main.c:parse_config() Key file does not have key “Name” in group “General”
bluetoothd[2906]: src/main.c:parse_config() Key file does not have key “Class” in group “General”
bluetoothd[2906]: src/main.c:parse_config() Key file does not have key “DeviceID” in group “General”
bluetoothd[2906]: src/main.c:parse_config() Key file does not have key “ReverseServiceDiscovery” in group “General”
D-Bus setup failed: Connection ":1.98" is not allowed to own the service "org.bluez" due to security policies in the configuration file
bluetoothd[2906]: Unable to get on D-Bus

Code: Select all

shaunak@Xubuntu-RPi:~$ bluetooth -v
bluetooth = on

Code: Select all

shaunak@Xubuntu-RPi:~$ hciconfig
hci0:	Type: Primary  Bus: SDIO
	BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
	DOWN 
	RX bytes:0 acl:0 sco:0 events:0 errors:0
	TX bytes:0 acl:0 sco:0 commands:0 errors:0

Code: Select all

shaunak@Xubuntu-RPi:~$ hcitool scan
Device is not available: No such device

Code: Select all

shaunak@Xubuntu-RPi:~$ sudo hciconfig hci0 reset
Can't init device hci0: Input/output error (5)

Code: Select all

shaunak@Xubuntu-RPi:~$ dmesg | grep "Bluetooth"
[   11.188876] Bluetooth: Core ver 2.22
[   11.189007] Bluetooth: HCI device and connection manager initialized
[   11.189033] Bluetooth: HCI socket layer initialized
[   11.189046] Bluetooth: L2CAP socket layer initialized
[   11.189090] Bluetooth: SCO socket layer initialized
[   11.205925] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[   16.028576] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   16.028586] Bluetooth: BNEP filters: protocol multicast
[   16.028617] Bluetooth: BNEP socket layer initialized

Code: Select all

shaunak@Xubuntu-RPi:~$ sudo bluetoothctl
Agent registered
[bluetooth]# scan on
No default controller available
[bluetooth]# 


I reinstalled bluez, bluetooth and blueman, but still I am facing the same problem of not being able to detect the on board bluetooth adaptor.
Shaunak
A Beautiful Mind

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

Re: Bluetooth not working in Raspberry Pi 3B+

Wed Oct 03, 2018 1:30 pm

Rather than throwing random Bluetooth commands at it, try this one:

Code: Select all

systemctl status hciuart
and post the results.

shaunakvyas1
Posts: 21
Joined: Wed Dec 16, 2015 1:35 pm
Location: Ahmedabad
Contact: AOL

Re: Bluetooth not working in Raspberry Pi 3B+ with Xubuntu 18.04

Thu Oct 04, 2018 4:02 am

@Douglas6
Here is the result:

Code: Select all

shaunak@Xubuntu-RPi:~$ systemctl status hciuart
Unit hciuart.service could not be found.
Shaunak
A Beautiful Mind

shaunakvyas1
Posts: 21
Joined: Wed Dec 16, 2015 1:35 pm
Location: Ahmedabad
Contact: AOL

Re: Bluetooth not working in Raspberry Pi 3B+ with Xubuntu 18.04

Thu Oct 04, 2018 5:49 am

Voila ! I finally am able to start bluetooth.

Here are the commands:

Code: Select all

root@Xubuntu-RPi:/home/shaunak# sudo hciattach /dev/ttyAMA0 bcm43xx 921600
bcm43xx_init
Cannot open directory '/etc/firmware': No such file or directory
Patch not found, continue anyway
Set Controller UART speed to 921600 bit/s
Device setup complete

Code: Select all

shaunak@Xubuntu-RPi:~$ sudo systemctl restart bluetooth
Shaunak
A Beautiful Mind

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

Re: Bluetooth not working in Raspberry Pi 3B+ with Xubuntu 18.04

Thu Oct 04, 2018 10:22 am

You might try installing pi-bluetooth.

argo86
Posts: 1
Joined: Wed Oct 24, 2018 5:59 pm

Bluetooth not working in Raspberry Pi

Wed Oct 24, 2018 6:29 pm

hello,
this is not my native language
these rows of commands will remove some bluetooth errors and allow you to make a connection with your phone

I hope it will be useful

sudo apt-get update
sudo apt-get upgrade

bluetoothctl -v

sudo apt-get install libusb-dev libdbus-1-dev libbluetooth-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev libsbc-dev libasound2-dev libortp-dev -y
sudo apt-get install pulseaudio-module-bluetooth
sudo apt-get install bluez-obexd

sudo wget www.kernel.org/pub/linux/bluetooth/bluez-5.50.tar.xz
sudo tar xvf bluez-5.50.tar.xz && cd bluez-5.50
sudo ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental
sudo make -j4
sudo make install

sudo nano /etc/systemd/system/dbus-org.bluez.service
ExecStart=/usr/lib/bluetooth/bluetoothd -C
ExecStartPost=/usr/bin/sdptool add SP

sudo nano /etc/bluetooth/main.conf
DisablePlugins = pnat

sudo reboot
bluetoothctl -v

godlich
Posts: 2
Joined: Thu Jan 04, 2018 9:56 pm

Re: Bluetooth not working in Raspberry Pi

Wed Jan 29, 2020 10:59 am

argo86 wrote:
Wed Oct 24, 2018 6:29 pm
hello,
this is not my native language
these rows of commands will remove some bluetooth errors and allow you to make a connection with your phone

I hope it will be useful

No! This will bring you to the dependancy hell!
I can strongly recommend not to use this instruction.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26413
Joined: Sat Jul 30, 2011 7:41 pm

Re: Bluetooth not working in Raspberry Pi

Wed Jan 29, 2020 11:03 am

godlich wrote:
Wed Jan 29, 2020 10:59 am
argo86 wrote:
Wed Oct 24, 2018 6:29 pm
hello,
this is not my native language
these rows of commands will remove some bluetooth errors and allow you to make a connection with your phone

I hope it will be useful

No! This will bring you to the dependancy hell!
I can strongly recommend not to use this instruction.
That post was from two years ago.....
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Return to “Other”