Raspberry Pi 3 - Setting Up Bluetooth
The Raspberry Pi 3 has bluetooth chip on the BCM2837 and it is connected to the hardware UART.
You can get bluetooth to work only if you are not using the UART for anything else.
You'll need the bluez package
apk add bluez
Start the bluetooth deamon at boot. This should load the right modules when you next reboot.
rc-update add bluetooth
We'll need the firmware from Broadcom. You'll have to look online for BCM43430A1.hcd to find $URL
mount -o remount,rw /dev/mmcblk0p1 wget $URL/BCM43430A1.hcd -O /media/mmcblk0p1/firmware/brcm/BCM43430A1.hcd
Next we need to stop the kernel using the device we want to attach to the bluetooth chip for as a console
remove "console=ttyAMA0,115200" from /media/mmcblk0p1/cmdline.txt lbu commit && reboot
After the reboot we attach the serial port to the bcm43xx
hciattach /dev/ttyAMA0 bcm43xx 115200 noflow -
The output from the hciattach above should be
bcm43xx_init Flash firmware /lib/firmware/brcm/BCM43430A1.hcd Set Controller UART speed to 115200 bit/s Device setup complete
Then it's a matter of doing what you normally do with your bluetooth stack. This should get you going:
hciconfig hci0 up hcitool dev hciconfig scan bluetoothctl