Bluetooth
This guide will show you how to connect to the phyCORE-i.MX8X development kit using the on-board Sterling-LWB WiFi/Bluetooth module.
Note
The Wifi/BT module can not be used at the same time as the SD card reader so the user must boot from eMMC.
Please refer to our eMMC guide for more information.
Requirements
Bluetooth capable device to test with
Setting Up Hardware
With the development kit powered off make sure the necessary switches are configured correctly.
Power on the board and stop in U-Boot.
Make sure your environment variables are set correctly and boot into Linux.
setenv mmcdev 0 setenv mmcroot "/dev/mmcblk0p2 rootwait rw" setenv overlay_files phytec-imx8qxp-bt.dtbo boot
Connecting A Bluetooth Device
After logging into Linux, run the brcm_patchram_plus utility which may take a second or two. This utility patches the firmware to the radio.
brcm_patchram_plus --patchram /lib/firmware/brcm/BCM43430A1.hcd --enable_hci --no2bytes --tosleep 1000 /dev/ttyLP1 &
[ 38.357433] Bluetooth: HCI UART driver ver 2.3 [ 38.362003] Bluetooth: HCI UART protocol H4 registered [ 38.367189] Bluetooth: HCI UART protocol BCSP registered [ 38.372729] Bluetooth: HCI UART protocol LL registered [ 38.377926] Bluetooth: HCI UART protocol ATH3K registered [ 38.384044] Bluetooth: HCI UART protocol Broadcom registered [ 38.389865] Bluetooth: HCI UART protocol QCA registered Done setting line discpline
Check that the bluetooth module was properly configured using the “hciconfig” command.
hciconfig
hci0: Type: Primary Bus: UART BD Address: 00:25:CA:35:52:0C ACL MTU: 1021:8 SCO MTU: 64:1 DOWN RX bytes:675 acl:0 sco:0 events:35 errors:0 TX bytes:427 acl:0 sco:0 commands:35 errors:0
Bring the Bluetooth interface up.
rfkill unblock bluetooth hciconfig hci0 up
Run “hcitool lescan” in Linux to scan for your external device.
hcitool lescan
LE Scan ... 18:EE:69:04:69:72 (unknown) 0B:E4:8A:B0:80:78 (unknown) 11:4F:37:EB:2A:6C (unknown) 5A:B0:B7:F2:5B:27 (unknown) 31:BC:21:21:9C:5F Raycon E55 Earbuds 31:BC:21:21:9C:5F (unknown) 64:E7:A7:29:11:AA (unknown) 66:2C:40:EC:77:C9 (unknown) 7F:3B:C9:53:54:E4 (unknown) 7F:3B:C9:53:54:E4 (unknown) 41:CC:AD:C6:0F:C2 (unknown) 57:80:3F:07:D6:B7 (unknown) 64:E7:A7:29:11:AA (unknown) 2A:B2:24:F3:FB:EB (unknown) 18:EE:69:04:69:72 (unknown)