Skip to content

Instantly share code, notes, and snippets.

@hkwi
Last active January 13, 2017 02:27
Show Gist options
  • Save hkwi/e854bc952b67d0551539d8d7450316df to your computer and use it in GitHub Desktop.
Save hkwi/e854bc952b67d0551539d8d7450316df to your computer and use it in GitHub Desktop.
Linux wifi information
$ sudo iw phy
Wiphy phy2
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports RSN-IBSS.
        Device supports T-DLS.
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
                * 00-0f-ac:10
                * GCMP (00-0f-ac:8)
                * 00-0f-ac:9
                * CMAC (00-0f-ac:6)
                * 00-0f-ac:13
                * 00-0f-ac:11
                * 00-0f-ac:12
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
        Band 1:
                Capabilities: 0x184e
                        HT20/HT40
                        SM Power Save disabled
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 7935 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, 32
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm)
                        * 2472 MHz [13] (disabled)
                        * 2484 MHz [14] (disabled)
        Band 2:
                Capabilities: 0x184e
                        HT20/HT40
                        SM Power Save disabled
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 7935 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, 32
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 4920 MHz [184] (disabled)
                        * 4940 MHz [188] (disabled)
                        * 4960 MHz [192] (disabled)
                        * 4980 MHz [196] (disabled)
                        * 5040 MHz [8] (disabled)
                        * 5060 MHz [12] (disabled)
                        * 5080 MHz [16] (disabled)
                        * 5180 MHz [36] (20.0 dBm) (no IR)
                        * 5200 MHz [40] (20.0 dBm) (no IR)
                        * 5220 MHz [44] (20.0 dBm) (no IR)
                        * 5240 MHz [48] (20.0 dBm) (no IR)
                        * 5260 MHz [52] (20.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 17 sec)
                          DFS CAC time: 60000 ms
                        * 5280 MHz [56] (20.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 17 sec)
                          DFS CAC time: 60000 ms
                        * 5300 MHz [60] (20.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 17 sec)
                          DFS CAC time: 60000 ms
                        * 5320 MHz [64] (20.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 17 sec)
                          DFS CAC time: 60000 ms
                        * 5500 MHz [100] (disabled)
                        * 5520 MHz [104] (disabled)
                        * 5540 MHz [108] (disabled)
                        * 5560 MHz [112] (disabled)
                        * 5580 MHz [116] (disabled)
                        * 5600 MHz [120] (disabled)
                        * 5620 MHz [124] (disabled)
                        * 5640 MHz [128] (disabled)
                        * 5660 MHz [132] (disabled)
                        * 5680 MHz [136] (disabled)
                        * 5700 MHz [140] (disabled)
                        * 5745 MHz [149] (disabled)
                        * 5765 MHz [153] (disabled)
                        * 5785 MHz [157] (disabled)
                        * 5805 MHz [161] (disabled)
                        * 5825 MHz [165] (disabled)
                        * 5170 MHz [34] (disabled)
                        * 5190 MHz [38] (20.0 dBm) (no IR)
                        * 5210 MHz [42] (20.0 dBm) (no IR)
                        * 5230 MHz [46] (20.0 dBm) (no IR)
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * new_station
                 * new_mpath
                 * set_mesh_config
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * join_mesh
                 * remain_on_channel
                 * set_tx_bitrate_mask
                 * frame
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * tdls_mgmt
                 * tdls_oper
                 * probe_client
                 * set_noack_map
                 * register_beacons
                 * start_p2p_device
                 * set_mcast_rate
                 * Unknown command (104)
                 * connect
                 * disconnect
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0x40 0xb0 0xc0 0xd0
                 * managed: 0x40 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * mesh point: 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-device: 0x40 0xd0
        software interface modes (can always be added):
                 * AP/VLAN
                 * monitor
        valid interface combinations:
                 * #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 2,
                   total <= 2, #channels <= 1
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Device supports TX status socket option.
        Device supports HT-IBSS.
        Device supports SAE with AUTHENTICATE command
        Device supports low priority scan.
        Device supports scan flush.
        Device supports AP scan.
        Device supports per-vif TX power setting
        Driver supports a userspace MPM
sudo apt-get install firmware-linux-free
Jan 13 02:05:05 raspberrypi kernel: usb 1-1.4: new high-speed USB device number 7 using dwc_otg
Jan 13 02:05:05 raspberrypi kernel: usb 1-1.4: New USB device found, idVendor=0409, idProduct=02b4
Jan 13 02:05:05 raspberrypi kernel: usb 1-1.4: New USB device strings: Mfr=16, Product=32, SerialNumber=48
Jan 13 02:05:05 raspberrypi kernel: usb 1-1.4: Product: AtermWL300NU-AG
Jan 13 02:05:05 raspberrypi kernel: usb 1-1.4: Manufacturer: NEC
Jan 13 02:05:05 raspberrypi kernel: usb 1-1.4: SerialNumber: 12345
Jan 13 02:05:06 raspberrypi kernel: usb 1-1.4: reset high-speed USB device number 7 using dwc_otg
Jan 13 02:05:07 raspberrypi kernel: usb 1-1.4: Direct firmware load for carl9170-1.fw failed with error -2
Jan 13 02:05:07 raspberrypi kernel: usb 1-1.4: firmware not found.
Jan 13 02:05:07 raspberrypi kernel: usbcore: registered new interface driver carl9170
Jan 13 02:07:43 raspberrypi kernel: usb 1-1.4: USB disconnect, device number 7
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: new high-speed USB device number 8 using dwc_otg
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: New USB device found, idVendor=0409, idProduct=02b4
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: New USB device strings: Mfr=16, Product=32, SerialNumber=48
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: Product: AtermWL300NU-AG
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: Manufacturer: NEC
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: SerialNumber: 12345
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: driver   API: 1.9.7 2012-12-15 [1-1]
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: firmware API: 1.9.6 2012-07-07
Jan 13 02:07:48 raspberrypi kernel: ath: EEPROM regdomain: 0x88
Jan 13 02:07:48 raspberrypi kernel: ath: EEPROM indicates we should expect a direct regpair map
Jan 13 02:07:48 raspberrypi kernel: ath: Country alpha2 being used: JP
Jan 13 02:07:48 raspberrypi kernel: ath: Regpair used: 0x88
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: Event message available
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: Drv Event 36 (NL80211_CMD_REG_CHANGE) received for wlan0
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: Regulatory domain change
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: * initiator=2
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: * type=2
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: wlan0: Event CHANNEL_LIST_CHANGED (30) received
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=CUSTOM_WORLD
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: Regulatory information - country=JP (DFS-JP)
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: 2402-2482 @ 40 MHz 20 mBm
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM)
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: 4910-4990 @ 40 MHz 23 mBm
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: 5030-5090 @ 40 MHz 23 mBm
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: 5170-5250 @ 80 MHz 20 mBm
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS)
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: 5490-5710 @ 160 MHz 23 mBm (DFS)
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: Added 802.11b mode based on 802.11g information
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: P2P: Add operating class 81
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: P2P: Channels - hexdump(len=13): 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: P2P: Update channel list
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11,12,13
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: P2P: cli_channels:
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: rfkill: event: idx=2 type=1 op=0 soft=0 hard=0
Jan 13 02:07:48 raspberrypi wpa_supplicant[640]: nl80211: Ignore RTM_NEWLINK event for foreign ifindex 5
Jan 13 02:07:48 raspberrypi kernel: ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
Jan 13 02:07:48 raspberrypi kernel: usb 1-1.4: Atheros AR9170 is registered as 'phy2'
$ uname -a
Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
$ iw --version
iw version 3.17
$ iw phy
Wiphy phy0
        max # scan SSIDs: 10
        max scan IEs length: 2048 bytes
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports T-DLS.
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
                * CMAC (00-0f-ac:6)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * P2P-client
                 * P2P-GO
                 * P2P-device
        Band 1:
                Capabilities: 0x1020
                        HT20
                        Static SM Power Save
                        RX HT20 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 16 usec (0x07)
                HT TX/RX MCS rate indexes supported: 0-7
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm)
                        * 2472 MHz [13] (20.0 dBm)
                        * 2484 MHz [14] (20.0 dBm)
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * join_ibss
                 * set_pmksa
                 * del_pmksa
                 * flush_pmksa
                 * remain_on_channel
                 * frame
                 * set_channel
                 * tdls_oper
                 * start_sched_scan
                 * start_p2p_device
                 * crit_protocol_start
                 * crit_protocol_stop
                 * connect
                 * disconnect
        Supported TX frame types:
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * managed: 0x40 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-device: 0x40 0xd0
        software interface modes (can always be added):
        valid interface combinations:
                 * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
                   total <= 3, #channels <= 2
                 * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
                   total <= 4, #channels <= 1
        Device supports scan flush.
$ iw features
nl80211 features: 0x1
        * split wiphy dump
$ sudo iw dev wlan0 set 4addr on
command failed: Operation not supported (-95)
# lsmod
Module                  Size  Used by
bnep                   10340  2
hci_uart               17943  1
btbcm                   5929  1 hci_uart
bluetooth             326105  22 bnep,btbcm,hci_uart
bridge                 91933  0
stp                     1643  1 bridge
llc                     3563  2 stp,bridge
brcmfmac              186403  0
brcmutil                5661  1 brcmfmac
cfg80211              428431  1 brcmfmac
rfkill                 16037  4 cfg80211,bluetooth
snd_bcm2835            20447  0
snd_pcm                75762  1 snd_bcm2835
snd_timer              19288  1 snd_pcm
snd                    51908  3 snd_bcm2835,snd_timer,snd_pcm
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
evdev                  11396  3
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
ipv6                  347594  35 bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment