coex_wifi_a2dp_sink#
Overview#
The example demonstrates the coexistence of Bluetooth A2DP sink (edgefast_open) and Wi-Fi.
This document provides step-by-step procedures to build and test the example, and also instructions for running the included sample applications.
Supported Boards#
MIMXRT1060-EVKC + IW416
Overview
This document provides step-by-step procedures to build and test coex examples, and also instructions for running the included sample applications.
Hardware requirements
Micro USB cable
evkcmimxrt1060 board
Personal Computer
One of the following modules:
Embedded Artists 2EL M.2 Module (Rev-A1) - direct M2 connection
Embedded Artists 1ZM M.2 Module (EAR00364) - direct M2 connection
Embedded Artists 1XK M.2 Module (EAR00385) - direct M2 connection
Board settings
Before building the example application define Wi-Fi module in the _boards/evkcmimxrt1060/coex_examples/coex_wifi_a2dp_sink/prj.conf.
If you want to use Embedded Artists 2EL M.2 Module (Rev-A1), please set CONFIG_MCUX_COMPONENT_component.wifi_bt_module.board_murata_2el_m2 to y.
CONFIG_MCUX_COMPONENT_component.wifi_bt_module.IW61X=yCONFIG_MCUX_COMPONENT_component.wifi_bt_module.board_murata_2el_m2=y
If you want to use Embedded Artists 1ZM M.2 Module (EAR00364), please set CONFIG_MCUX_COMPONENT_component.wifi_bt_module.board_murata_1zm_m2 to y.
CONFIG_MCUX_COMPONENT_component.wifi_bt_module.88W8987=yCONFIG_MCUX_COMPONENT_component.wifi_bt_module.board_murata_1zm_m2=y
If you want to use Embedded Artists 1XK M.2 Module (EAR00385), please set CONFIG_MCUX_COMPONENT_component.wifi_bt_module.board_murata_1xk_m2 to y.
CONFIG_MCUX_COMPONENT_component.wifi_bt_module.IW416=yCONFIG_MCUX_COMPONENT_component.wifi_bt_module.board_murata_1xk_m2=y
Jumper settings for RT1060-EVKC (enables external 5V supply):
remove J40 5-6 connect J40 1-2 connect J45 with external power(controlled by SW6)
Murata Solution Board settings
Embedded Artists 2EL module datasheet: https://www.embeddedartists.com/doc/ds/2EL_M2_Datasheet.pdf Embedded Artists 1ZM module datasheet: https://www.embeddedartists.com/doc/ds/1ZM_M2_Datasheet.pdf Embedded Artists 1XK module datasheet: https://www.embeddedartists.com/doc/ds/1XK_M2_Datasheet.pdf
The hardware should be reworked according to the hardware rework guide for evkcmimxrt1060 and Murata 1XK/1ZM/2EL M.2 Adapter in document Hardware Rework Guide for EdgeFast BT PAL.
NOTE:
To ensure that the LITTLEFS flash region has been cleaned, all flash sectors need to be erased before downloading example code.
After downloaded binary into qspiflash and boot from qspiflash directly, please reset the board by pressing SW7 or power off and on the board to run the application.
Build and flash
Prerequisites:
CMake (version >=3.24)
Ninja (version >=1.12)
ARM GCC Toolchain (only support ARM GCC)
Python3 (version >=3.6)
NOTE: Make sure that the paths of all these tools are set into the path system variable.
2. Building
flexspi_nor_debug:
$ cd <sdk root>
$ west build -b evkcmimxrt1060 examples/coex_examples/coex_wifi_a2dp_sink --toolchain armgcc --config flexspi_nor_debug -d coex_wifi_a2dp_sink
flexspi_nor_release:
$ cd <sdk root>
$ west build -b evkcmimxrt1060 examples/coex_examples/coex_wifi_a2dp_sink --toolchain armgcc --config flexspi_nor_release -d coex_wifi_a2dp_sink
NOTE:
-d coex_wifi_a2dp_sink-> Specify the generated project path. Can name it as needed.Find coex_wifi_central_ht.elf/coex_wifi_central_ht.bin in coex_wifi_central_ht folder.
Only support armgcc to build coex application.
CSI and NET_MONITOR are disabled by default due to RAM limitation. If to test CSI and NET_MONITOR, enable them and disable enterprise in wifi_config.h. Modify middleware/wireless/coex/src/configs/
/wifi/wifi_config.h: Enable CSI and NET_MONITOR: #define CONFIG_CSI 1 #define CONFIG_NET_MONITOR 1 Disable enterprise: #define CONFIG_WPA_SUPP_CRYPTO_ENTERPRISE 0 #define CONFIG_WPA_SUPP_CRYPTO_AP_ENTERPRISE 0
4. Flash Binaries
Flash the image with the following command,
##### CMD to write CPU3 coex app image to flash in J-link window:
J-Link> loadbin C:\xxx\coex_wifi_a2dp_sink.bin, 0x60000000
Run
Prepare the Demo
Connect a micro USB cable between the PC host and the MCU-Link USB port (J53) on the board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Launch the debugger in your IDE to begin running the example.
Running the example
The log below shows the output of the coex examples in the terminal window:
```bash
Coex APP
========================================
Initialize Firecrest-2EL (IW612) M2 Module
Download BT FW… download starts(429436) ………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….. download success! Download WLAN FW… STA MAC Address: A0:CD:F3:77:E7:66 supplicant_main_task: 632 Starting wpa_supplicant thread with debug level: 6
Coex menu called
0 Coex menu print
w Wifi Cli
Bluetooth A2dp Sink demo start…
app_cb: WLAN: received event 12
app_cb: WLAN initialized
WLAN CLIs are initialized
CLIs Available:
help (exit: 0)
wlan-version
wlan-mac
wlan-thread-info
wlan-net-stats
wlan-set-mac <MAC_Address>
wlan-scan
wlan-scan-opt ssid
dhcp-stat
========================================
app_cb: WLAN: received event 16
app_cb: WLAN: PS_ENTER
app_cb: WLAN: received event 16
app_cb: WLAN: PS_ENTER Bluetooth initialized BR/EDR set connectable and discoverable done Wait for connection
1. WiFi Test
> Enter 'w' to enter Wi-Fi command mode. Enter '0' to return coex menu.
- Get the Wi-Fi driver and firmware version:
```bash
>
>wlan-version
wifi commands: wlan-version
WLAN Driver Version : v1.3.r48.p52
WLAN Firmware Version : w9177o-V1, SDIO, FP99, 18.99.3.p27.3, PVE_FIX 1
Scan the network:
>wlan-scan
wifi commands: wlan-scan
Scan scheduled...
>10 networks found:
7C:21:0E:17:D5:6F "NXP" Infra
mode: 802.11AC
channel: 64
rssi: -65 dBm
security: WPA2 Enterprise
WMM: YES
802.11W: NA
WPS: NO
7C:21:0E:17:D5:69 "NXPOPEN" Infra
mode: 802.11AC
channel: 64
rssi: -64 dBm
security: WPA2
WMM: YES
802.11K: YES
802.11V: YES
802.11W: NA
WPS: NO
Br/edr Test
NOTE:
No need enter any BT commands.