Can't activate the NXP's 88W9098 chip's Bluetooth interface on the i.MX8MQ EVK board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't activate the NXP's 88W9098 chip's Bluetooth interface on the i.MX8MQ EVK board

1,042 Views
SoniaLuo
Contributor I

Hi,

We are using the u-blox's M2-JODY-377-00B of 88W9098 chip on i.MX8MQ EVK's M.2 slot. But as there is an on-board CYW4xxxx chip, when we tried to activate the 88W9098 chip's Bluetooth function, actually only the interface of the CYW4xxxx chip was activated. See below details:

Follow the steps from the document "Murata Wi-Fi & BT (NXP) for i.MX Linux User Guide" https://community.murata.com/sfc/servlet.shepherd/document/download/0695F00000LYPUjQAP?operationCont...

In u-boot:

setenv fdt_file fsl-imx8mq-evk-pcie1-m2.dtb
saveenv
# Boot kernel
boot

Load Drivers:

modprobe moal mod_para=nxp/wifi_mod_para.conf

...

hciattach /dev/ttymxc[UART# -1] any 115200 flow
hcitool -i hci0 cmd 0x3f 0x0009 0xc0 0xc6 0x2d 0x00
killall hciattach
hciattach /dev/ttymxc[UART# -1] any -s 3000000 3000000 flow
hciconfig hci0 up
hciconfig hci0 piscan
hciconfig hci0 noencrypt
hcitool scan

We actually got below result by following above steps:

setenv fdt_file imx8mq-evk-pcie1-m2.dtb  -- (There is no file named fsl-imx8mq-evk-pcie1-m2.dtb but imx8mq-evk-pcie1-m2.dtb in the partition mmc 1)
saveenv
# Boot kernel
boot

[ 33.763101] VGEN6: disabling
modprobe moal mod_para=nxp/wifi_mod_para.conf
ifconfig mlan0 up

NXP i.MX Release Distro 5.15-kirkstone imx8mqevk ttymxc0

imx8mqevk login: root
root@imx8mqevk:~# modprobe moal mod_para=nxp/wifi_mod_para.conf
root@imx8mqevk:~# ifconfig mlan0 up
root@imx8mqevk:~# hciattach /dev/ttymxc2 any 115200 flow
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8mqevk:~# [ 75.556606] NET: Registered PF_ALG protocol family
hciconfig hci0 up
root@imx8mqevk:~# hcitool -i hci0 cmd 0x3f 0x0009 0xc0 0xc6 0x2d 0x00
< HCI Command: ogf 0x3f, ocf 0x0009, plen 4
C0 C6 2D 00
> HCI Event: 0x0e plen 4
01 09 FC 01                  -- (From the example in the document, it returned 01 09 FC 00. Is 01 a failure indication at the last byte?)
root@imx8mqevk:~# killall hciattach
root@imx8mqevk:~# [ 101.762185] Bluetooth: hci0: sending frame failed (-49)
hciattach /dev/ttymxc2 any -s 3000000 3000000 flow -t 20
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8mqevk:~# [ 127.646064] Bluetooth: hci0: command 0x1003 tx timeout
[ 129.662061] Bluetooth: hci0: command 0x1001 tx timeout
[ 131.678064] Bluetooth: hci0: command 0x1009 tx timeout
hciconfig hci0 up
[ 135.646723] Bluetooth: hci0: Frame reassembly failed (-84)
[ 137.662053] Bluetooth: hci0: command 0x1003 tx timeout
[ 139.678051] Bluetooth: hci0: command 0x1001 tx timeout
[ 141.694053] Bluetooth: hci0: command 0x1009 tx timeout
Can't init device hci0: Connection timed out (110)
root@imx8mqevk:~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN
RX bytes:1 acl:0 sco:0 events:0 errors:0
TX bytes:24 acl:0 sco:0 commands:6 errors:0
Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DH1 HV1
Link policy:
Link mode: PERIPHERAL ACCEPT

When we set the baud rate to 3,000,000, it generated quite a few timeout events and the BD Address is all 0s.

Then we tried to set baud rate to 115200, but just saw the on-board chip is activated:

root@imx8mqevk:~# modprobe moal mod_para=nxp/wifi_mod_para.conf
root@imx8mqevk:~# ifconfig mlan0 up
root@imx8mqevk:~# hciattach /dev/ttymxc2 any 115200 flow
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8mqevk:~# [ 31.909711] NET: Registered PF_ALG protocol family
[ 33.758135] VGEN1: disabling
[ 33.761571] VGEN6: disabling
hciconfig hci0 up
root@imx8mqevk:~# hcitool -i hci0 cmd 0x3f 0x0009 0xc0 0xc6 0x2d 0x00
< HCI Command: ogf 0x3f, ocf 0x0009, plen 4
C0 C6 2D 00
> HCI Event: 0x0e plen 4
01 09 FC 01
root@imx8mqevk:~# killall hciattach
root@imx8mqevk:~# [ 51.842203] Bluetooth: hci0: sending frame failed (-49)

root@imx8mqevk:~# hciattach /dev/ttymxc2 any -s 115200 115200 flow -t 20
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8mqevk:~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 9A:A2:5D:6F:5A:FF ACL MTU: 1021:8 SCO MTU: 64:1
DOWN
RX bytes:674 acl:0 sco:0 events:35 errors:0
TX bytes:427 acl:0 sco:0 commands:35 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: PERIPHERAL ACCEPT

root@imx8mqevk:~# hciconfig hci0 up
root@imx8mqevk:~# hciconfig hci0 piscan
root@imx8mqevk:~# hciconfig hci0 noencrypt
root@imx8mqevk:~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 9A:A2:5D:6F:5A:FF ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN ISCAN
RX bytes:1425 acl:0 sco:0 events:81 errors:0
TX bytes:1252 acl:0 sco:0 commands:81 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: PERIPHERAL ACCEPT
Name: 'imx8mqevk'
Class: 0x200000
Service Classes: Audio
Device Class: Miscellaneous,
HCI Version: 4.1 (0x7) Revision: 0x2000
LMP Version: 4.1 (0x7) Subversion: 0x230f
Manufacturer: Broadcom Corporation (15)

See it reported Manufacturer is Broadcom Corporation. Our hardware engineer helped to test the signals from the antennas, and confirmed that only the on-board antenna had Bluetooth signals.

The system version is:

root@imx8mqevk:~# uname -a
Linux imx8mqevk 5.15.32-lts-next+gfa6c3168595c #1 SMP PREEMPT Tue Jun 7 02:34:46 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

0 Kudos
7 Replies

996 Views
SoniaLuo
Contributor I

Hi Christine,

Thank you for your reply and the document. I saw the document has test steps after the the hci0 interface is up, which we've used on normal Bluetooth test. But I can't find the steps of how to bring up the hci0 interface up for the chips like 88W9098 through M.2 socket. Do you have other document about the process?

You think Bluetooth has been worked fine, but is the Bluetooth interface still for the on-board chip CYW4XXXX? Why the "hciconfig -a" showed the Manufacturer is Broadcom Corporation, not NXP? Our hardware engineer used Spectrum Analyser instrument to capture Bluetooth signal, and we can only captured it from the on-board antenna, and no signal from the 88W9098 antenna.

0 Kudos

964 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @SoniaLuo 

Oh, yes, you are correct, it should be NXP or Marvell, other than Broadcomm or Qualcomm COB WiFi chip CYW4XXX. 

I test it on my local side with AW-XM458 (M.2 PCIE+UART), it can show correct.

Please refer my steps as below:

1.change dtb file

========
Hit any key to stop autoboot: 0
u-boot=> setenv fdtfile imx8mq-evk-pcie1-m2.dtb
u-boot=> saveenv
Saving Environment to MMC... Writing to MMC(0)... OK
u-boot=> reset

resetting ...

2.After boot, login with root:

=======

imx8mqevk login: root

3. load WiFi driver

========

root@imx8mqevk:~# modprobe moal mod_para=nxp/wifi_mod_para.conf
[ 165.874807] mlan: loading out-of-tree module taints kernel.
[ 165.904328] wlan: Loading MWLAN driver
[ 165.908388] wlan: Register to Bus Driver...
[ 165.912873] wlan_pcie 0001:01:00.0: enabling device (0000 -> 0002)
[ 165.919144] Attach moal handle ops, card interface type: 0x206
[ 165.925886] PCIE9098: init module param from usr cfg
[ 165.930908] card_type: PCIE9098, config block: 0
[ 165.935541] cfg80211_wext=0xf
[ 165.938508] max_vir_bss=1
[ 165.941139] cal_data_cfg=none
[ 165.944115] ps_mode = 1
[ 165.946560] auto_ds = 1
[ 165.949019] host_mlme=enable
[ 165.951908] fw_name=nxp/pcieuart9098_combo_v1.bin
[ 165.956638] rx_work=1 cpu_num=4
[ 165.959801] Attach mlan adapter operations.card_type is 0x206.
[ 165.967228] Request firmware: nxp/pcieuart9098_combo_v1.bin
[ 166.249277] FW download over, size 702324 bytes
[ 166.511624] WLAN FW is active
[ 166.514597] on_time is 166511550293
[ 166.532687] VDLL image: len=168252
[ 166.537256] fw_cap_info=0xc8fcefa3, dev_cap_mask=0xffffffff
[ 166.542879] max_p2p_conn = 8, max_sta_conn = 64
[ 166.557913] Register NXP 802.11 Adapter mlan0
[ 166.562444] wlan: uap%d set max_mtu 2000
[ 166.567642] Register NXP 802.11 Adapter uap0
[ 166.575247] Register NXP 802.11 Adapter wfd0
[ 166.579611] wlan: version = PCIE9098--17.92.1.p136.13-MM5X17366.p5-GPL-(FP92)
[ 166.588808] wlan_pcie 0001:01:00.1: enabling device (0000 -> 0002)
[ 166.595299] Attach moal handle ops, card interface type: 0x206
[ 166.601360] PCIE9098: init module param from usr cfg
[ 166.606423] card_type: PCIE9098, config block: 1
[ 166.611102] cfg80211_wext=0xf
[ 166.614082] max_vir_bss=1
[ 166.616743] cal_data_cfg=none
[ 166.619747] ps_mode = 1
[ 166.622204] auto_ds = 1
[ 166.624691] host_mlme=enable
[ 166.627602] fw_name=nxp/pcieuart9098_combo_v1.bin
[ 166.635143] rx_work=1 cpu_num=4
[ 166.638315] Attach mlan adapter operations.card_type is 0x206.
[ 166.655386] Request firmware: nxp/pcieuart9098_combo_v1.bin
[ 166.662543] WLAN FW already running! Skip FW download
[ 166.668371] WLAN FW is active
[ 166.671534] on_time is 166668487379
[ 166.687249] VDLL image: len=168252
[ 166.690969] fw_cap_info=0x68fcefa3, dev_cap_mask=0xffffffff
[ 166.696581] max_p2p_conn = 8, max_sta_conn = 64
[ 166.705911] Register NXP 802.11 Adapter mmlan0
[ 166.710529] wlan: muap%d set max_mtu 2000
[ 166.715829] Register NXP 802.11 Adapter muap0
[ 166.722084] Register NXP 802.11 Adapter mwfd0
[ 166.726571] wlan: version = PCIE9098--17.92.1.p136.13-MM5X17366.p5-GPL-(FP92)
[ 166.734745] wlan: Register to Bus Driver Done
[ 166.739178] wlan: Driver loaded successfully
root@imx8mqevk:~# hciattach /dev/ttymxc2 any 115200 flow
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8mqevk:~# [ 173.571077] Bluetooth: hci0: command 0x1003 tx timeout------(it shows the baud rate is not correct.)
[ 175.587078] Bluetooth: hci0: command 0x1001 tx timeout
[ 177.603076] Bluetooth: hci0: command 0x1009 tx timeout

root@imx8mqevk:~#
root@imx8mqevk:~#
root@imx8mqevk:~# killall hciattach
root@imx8mqevk:~#
root@imx8mqevk:~#
root@imx8mqevk:~#
root@imx8mqevk:~# hciattach /dev/ttymxc2 any 3000000 flow     ----(change baud rate from 115200 to 3000000)
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8mqevk:~# [ 194.336093] NET: Registered PF_ALG protocol family

root@imx8mqevk:~#
root@imx8mqevk:~#
root@imx8mqevk:~#
root@imx8mqevk:~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 48:E7:DA:25:61:3F ACL MTU: 1021:7 SCO MTU: 120:6
DOWN
RX bytes:737 acl:0 sco:0 events:43 errors:0
TX bytes:468 acl:0 sco:0 commands:43 errors:0
Features: 0xff 0xfe 0x8f 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: PERIPHERAL ACCEPT

root@imx8mqevk:~# hciconfig hci0 up
root@imx8mqevk:~#
root@imx8mqevk:~#
root@imx8mqevk:~#
root@imx8mqevk:~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 48:E7:DA:25:61:3F ACL MTU: 1021:7 SCO MTU: 120:6
UP RUNNING
RX bytes:1516 acl:0 sco:0 events:92 errors:0
TX bytes:1278 acl:0 sco:0 commands:92 errors:0
Features: 0xff 0xfe 0x8f 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: PERIPHERAL ACCEPT
Name: 'imx8mqevk'
Class: 0x200000
Service Classes: Audio
Device Class: Miscellaneous,
HCI Version: 5.0 (0x9) Revision: 0x8300
LMP Version: 5.0 (0x9) Subversion: 0x1088
Manufacturer: Marvell Technology Group Ltd. (72)

Can you please just follow my steps to have a try and let me know the results?

By the way, you can also refer to this User Manual to bring up 88W9098 Wi-Fi and Bluetooth on i.MX8MQ.

UM11483  Getting Started with NXP-based Wireless Modules on i.MX 8M Quad EVK Running Linux OS

Hope above info can help you.

Best regards,

Christine.

0 Kudos

936 Views
SoniaLuo
Contributor I

Hi Christine,

Thank you for your excellent support! I at last got the below Bluetooth chip running:

root@imx8mqevk:~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 60:09:C3:81:5D:E4 ACL MTU: 1021:7 SCO MTU: 120:6
UP RUNNING
RX bytes:1516 acl:0 sco:0 events:92 errors:0
TX bytes:1278 acl:0 sco:0 commands:92 errors:0
Features: 0xff 0xfe 0x8f 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: PERIPHERAL ACCEPT
Name: 'imx8mqevk'
Class: 0x200000
Service Classes: Audio
Device Class: Miscellaneous,
HCI Version: 5.0 (0x9) Revision: 0x8300
LMP Version: 5.0 (0x9) Subversion: 0x1074
Manufacturer: Marvell Technology Group Ltd. (72)

0 Kudos

910 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @SoniaLuo 

Great job! And you are welcome!

Then let me close this case for now, and if you have any other queries, please feel free to create new case to us.

Have a nice day~

 

Best regards,

Christine.

0 Kudos

901 Views
SoniaLuo
Contributor I

You too, have a nice week Christine!

0 Kudos

1,038 Views
SoniaLuo
Contributor I

BTW, the WIFI driver and WIFI function of the 88W9098 chip worked quite well.

0 Kudos

1,007 Views
Christine_Li
NXP TechSupport
NXP TechSupport

Hi, @SoniaLuo 

From your given info, I think the Bluetooth has been worked fine on your side with "hciattach /dev/ttymxc2 any 115200 flow" command. It also has been list hci0 interface and show correct BT MAC address.

I think you are using the combo firmware when you load Wi-Fi driver(modprobe moal mod_para=nxp/wifi_mod_para.conf), then BT firmware should also been load successfully.

Usually we don't have Murata's user manual, I am not sure whether have any errors in it. But for 88W9098 Wi-Fi and Bluetooth configuration, I think you can follow our User Manual :UM11490 Feature Configuration Guide for NXP-based Wireless Modules
on i.MX 8M Quad EVK
 

You can refer to this User manual to check your BT, I think it should work fine now.

Best regards,

Christine.

0 Kudos