8.6 Running in the ATWILC AP Mode
This section describes how to connect a device to the ATWILC1000 Access Point.
- Initialize the ATWILC1000 or
ATWILC3000 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 as 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/wilc1000_wifi_firmware.bin wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_get_firmware]WLAN firmware: mchp/wilc1000_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 = WILC_WIFI_FW_REL_15_01_RC3 Build: 9792 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: See thewilc_hostapd_open.conf
file for the unencrypted AP settings and thewilc_hostapd_wpa.conf
file for WPA/WPA2/WPA3 AP settings. - Run the DHCP server to allocate the
IP to client. Set the IP address to the gateway using the
#ifconfig wlan0 192.168.0.1
command.Note: The gateway IP address is defined in thedhcpd.conf
file.Start the DHCP server using the
#/etc/init.d/S80dhcp-server start
command.The user can now connect the PC or smartphone to the ATWILC1000 access point.
To configure the AP in the WPS mode, use the same steps for WPA/WPA2/WPA3 settings, then use the following command to configure to the Push-Button mode:hostapd_cli wps_pbc
(or) to configure for the Pin mode, use the following command:hostapd_cli wps_pin any <pin>