miércoles, 2 de septiembre de 2015

Setting Wireless

Setting Wireless


Setting power


 #iw dev wlan0 set txpower fixed 1000

to verify the power
#iwinfo wlan0 info
wlan0     ESSID: "casa"
          Access Point: A0:F3:C1:86:1E:D8
          Mode: Master  Channel: 11 (2.462 GHz)
          Tx-Power: 20 dBm  Link Quality: 64/70
          Signal: -46 dBm  Noise: -71 dBm
          Bit Rate: 72.2 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: unknown [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: yes  PHY name: phy0

Association list 

#iwinfo wlan0 assoclist
E4:90:7E:8C:37:C4  -47 dBm / -71 dBm (SNR 24)  0 ms ago
RX: 52.0 MBit/s, MCS 5, 20MHz                   1418 Pkts.
TX: 58.5 MBit/s, MCS 6, 20MHz                    750 Pkts.

50:F5:20:9D:D8:52  -52 dBm / -71 dBm (SNR 19)  0 ms ago
RX: 39.0 MBit/s, MCS 4, 20MHz                 133078 Pkts.
TX: 26.0 MBit/s, MCS 3, 20MHz                 113298 Pkts.

BC:85:56:08:BC:42  -42 dBm / -71 dBm (SNR 29)  0 ms ago
RX: 72.2 MBit/s, MCS 7, 20MHz, short GI         5903 Pkts.
TX: 65.0 MBit/s, MCS 6, 20MHz, short GI         5643 Pkts.

34:23:BA:E3:AF:90  -4 dBm / -71 dBm (SNR 67)  1040 ms ago
RX: 1.0 MBit/s, MCS 0, 20MHz                    7357 Pkts.
TX: 65.0 MBit/s, MCS 7, 20MHz                   2834 Pkts.

Scan for others acces point

# iwinfo wlan0 scan
Cell 01 - Address: CC:7D:37:F5:65:BB
          ESSID: "Fibertel WiFi543"
          Mode: Master  Channel: 1
          Signal: -61 dBm  Quality: 49/70
          Encryption: WPA PSK (TKIP)

Cell 02 - Address: 9C:D6:43:CB:20:FC
          ESSID: "ESTUDIO"
          Mode: Master  Channel: 3
          Signal: -63 dBm  Quality: 47/70
          Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)

Cell 03 - Address: 94:0C:6D:BD:4C:EE
          ESSID: "JUAN PABLO"
          Mode: Master  Channel: 6
          Signal: -82 dBm  Quality: 28/70
          Encryption: WPA2 PSK (TKIP)

Cell 04 - Address: 08:10:74:74:3C:18
          ESSID: "Oscar"
          Mode: Master  Channel: 6
          Signal: -69 dBm  Quality: 41/70
          Encryption: WPA2 PSK (CCMP)

Cell 05 - Address: 00:16:B6:D4:BE:9A
          ESSID: "BernardoHome1"
          Mode: Master  Channel: 6

# iw reg get
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 17), (N/A)
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)         Signal: -90 dBm  Quality: 20/70
          Encryption: WPA2 PSK (CCMP)

# iw dev wlan0 station dump
Station e4:90:7e:8c:37:c4 (on wlan0)
inactive time: 4500 ms
rx bytes: 196660
rx packets: 1592
tx bytes: 250365
tx packets: 817
tx retries: 389
tx failed: 1
signal:   -48 [-52, -50] dBm
signal avg: -37 [-50, -39] dBm
tx bitrate: 43.3 MBit/s MCS 4 short GI
rx bitrate: 6.0 MBit/s
authorized: yes
authenticated: yes
preamble: short
WMM/WME: yes
MFP: no
TDLS peer: no
Station 50:f5:20:9d:d8:52 (on wlan0)
inactive time: 0 ms
rx bytes: 89641215
rx packets: 172242
tx bytes: 152951855
tx packets: 147258
tx retries: 30366
tx failed: 8
signal:   -28 [-88, -28] dBm
signal avg: -28 [-69, -28] dBm
tx bitrate: 39.0 MBit/s MCS 4
rx bitrate: 26.0 MBit/s MCS 3
authorized: yes
authenticated: yes
preamble: short
WMM/WME: yes
MFP: no
TDLS peer: no
Station bc:85:56:08:bc:42 (on wlan0)
inactive time: 0 ms
rx bytes: 1221328
rx packets: 7352
tx bytes: 3059278
tx packets: 7106
tx retries: 1182
tx failed: 5
signal:   -24 [-75, -24] dBm
signal avg: -27 [-55, -28] dBm
tx bitrate: 65.0 MBit/s MCS 6 short GI
rx bitrate: 43.3 MBit/s MCS 4 short GI
authorized: yes
authenticated: yes
preamble: short
WMM/WME: yes
MFP: no
TDLS peer: no
Station 34:23:ba:e3:af:90 (on wlan0)
inactive time: 2890 ms
rx bytes: 773918
rx packets: 8065
tx bytes: 1231013
tx packets: 3118
tx retries: 1069
tx failed: 34
signal:   -6 [-58, -6] dBm
signal avg: -13 [-46, -13] dBm
tx bitrate: 65.0 MBit/s MCS 7
rx bitrate: 1.0 MBit/s
authorized: yes
authenticated: yes
preamble: short
WMM/WME: yes
MFP: no
TDLS peer: no

Problem to change channel


wifi down && sleep 5 && iw dev wlan0 set channel 11 HT20 && sleep 5 && wifi up

the wifi go down and never up

Bibliography