Hi there,
We are trying to bring up the IW612 based Wifi bluetooth module from MAYA with IMX8MP based board.
We were successfully able to bring-up the Wi-Fi we are having issues with bluetooth.
While the Bluetooth functionality works correctly when RTS/CTS flow control is not used, I encounter issues when enabling RTS/CTS.
Specifically, when I connect the RTS and CTS pins between the host and the module, Bluetooth initialization fails with opcode timeouts and TX errors.
root@verdin-imx8mp-15460290:~# modprobe btnxpuart
[ 42.127549] wlan: SCAN COMPLETED: scanned AP count=17
root@verdin-imx8mp-15460290:~# [ 42.439851] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 42.445247] Bluetooth: BNEP socket layer initialized
[ 43.266730] Bluetooth: hci0: FW already running.
[ 45.315028] Bluetooth: hci0: Opcode 0x0c03 failed: -110
[ 47.330733] Bluetooth: hci0: Setting baudrate failed (-110)
root@verdin-imx8mp-15460290:~#
root@verdin-imx8mp-15460290:~# [ 49.346732] Bluetooth: hci0: Setting wake-up method failed (-110)
[ 51.362750] Bluetooth: hci0: Setting Power Save mode failed (-110)
Interestingly, if I ground the CTS pin on the Bluetooth module and leave the RTS pin unconnected, the module initializes correctly and basic functionality appears to work. However, when I attempt to scan for nearby Bluetooth devices, the following errors occur:
root@verdin-imx8mp-15460290:~# hciconfig
hci0: Type: Primary Bus: UART
BD Address: 20:BA:36:56:BB:E0 ACL MTU: 1021:7 SCO MTU: 120:6
UP RUNNING PSCAN
RX bytes:902 acl:0 sco:0 events:65 errors:0
TX bytes:1610 acl:0 sco:0 commands:64 errors:0
root@verdin-imx8mp-15460290:~# bluetoothctl
hci0 new_settings: powered bondable ssp br/edr le secure-conn cis-central cis-p
Agent registered
[CHG] Controller 20:BA:36:56:BB:E0 Pairable: yes
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
SetDiscoveryFilter success
hci0 type 7 discovering on
Discovery started
[CHG] Controller 20:BA:36:56:BB:E0 Discovering: yes
[bluetooth]# [ 139.054737] Bluetooth: hci0: Frame reassembly failed (-84)
[NEW] Device 44:A1:70:C1:74:43 44-A1-70-C1-74-43
[bluetooth]# [ 139.836671] Bluetooth: hci0: Frame reassembly failed (-84)
[ 139.842218] Bluetooth: hci0: Frame reassembly failed (-84)
[CHG] Device 4F:03:41:6A:A2:92 RSSI: 0xffffffaa (-86)
[bluetooth]# [ 139.985060] Bluetooth: hci0: Frame reassembly failed (-84)
[NEW] Device 36:D2:3A:FC:99:05 36-D2-3A-FC-99-05
[bluetooth]# [ 140.125421] Bluetooth: hci0: Frame reassembly failed (-84)
[ 140.167024] Bluetooth: hci0: Frame reassembly failed (-84)
[ 140.177003] Bluetooth: hci0: Frame reassembly failed (-84)
My DTS node looks like this:
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
status = "okay";
assigned-clocks = <&clk IMX8MP_CLK_UART1>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
uart-has-rtscts;
bluetooth {
compatible = "nxp,88w8987-bt";
fw-init-baudrate = <115200>;
status = "okay";
};
};
&iomuxc {
pinctrl_uart1: uart1grp {
fsl,pins =
<MX8MP_IOMUXC_SAI2_RXD0__UART1_DCE_RTS 0x1c4>, /* SODIMM 135 */
<MX8MP_IOMUXC_SAI2_TXFS__UART1_DCE_CTS 0x1c4>, /* SODIMM 133 */
<MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x1c4>, /* SODIMM 129 */
<MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x1c4>; /* SODIMM 131 */
};
};
My hardware connection are as follows:
HOST SIDE (IMX8MP) MODULE SIDE (MAYA W2)
UART1_TX | UART_RX |
UART1_RX | UART_TX |
UART1_CTS | UART_RTS |
UART1_RTS | UART_CTS |
I have also tried reversing the RTS and CTS connections, but there was no change in behaviour.
Thank you for contacting NXP Support!
What BSP version are you using?
Can you try using the next values?
pinctrl_uart1: uart1grp {
fsl,pins =
<MX8MP_IOMUXC_SAI2_RXD0__UART1_DCE_RTS 0x140>, /* SODIMM 135 */
<MX8MP_IOMUXC_SAI2_TXFS__UART1_DCE_CTS 0x140>, /* SODIMM 133 */
<MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140>, /* SODIMM 129 */
<MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140>; /* SODIMM 131 */
};
Remember that you have to install the wifi (modprobe moal mod_para=nxp/wifi_mod_para.conf) drivers before to insert the btnxpuart module.
Best Regards!
Chavira
Hi @Chavira ,
Thanks for your response,
What BSP version are you using?
--I am using linux kernel version 6.6.74.
Can you try using the next values?
-- I have tried this but i am having the same OP code failure error.
Error log:
root@verdin-imx8mp-15460290:~# modprobe btnxpuart
[ 38.966015] wlan: SCAN COMPLETED: scanned AP count=8
[ 38.980544] wlan: mlan0 START SCAN
root@verdin-imx8mp-15460290:~# [ 40.376824] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 40.382218] Bluetooth: BNEP socket layer initialized
[ 41.186982] Bluetooth: hci0: FW already running.
[ 43.234989] Bluetooth: hci0: Opcode 0x0c03 failed: -110
[ 44.843967] wlan: SCAN COMPLETED: scanned AP count=12
[ 45.250972] Bluetooth: hci0: Setting baudrate failed (-110)
[ 47.267007] Bluetooth: hci0: Setting wake-up method failed (-110)
[ 49.282970] Bluetooth: hci0: Setting Power Save mode failed (-110)
Hi,
The NXP Bluetooth Serial driver can run standalone, so it is OK to only issue modprobe btnxpuart.
1. I assume you are using a custom board based on the iMX8MP, can you confirm?
2. Could you please try with fw-init-baudrate=3000000 (just because this is the one I tried)?
4. Are you able to see with an external device like a logic analyzer the RTS and CTS communication?
5. I did a test on my side using the iMX8MP-EVK and the 2EL module, and it is working on my side. I just changed the default dtb. You can take a look to the one I used in the iMX8MP BSP.
Regards,
Daniel.