When I'm running the script on an LEDE powered router I'm getting
root@OpenWrt:~# ./setAutoChannel.sh 0
Iteration 1
Iteration 2
Iteration 3
Channel 1 has an average of 0 networks
Channel 6 has an average of 0 networks
Channel 11 has an average of 0 networks
Setting channel to 1
but the result of iw wlan0 scan is:
root@OpenWrt:~# iw wlan0 scan
BSS e8:94:f6:cc:44:3d(on wlan0)
TSF: 1869218724 usec (0d, 00:31:09)
freq: 2412
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -71.00 dBm
last seen: 890 ms ago
Information elements from Probe Response frame:
SSID: drahtlos nicht ratlos
HT capabilities:
Capabilities: 0x1ad
RX LDPC
HT20
SM Power Save disabled
RX HT20 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: No restriction (0x00)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 1
* secondary channel offset: no secondary
* STA channel width: 20 MHz
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
BSS bc:05:43:ab:37:76(on wlan0)
TSF: 2286763344 usec (0d, 00:38:06)
freq: 2412
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -79.00 dBm
last seen: 980 ms ago
SSID: sdt.net 33298
RSN: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
HT capabilities:
Capabilities: 0x13ce
HT20/HT40
SM Power Save disabled
RX HT40 SGI
TX STBC
RX STBC 3-streams
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 1
* secondary channel offset: above
* STA channel width: any
BSS 04:c0:6f:a2:16:b3(on wlan0)
TSF: 476191568154 usec (5d, 12:16:31)
freq: 2437
beacon interval: 100 TUs
capability: ESS (0x0411)
signal: -81.00 dBm
last seen: 590 ms ago
SSID: WLAN-B1A7E9
RSN: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP TKIP
* Authentication suites: PSK
* Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
BSS f4:30:b9:1f:ff:48(on wlan0)
TSF: 5876737280910 usec (68d, 00:25:37)
freq: 2437
beacon interval: 100 TUs
capability: ESS (0x0511)
signal: -87.00 dBm
last seen: 600 ms ago
SSID: DIRECT-47-HP OfficeJet 4650
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
HT capabilities:
Capabilities: 0x20
HT20
Static SM Power Save
RX HT20 SGI
No RX STBC
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 32767 bytes (exponent: 0x002)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-7
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 6
* secondary channel offset: no secondary
* STA channel width: 20 MHz
BSS bc:f2:af:e3:d2:7a(on wlan0)
TSF: 27822871061 usec (0d, 07:43:42)
freq: 2437
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -82.00 dBm
last seen: 600 ms ago
SSID: devolo-bcf2afe3d27a
HT capabilities:
Capabilities: 0x11ef
RX LDPC
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: No restriction (0x00)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 6
* secondary channel offset: no secondary
* STA channel width: 20 MHz
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
BSS c8:51:95:8c:a2:7a(on wlan0)
TSF: 72038824076 usec (0d, 20:00:38)
freq: 2462
beacon interval: 100 TUs
capability: ESS (0x0411)
signal: -69.00 dBm
last seen: 120 ms ago
Information elements from Probe Response frame:
SSID: WLAN1-000531
RSN: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP TKIP
* Authentication suites: PSK
* Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
HT capabilities:
Capabilities: 0x19bc
HT20
SM Power Save disabled
RX Greenfield
RX HT20 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 32767 bytes (exponent: 0x002)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 11
* secondary channel offset: no secondary
* STA channel width: 20 MHz
BSS 38:10:d5:b7:6a:cf(on wlan0)
TSF: 132239580368 usec (1d, 12:43:59)
freq: 2462
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -86.00 dBm
last seen: 210 ms ago
SSID: WLAN
HT capabilities:
Capabilities: 0x1ad
RX LDPC
HT20
SM Power Save disabled
RX HT20 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-23
HT operation:
* primary channel: 11
* secondary channel offset: no secondary
* STA channel width: 20 MHz
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
BSS 34:31:c4:d8:58:d6(on wlan0)
TSF: 12097715968384 usec (140d, 00:28:35)
freq: 2462
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -89.00 dBm
last seen: 200 ms ago
Information elements from Probe Response frame:
SSID: FRITZ!Powerline 546E
HT capabilities:
Capabilities: 0x11ef
RX LDPC
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-15
HT operation:
* primary channel: 11
* secondary channel offset: below
* STA channel width: any
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
so there are definitely several WLAN on channels 1,6 and 11 around.
Why is it then the script is not recognizing those ?
When I'm running the script on an LEDE powered router I'm getting
root@OpenWrt:~# ./setAutoChannel.sh 0
Iteration 1
Iteration 2
Iteration 3
Channel 1 has an average of 0 networks
Channel 6 has an average of 0 networks
Channel 11 has an average of 0 networks
Setting channel to 1
but the result of iw wlan0 scan is:
root@OpenWrt:~# iw wlan0 scan
BSS e8:94:f6:cc:44:3d(on wlan0)
TSF: 1869218724 usec (0d, 00:31:09)
freq: 2412
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -71.00 dBm
last seen: 890 ms ago
Information elements from Probe Response frame:
SSID: drahtlos nicht ratlos
HT capabilities:
Capabilities: 0x1ad
RX LDPC
HT20
SM Power Save disabled
RX HT20 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: No restriction (0x00)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 1
* secondary channel offset: no secondary
* STA channel width: 20 MHz
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
BSS bc:05:43:ab:37:76(on wlan0)
TSF: 2286763344 usec (0d, 00:38:06)
freq: 2412
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -79.00 dBm
last seen: 980 ms ago
SSID: sdt.net 33298
RSN: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
HT capabilities:
Capabilities: 0x13ce
HT20/HT40
SM Power Save disabled
RX HT40 SGI
TX STBC
RX STBC 3-streams
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 1
* secondary channel offset: above
* STA channel width: any
BSS 04:c0:6f:a2:16:b3(on wlan0)
TSF: 476191568154 usec (5d, 12:16:31)
freq: 2437
beacon interval: 100 TUs
capability: ESS (0x0411)
signal: -81.00 dBm
last seen: 590 ms ago
SSID: WLAN-B1A7E9
RSN: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP TKIP
* Authentication suites: PSK
* Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
BSS f4:30:b9:1f:ff:48(on wlan0)
TSF: 5876737280910 usec (68d, 00:25:37)
freq: 2437
beacon interval: 100 TUs
capability: ESS (0x0511)
signal: -87.00 dBm
last seen: 600 ms ago
SSID: DIRECT-47-HP OfficeJet 4650
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
HT capabilities:
Capabilities: 0x20
HT20
Static SM Power Save
RX HT20 SGI
No RX STBC
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 32767 bytes (exponent: 0x002)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-7
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 6
* secondary channel offset: no secondary
* STA channel width: 20 MHz
BSS bc:f2:af:e3:d2:7a(on wlan0)
TSF: 27822871061 usec (0d, 07:43:42)
freq: 2437
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -82.00 dBm
last seen: 600 ms ago
SSID: devolo-bcf2afe3d27a
HT capabilities:
Capabilities: 0x11ef
RX LDPC
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: No restriction (0x00)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 6
* secondary channel offset: no secondary
* STA channel width: 20 MHz
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
BSS c8:51:95:8c:a2:7a(on wlan0)
TSF: 72038824076 usec (0d, 20:00:38)
freq: 2462
beacon interval: 100 TUs
capability: ESS (0x0411)
signal: -69.00 dBm
last seen: 120 ms ago
Information elements from Probe Response frame:
SSID: WLAN1-000531
RSN: * Version: 1
* Group cipher: TKIP
* Pairwise ciphers: CCMP TKIP
* Authentication suites: PSK
* Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)
HT capabilities:
Capabilities: 0x19bc
HT20
SM Power Save disabled
RX Greenfield
RX HT20 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 32767 bytes (exponent: 0x002)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 11
* secondary channel offset: no secondary
* STA channel width: 20 MHz
BSS 38:10:d5:b7:6a:cf(on wlan0)
TSF: 132239580368 usec (1d, 12:43:59)
freq: 2462
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -86.00 dBm
last seen: 210 ms ago
SSID: WLAN
HT capabilities:
Capabilities: 0x1ad
RX LDPC
HT20
SM Power Save disabled
RX HT20 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-23
HT operation:
* primary channel: 11
* secondary channel offset: no secondary
* STA channel width: 20 MHz
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
BSS 34:31:c4:d8:58:d6(on wlan0)
TSF: 12097715968384 usec (140d, 00:28:35)
freq: 2462
beacon interval: 100 TUs
capability: ESS (0x0431)
signal: -89.00 dBm
last seen: 200 ms ago
Information elements from Probe Response frame:
SSID: FRITZ!Powerline 546E
HT capabilities:
Capabilities: 0x11ef
RX LDPC
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-15
HT operation:
* primary channel: 11
* secondary channel offset: below
* STA channel width: any
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 1-PTKSA-RC 1-GTKSA-RC (0x0000)
so there are definitely several WLAN on channels 1,6 and 11 around.
Why is it then the script is not recognizing those ?