25. Wi-Fi

25.1. Overview

This demo explains Wi-Fi-relate functionalities.

25.2. Usage Steps

  • Compile and flash customer_app/bl602_demo_wifi.

  • In the serial console, enter stack_wifi to initialize the Wi-Fi stack.

25.3. Functionalities

  • Connect to an available Wi-Fi network:

Enter the command wifi_sta_connect <ssid> <pwd>, for example wifi_sta_connect bl_test_005 12345678. If the connection is successful, the console will display network and available RAM information. In the picture below you can see the network’s IP and mask, and the available RAM.

  • Disconnect from Wi-Fi:

Use the command wifi_sta_disconnect.

  • Scan for networks:

Command wifi_scan. Displays a list of networks if successful.

  • Enable AP mode:

Command: wifi_ap_start. Prints out the SSID, password and channel.

  • Disable AP mode:

Command: wifi_ap_stop .