Application Note: Implementing a WiFi Secure Client on i.MX RT1170 Running Linux

Application Note: Implementing a WiFi Secure Client on i.MX RT1170 Running Linux

1. Introduction

This application note describes how to configure and establish a secure WiFi connection on i.MX RT1170-based development boards running Linux. The guide covers both USB-based and SDIO-based WiFi adapters and provides step-by-step instructions for manual connection setup as well as automated configuration.

1.1 Supported Hardware

  • NXP i.MX RT1170 EVK Board

  • Avnet MaaXBoard-RT

  • Tested WiFi Adapters:

    • ComFast CF-WU815N USB adapter (RT5370 chipset)

    • Murata 1ZM SDIO module (SD8987 chipset)

Note: Other USB WiFi dongles may require enabling or porting appropriate device drivers in the Linux kernel.

1.2 Board-Specific Notes

  • i.MX RT1170 EVK: Uses USB WiFi adapters connected via USB OTG port (USB1 or USB2 interface connector)

  • MaaXBoard-RT: Uses built-in SDIO WiFi (interface name: mlan0 instead of wlan0)


2. Preliminary Setup

2.1 Disable Ethernet Interface

To avoid network conflicts, disable the Ethernet interface before enabling WiFi:

ifconfig eth0 down

2.2 Connect WiFi Hardware

For i.MX RT1170 EVK:

  1. Plug the USB WiFi adapter into the USB OTG port

  2. Verify system recognizes the device (console output should show detection messages)

For MaaXBoard-RT:

The SDIO WiFi module is built-in and automatically detected during boot.


3. Manual WiFi Connection Setup

3.1 Start wpa_supplicant

Launch the WiFi security supplicant with the appropriate interface name:

# For i.MX RT1170 EVK (USB WiFi): wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B # For MaaXBoard-RT (SDIO WiFi): wpa_supplicant -i mlan0 -c /etc/wpa_supplicant.conf -B

Expected output includes firmware loading messages and successful initialization.

3.2 Scan for Available Networks

# Scan for networks wpa_cli scan # View scan results wpa_cli scan_results

The output displays available access points with SSID, signal strength, and security information.

3.3 Configure and Connect to a Network

# Add a new network configuration wpa_cli add_network # Note: The returned number (e.g., 1) is your network identifier # Set SSID (replace with your network name) wpa_cli set_network 1 ssid '"YOUR_SSID"' # Set password (replace with your network password) wpa_cli set_network 1 psk '"YOUR_PASSWORD"' # Enable the network wpa_cli enable_network 1

3.4 Verify Connection Status

# Check connection status wpa_cli status # Verify interface configuration ifconfig wlan0 # or mlan0 for MaaXBoard-RT

3.5 Obtain IP Address via DHCP

# Request IP address from access point udhcpc -i wlan0 # or mlan0 for MaaXBoard-RT # Verify IP configuration ifconfig wlan0 # or mlan0 route

3.6 Test Internet Connectivity

# Test connection to internet ping google.com -c 3

4. Automated Configuration Method

4.1 Edit wpa_supplicant.conf

For persistent connections, configure /etc/wpa_supplicant.conf:

vi /etc/wpa_supplicant.conf

Add your network configuration:

network={ ssid="YOUR_SSID" psk="YOUR_PASSWORD" }

4.2 Establish Connection

With the configuration file updated, a simpler connection sequence is possible:

# Disable Ethernet (if needed) ifconfig eth0 down # Start wpa_supplicant (will auto-connect) wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B # Obtain IP address udhcpc -i wlan0 # Test connectivity ping google.com -c 3

5. Persistent Configuration Across Reboots

Important Note: The /etc/wpa_supplicant.conf file resides in initramfs. Changes made directly on the device will be lost after reboot.

5.1 Making Permanent Changes

To preserve WiFi configuration across reboots:

  1. Update the source configuration:
    Edit projects/rootfs/etc/wpa_supplicant.conf in your build environment

  2. Rebuild the project:
    Follow the build instructions at: Building Linux

  3. Install the new image:
    Flash the updated rootfs.uImage to your board using the standard installation procedure documented in: Installing U-Boot and Linux Images to the QSPI Flash / HyperFlash on IMXRT1170-EVK(B) or MaaXBoard-RT Boards


6. Troubleshooting

6.1 Common Issues

  1. WiFi adapter not detected:

    • Verify physical connection

    • Check kernel messages for detection errors

    • Ensure appropriate drivers are enabled in kernel configuration

  2. Connection fails:

    • Verify SSID and password are correct

    • Check access point security settings match configuration

    • Ensure signal strength is adequate

  3. No IP address assigned:

    • Verify DHCP server is active on access point

    • Check firewall settings on access point

    • Try manual IP configuration if DHCP fails

6.2 Board-Specific Considerations

  • Interface names: i.MX RT1170 EVK uses wlan0, MaaXBoard-RT uses mlan0

  • Power management: Some USB WiFi adapters may require external power for reliable operation

  • Antenna placement: Ensure optimal antenna positioning for best signal reception


7. Conclusion

This application note provides comprehensive instructions for establishing secure WiFi connections on i.MX RT1170-based development boards running Linux. The procedures cover both manual interactive setup and automated persistent configuration, accommodating both USB and SDIO WiFi solutions.

For further assistance or technical support, refer to the Emcraft Systems documentation or contact your board manufacturer's support channels.