
The WLAN command can be used to change all of the WLAN settings.
For each setting, WLAN must be invoked with two arguments, the setting name and the new value. Here is a list that shows the WLAN command's capabilities in detail:
WLAN PS ON | OFF
Enables or disables power saving mode. The second argument must be one of the words ON or OFF. ON switches to power saving mode, whereas OFF switches the WLAN device to full power mode. In power saving mode, most of the internal components of the WLAN device are switched on and off repeatedly to reduce power consumption.
WLAN PASS xxx
Sets the WPA pass phrase. This is a human-readable text that is used to calculate the master key for the WPA and WPA2 WLAN encryption schemes. The pass phrase must not exceed 63 characters.
WLAN SSID xxx
Sets the new SSID (network name) for WLAN infrastructure mode. The SSID must be the same SSID as that of the access point where the module should connected or the same SSID that is used in the ad-hoc network. The SSID must not exceed 32 characters.
New since firmware version 4.24: Avisaro Modules can use a special notation *abcde# beginning with an asterisk, a number sign at the end and where a,b,c,d,e are any characters. This can be used to set the 802.11 Network-ID (BSSID) to 0abcde (for Ad-Hoc networks only). In this case, all ad-hoc nodes that have the same SSID are forcibly brought together. A so configured module does not need to scan the air for ad-hoc partners and, consequently, can't communicate with others that use a variable BSSID.
WLAN MODE INFRA | ADHOC
This sets the connection mode to either Ad-Hoc (IBSS) or infrastructure mode. The second argument must be one of the words INFRA or ADHOC. In infrastructure mode, WLAN nodes require a master station, the so-called "access point". In ad-hoc mode, WLAN nodes can interlink without the need for an access point.
WLAN CHANNEL xxx
This sets the WLAN channel, that means the set of frequencies which are used on the air. Allowed values are 1...14.
WLAN SECURITY WEP40 | WEP104 | WPAPSK | WPA2PSK | NONE
With this command one can change the encryption scheme that is used to secure the communication. WEP40 means 40-bit WEP encryption. WEP104 means 104-bit WEP encryption. WPAPSK means that WPA-TKIP with pre-shared key should be used and WPA2PSK is WPA-AES with pre-shared key. If you supply NONE no encryption will be used thus, communication is visible for everyone.
WLAN WEP xxxxxxxxxxxxxxxxxxxxxxxxxx
This sets a new WEP key. A WEP key is a 26-digit long hexadecimal value (104 bits) that is used as key for WEP encryption, if WEP104 is enabled. If WEP40 is enabled, only the first ten digits (== 40 bits) are valid.
WLAN SLEEP
Puts the WLAN component immediately into "deep sleep" mode, to consume as little power as possible. In contrast to WLAN PS, this mode does not allow to send or receive data. Before the component goes to sleep, it is disconnected from the AP, but all TCP connections are kept open. Deep sleep is a temporary mode, that means the Avisaro module always has an active WLAN after reboot.
WLAN AWAKE
Wakes up the WLAN from deep sleep mode immediately. After it woke up, the WLAN reconnects itself to the AP and continues to work. WLAN AWAKE introduces a one-second delay which is necessary for the WLAN component to settle down.
WLAN BSSID CLEAR | PIN | xxxxxxxxxxxx
(NEW since version 4.45)
Sets a constraint on association. If the BSSID filter is active, the module only associates to an AP having exactly the same BSSID that was entered. For example, if you invoke BSSID 001977021385 then the module only seeks for APs with this BSSID when trying to connect. To remove the constraint, call BSSID CLEAR. BSSID can be used with the the following arguments:
A 12-digits hexadecimal number
Set the BSSID filter manually. If 000000000000 is used, the filter is switeched off and the modules is able to connect to any AP.
CLEAR
For convenience, same as BSSID 000000000000. Use this to remove the BSSID filter.
PIN
BSSID PIN can be used to set the BSSID filter to the BSSID of the currently connected AP. In order to pin your Avisaro Module to an AP, follow these steps:
1. Invoke BSSID CLEAR to disable any previous filtering
2. Restart the module and let it associate to the desired AP.You may invoke the WLAN? command to verify that the module is connected to the right AP
3. Invoke BSSID PIN.
ERR_OK (0) if the command was accepted.
ERR_ARGUMENT (4) if one ore more arguments didn't match.
ERR_LENGTH (5) if one or more arguments had a wrong length.
WLAN SSID TestAP
WLAN MODE INFRA
WLAN CHANNEL 3
WLAN SECURITY WEP104
WLAN WEP 12345678901234567890aabbcc
This configures the WLAN device to connect to an AP named TestAP on channel 3, using WEP104 as encryption scheme with the key 0x12345678901234567890aabbcc
All WLAN settings are effective after next reboot, or if WLAN ist stoppend and started again.
Prints WLAN settings and information line-by-line in the following order:
1. The network name, SSID.
2. WLAN mode. This can be either INFRA or ADHOC.
3. Preferred WLAN channel (a scan seeks all channels).
4. WLAN encryption scheme. This can be one of WEP40, WEP104, WPAPSK, WPA2PSK, NONE.
5. The WEP key as hexadecimal value.
6. Power saving mode. Either ON or OFF.
7. The pass phrase for WPA and WPA2. Encryption keys are based on this.
8. Primary Master Key for WPA or WPA2. This value is calculated automatically by the module when SSID or pass phrase has changed.
9. Connection state (CONN == Connected, NC == Not Connected).
10. Number of successfully received packets.
11. Number of receive failures (Dropped packets because of errors)
12. Number of successfully transmitted packets.
13. Number of transmit failures.
14. Signal strength of last received packet.
15. Own MAC address. This is a 12-digits hexadecimal number.
16. BSSID of the WLAN where the module currently is attached to. This is a 12-digits hexadecimal number.
17. Also a 12-digits hex number. This is the filter BSSID that can be set with the WLAN BSSID command. If all digits are zero, the filter is disabled. (NEW since version 4.45)
WLAN?
Could produce the following output:
Andromeda_AP INFRA 11 WEP104 12345678901234567890a1b2d3 OFF IEEE a687b2429193c66edc7cc10f0e9d3facc0e8ba1d5ed3e8eebe26161ea0ffd2bf CONN 5169 0 41 0 66 00197002121c 000c419d2f64 000000000000