Wifi on the Antsle Nano

Setting up WiFi on the nano works and allows you to use the connection on a system level. However, it does not work as Interface in antMan, i.e. cannot be used to configure a bridged NIC. Since WiFi is generally less reliable and slower than Ethernet, it is generally not advised to use it.

You can easily configure a WiFi connection on the Antsle Nano using wpa_supplicant, which should be pre-installed on your Antsle Nano, follow the steps below on the command line.

  1. Edit /etc/wpa_supplicant/wpa_supplicant.conf and add a network={…} block to it.

Example:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
   ssid="MyNetwork"
   scan_ssid=1
   key_mgmt=WPA-PSK
   psk="topsecret"
}

Field

Description

ssid

Network name (as announced by the access point). An ASCII or hex string enclosed in quotation marks.

ssid_scan

SSID scan technique; 0 (default) or 1. Technique 0 scans for the SSID using a broadcast Probe Request frame while 1 uses a directed Probe Request frame. Access points that cloak themselves by not broadcasting their SSID require technique 1, but beware that this scheme can cause scanning to take longer to complete.

key_mgmt

List of acceptable key management protocols; one or more of:

WPA-PSK (WPA pre-shared key), WPA-EAP (WPA using EAP

authentication), IEEE8021X (IEEE 802.1x using EAP authentication

and, optionally, dynamically generated WEP keys), NONE (plaintext

or static WEP keys). If not set this defaults to "WPA-PSK

WPA-EAP".

psk

WPA preshared key used in WPA-PSK mode. The key is specified as 64 hex digits or as an 8-63 character ASCII passphrase. ASCII passphrases are converted to a 256-bit key using the network SSID by the wpa_passphrase utility.

2. Edit /etc/sysconfig/wpa_supplicant to make sure you add -iwlan0 to specify the correct interface.

# Use the flag "-i" before each of your interfaces, like so:
#  INTERFACES="-ieth1 -iwlan0"
INTERFACES="-iwlan0"
# Use the flag "-D" before each driver, like so:
#  DRIVERS="-Dwext"
DRIVERS=""
# Other arguments
#   -u   Enable the D-Bus interface (required for use with NetworkManager)
#   -f   Log to /var/log/wpa_supplicant.log
#   -P   Write pid file to /var/run/wpa_supplicant.pid 
#        required to return proper codes by init scripts (e.g. double "start" action)
#        -B to daemonize that has to be used together with -P is already in wpa_supplicant.init.d
OTHER_ARGS="-P /var/run/wpa_supplicant.pid"

The third line INTERFACES="-iwlan0" is the one that needs to be updated. If it is commented, uncomment that line.

3. Restart the service by running systemctl restart wpa_supplicant.service .

4. Run wpa_cli -i wlan0 to start the wpa_supplicant cli in interactive mode.

5. Run interface wlan0 in the wpa_cli prompt.

6. Wait a few seconds and check the status by running status at the wpa_cli prompt. You should see the connection, like below.

> status
bssid=58:b6:33:7b:0c:6c
freq=5600
ssid=MyNetwork
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
p2p_device_address=06:26:15:88:c9:22
address=c2:11:c6:b8:6e:9d
uuid=ca4813d9-409d-5033-8307-28cbc1b82b34

7. Type q to quit wpa_cli .

You can now use the wlan0 interface!

For more information on wpa_supplicant, please refer to the manpage here.

Last updated