The ISM4334x-L77 evaluation board offers 802.11 Wi-Fi connectivity over an SDIO interface, as well as Bluetooth over a UART interface. The purpose of this document is to assist you in bringing up the Wi-Fi interface on an i.MX6 processor running the Linux operating system. There are many processor boards in the i.MX6 family. The instructions in this document will target the i.MX6 UltraLite evaluation kit (MCIMX6UL-EVK), running Linux Kernel version 3.14.38 (ISM43341-L77 iMx6 Quick Start guide .pdf)
2 Required Files
The following files are referenced in the instructions and are made available on inventeksys.com
- dhd.ko Broadcom 43340/1 Dongle Host Driver
- ISM4334X_Wifi_FW_126.96.36.199_P.bin Firmware (WPA2 supplicant for testing only)
- ISM4334X_Wifi_FW_188.8.131.52.bin- Firmware (FCC approved – Ext WPA2 supplicant )
- imx6ul-14×14-evk.dtb Device Tree Blob for SDIO Interface
- join.sh Shell Script to Join a Network (Sample)
- nvram.txt Broadcom 43340/1 Configuration File
- wlarm WL Utility Compiled for ARM (Executable)
The Linux operating system can be installed on the i.MX6 UltraLite evaluation kit by following the instructions outlined in the quick start guide (IMX6ULTRALITEQSG) found on nxp.com. The default Linux configuration provided, however, will not support the ISM43341-L77 evaluation board without some modification as the i.MX6 processor requires control of the pin WL_REG_ON which is found on the 43341 module. Control of this pin is accomplished by modifying the device tree that is passed to the kernel at boot time.
The device tree contains a description of all the hardware in the system. The file that is passed to the kernel is known as the device tree blob (.dtb). This file is generated by compiling a number of device tree source (.dts) and device tree source include (.dtsi) files. A modified dtb file is provided with this document for the i.MX6 UltraLite evaluation kit. In the event that you are using a different i.MX6 platform you will need to recompile your device tree blob with the provided dtsi file included at the bottom of your device tree source.
The modified dtb file is loaded by rebooting the i.MX6 and stopping it at the u-boot prompt. Once at this prompt you will execute the following commands:
setenv fdt_file imx6ul-14×14-evk.dtb
The reset command will cause the kernel to boot and allow you to load the wireless drivers.
After booting the i.MX6 UltraLite evaluation kit from the micro SD card you will need to transfer the file deliverables.zip to the device. File transfer can be accomplished by mounting a USB thumb drive or by hosting the file on a TFTP server. A free TFTP server for Windows can be downloaded from the URL
Once the file deliverables.zip has been transferred to the device you will extract it using the command
The extracted files contain a kernel object file (dhd.ko). This file is the wireless driver and it can be loaded via the command:
insmod dhd.ko firmware_path= ISM4334X_Wifi_FW_184.108.40.206_P.bin nvram_path=nvram.txt
4 WL Commands
In order to communicate with wireless devices on your network there are two primary steps that you will need to perform: (1) bring up the wireless adapter and (2) connect to a network. Once you have performed these two steps you will be able to send and receive data over your Wi-Fi network using standard Linux network sockets. The configuration process is accomplished using the Linux program wl which allows you to control your wireless adapter. On some ARM platforms this program is named wlarm. The two commands are to be considered equivalent.
4.2 Bringing Up Wireless Adapter
The first step is to activate your WIFI adapter. This task is accomplished using the commands
./wlarm PM 0
The argument PM to the wl command sets the driver power management mode.
|Set driver power management mode.|
|0: CAM (constantly awake)
1: PS (power-save)
2: FAST PS mode
The argument up to the wlarm command reinitializes the adapter and marks it as up.
4.3 Scanning for a Wireless Network
Once you have activated your wireless module you may want to scan to see what wireless networks are available. Displaying a list of the nearby wireless networks is accomplished using the command sequence
The scan argument to the wl command initiates the scan and the scanresults argument displays the gathered information.
4.4 Connect to a WI-Fi network
The last step in the process of connecting to a WIFI network is to join the network. In order to accomplish this task you will need to know the WIFI network’s security type and password. The join syntax is:
join <ssid> [key <0-3>:xxxxx]
The following examples show how to connect to networks of various different security types.
Connect to an open network
./wlarm join SSID imode bss
udhcpc –i eth1
Connect to WEP network with 64-bit encryption
./wlarm join SSID key 63CACE42D9 imode bss
udhcpc –i eth1
Connect to WEP network with 128-bit encryption
./wlarm join SSID key 014842D480B571495A4A036379 imode bss
udhcpc –i eth1
Connect to WPA2-PSK network
./wlarm wsec 4
./wlarm sup_wpa 1
./wlarm wpa_auth 4
./wlarm set_pmk PASSWORD
./wlarm join SSID imode bss amode wpa2psk
udhcpc –i eth1
When connecting to a WPA network you will need to utilize the wsec and wpa_auth arguments to set the security bit vector and authorization mode. The options for both commands are listed below.
Gets or sets the wireless security bit vector.
./wlarm wsec [<vector>]
Bit 0 WEP enabled
Bit 1 TKIP enabled
Bit 2 AES enabled
Bit 3 WSEC in software
A bit vector in the same form as the above vector parameter
Sets the WPA authorization mode.
./wlarm wpa_auth [<value>]
The WPA authorization mode
The functionality from sections 4.1-4.5 has been implemented by Inventek, and can be seen in the sample join.sh script.