xtal256
Posts: 14
Joined: Sat Aug 26, 2017 8:34 am

Bluetooth and hciuart not working

Sat Jun 08, 2019 3:31 am

(I also posted this in the sticky bluetooth thread)


I bought a Pi 3 and used the image from an older Pi 2 (so there was no bluetooth on it). Now, although though the new Pi supports bluetooth, I'm having some trouble getting it working on my image ("Raspbian GNU/Linux 9 (stretch)", upgraded from jessie).

On startup, bluetooth is not enabled:

Code: Select all

$ service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(8)

$ service hciuart status
● hciuart.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)
I can start the bluetooth service:

Code: Select all

$ sudo modprobe btusb
$ sudo systemctl start bluetooth
$ service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-06-02 18:26:20 AEST; 15s ago
     Docs: man:bluetoothd(8)
 Main PID: 1958 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─1958 /usr/lib/bluetooth/bluetoothd

Jun 02 18:26:20 Raspberry-Pi systemd[1]: Starting Bluetooth service...
Jun 02 18:26:20 Raspberry-Pi bluetoothd[1958]: Bluetooth daemon 5.43
Jun 02 18:26:20 Raspberry-Pi systemd[1]: Started Bluetooth service.
Jun 02 18:26:20 Raspberry-Pi bluetoothd[1958]: Starting SDP server
Jun 02 18:26:20 Raspberry-Pi bluetoothd[1958]: Bluetooth management interface 1.14 initialized
But when I try to start hciuart it says:

Code: Select all

Failed to start hciuart.service: Unit hciuart.service is masked.
And bluetoothctl says "No default controller available" when I try to do anything with it.


On the advice of Douglas6, I unmasked the hciuart service, but now it cannot be found at all:

Code: Select all

$ service hciuart status
Unit hciuart.service could not be found.
I tried updating the firmware with rpi-update, but that did not fix the problem.


Any help would be appreciated,
thanks

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

Re: Bluetooth and hciuart not working

Sat Jun 08, 2019 9:30 am

Try:

Code: Select all

sudo apt-get install pi-bluetooth 
Don't ever use rpi-update.

xtal256
Posts: 14
Joined: Sat Aug 26, 2017 8:34 am

Re: Bluetooth and hciuart not working

Sat Jun 08, 2019 11:19 am

Installing pi-bluetooth worked. I did not know that there was a specific install for the Raspberry Pi.

Douglas6 wrote:
Sat Jun 08, 2019 9:30 am
Don't ever use rpi-update.
I have read that a few times. However, at this time I felt I had no choice.

Return to “Troubleshooting”