Sunday, April 8, 2012

How will determine if a station is connected to an Access point in HT20 or HT40 ( in a linux based Systems)



Getting link status



To determine if you are connected to an AP or not and if you are the last TX rate used you can use the command below.
Example output when associated to a legacy (non-802.11n) AP:
iw dev wlan0 link
Connected to 04:21:b0:e8:c8:8b (on wlan0)
        SSID: attwifi
        freq: 2437
        RX: 2272 bytes (18 packets)
        TX: 232 bytes (3 packets)
        signal: -57 dBm
        tx bitrate: 36.0 MBit/s
Example output when associated to an 802.11n AP:
iw dev wlan0 link
Connected to 68:7f:74:3b:b0:01 (on wlan0)
        SSID: tesla-5g-bcm
        freq: 5745
        RX: 30206 bytes (201 packets)
        TX: 4084 bytes (23 packets)
        signal: -31 dBm
        tx bitrate: 300.0 MBit/s MCS 15 40Mhz short GI
Example output when not connected to an AP:
iw dev wlan0 link
Not connected.
This would happen if you are not connected to an AP. To connect to an AP you can use iw connect if the connection requires:
  • No encryption
  • Uses WEP for encryption
If you need to connect to an AP with WPA or WPA2 encryption requirements then you must usewpa_supplicant.

Thanks to : 

No comments:

Post a Comment