Reputation: 173
I am trying to get the Bluetooth to work in Raspberry Pi 3.
I am using buildroot with:
bluetoothd
because
the bluez script is for systemd.console=ttyAMA0,115200
from cmdline.txtrfkill
for busybox but I only see the wifi interface, no Bluetooth interface.running:
hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
output showed:
bcm43xx_init
Initialization timed out
tried 115200, the same.
Notes:
invalid id
All the above was taken after deep search.
So what I am missing here?
How can I get the Bluetooth to start running in my Raspberry Pi 3 with buildroot as image creator?
Thank you all!
Upvotes: 2
Views: 6900
Reputation: 173
The main problem is that buildroot adds the pi3-miniuart-bt overlay in config.txt.
To remove it we need to remove if from the post-image.sh script as parameter to the above script.
In raspberry pi 3 the ttyAMA0 was assigned to bluetooth and the pi3-miniuart-bt restored it back to be serial com port, which disconnects the bluetooth again.
To summarize the steps in buildroot.
/dev/ttyAMA0
from cmdline.txtAfter building, check on the target (pi3)
hci_uart is not running in case of busybox init (only in systemd)
so just modprobe hci_uart
. run lsmod
to see that it is running.
To start the service and load the firmware, use hciattach:
hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
Start the bluetoothd daemon:
/usr/libexec/bluetooth/bluetoothd &
Power up the bluetooth hardware using bluetoothctl
(power on and agent on).
Now you should see it using hcitool dev.
Again, if you don't remove the overlay you will get timeout.
That it. the hci device should be seen now. you can see it using:
rfkill list
( install it from busybox-menuconfig)hciconfig -a
The above steps does not get the console to work properly on the Pi 3 but this is a different story.
Upvotes: 4
Reputation: 696
As described in the commit adding the firmware, you unfortunately need to patch bluez5_utils to get the firmware to work:
https://git.buildroot.net/buildroot/commit/?id=1f94f1aaab2e786542a83327358570a828d68f45
Upvotes: 2