I have custom buildroot image built for Raspberry Pi Zero W. My primary goal is to be able to activate on-board blueetoth, however I seem to have immense problems achieving it. My main problem is that no matter what I do my system cannot detect any bluetooth adapters.

My buildroot .config: https://github.com/KarolPWr/Bluetooth-buildroot-rpi/blob/master/.config

Releveant part of config.txt:

# fixes rpi3 ttyAMA0 serial console

# enable rpi3 ttyS0 serial console


root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200

What I do after boot finishes:

modprobe hci_uart

All starts without errors. Then when I type bt-device -l, no adapter is shown.

When executing command hciattach /dev/ttyS0 any 921600 noflow - I get informed of several bluetooth timeouts and then I only get:

# hciconfig -a
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
        RX bytes:0 acl:0 sco:0 events:0 errors:0
        TX bytes:12 acl:0 sco:0 commands:3 errors:0

I also tried hciattach /dev/ttyS0 bcm43xx 921600 noflow - But this fails with Unknown device type or id

I've already spent many hours researching various resources, but I still feel very lost.

As a sidenote, I'd like to preserve serial console on GPIO pins, since its very useful for debugging. For now I have no idea how to make this configuration work.

  • Have you seen raspberrypi.stackexchange.com/questions/47284/… - there is also an old note in dtoverlay -h pi3-miniuart-bt that said It is also necessary to edit /lib/systemd/system/hciuart.service and replace ttyAMA0 with ttyS0 Not sure if either of these are a fix for you with the custom build. – user115418 Apr 19 '20 at 19:01
  • @Andyroo Thanks for the link, I adjusted my config.txt. However it did not change much. Like you said, I'm not using systemd so I cant configure hciuart like this. It is also strange for me that hciattach does not allow me to use 'bcm43xx' argument. Do you have any idea how to fix this? – Surcouf Apr 20 '20 at 16:40
  • Just wondered if you need to use bluetoothctl and issue a power on command? There was a quirk back in Jessie where this was required... – user115418 Jun 21 '20 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.