8.8.1 Running the ATWILC Device in Station and AP Modes Concurrently
The following section describes the configuration steps to run the ATWILC device in the Station (STA) and AP modes, concurrently.
- Initialize the ATWILC1000 and
ATWILC3000 driver module using the following
command:
Welcome to Buildroot buildroot login: root [root@buildroot ~]# modprobe wilc-sdio linux_sdio_probe init_power =0 wilc_sdio mmc0:0001:1: Driver Initializing success
- Start the WPA Supplicant service and
execute
wpa_supplicant
using the following command:# wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wilc_wpa_supplicant.conf & Successfully initialized wpa_supplicant rfkill: Cannot open RFKILL control dev wilc_sdio mmc0:0001:1 wlan0: Detect chip WILC3000 wilc_sdio mmc0:0001:1 wlan0: loading firmware wilc3000_wifi_firmware.bin wilc_gnrl_async_info_received wilc_sdio mmc0:0001:1 wlan0: WILC Firmware Ver = WILC_WIFI_FW_REL_15_00 Build: 8719
- Connect to the Access Point using the
following
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 '"User_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 '"12345678"' # wpa_cli -p/var/run/wpa_supplicant select_network 0
- Run the DHCP service.If the IP address can be allocated from the AP automatically, start the DHCP client using the following command:
#dhcpcd wlan0 &
- Ping the User AP to check the
connection using the following
command:
# ping 192.168.0.1
- Add the p2p0 virtual
interface:
iw phy0 interface add p2p0 type station
- Run the hostapd as a user
configuration, making sure that the .conf file uses the p2p0
interface:
# hostapd /etc/wilc_hostapd_open.conf -B & Configuration file: /etc/wilc_hostapd_open.conf rfkill: Cannot open RFKILL control device wilc_sdio mmc0:0001:1 wlan0: Detect chip WILC3000 wilc_sdio mmc0:0001:1 wlan0: loading firmware wilc3000_wifi_firmware.bin wilc_gnrl_async_info_received wilc_sdio mmc0:0001:1 wlan0: WILC Firmware Ver = WILC_WIFI_FW_REL_15_00 Build: 8719 Using interface wlan0 with hwaddr fa:f0:05:f6:56:6a and ssid "wilc_SoftAP" wilc_gnrl_async_info_received wilc_sdio mmc0:0001:1 wlan0: there is no current Connect Request wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED
- Run the DHCP Server to allocate the
IP to client.
- Set the IP of AP;
#ifconfig p2p0 192.168.0.1
- Start the DHCP server;
#/etc/init.d/S80dhcp-server start
The user can connect the PC or smartphone to the ATWILC1000 AP.
- Set the IP of AP;