Interfacing IW612 with IMX8QXP

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

Interfacing IW612 with IMX8QXP

6,863 Views
jnj
Contributor III

I am currently working on IMX8QXP[L5.15 Kirkstone] and I would like to connect IW612 with IMX8QXP to enable Bluetooth functionality. My goal is to load only the UART Bluetooth firmware, and to achieve this, I am consulting the document titled 'Getting Started with NXP-based Wireless Modules on i.MX 8M Quad EVK Running Linux OS' for validating the Bluetooth interface with the i.MX 8QXP board. Unfortunately, the mentioned file 'UART-FW-LOADER--GPL-src.tgz' is not accessible on the NXP site. Can someone help me in acquiring the release package?

0 Kudos
Reply
39 Replies

2,259 Views
AnisCh
Contributor II

did you get any feedback about your issue?

0 Kudos
Reply

2,244 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @AnisCh ,

 

I found your Bluetooth has been up and worked fine.

As for power saving mode, it is not enabled by platform uart driver. actually few customers use the feature now.

 

Thanks!

Regards,

weidong

0 Kudos
Reply

2,892 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

Could you please clarify your setup ?

1/ Do you use an IW611 module ? If yes, which model ?

2/ How do you connect the IW611 SDIO and UART interfaces to the i.MX8 board ?

 

Regards,

Olivier

0 Kudos
Reply

2,890 Views
jnj
Contributor III

Hi @ocourson ,

I have connected IW612 module [M.2] [https://www.embeddedartists.com/products/2el-m-2-module/]directly to the IMX8QXP MEK M.2 connector.

0 Kudos
Reply

2,885 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

I wonder if some SW/HW changes are required to make UART work on IMX8QXP M.2.

I do not know if it applies to IMX8QXP EVK, but I know that IMX8MQ needs some changes to have UART working on M.2 connector:

- need to use a specific dtb to enable both PCIe and UART (in your case, you are not using PCIe but that dtb was also required to enable UART on M.2)

- need HW rework (4 resistors to be depopulated from the EVK)

 

I need to crosscheck if these changes are required on IMX8QXP MEK.

 

Regards,

Olivier

0 Kudos
Reply

2,888 Views
jnj
Contributor III

Hi @ocourson ,

In IMX8QXP EVK W_DISABLE1 pin [M.2 connector]state was 0 .That means module was not enabled.In EVK W_DISABLE1 pin of M.2 Module was going to i2c expander.I enabled this pin manually using the following echo command .

echo 474 > /sys/class/gpio/export
echo 1 > /sys/class/gpio/gpio474/value

and after that I followed the following commands in the imx8qxp evk.

./fw_loader_imx_lnx /dev/ttyLP1 115200 0 /home/root/FwImage/uartspi_n61x_v1.bin.se 3000000
hciattach /dev/ttyLP1 any 115200 flow
hciconfig hci0 up
hciconfig 

jnj_0-1708511552239.png

after this bluetooth was up and I am able to connect to a device.I haven't changed anything in the dts file of imx8qxp mek. Further testing is going on .Do you have any suggestions in the above procedure?If I committed anything wrong in enabling the bluetooth, kindly let me know.

0 Kudos
Reply

2,885 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

Your procedure seems OK (refer to UM11483 chapter 6, and UM11490 chapter 4).

Could you provide the hciconfig output ?

 

But remind that, as IW611 is a Wifi+BT chipset, our default init scheme is using the wifi moal driver to load wifi+bt combo firmware over SDIO.

BT only firmware download over UART (using btnxpuart or fw_loader) is mainly useful in case you need to reset independently the wifi and the BT parts.

 

Regards,

Olivier

0 Kudos
Reply

2,883 Views
jnj
Contributor III

Hi @ocourson ,

Please see the hciconfig output .

jnj_0-1708522440334.png

I faced one issue .That is , I connected a phone and headset to the BT module.And I played song from phone.But in headset the song is a kind of choppy and I am getting the following log

Screenshot from 2024-02-21 18-22-50.png

0 Kudos
Reply

2,879 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

hciconfig shows the BT MAC, so BT firmware is working.

Could you please send all the exact steps you use to reproduce your issue ?

Remind that 115200 is not enough for A2DP. If you want to use A2DP, you need to switch UART to 3000000 (refer to UM11483)

 

Regards,

Olivier

2,873 Views
jnj
Contributor III

Hi @ocourson ,

Thank you so much for the support. The audio breaking issue has been resolved by changing the baud rate from 115200 to 3000000 as you mentioned .I referred the document and followed the steps.

"But remind that, as IW611 is a Wifi+BT chipset, our default init scheme is using the wifi moal driver to load wifi+bt combo firmware over SDIO.

BT only firmware download over UART (using btnxpuart or fw_loader) is mainly useful in case you need to reset independently the wifi and the BT parts."

 

Regarding the above points,in my case I am using only the BT interface in the IW612 WiFi/BT module.SDIO will not be using .That's why I am using the UART bt only firmware to enable BT.Is there any issue in using so. Does it affect any profile support or smooth functioning of BT/BLE module ?  

0 Kudos
Reply

2,866 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

Sure, you can you BT only part, using firmware download over UART.

 

Regards,

Olivier

0 Kudos
Reply

2,877 Views
jnj
Contributor III

Hi @ocourson ,

Thank you for the reply.I have followed the below steps.

echo 474 > /sys/class/gpio/export // To enable the module
echo 1 > /sys/class/gpio/gpio474/value
./fw_loader_imx_lnx /dev/ttyLP1 115200 0 /home/root/FwImage/uartspi_n61x_v1.bin.se 3000000
hciattach /dev/ttyLP1 any 115200 flow
hciconfig hci0 up
hciconfig

pactl unload-module module-bluetooth-discover // to resolve the disconnect issue
pactl load-module module-bluetooth-discover headset=auto enable_msbc=false 

Then, I used Bluetoothctl commands [scan on, trust <mac>, pair <mac>, connect <mac>] to connect to a mobile phone and a headset. I played a song from the mobile phone and checked the song in the headset. However, the song was breaking.

0 Kudos
Reply

2,854 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

As you confirmed that:

1/ BT firmware download is successful once W_DISABLE1 pin is correctly set 

2/ The audio breaking issue has been resolved by changing the UART baud rate from 115200 to 3000000

 

Can we close current discussion, or do you still need support from us ?

 

Regards,

Olivier

0 Kudos
Reply

2,844 Views
jnj
Contributor III

Hi @ocourson ,

I have one more query. If we connect the IW611 WiFi module to USDHC1 [Ethernet pins], create a node in the DTS file for the USDHC1, and use the moal driver to enable WiFi, are there any more changes required?

0 Kudos
Reply

2,829 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

This should be enough.

 

Regards,

Olivier

0 Kudos
Reply

2,820 Views
jnj
Contributor III

Hi @ocourson ,

I have some more doubts regarding the Bluetooth.I want to enable the deep sleep mode in the bluetooth. I tried in the L5.15.71_2.2.1 version [ Uart firmware flashing is done using UART fw loader ].But deep sleep mode is not working.

1. Does this uart firmware[linux kernel version < 6.1] support Deep sleep mode ?

2. I tried flashing the linux kernnel version 6.1-mickledore since I am having doubt whether deep sleep is supported in the uart only fw. I used this command : hcitool -i hci0 cmd 3F 23 02 00 00 [as mentioned in the doc : AN13920] to put the module in deep sleep mode.But the module is not going to deep sleep mode.

Could you please guide me on this?

0 Kudos
Reply

2,816 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

1/ deep sleep is automatically handled by NXP btnxuart driver

2/ NXP btnxpuart driver can only be used in kernel 6.x, but not with 5.x because some internal API are missing

3/ deep sleep can be used with legacy UART driver, but in that case, user need to make some manual config, as below:

  1. killall -9 hciattach
  2. rmmod hci_uart.ko // Removing the open source hci uart driver
  3. ./fw_loader_linux /dev/ttyXXX 115200 0 /lib/firmware/nxp/XXX.bin 3000000
  4. insmod hci_uart.ko //insert the NXP legacy HCI UART driver
  5. hciattach /dev/ttyUSB0 any -s 3000000 3000000 flow dtron
  6. hciconfig hci0 reset
  7. echo "psmode=1" >> /proc/mbt_uart/hci0/config

UART break signal is required to be initiated from the driver in order to start the BT deep sleep mode

 

Regards,

Olivier

0 Kudos
Reply

2,807 Views
jnj
Contributor III

Hi @ocourson ,

Thank you for the response.

"deep sleep is automatically handled by NXP btnxuart driver"

Could you please elaborate more on this point?

 

0 Kudos
Reply

2,792 Views
ocourson
NXP TechSupport
NXP TechSupport

Dear @jnj 

 

Please refer to AN13920-Enabling Bluetooth Deep-sleep with NXP Bluetooth UART Driver

https://www.nxp.com/webapp/Download?colCode=AN13920

 

Regards,

Olivier

0 Kudos
Reply