background image

NXP Semiconductors

UM11490

Feature Configuration Guide for NXP-based Wireless Modules on i.MX 8M Quad EVK

2.3.2 Get wpa_supplicant version

Command to get wpa_supplicant version

root@imx8mqevk:~# wpa_supplicant -v

Command output example:

wpa_supplicant v2.9

Copyright (c) 2003-2019, Jouni Malinen <[email protected]> and contributors

2.3.3 Use wpa_supplicant to connect with the AP

Connect the device with the Access Point:

root@imx8mqevk:~# killall wpa_supplicant

root@imx8mqevk:~# killall hostapd

root@imx8mqevk:~# wpa_supplicant -i mlan0 -Dnl80211 –c /etc/

wpa_supplicant.conf

Command output example:

Successfully initialized wpa_supplicant

rfkill: Cannot open RFKILL contro[25602.796098] IPv6:

 ADDRCONF(NETDEV_UP): mlan0: link is not ready

    [25602.922052] wlan: mlan0 START SCAN

    [25607.566402] wlan: SCAN COMPLETED: scanned AP count=18

mlan0: Trying to associate with 1a:2d:8c:55:73:56 (SSID='NXP_Demo'

 freq=2427 MHz)

    [25607.598754] 

wlan: Connected to bssid 1a:XX:XX:XX:73:56

 successfully

mlan0: Associated with 1a:2d:8c:5[25607.606587] IPv6:

 ADDRCONF(NETDEV_CHANGE): mlan0: link becomes ready

    5:73:56

mlan0: CTRL-EVENT-CONNECTED - 

Connection to 1a:2d:8c:55:73:56

 completed [id=0 id_str=]

UM11490

All information provided in this document is subject to legal disclaimers.

© NXP B.V. 2021. All rights reserved.

User manual

Rev. 2 — 29 January 2021

11 / 88

Содержание UM11490

Страница 1: ...9 January 2021 User manual Document information Information Content Keywords NXP based wireless modules Wi Fi features Bluetooth features guidelines driver debug information Abstract Details the Wi Fi...

Страница 2: ...nfigure and test Wi Fi direct updated Section 2 8 3 Set the RF bandwidth added Section 2 8 4 Set the RF channel added Section 2 8 5 Set Tx power added Section 2 8 6 Set Tx continuous mode added Sectio...

Страница 3: ...er i MX 8 families and NXP based wireless modules The Wi Fi features demonstrated in this document are configured with the open source supplicant and the Linux utilities The host platform setup and bu...

Страница 4: ...SlotTime RadioMeasure 0x1431 signal 56 00 dBm last seen 0 ms ago SSID destin Supported rates 1 0 2 0 5 5 6 0 9 0 11 0 12 0 18 0 DS Parameter set channel 4 Country in Environment Indoor Outdoor Channel...

Страница 5: ...mber non GF present 1 OBSS non GF present 1 dual beacon 0 dual CTS protection 0 STBC beacon 0 L SIG TXOP Prot 0 PCO active 0 PCO phase 0 Overlapping BSS scan params passive dwell 20 TUs active dwell 1...

Страница 6: ...pa_supplicant conf Start wpa_cli for the scan root imx8mqevk wpa_cli Command output wpa_cli v2 9 Copyright c 2004 2019 Jouni Malinen j w1 fi and contributors This software may be distributed under the...

Страница 7: ...The configurations for hostapd are stored in the hostapd conf file located in etc directory 2 2 1 Get the hostpad version Execute the command root imx8mqevk hostapd v Command output example hostapd v2...

Страница 8: ...n file for udhcp server Create the configuration file udhcpd conf in etc repository root imx8mqevk nano etc udhcpd conf Add the following content to udhcpd conf file start 192 168 1 10 end 192 168 1 2...

Страница 9: ...selection started this may take a bit 9618 998539 wlan SCAN COMPLETED scanned AP count 1 uap0 interface state COUNTRY_UPDATE ACS uap0 ACS STARTED 9619 479337 wlan SCAN COMPLETED scanned AP count 1 96...

Страница 10: ...n ies 0xc P_Demo 9817 702468 fw doesn t support 11ax 9817 717811 wlan AP started 9817 722028 Set AC 3 txop 47 cwmin 3 cwmax 7 aifs 1 9817 729606 Set AC 2 txop 94 cwmin 7 cwmax 15 aifs 1 9817 736887 Se...

Страница 11: ...conf Command output example Successfully initialized wpa_supplicant rfkill Cannot open RFKILL contro 25602 796098 IPv6 ADDRCONF NETDEV_UP mlan0 link is not ready 25602 922052 wlan mlan0 START SCAN 25...

Страница 12: ...ion describes the hostapd configuration used to configure WPA security and start the Access Point using the open source supplicant Create the configuration file Configure WPA for open source supplican...

Страница 13: ...PLETED scanned AP count 1 19647 577100 wlan SCAN COMPLETED scanned AP count 0 uap0 ACS COMPLETED freq 2412 channel 1 Using interface uap0 with hwaddr 00 50 43 24 84 c4 and ssid NXP_Demo random Cannot...

Страница 14: ...pen source supplicant Create the configuration file Configure WPA2 for open source supplicant root imx8mqevk nano etc hostapd wpa2 conf Configuration file content interface uap0 hw_mode g channel 0 co...

Страница 15: ...0 20040 571527 wlan SCAN COMPLETED scanned AP count 0 20041 051179 wlan SCAN COMPLETED scanned AP count 0 uap0 ACS COMPLETED freq 2412 channel 1 Using interface uap0 with hwaddr 00 50 43 24 84 c4 and...

Страница 16: ...configurations for WPA3 SAE and SAE transition mode backward compatibility with WPA2 PSK using hostapd and wpa_supplicant for Access Point and Station To test WPA3 security load the drivers with the m...

Страница 17: ...tapd etc hostapd wpa3 sae conf Command output example Configuration file etc hostapd wpa3 sae conf rfkill Cannot open RFKILL control device 758 651665 wlan HostMlme uap0 send deauth disassoc Using int...

Страница 18: ...2437 MHz 150 056535 mlan0 150 056539 wlan HostMlme Auth received from 00 XX XX XX 3c 0e mlan0 SME Trying to authenticate with 00 50 43 23 3c 0e SSID NXP_Demo freq 2437 MHz 150 073767 mlan0 150 073771...

Страница 19: ...an0 Dnl80211 c etc wpa_supplicant conf Command output example Successfully initialized wpa_supplicant rfkill Cannot open RFKILL contro 29837 078281 IPv6 ADDRCONF NETDEV_UP mlan0 link is not read 29837...

Страница 20: ...i mlan0 Dnl80211 c etc wpa_supplicant conf Command output example Successfully initialized wpa_supplicant rfkill Cannot open RFKILL control device 33831 070886 wlan mlan0 START SCAN 33835 714782 wlan...

Страница 21: ...02 11b standard root imx8mqevk nano etc hostapd conf Configuration file content interface uap0 hw_mode b channel 0 country_code US ssid NXP_Demo 2 5 2 Configure IEEE 802 11a standard Configure the Acc...

Страница 22: ...try_code US ssid NXP_Demo Edit the configuration for 5 GHz root imx8mqevk nano etc hostapd conf Configuration file content interface uap0 hw_mode a ieee80211n 1 channel 0 country_code US ssid NXP_Demo...

Страница 23: ...2896 183972 Attach moal handle ops card interface type 0x105 2896 189935 SD8987 init module param from usr cfg 2896 194807 card_type SD8987 config block 0 2896 199291 cfg80211_wext 0xf 2896 202274 wf...

Страница 24: ...wlan SCAN COMPLETED scanned AP count 0 59 979884 wlan p2p0 START SCAN 3 CTRL EVENT SCAN STARTED 60 111610 wlan SCAN COMPLETED scanned AP count 1 3 P2P DEVICE FOUND ba c7 4a 41 e3 3f p2p_dev_addr ba c...

Страница 25: ...58004 wlan Send EAPOL pkt to ba XX XX XX e3 3f 92 770529 p2p p2p0 0 92 770532 wlan Send EAPOL pkt to ba XX XX XX e3 3f 92 783601 p2p p2p0 0 92 783608 wlan Send EAPOL pkt to ba XX XX XX e3 3f 3 P2P GRO...

Страница 26: ...with the Access point Follow the instructions given in Section 2 3 Connect with the Access Point to connect the device i MX 8M Quad with the Access Point External Wi Fi router Use the following steps...

Страница 27: ...XX XX MBytes XXX X Mbits sec X XXX ms XX XXXX XX 5 3 00 4 00 sec XX XX MBytes XXX X Mbits sec X XXX ms XX XXXX XX 5 4 00 5 00 sec XX XX MBytes XXX X Mbits sec X XXX ms XX XXXX XX 5 5 00 6 00 sec XX XX...

Страница 28: ...2 00 sec XX XX MBytes XXX X Mbits sec XXXX 5 2 00 3 00 sec XX XX MBytes XXX X Mbits sec XXXX 5 3 00 4 00 sec XX XX MBytes XXX X Mbits sec XXXX 5 4 00 5 00 sec XX XX MBytes XXX X Mbits sec XXXX 5 5 00...

Страница 29: ...ho rf_test_mode 1 proc mwlan adapterX config Verify that the value of rf_test_mode is 1 root imx8mqevk cat proc mwlan adapterX config Step 2 Set the antenna configuration Command to set the antenna co...

Страница 30: ...n adapterX config Step 2 Set the RF frequency band to 2 4 GHz For example root imx8mqevk echo band 0 proc mwlan adapterX config Verify the output value of band parameter root imx8mqevk cat proc mwlan...

Страница 31: ...evk echo bw 0 proc mwlan adapterX config Where Parameter Definition bw RF bandwidth 0 20 MHz 1 40 MH 4 80 MHz 2 8 4 Set the RF channel This section shows how to set the RF channel The test requires fi...

Страница 32: ...pterX config Verify that the output value of rf_test_mode is 1 root imx8mqevk cat proc mwlan adapterX config Step 2 Set the Tx power For example root imx8mqevk echo tx_power 16 2 0 proc mwlan adapterX...

Страница 33: ...t stop any ongoing transmission root imx8mqevk echo tx_continuous 0 proc mwlan adapterX config Start Tx continuous mode root imx8mqevk echo tx_continuous 1 0 0xAAA 0 3 7 proc mwlan adapterX config Wav...

Страница 34: ...ble payload pattern Payload pattern value in the range of 0 to 0xFFFFFFFF cs mode CS mode Applicable only when continuous wave is disabled 0 disable 1 enable active subchannel Active sub channel 0 low...

Страница 35: ...following parameters tx_continuous start stop tx data rate payload pattern payload length adjust burst SIFS gap adjust SIFS short preamble active subchannel short GI adv coding beamforming greenfield...

Страница 36: ...BSSID Basic service set identifiers format xx xx xx xx xx xx ID Data rate 1 1Mbit s 2 2Mbit s 3 5 5Mbit s 4 11Mbit s 5 Reserved 6 6Mbit s 7 9Mbit s 8 12Mbit s 9 18Mbit s 10 24Mbit s 11 36Mbit s 12 48...

Страница 37: ...S8 110 VHT_SS1_MCS9 111 VHT_SS2_MCS0 112 VHT_SS2_MCS1 113 VHT_SS2_MCS2 114 VHT_SS2_MCS3 115 VHT_SS2_MCS4 116 VHT_SS2_MCS5 117 VHT_SS2_MCS6 118 VHT_SS2_MCS7 119 VHT_SS2_MCS8 120 VHT_SS2_MCS9 Table 2 Da...

Страница 38: ...g enable 2 0x1 0 disable EU adaptivity for 5GHz band 1 enable EU adaptivity for 5GHz band ed_ctrl_5g offset 2 0x6 0 Default Energy Detect threshold offset value range 0x80 to 0x7F ed_ctrl_txq_lock 4 0...

Страница 39: ...es init_hostcmd_cfg parameter when loading ed_mac bin root imx8mqevk nano lib firmware nxp wifi_mod_para_sd8987 conf SD8987 cfg80211_wext 0xf wfd_name p2p cal_data_cfg none max_vir_bss 1 fw_name nxp s...

Страница 40: ...system for example mlan0 conf_file_name is the name of Tx power configuration file bin_file_name is the name of the output bin file to be generated Example root imx8mqevk mlanutl mlan0 hostcmd txpwrli...

Страница 41: ...x power table 0 Get 2 4G txpwrlimit table 0x10 Get 5G sub0 txpwrlimit table 0x11 Get 5G sub1 txpwrlimit table 0x12 Get 5G sub2 txpwrlimit table 0x1f Get all 5G txpwrlimit table 0xff Get both 2G and 5G...

Страница 42: ...figuration file SD8987 cfg80211_wext 0xf wfd_name p2p max_vir_bss 2 cal_data_cfg none drv_mode 7 ps_mode 1 auto_ds 2 fw_name nxp sdiouart8987_combo_v0 bin Step 2 Load the modules in the kernel root im...

Страница 43: ...section shows how to configure PCIe bus frequency to high power mode and achieving a higher throughput It also provides the step to reverse to low power mode Enable high throughput using high power mo...

Страница 44: ...3 1 1 Use the module parameter Use the drvdbg module parameter to enable driver debug logs while the driver is loading Refer to Section 3 2 Driver debug log types for the module parameter values Edit...

Страница 45: ...OCTL Bit 16 MDAT_D PRINTM MDAT_D DBG_HEXDUMP MDAT_D Set bit 16 to enable all driver logs with log level MDAT_D and provide the corresponding hexdump in dmesg logs Bit 17 MCMD_D PRINTM MCMD_D DBG_HEXDU...

Страница 46: ...Directory name is var dump_4648 4648 325353 START DRIVER INFO DUMP 4648 325407 DRV dump data in var dump_4648 file_drv_info 4648 330895 SDIO Func1 0x8 c3 0x58 00 0x5c 08 0x5d 00 0x60 07 0x61 0c 0x62 0...

Страница 47: ...stered bluetooth Authenticate Since the pairing procedure will involve authentication by PIN it is required to register with an authentication agent The agent handles the PIN prompt bluetooth agent on...

Страница 48: ...00 1000 8000 00805f9b34fb CHG Device B4 F5 00 31 CB 4E UUIDs 00001112 0000 1000 8000 00805f9b34fb CHG Device B4 F5 00 31 CB 4E UUIDs 00001115 0000 1000 8000 00805f9b34fb CHG Device B4 F5 00 31 CB 4E U...

Страница 49: ...yes Connection successful CHG Device B4 F5 00 31 CB 4E ServicesResolved yes Moto E Disconnect the remote Bluetooth Classic Bluetooth LE device Moto E disconnect B4 F5 00 31 CB 4E Attempting to disconn...

Страница 50: ...es Blocked no Connected yes LegacyPairing no UUID Dialup Networking 00001103 0000 1000 8000 00805f9b34fb UUID OBEX Object Push 00001105 0000 1000 8000 00805f9b34fb UUID Audio Source 0000110a 0000 1000...

Страница 51: ...sink to listen to music on the audio jack of the i MX 8M Quad board root imx8mqevk pacmd set default sink 2 root imx8mqevk pacmd list sinks egrep index name index 0 name alsa_output platform sound bt...

Страница 52: ...ci0 dev_B4_F5_00_31_CB_4E player0 Filesystem item3 Filesystem Playlists NEW Item org bluez hci0 dev_B4_F5_00_31_CB_4E player0 Filesystem item2 Filesystem Artists NEW Item org bluez hci0 dev_B4_F5_00_3...

Страница 53: ...ffice speaker 1 info 7C 2E BD 48 15 FC Device 7C 2E BD 48 15 FC public Name Office speaker 1 Alias Office speaker 1 Class 0x00240400 Icon audio card Paired yes Trusted yes Blocked no Connected yes Leg...

Страница 54: ...name alsa_output platform sound wm8524 stereo fallback index 3 name bluez_sink 7C_2E_BD_48_15_FC a2dp_sink root imx8mqevk Play the audio file using pulseaudio play utility root imx8mqevk paplay path t...

Страница 55: ...ommand used to hang up This command causes the AG to end an active call Table 4 Hands free profile AT commands For more information on AT commands refer to the Hands Free Profile Specification 4 3 2 H...

Страница 56: ...ternal sink device Note As the i MX 8M Quad EVK does not have a built in mic an external USB audio mic adapter is required to enable the two way audio Step 7 List the available source devices root imx...

Страница 57: ...en the host wants to control the PCM lines The host needs to issue this command to have multiple voices at the same time to let the controller know that the host software provides the PCM configuratio...

Страница 58: ...001112 0000 1000 8000 00805f9b34fb UUID NAP 00001116 0000 1000 8000 00805f9b34fb UUID Handsfree Audio Gateway 0000111f 0000 1000 8000 00805f9b34fb UUID Phonebook Access Server 0000112f 0000 1000 8000...

Страница 59: ...clock is terminated after last data bit has been transmitted 1 make PCM clock available continuously Bit 3 Reserved Bit 2 PCM Sync Source 0 PCM sync page generated from system clock 1 PCM sync page ge...

Страница 60: ...d Rate PCM Sync Settings 1 Bit 1 0 0 ISR not aligned to frame tick 1 ISR aligned to frame tick this field should be set to 1 PCM Sync Settings 2 2 Default 0x0000 pcmIfMode in PCM Descriptor PCM Sync S...

Страница 61: ...the BTU Bits 9 2 Defines start of PCM slot relative to start of PCM synchronization must be greater than the size of the PCM slot Bits 1 0 Indicates which PCM slots should be used Default 0x0004 first...

Страница 62: ...qevk test Step 19 Initialize the PCM interface The command below initializes and configures PCM This command should be sent in any of the following situations To initialize PCM after starting voice ca...

Страница 63: ...y 0x02 remote loopback on same link 0x03 local loopback on same link 0x04 to 0xFF reserved SCO Handle1 2 Synchronous connection handle for which PCM configuration is to be done Range from 8 to 10 SCO...

Страница 64: ...ve call Ofono hangup active script uses the AT command AT CHUP to hang up an active call root imx8mqevk usr lib ofono test python3 hangup active hfp org bluez hci0 dev_04_1B_BA_C7_92_36 voicecall01 ac...

Страница 65: ...Moto E Class 0x005a020c Icon phone Paired yes Trusted yes Blocked no Connected yes LegacyPairing no UUID OBEX Object Push 00001105 0000 1000 8000 00805f9b34fb UUID Audio Source 0000110a 0000 1000 800...

Страница 66: ...on org bluez obex client session0 CHG Transfer org bluez obex client session0 transfer0 Status active CHG Transfer org bluez obex client session0 transfer0 Transferred 8030 8KB s 02 12 B4 F5 00 31 CB...

Страница 67: ...h classic Bluetooth LE Verify the Human Interface Device Profile capability of the connected Bluetooth device Rapoo E6700 info 6C 5D 63 20 40 AA Device 6C 5D 63 20 40 AA Name Rapoo E6700 Alias Rapoo E...

Страница 68: ...ne root imx8mqevk bluetoothctl Agent registered bluetooth Register the Battery Service bluetooth menu gatt Menu gatt bluetooth register service 0x180F NEW Primary Service org bluez app service0xbf2985...

Страница 69: ...80f 0000 1000 8000 00805f9b34fb CHG Controller 00 50 43 24 34 F7 UUIDs 0000111e 0000 1000 8000 00805f9b34fb Application registered CHG Controller 00 50 43 24 34 F7 UUIDs 00001112 0000 1000 8000 00805f...

Страница 70: ...mation 00001200 0000 1000 8000 00805f9b34fb UUID A V Remote Control 0000110e 0000 1000 8000 00805f9b34fb UUID Audio Sink 0000110b 0000 1000 8000 00805f9b34fb UUID A V Remote Control Target 0000110c 00...

Страница 71: ...Discoverable off bluetooth Connect to the i MX 8M Quad board using nRF connect LE Cell Phone application Check for the available Battery Service in the application Figure 2 Battery Service Read operat...

Страница 72: ...ce menu gatt Menu gatt LE Device list attributes Primary Service org bluez hci0 dev_5F_82_1E_F1_DE_CC service0001 00001801 0000 1000 8000 00805f9b34fb Generic Attribute Profile Characteristic org blue...

Страница 73: ...D4 18 20 A0 48 5F Device D4 18 20 A0 48 5F public Name LE Device Alias LE Device Paired yes Trusted yes Blocked no Connected yes LegacyPairing no UUID Generic Access Profile 00001800 0000 1000 8000 0...

Страница 74: ...0x0e plen 4 Enable Device Under Test Mode 0x06 0x0003 ncmd 1 Status Success 0x00 root imx8mqevk 4 9 1 2 Set the receive test parameters This command sets the receive test parameters An HCI reset comma...

Страница 75: ...TestPacketType 1 Test Packet Type 0x03 DM1 0x04 DH1 0x0A DM3 0x0B DH3 0x0E DM5 0x0F DH5 0x14 2 DH1 0x18 3 DH1 0x1A 2 DH3 0x1B 3 DH3 0x1E 2 DH5 0x1F 3 DH5 Expected Number of Packets 4 Length of Test D...

Страница 76: ...plen 4 Vendor 0x3f 0x0019 ncmd 1 Status Success 0x00 HCI Event Vendor 0xff plen 6 19 00 01 00 00 00 where Parameter Length Definition OGF 1 0x3F OCF 2 0x0019 RxOnStart 1 SyntOnStart 1 1 TxOnStart 1 Ph...

Страница 77: ...F DH5 0x14 2 DH1 0x18 3 DH1 0x1A 2 DH3 0x1B 3 DH3 0x1E 2 DH5 0x1F 3 DH5 Length 2 Length of test data Whitening 1 0x00 disabled 0x01 enabled Number of Test Packets 4 0 infinite default Tx Power 1 Signe...

Страница 78: ...nt 0x0e plen 4 HCI Event Command Complete 0x0e plen 4 01 33 20 00 LE Enhanced Receiver Test 0x08 0x0033 ncmd 1 Status Success 0x00 root imx8mqevk 4 9 2 2 Bluetooth LE transmitter test To start a test...

Страница 79: ...v5 2 root imx8mqevk hcitool i hci0 cmd 0x08 0x001F Command output example HCI Command ogf 0x08 ocf 0x001f plen 0 HCI Command LE Test End 0x08 0x001f plen 0 HCI Event 0x0e plen 6 01 1F 20 00 00 00 HCI...

Страница 80: ...hci0 w sample_hci log 1 770 HCI sniffer Bluetooth packet analyzer ver 5 50 btsnoop version 1 datalink type 1002 device hci0 snap_len 1500 filter 0x0 root imx8mqevk Start capturing HCI logs and store...

Страница 81: ...pen btmon privileged version 1 14 0x0002 0 926262 root imx8mqevk Start capturing HCI logs and store in text format root imx8mqevk btmon tee sample_hci txt 1 780 Bluetooth monitor ver 5 50 Note Linux v...

Страница 82: ...Address info Example Get the Link Key for a Bluetooth device root imx8mqevk cat var lib bluetooth 00 50 43 24 34 F7 B4 F5 00 31 CB 4E info LinkKey Key 7CC2A6C9AA14F799F9E596B90FC973BC Type 8 PINLengt...

Страница 83: ...HCI UART protocol BCSP registered 1 790390 Bluetooth HCI UART protocol LL registered 1 795534 Bluetooth HCI UART protocol ATH3K registered 1 800958 Bluetooth HCI UART protocol Three wire H5 registere...

Страница 84: ...ollowing links for more details queries and support Website homepage nxp com Web support nxp com support NXP community community nxp com iMX community community nxp com community imx UM11490 All infor...

Страница 85: ...under test ED Energy detection EVK Evaluation kit GATT Generic attribute profile HID Human interface device HFP Hands free profile OCF Opcode command field OGF Opcode group field OPP Object push prof...

Страница 86: ...s or customer product design It is customer s sole responsibility to determine whether the NXP Semiconductors product is suitable and fit for the customer s applications and products planned as well a...

Страница 87: ...te parameter 36 Tab 3 NXP driver debug log types 45 Tab 4 Hands free profile AT commands 55 Tab 5 Acronyms and abbreviations 85 Figures Fig 1 iPerf setup diagram 26 Fig 2 Battery Service 71 UM11490 Al...

Страница 88: ...40 2 10 Set the Wi Fi device in suspend state 42 2 10 1 Enable dmesg logs for device in supended state 43 2 10 2 High throughput DDR frequency and AXIHP bus frequency 43 3 Wi Fi driver debugging 44 3...

Отзывы: