Buildroot and raspberry pi 3 bluetooth HCI not exist

1.9k views Asked by At

I tried building an image with buildroot that will have bluetooth. The image is configure with busybox init and not with systemd. I added bt firmware and i can see the BCM firmware on target. Bluez5 utils and tools I started the following on the target manually modprobe uart_hci /usr/libexec/bluetooth/bluetoothd & I removed the ttyAMA0 from cmdline.txt modprobe rfcomm : bluetooth TTY layer initialized

installed eudev in buildroot

But i don't see any HCI in /dev hcitool dev return empty devices. I cannot call to hciattach yet because hciattach needs an hci device.

Does someone tried to get the bluetooth with buildroot working and can share his findings please? Thank you all!

2

There are 2 answers

0
Gal Ben-Haim On

have you tried using hciattach - https://www.systutorials.com/docs/linux/man/8-hciattach/ to attach the UART HCI adapter to Bluez?

see this question - Bluetooth on Raspberry Pi Zero W, using buildroot

0
volzo On

While the answer by Gal Ben-Haim is already correct and pointing in the right direction, a bit of additional info:

The Bluetooth device can be attached by running hciattach /dev/ttyAMA0 bcm43xx 921600 noflow - Afterwards the interface may need to be enabled with hciconfig hci0 up

When using the Pi Zero W or Pi 3, you may or may not use the bt-overlay fix. If your /boot/config.txt has the line dtoverlay=miniuart-bt your Bluetooth device is connected to dev/ttyS0 instead (the hciattach command needs to be changed accordingly).

To check if everything works as expected, run hcitool lescan