Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

SCAN

Description

The SCAN command can be used to seek the air for nearby WLAN nets. SCAN actively searches all 14 WLAN channels beginning from CH 1 up to CH 14. SCAN requires one argument and can have a second, optional one. When SCAN has finished, a list of all found WLAN nets is sent to the active I/O interface. The output begins with a single-line number that is the count of the following entries. Each entry contains space-separated information in the following order:

1. The BSSID,  six bytes, 12 hex digits

2. RSSI: A decimal number that is the power of the received radio signal. The higher this value is, the greater is the probability that the sending station is nearer than stations with a smaller value.

3. The network type, either B or I, where I stands for IBSS (ad-hoc) and B stands for BSS (infrastructure) networks.

4. The encryption type, either 0,1,2 or 3. 0 means "no encryption", 1 means WEP, 2 means WPA and 3 means WPA2.

5. The SSID, a variable-length network name of up to 32 characters. Networks with a hidden SSID are labeled "[no name]".

Parameters

The first argument is one of the keywords BSS, IBSS or ANY. If BSS is given, SCAN only seeks for Access Points. In contrast, IBSS only seeks for ad-hoc networks. If ANY is given, both Access Points and ad-hoc networks are returned in the list.

The second optional argument determines how many milliseconds SCAN shall remain in one channel before it switches over to the next channel. The smaller this value is, the faster the scan finishes but scan results might be incomplete. If this argument is missing, a default value of 100 is taken.

Return Values

ERR_REJECTED (12) if SCAN could not start because of low ressources.
ERR_ARGUMENT (4) if one of the arguments was wrong.
ERR_NET_DOWN (39) If the WLAN interface is not active.

Example

SCAN ANY

Might produce the following output

6
00095bb13202 55 B 0 [no name]
001a4fdc3cb3 67 B 3 Toshiba_APx
001cf084d376 75 B 2 Nagasaki_Medien
001b11fea730 90 B 2 dlink
000c419d2f64 50 B 1 Toshiba_AP
0019700213a3 51 I 0 avisaro

Remarks

This feature is new since version 3.48