4.4.3.1 Station Mode Configuration

To run the driver and set Wi-Fi Station mode for Wi-Fi connection, following are the manual steps:

  1. Install the WILCS02 driver by the following command:
    modprobe wilc-sdio
  2. Run wpa_supplicant for configuring Wi-Fi interface by the following command:
    wpa_supplicant -iwlan0 -Dnl80211 -c /etc/wilc_wpa_supplicant.conf -B
  3. Perform AP scan and connection AP by the following wpa_cli command:
    wpa_cli -p/var/run/wpa_supplicant ap_scan 1
    wpa_cli -p/var/run/wpa_supplicant add_network
    wpa_cli -p/var/run/wpa_supplicant set_network 0 ssid '"DEMO_AP "'
    wpa_cli -p/var/run/wpa_supplicant set_network 0 key_mgmt WPA-PSK
    wpa_cli -p/var/run/wpa_supplicant set_network 0 psk '"password"'
    wpa_cli -p/var/run/wpa_supplicant select_network 0
  4. Retrieve DHCP IP:
    dhcp wlan0 &
  5. You can use iwconfig and ifconfig to check if the AP connection is successful and DHCP IP is get.

    Figure 4-3 illustrates the use of the iwconfig and ifconfig command.