Test BT under Yocto - TechNexion/u-boot-edm GitHub Wiki
Make sure bluetooth device for testing is able to be scanned.
Check daemon service:
~# systemctl status serial-qcabtfw@* ● [email protected] - QCA Bluetooth firmware service on ttymxc0 Loaded: loaded (/lib/systemd/system/[email protected]; indirect; vendo> Active: active (exited) since Tue 2019-07-02 05:30:49 UTC; 3h 33min ago Process: 3167 ExecStart=/usr/bin/hciattach -t 30 /dev/ttymxc0 qca 3000000 flo> Main PID: 3167 (code=exited, status=0/SUCCESS) Tasks: 1 (limit: 1623) CGroup: /system.slice/system-serial\x2dqcabtfw.slice/serial-qcabtfw@ttymxc0.> mq3174 /usr/bin/hciattach -t 30 /dev/ttymxc0 qca 3000000 flow - Jul 02 05:30:50 pico-imx8mm hciattach[3167]: get_vs_hci_event: Response type > Jul 02 05:30:50 pico-imx8mm hciattach[3167]: read_vs_hci_event: Wait for HCI-Ve> Jul 02 05:30:50 pico-imx8mm hciattach[3167]: rome_set_baudrate_req: Received HC> Jul 02 05:30:50 pico-imx8mm hciattach[3167]: rome_set_baudrate_req Jul 02 05:30:50 pico-imx8mm hciattach[3167]: rome_hci_reset_req: HCI RESET Jul 02 05:30:50 pico-imx8mm hciattach[3167]: rome_hci_reset_req: HCI CMD: 0x1 0> Jul 02 05:30:50 pico-imx8mm hciattach[3167]: ## userial_vendor_set_baud: 14 Jul 02 05:30:50 pico-imx8mm hciattach[3167]: HCI Reset is done Jul 02 05:30:50 pico-imx8mm hciattach[3167]: Setting TTY to N_HCI line discipli> Jul 02 05:30:50 pico-imx8mm hciattach[3167]: Device setup complete
Check if interface “hci” device node exist.
~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 00:1F:7B:31:1F:1B ACL MTU: 1024:7 SCO MTU: 60:8
UP RUNNING
RX bytes:713 acl:0 sco:0 events:42 errors:0
TX bytes:1015 acl:0 sco:0 commands:42 errors:0
Features: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: SLAVE ACCEPT
Name: 'pico-imx8mm'
Class: 0x200000
Service Classes: Audio
Device Class: Miscellaneous,
HCI Version: 5.0 (0x9) Revision: 0x0
LMP Version: 5.0 (0x9) Subversion: 0x25a
Manufacturer: Qualcomm (29)
Scan the bluetooth device.
~# hcitool -i hci0 scan
Scanning ...
20:74:CF:27:82:56 TREKZ Titanium by AfterShokz
Make sure bluetooth device for testing is able to be scanned. Load bluetooth firmware into BT chip via UART and need to wait few secs to complete.
For PICO-IMX8MQ:
~# hciattach -t 30 /dev/ttymxc1 any 115200 flow Setting TTY to N_HCI line discipline Device setup complete
For PICO-IMX8MM:
~# hciattach -t 30 /dev/ttymxc0 any 115200 flow Setting TTY to N_HCI line discipline Device setup complete
Check if interface “hci” device node exist.
~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 00:1F:7B:31:01:47 ACL MTU: 1024:7 SCO MTU: 60:8
UP RUNNING
RX bytes:684 acl:0 sco:0 events:39 errors:0
TX bytes:995 acl:0 sco:0 commands:39 errors:0
Features: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: SLAVE ACCEPT
Name: 'pico-imx8m'
Class: 0x200000
Service Classes: Audio
Device Class: Miscellaneous,
HCI Version: 4.1 (0x7) Revision: 0x0
LMP Version: 4.1 (0x7) Subversion: 0x25a
Manufacturer: Qualcomm (29)
Bring hci interface up.
~# hciconfig hci0 up
Scan the bluetooth device.
~# hcitool -i hci0 scan
Scanning ...
20:74:CF:27:82:56 TREKZ Titanium by AfterShokz