Wilc3000 concurrent sta ap

From Technologic Systems Manuals
Revision as of 14:19, 20 August 2021 by Kris (talk | contribs) (Change wording for station)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Wi-Fi device on this platform supports concurrent operation of client and access point (STA and AP). Please see the "Wi-Fi Client" section above first to connect the Wi-Fi module, in STA mode, to an external AP. This demo showcases the Wi-Fi module starting its own AP mode via hostapd with a simple static IP address while also being concurrently connected to a separate AP.

The 'hostapd' utility is used to manage the access point of the device. This is usually installed by default, but can be installed with:

apt-get update && apt-get install hostapd -y

Note: The install process may start an unconfigured 'hostapd' process. This process must be killed before moving forward.

Modify the file /etc/hostapd/hostapd.conf to have the following lines:

wpa_pairwise=TKIP CCMP
Note: The channel used for AP must match the channel the STA is using! Be sure to set 'channel=...' in the above file to a proper channel number.
Note: Refer to the kernel's hostapd documentation for more wireless configuration options.

In order for the concurrent modes to work, a separate virtual wireless device must first be created. Note that hostapd.conf above lists interface=p2p0, a second interface with this name must be created:

iw wlan0 interface add p2p0 type managed

The access point can then be started and tested by hand:

hostapd /etc/hostapd/hostapd.conf &

An IP address can be set to p2p0:

ifconfig p2p0

From this point, other Wi-Fi clients can connect to the SSID YourWiFiName with the WPA2 key Somepassphrase with a static IP in the range of, and will be able to access the platform at More advanced configurations are also possible, including bridging, routing/NAT, or simply separate networks with the Wi-Fi module connecting to a network and hosting its own private network with DHCP.