4.8 Running in the WILCS02 AP Mode
This section describes how to connect a device to the WILCS02 AP.
- Initialize the WILCS02 driver module using the following
command:
[root@buildroot ~]# modprobe wilc-sdio linux_sdio_probe init_power =0 wilc_sdio mmc0:0001:1: Driver Initializing success
- Run
hostapd
with a user configuration using the following command:# hostapd /etc/wilc_hostapd_open.conf -B & # Configuration file: /etc/wilc_hostapd_open.conf wilc_sdio mmc0:0001:1 wlan0: INFO [change_virtual_intf]In Change virtual interface function wilc_sdio mmc0:0001:1 wlan0: INFO [change_virtual_intf]Wireless interface name =wlan0 wilc_sdio mmc0:0001:1 wlan0: INFO [change_virtual_intf]Changing virtual interface, enable scan wilc_sdio mmc0:0001:1 wlan0: INFO [change_virtual_intf]Interface type = NL80211_IFTYPE_AP wilc_sdio mmc0:0001:1 wlan0: INFO [add_virtual_intf]Adding monitor interface[d4789800] wilc_sdio mmc0:0001:1 wlan0: INFO [add_virtual_intf]Initializing mon ifc virtual device driver wilc_sdio mmc0:0001:1 wlan0: INFO [add_virtual_intf]Adding monitor interface[d4789800] wilc_sdio mmc0:0001:1 wlan0: INFO [add_virtual_intf]Setting monitor flag in private structure wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_mac_open]MAC OPEN[d4789800] wlan0 WILC POWER UP wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_init_host_int]Host[d4789800][d45dd000] wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_mac_open]*** re-init *** wilc_sdio mmc0:0001:1 wlan0: INFO [wlan_init_locks]Initializing Locks ... wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan wilc_sdio mmc0:0001:1: SDIO speed: 50000000 wilc_sdio mmc0:0001:1: chipid 001003a0 wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_initialize]WILC Initialization done wilc_sdio mmc0:0001:1 wlan0: INFO [init_irq]IRQ request succeeded IRQ-NUM= 137 on GPIO: 91 wilc_sdio mmc0:0001:1 wlan0: INFO [wlan_initialize_threads]Initializing Threads ... wilc_sdio mmc0:0001:1 wlan0: INFO [wlan_initialize_threads]Creating kthread for transmission wilc_sdio mmc0:0001:1 wlan0: INFO [wlan_initialize_threads]Creating kthread for Debugging wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_get_firmware]Detect chip WILC1000 wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_get_firmware]loading firmware mchp/ wilcs02_wifi_firmware.bin wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_get_firmware]WLAN firmware: mchp/ wilcs02_wifi_firmware.bin wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_firmware_download]Downloading Firmware ... wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_firmware_download]Downloading firmware size = 134964 wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_firmware_download]Offset = 119660 wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_firmware_download]Offset = 134964 wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_firmware_download]Download Succeeded wilc_sdio mmc0:0001:1 wlan0: INFO [linux_wlan_start_firmware]Starting Firmware ... wilc_sdio mmc0:0001:1 wlan0: INFO [linux_wlan_start_firmware]Waiting for FW to get ready ... wilc_sdio mmc0:0001:1 wlan0: INFO [linux_wlan_start_firmware]Firmware successfully started wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_initialize]WILC Firmware Ver = WILCSO2_WIFI_FW_REL_2_00 wilc_sdio mmc0:0001:1 wlan0: INFO [linux_wlan_init_test_config]Start configuring Firmware wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_mac_open]Mac address: fa:f0:05:f1:3d:64 wilc_sdio mmc0:0001:1 wlan0: INFO [del_station]Deleting station wilc_sdio mmc0:0001:1 wlan0: INFO [del_station]All associated stations wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_del_allstation]NO ASSOCIATED STAS Using interface wlan0 with hwaddr fa:f0:05:f1:3d:64 and ssid "wilc1000_SoftAP" wilc_sdio mmc0:0001:1 wlan0: INFO [start_ap]Starting ap wilc_sdio mmc0:0001:1 wlan0: INFO [start_ap]Interval= 100 DTIM period= 2 Head length= 66 Tail length= 9 wilc_sdio mmc0:0001:1 wlan0: INFO [set_channel]Setting channel 7 with frequency 2442 wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_set_bssid]set bssid on[d4789800] wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_set_bssid]set bssid [fa][f0][5] wilc_sdio mmc0:0001:1 wlan0: INFO [change_bss]Changing Bss parametrs wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED
Note:- For unencrypted AP settings, refer to the
wilc_hostapd_open.conf
file. - For WPA/WPA2/WPA3 AP settings, refer to the
wilc_hostapd_wpa.conf
file.
- For unencrypted AP settings, refer to the
- Set the IP address to the gateway
using the following
command:
#ifconfig wlan0 192.168.0.1
-
Run the DHCP server to allocate the IP to a client using the following command:
dhcpd wlan0 &
Note: For gateway IP address definition, refer to thedhcpd.conf
file. - The user must verify the access point functionality, perform the following steps:
- Connect a PC or smart-phone to the WILCS02 access point.
- Ensure that the device can successfully connect to the AP.
- Verify that the AP is functioning correctly by checking the connection status on the device.
- Configure the AP in WPS mode.
- To configure the AP in WPS Push-Button mode, use the following
command:
hostapd_cli wps_pbc
- To configure the AP in WPS PIN mode, use the following
command:
hostapd_cli wps_pin any <pin>
Note: The user can replace<pin>
with the desired WPS pin.
- To configure the AP in WPS Push-Button mode, use the following
command: