Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I know how to determine if scanned AP uses B or G mode, but how to know (using "iwlist wlan0 scan") it uses N protocol ? if I use "iw dev wlan0 scan" and see if the cell has a "HT capabilities" block.

OK. "iw dev wlan scan" partially works, but i can not get data about the signal quality, Channel mode (is it master or ad hoc) and security options. I need to find all security algorithm options in one command.

Is there other options? like third party commands? Any source code hack suggestions?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

No tool other than iw can give you more information. iw already gives all information that the network driver gives. If some information is missing, update your network driver (that mean your kernel) and/or iw.

An example of an up-to-date iw output:

BSS 42:42:42:42:42:42 (on w0)
    TSF: 4922636642679 usec (56d, 23:23:56)
    freq: 2437
    beacon interval: 102
    capability: ESS ShortPreamble ShortSlotTime (0x0421)
    signal: -80.00 dBm
    last seen: 600 ms ago
    Information elements from Probe Response frame:
    SSID: bestSSIDevar
    Supported rates: 1.0* 2.0* 5.5* 6.0 9.0 11.0* 12.0 18.0 
    DS Parameter set: channel 6
    TIM: DTIM Count 0 DTIM Period 1 Bitmap Control 0x0 Bitmap[0] 0x0
    ERP: <no flags>
    Extended supported rates: 24.0 36.0 48.0 54.0 

To get signal quality, just look at the signal: line. The type of BSS is given in the capability: line: ESS mean this is an part of a larger network (so it's AP mode), IBSS means the network is independent, so it's ad-hoc mode.

Security options are one complex beast, given in several Information Elements. If you see Privacy in capabilities, the network is protected somehow. If you see an RSN information element, then ... the network is protected via the Robust Security Network families of protocols, more know informally as WPA2. If you see an WPA information element, then, it's WPA1. If you see no RSN or WPA information elements but there is Privacy, then it's ye old WEP.

Here is a snipped of a network supporting both WPA and RSN with both CCMP and TKIP (but only TKIP for group) and using IEEE 802.1X (not PSK):

BSS 46:46:46:46:46:46 (on w0)
    TSF: 4923527793080 usec (56d, 23:38:47)
    freq: 2412
    beacon interval: 102
    capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
    signal: -59.00 dBm
    last seen: 872 ms ago
    Information elements from Probe Response frame:
    SSID: bestest
    Supported rates: 1.0* 2.0* 5.5* 6.0 9.0 11.0* 12.0 18.0 
    DS Parameter set: channel 1
    TIM: DTIM Count 0 DTIM Period 1 Bitmap Control 0x0 Bitmap[0] 0x0
    ERP: <no flags>
    RSN:     * Version: 1
             * Group cipher: TKIP
             * Pairwise ciphers: TKIP CCMP
             * Authentication suites: IEEE 802.1X
             * Capabilities: 4-PTKSA-RC 4-GTKSA-RC (0x0028)
    Extended supported rates: 24.0 36.0 48.0 54.0 
    WPA:     * Version: 1
             * Group cipher: TKIP
             * Pairwise ciphers: TKIP
             * Authentication suites: IEEE 802.1X
             * Capabilities: (0x0000)
share|improve this answer
    
Signal quality is not the same as Signal strenght. Signal quality is signals signal/noise ratio and other parameters. It is newer the same. Also channel mode is not reported straight way as in "iwlist wlan0 scan" . in "iwlist wlan0 scan" mode parameter tells either it is Master Mode, Ad-Hoc, Mesh, etc... –  Justin Bibys Jan 30 '13 at 14:36
    
@JustinBibys: No tool gives directly the signal quality with current kernels. You will have to use the survey results as well (iw dev w0 survey dump). (no, the value reported by iwconfig is a complete joke) –  BatchyX Jan 30 '13 at 15:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.