The purpose of this application is to provide a UART Command Line Interface (CLI) to allow interaction with part of the Wi-Fi FMAC driver and the LwIP APIs.
The example requires the hardware components below:
- WF200 Wi-Fi® Expansion Kit (SLEXP8022A) or WFM200S Wi-Fi® Expansion Kit (SLEXP8023A)
- STMicroelectronics NUCLEO-F429ZI development board
- An Arduino/NUCLEO interposer (Available through support ticket request) or some flying wires
- A micro USB cable
- A PC to load a binary file on the board, compile the EWARM project or run a serial terminal
The required software includes:
- The example projects available in this repository
- A Serial terminal to communicate with the board. For example, Tera Term or Putty
- The correct ST-link driver installed on your machine
- Optionally, IAR Embedded Workbench IDE (version >= 7.80.2)
Follow the steps described below:
- Connect the Arduino/Nucleo interposer board to the NUCLEO-F429ZI board.
- Connect the WF(M)200 expansion kit to the Arduino/Nucleo interposer board.
- Make sure the "Power" switch on the WF200 expansion kit is in the [On Board LDO] position.
- Select [SPI] or [SDIO] on the bus switch depending on the bus you want to use.
- Connect the NUCLEO board to your PC using the USB cable. The board should appear as a mass storage device named "NODE_F429ZI".
The first option to run the uart_cli is to use the precompiled binaries provided under wfx-fullMAC-tools/Examples/STM32/uart_cli/Binaries/. Depending on the bus selected on the switch, choose the corresponding binary file:
- f429zi_uart_cli_spi.bin
- f429zi_uart_cli_sdio.bin
To use this method, drag-and-drop or copy the f429zi_uart_cli_xxx.bin file to the "NODE_F429ZI" mass storage.
After the STM32 is successfully flashed, you can jump to the Start the Example section.
Alternatively, use an IDE to compile and flash the project into the NUCLEO board.
- Open the project with the EWARM IDE.
- Select the bus configuration (SPI or SDIO). Make sure it matches the switch position on the WF(M)200 expansion board.
- Build the project.
- Flash the project to the NUCLEO-F429ZI board.
After the STM32 is successfully flashed, jump to the Start the Example section.
-
If using Windows, open the Device Manager to see the COM Port Number assigned to the USB device [STMicroelectronics STLink Virtual COM Port].
-
Open a Serial Terminal application, such as PuTTY, configure it to the COM Port Number you found in the previous step, and set the UART settings to 115200 bps, 8 data bits, 1 stop bit and no parity.
-
Reset the NUCLEO board using the black button. You should see the following output.
Type "help" to view a list of registered commands. @
-
The uart_cli project is ready to receive commands. You can start by the 'help' command to list available commands. The 'help' list below is provided as an indication. To access an up-to-date list, use the 'help' command on the target.
help : Lists all the registered commands cpu-reset : Reset the host CPU cli-version : Provide the version of the registered modules get : Get a parameter value Usage: get <param_name> set : Set a parameter value Usage: set <param_name> <param_value> wifi-reboot : Reboot the Wi-Fi chip network-up : Connect to the Wi-Fi access point with the information stored in wlan parameters nup : Alias of network-up network-down : Disconnect from the Wi-Fi access point ndo : Alias of network-down scan : Perform a Wi-Fi scan wlan-pm : Enable/disable the Power Mode on the WLAN interface of the Wi-Fi chip NOTE: WLAN must be up Usage: wlan-pm <mode> [interval] mode: 0(awake), 1(wake-up on beacons), 2(wake-up on DTIMs) interval: number of beacons/DTIMs to skip while asleep wlan-ps : Enable/disable the Power Save on the WLAN interface of the Wi-Fi chip Usage: wlan-ps <state> state: 0(OFF), 1(ON) wlan-rssi : Get the RSSI of the WLAN interface softap-up : Start the SoftAP interface using the information stored in softap parameters sup : Alias of softap-up softap-down : Stop the SoftAP interface sdo : Alias of softap-down softap-rssi : Get the RSSI of a station connected to the SoftAP Usage: softap-rssi <sta_mac> softap-client-list : Get the list of clients connected to the SoftAP iperf : Start a TCP iPerf test as a client or a server Usage: iperf <-c ip [-t dur] [-p port] [-k] | -s> ip: iPerf server address to connect to (IPv4 format) dur: test duration in client mode (default 10s) port: server port to connect to (default 5001) -k: execute the command in foreground iperf-server-stop : Stop the running iPerf server iperf-client-stop : Stop the running iPerf client ip-stats : Display the IP stack statistics ping : Send ICMP ECHO_REQUEST to network hosts Usage: ping [-n nb] <ip> ip: address to ping (IPv4 format) nb: number of requests to send (default 3) wfx_test_agent : Send a command to the RF Test Agent Usage: wfx_test_agent <cmd> [cmd_args]
Additionally, you can display the specific command help by tipping:
@ [command] help