Advertisement
Guest User

Untitled

a guest
Jan 17th, 2020
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.79 KB | None | 0 0
  1. pi@raspberrypi:~ $ sudo iw wlan0
  2. Usage: iw [options] command
  3. Options:
  4. --debug enable netlink debugging
  5. --version show version (5.0.1)
  6. Commands:
  7. help [command]
  8. Print usage for all or a specific command, e.g.
  9. "help wowlan" or "help wowlan enable".
  10.  
  11. event [-t|-r] [-f]
  12. Monitor events from the kernel.
  13. -t - print timestamp
  14. -r - print relative timstamp
  15. -f - print full frame for auth/assoc etc.
  16.  
  17. features
  18.  
  19.  
  20. commands
  21. list all known commands and their decimal & hex value
  22.  
  23. phy
  24. list
  25. List all wireless devices and their capabilities.
  26.  
  27. phy <phyname> info
  28. Show capabilities for the specified wireless device.
  29.  
  30. dev <devname> cac channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]
  31. dev <devname> cac freq <freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]
  32. dev <devname> cac freq <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]
  33. dev <devname> cac trigger channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]
  34. dev <devname> cac trigger freq <frequency> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]
  35. dev <devname> cac trigger freq <frequency> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]
  36. Start or trigger a channel availability check (CAC) looking to look for
  37. radars on the given channel.
  38.  
  39. phy <phyname> channels
  40. Show available channels.
  41.  
  42. dev <devname> switch channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]
  43. dev <devname> switch freq <freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]
  44. dev <devname> switch freq <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]] [beacons <count>] [block-tx]
  45. Switch the operating channel by sending a channel switch announcement (CSA).
  46.  
  47. dev
  48. List all network interfaces for wireless hardware.
  49.  
  50. dev <devname> info
  51. Show information for this interface.
  52.  
  53. dev <devname> del
  54. Remove this virtual interface
  55.  
  56. dev <devname> interface add <name> type <type> [mesh_id <meshid>] [4addr on|off] [flags <flag>*] [addr <mac-addr>]
  57. phy <phyname> interface add <name> type <type> [mesh_id <meshid>] [4addr on|off] [flags <flag>*] [addr <mac-addr>]
  58. Add a new virtual interface with the given configuration.
  59. Valid interface types are: managed, ibss, monitor, mesh, wds.
  60.  
  61. The flags are only used for monitor interfaces, valid flags are:
  62. none: no special flags
  63. fcsfail: show frames with FCS errors
  64. control: show control frames
  65. otherbss: show frames from other BSSes
  66. cook: use cooked mode
  67. active: use active mode (ACK incoming unicast packets)
  68. mumimo-groupid <GROUP_ID>: use MUMIMO according to a group id
  69. mumimo-follow-mac <MAC_ADDRESS>: use MUMIMO according to a MAC address
  70.  
  71. The mesh_id is used only for mesh mode.
  72.  
  73. dev <devname> ibss join <SSID> <freq in MHz> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [fixed-freq] [<fixed bssid>] [beacon-interval <TU>] [basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] [key d:0:abcde]
  74. Join the IBSS cell with the given SSID, if it doesn't exist create
  75. it on the given frequency. When fixed frequency is requested, don't
  76. join/create a cell on a different frequency. When a fixed BSSID is
  77. requested use that BSSID and do not adopt another cell's BSSID even
  78. if it has higher TSF and the same SSID. If an IBSS is created, create
  79. it with the specified basic-rates, multicast-rate and beacon-interval.
  80.  
  81. dev <devname> ibss leave
  82. Leave the current IBSS cell.
  83.  
  84. dev <devname> station set <MAC address> plink_action <open|block>
  85. Set mesh peer link action for this station (peer).
  86.  
  87. dev <devname> station set <MAC address> vlan <ifindex>
  88. Set an AP VLAN for this station.
  89.  
  90. dev <devname> station set <MAC address> mesh_power_mode <active|light|deep>
  91. Set link-specific mesh power mode for this station
  92.  
  93. dev <devname> station dump [-v]
  94. List all stations known, e.g. the AP on managed interfaces
  95.  
  96. dev <devname> station del <MAC address> [subtype <subtype>] [reason-code <code>]
  97. Remove the given station entry (use with caution!)
  98. Example subtype values: 0xA (disassociation), 0xC (deauthentication)
  99.  
  100. dev <devname> station get <MAC address>
  101. Get information for a specific station.
  102.  
  103. dev <devname> survey dump
  104. List all gathered channel survey data
  105.  
  106. dev <devname> ocb leave
  107. Leave the OCB mode network.
  108.  
  109. dev <devname> ocb join <freq in MHz> <5MHz|10MHz>
  110. Join the OCB mode network.
  111.  
  112. dev <devname> mesh leave
  113. Leave a mesh.
  114.  
  115. dev <devname> mesh join <mesh ID> [[freq <freq in MHz> <NOHT|HT20|HT40+|HT40-|80MHz>] [basic-rates <rate in Mbps,rate2,...>]], [mcast-rate <rate in Mbps>] [beacon-interval <time in TUs>] [dtim-period <value>] [vendor_sync on|off] [<param>=<value>]*
  116. Join a mesh with the given mesh ID with frequency, basic-rates,
  117. mcast-rate and mesh parameters. Basic-rates are applied only if
  118. frequency is provided.
  119.  
  120. dev <devname> mpath dump
  121. List known mesh paths.
  122.  
  123. dev <devname> mpath set <destination MAC address> next_hop <next hop MAC address>
  124. Set an existing mesh path's next hop.
  125.  
  126. dev <devname> mpath new <destination MAC address> next_hop <next hop MAC address>
  127. Create a new mesh path (instead of relying on automatic discovery).
  128.  
  129. dev <devname> mpath del <MAC address>
  130. Remove the mesh path to the given node.
  131.  
  132. dev <devname> mpath get <MAC address>
  133. Get information on mesh path to the given node.
  134.  
  135. dev <devname> mpp dump
  136. List known mesh proxy paths.
  137.  
  138. dev <devname> mpp get <MAC address>
  139. Get information on mesh proxy path to the given node.
  140.  
  141. dev <devname> scan [-u] [freq <freq>*] [duration <dur>] [ies <hex as 00:11:..>] [meshid <meshid>] [lowpri,flush,ap-force,duration-mandatory] [randomise[=<addr>/<mask>]] [ssid <ssid>*|passive]
  142. Scan on the given frequencies and probe for the given SSIDs
  143. (or wildcard if not given) unless passive scanning is requested.
  144. If -u is specified print unknown data in the scan results.
  145. Specified (vendor) IEs must be well-formed.
  146.  
  147. dev <devname> scan sched_stop
  148. Stop an ongoing scheduled scan.
  149.  
  150. dev <devname> scan sched_start [interval <in_msecs> | scan_plans [<interval_secs:iterations>*] <interval_secs>] [delay <in_secs>] [freqs <freq>+] [matches [ssid <ssid>]+]] [active [ssid <ssid>]+|passive] [randomise[=<addr>/<mask>]]
  151. Start a scheduled scan at the specified interval on the given frequencies
  152. with probing for the given SSIDs (or wildcard if not given) unless passive
  153. scanning is requested. If matches are specified, only matching results
  154. will be returned.
  155.  
  156. dev <devname> scan abort
  157. Abort ongoing scan
  158.  
  159. dev <devname> scan trigger [freq <freq>*] [duration <dur>] [ies <hex as 00:11:..>] [meshid <meshid>] [lowpri,flush,ap-force,duration-mandatory] [randomise[=<addr>/<mask>]] [ssid <ssid>*|passive]
  160. Trigger a scan on the given frequencies with probing for the given
  161. SSIDs (or wildcard if not given) unless passive scanning is requested.
  162. Duration(in TUs), if specified, will be used to set dwell times.
  163.  
  164.  
  165. dev <devname> scan dump [-u]
  166. Dump the current scan results. If -u is specified, print unknown
  167. data in scan results.
  168.  
  169. reg reload
  170. Reload the kernel's regulatory database.
  171.  
  172. phy <phyname> reg get
  173. Print out the devices' current regulatory domain information.
  174.  
  175. reg get
  176. Print out the kernel's current regulatory domain information.
  177.  
  178. reg set <ISO/IEC 3166-1 alpha2>
  179. Notify the kernel about the current regulatory domain.
  180.  
  181. dev <devname> auth <SSID> <bssid> <type:open|shared> <freq in MHz> [key 0:abcde d:1:6162636465]
  182. Authenticate with the given network.
  183.  
  184.  
  185. dev <devname> connect [-w] <SSID> [<freq in MHz>] [<bssid>] [key 0:abcde d:1:6162636465] [mfp:req/opt/no]
  186. Join the network with the given SSID (and frequency, BSSID).
  187. With -w, wait for the connect to finish or fail.
  188.  
  189. dev <devname> disconnect
  190. Disconnect from the current network.
  191.  
  192. dev <devname> link
  193. Print information about the current link, if any.
  194.  
  195. dev <devname> offchannel <freq> <duration>
  196. Leave operating channel and go to the given channel for a while.
  197.  
  198. dev <devname> cqm rssi <threshold|off> [<hysteresis>]
  199. Set connection quality monitor RSSI threshold.
  200.  
  201.  
  202. phy <phyname> wowlan show
  203. Show WoWLAN status.
  204.  
  205. phy <phyname> wowlan disable
  206. Disable WoWLAN.
  207.  
  208. phy <phyname> wowlan enable [any] [disconnect] [magic-packet] [gtk-rekey-failure] [eap-identity-request] [4way-handshake] [rfkill-release] [net-detect [interval <in_msecs> | scan_plans [<interval_secs:iterations>*] <interval_secs>] [delay <in_secs>] [freqs <freq>+] [matches [ssid <ssid>]+]] [active [ssid <ssid>]+|passive] [randomise[=<addr>/<mask>]]] [tcp <config-file>] [patterns [offset1+]<pattern1> ...]
  209. Enable WoWLAN with the given triggers.
  210. Each pattern is given as a bytestring with '-' in places where any byte
  211. may be present, e.g. 00:11:22:-:44 will match 00:11:22:33:44 and
  212. 00:11:22:33:ff:44 etc.
  213. Offset and pattern should be separated by '+', e.g. 18+43:34:00:12 will match '43:34:00:12' after 18 bytes of offset in Rx packet.
  214.  
  215. The TCP configuration file contains:
  216. source=ip[:port]
  217. dest=ip:port@mac
  218. data=<hex data packet>
  219. data.interval=seconds
  220. [wake=<hex packet with masked out bytes indicated by '-'>]
  221. [data.seq=len,offset[,start]]
  222. [data.tok=len,offset,<token stream>]
  223.  
  224. Net-detect configuration example:
  225. iw phy0 wowlan enable net-detect interval 5000 delay 30 freqs 2412 2422 matches ssid foo ssid bar
  226.  
  227. phy <phyname> coalesce show
  228. Show coalesce status.
  229.  
  230. phy <phyname> coalesce disable
  231. Disable coalesce.
  232.  
  233. phy <phyname> coalesce enable <config-file>
  234. Enable coalesce with given configuration.
  235. The configuration file contains coalesce rules:
  236. delay=<delay>
  237. condition=<condition>
  238. patterns=<[offset1+]<pattern1>,<[offset2+]<pattern2>,...>
  239. delay=<delay>
  240. condition=<condition>
  241. patterns=<[offset1+]<pattern1>,<[offset2+]<pattern2>,...>
  242. ...
  243. delay: maximum coalescing delay in msec.
  244. condition: 1/0 i.e. 'not match'/'match' the patterns
  245. patterns: each pattern is given as a bytestring with '-' in
  246. places where any byte may be present, e.g. 00:11:22:-:44 will
  247. match 00:11:22:33:44 and 00:11:22:33:ff:44 etc. Offset and
  248. pattern should be separated by '+', e.g. 18+43:34:00:12 will
  249. match '43:34:00:12' after 18 bytes of offset in Rx packet.
  250.  
  251.  
  252. dev <devname> roc start <freq> <time in ms>
  253.  
  254.  
  255. wdev <idx> p2p stop
  256.  
  257.  
  258. wdev <idx> p2p start
  259.  
  260.  
  261. dev <devname> vendor recvbin <oui> <subcmd> <filename|-|hex data>
  262.  
  263.  
  264. dev <devname> vendor recv <oui> <subcmd> <filename|-|hex data>
  265.  
  266.  
  267. dev <devname> vendor send <oui> <subcmd> <filename|-|hex data>
  268.  
  269.  
  270. dev <devname> mgmt dump frame <type as hex ab> <pattern as hex ab:cd:..> [frame <type> <pattern>]* [count <frames>]
  271. Register for receiving certain mgmt frames and print them.
  272. Frames are selected by their type and pattern containing
  273. the first several bytes of the frame that should match.
  274.  
  275. Example: iw dev wlan0 mgmt dump frame 40 00 frame 40 01:02 count 10
  276.  
  277.  
  278. dev <devname> ap stop
  279. Stop AP functionality
  280.  
  281.  
  282. dev <devname> ap start
  283. <SSID> <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]] <beacon interval in TU> <DTIM period> [hidden-ssid|zeroed-ssid] head <beacon head in hexadecimal> [tail <beacon tail in hexadecimal>] [inactivity-time <inactivity time in seconds>] [key0:abcde d:1:6162636465]
  284.  
  285.  
  286. wdev <idx> nan add_func type <publish|subscribe|followup> [active] [solicited] [unsolicited] [bcast] [close_range] name <name> [info <info>] [flw_up_id <id> flw_up_req_id <id> flw_up_dest <mac>] [ttl <ttl>] [srf <include|exclude> <bf|list> [bf_idx] [bf_len] <mac1;mac2...>] [rx_filter <str1:str2...>] [tx_filter <str1:str2...>]
  287.  
  288.  
  289. wdev <idx> nan rm_func cookie <cookie>
  290.  
  291.  
  292. wdev <idx> nan config [pref <pref>] [bands [2GHz] [5GHz]]
  293.  
  294.  
  295. wdev <idx> nan stop
  296.  
  297.  
  298. wdev <idx> nan start pref <pref> [bands [2GHz] [5GHz]]
  299.  
  300.  
  301. dev <devname> measurement ftm_request <config-file> [timeout=<seconds>] [randomise[=<addr>/<mask>]]
  302. Send an FTM request to the targets supplied in the config file.
  303. Each line in the file represents a target, with the following format:
  304. <addr> bw=<[20|40|80|80+80|160]> cf=<center_freq> [cf1=<center_freq1>] [cf2=<center_freq2>] [ftms_per_burst=<samples per burst>] [ap-tsf] [asap] [bursts_exp=<num of bursts exponent>] [burst_period=<burst period>] [retries=<num of retries>] [burst_duration=<burst duration>] [preamble=<legacy,ht,vht,dmg>] [lci] [civic]
  305.  
  306. dev <devname> ftm start_responder [lci=<lci buffer in hex>] [civic=<civic buffer in hex>]
  307. Start an FTM responder. Needs a running ap interface
  308.  
  309.  
  310. dev <devname> ftm get_stats
  311. Get FTM responder statistics.
  312.  
  313.  
  314. phy <phyname> set txq limit <packets> | memory_limit <bytes> | quantum <bytes>
  315. Set TXQ parameters. The limit and memory_limit are global queue limits
  316. for the whole phy. The quantum is the DRR scheduler quantum setting.
  317. Valid values: 1 - 2**32
  318.  
  319. phy <phyname> set antenna <bitmap> | all | <tx bitmap> <rx bitmap>
  320. Set a bitmap of allowed antennas to use for TX and RX.
  321. The driver may reject antenna configurations it cannot support.
  322.  
  323. dev <devname> set txpower <auto|fixed|limit> [<tx power in mBm>]
  324. Specify transmit power level and setting type.
  325.  
  326. phy <phyname> set txpower <auto|fixed|limit> [<tx power in mBm>]
  327. Specify transmit power level and setting type.
  328.  
  329. phy <phyname> set distance <auto|distance>
  330. Enable ACK timeout estimation algorithm (dynack) or set appropriate
  331. coverage class for given link distance in meters.
  332. To disable dynack set valid value for coverage class.
  333. Valid values: 0 - 114750
  334.  
  335. phy <phyname> set coverage <coverage class>
  336. Set coverage class (1 for every 3 usec of air propagation time).
  337. Valid values: 0 - 255.
  338.  
  339. phy <phyname> set netns { <pid> | name <nsname> }
  340. Put this wireless device into a different network namespace:
  341. <pid> - change network namespace by process id
  342. <nsname> - change network namespace by name from /run/netns
  343. or by absolute path (man ip-netns)
  344.  
  345.  
  346. phy <phyname> set retry [short <limit>] [long <limit>]
  347. Set retry limit.
  348.  
  349. phy <phyname> set rts <rts threshold|off>
  350. Set rts threshold.
  351.  
  352. phy <phyname> set frag <fragmentation threshold|off>
  353. Set fragmentation threshold.
  354.  
  355. dev <devname> set channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]
  356. phy <phyname> set channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]
  357. dev <devname> set freq <freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]
  358. dev <devname> set freq <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]
  359. phy <phyname> set freq <freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]
  360. phy <phyname> set freq <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]
  361. Set frequency/channel the hardware is using, including HT
  362. configuration.
  363.  
  364. phy <phyname> set name <new name>
  365. Rename this wireless device.
  366.  
  367. dev <devname> set mcast_rate <rate in Mbps>
  368. Set the multicast bitrate.
  369.  
  370. dev <devname> set peer <MAC address>
  371. Set interface WDS peer.
  372.  
  373. dev <devname> set noack_map <map>
  374. Set the NoAck map for the TIDs. (0x0009 = BE, 0x0006 = BK, 0x0030 = VI, 0x00C0 = VO)
  375.  
  376. dev <devname> set 4addr <on|off>
  377. Set interface 4addr (WDS) mode.
  378.  
  379. dev <devname> set type <type>
  380. Set interface type/mode.
  381. Valid interface types are: managed, ibss, monitor, mesh, wds.
  382.  
  383. dev <devname> set meshid <meshid>
  384. dev <devname> set monitor <flag>*
  385. Set monitor flags. Valid flags are:
  386. none: no special flags
  387. fcsfail: show frames with FCS errors
  388. control: show control frames
  389. otherbss: show frames from other BSSes
  390. cook: use cooked mode
  391. active: use active mode (ACK incoming unicast packets)
  392. mumimo-groupid <GROUP_ID>: use MUMIMO according to a group id
  393. mumimo-follow-mac <MAC_ADDRESS>: use MUMIMO according to a MAC address
  394.  
  395. dev <devname> set mesh_param <param>=<value> [<param>=<value>]*
  396. Set mesh parameter (run command without any to see available ones).
  397.  
  398. dev <devname> set power_save <on|off>
  399. Set power save state to on or off.
  400.  
  401. dev <devname> set bitrates [legacy-<2.4|5> <legacy rate in Mbps>*] [ht-mcs-<2.4|5> <MCS index>*] [vht-mcs-<2.4|5> <NSS:MCSx,MCSy... | NSS:MCSx-MCSy>*] [sgi-2.4|lgi-2.4] [sgi-5|lgi-5]
  402. Sets up the specified rate masks.
  403. Not passing any arguments would clear the existing mask (if any).
  404.  
  405. phy <phyname> get txq
  406. Get TXQ parameters.
  407.  
  408. dev <devname> get mesh_param [<param>]
  409. Retrieve mesh parameter (run command without any to see available ones).
  410.  
  411. dev <devname> get power_save <param>
  412. Retrieve power save state.
  413.  
  414.  
  415. Commands that use the netdev ('dev') can also be given the
  416. 'wdev' instead to identify the device.
  417.  
  418. You can omit the 'phy' or 'dev' if the identification is unique,
  419. e.g. "iw wlan0 info" or "iw phy0 info". (Don't when scripting.)
  420.  
  421. Do NOT screenscrape this tool, we don't consider its output stable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement