User Tools

Site Tools


doc:howto:wireless.utilities

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:wireless.utilities [2013/05/06 13:33]
robthebrew
doc:howto:wireless.utilities [2014/07/07 21:31] (current)
valentt
Line 1: Line 1:
 ====== Wireless Utilities ====== ====== Wireless Utilities ======
-As already explained at [[wireless.overview]] the Linux IEEE 802.11 subsystem is fragmented. The available tools depend entirely on your [[http://​linuxwireless.org/​en/​users/​Drivers|driver]]. +As already explained at [[wireless.overview]] the Linux IEEE 802.11 subsystem is fragmented. The available tools depend entirely on your [[http://​linuxwireless.org/​en/​users/​Drivers|driver]]. ​Wireless devices have an API different from that of Ethernet devices because the specifications of IEEE 802.11 regulate quite precisely the whole communications processso it makes sense to NOT implement this requirements in each driver but only once for all drivers and also because there is the problem of the diverging frequency regulations world wide.
- +
-===== mac80211-based drivers (ath9kb43, etc.) =====+
  
 +===== mac80211-based drivers (ath9k, b43, brcmfmac, etc.) =====
  
 ==== iwconfig ==== ==== iwconfig ====
-''​[[man>​iwconfig]]''​ is the configuration utility for the [[http://​linuxwireless.org/​en/​developers/​Documentation/​Wireless-Extensions|WEXT]] API. WEXT is obsolete. +''​[[man>​iwconfig]]'' ​(and ''/​proc/​net/​wireless''​) ​is the configuration utility for the now <color red>​obsolete</​color> ​[[http://​linuxwireless.org/​en/​developers/​Documentation/​Wireless-Extensions|WEXT]] API, which is scheduled for removal. Use ''​iw''​ or ''​iwinfo''​. 
-iwconfig and /​proc/​net/​wireless use deprecated APIsand are scheduled for removal. + 
-Use iwinfo to list info instead ​of these: https://forum.openwrt.org/viewtopic.php?​id=44011+ 
 +==== iwinfo ==== 
 +''​iwinfo''​ is a CLI frontend ​to the custom library, which assembles information from various places. It is also used by [[doc:​howto:​LuCI]] 
 +  * When in AP-mode, obtain a list of connected clients in STA-mode:<code bash> 
 +iwinfo wlan0/wl0/ath0 assoclist<​/code>
  
 ==== iw ==== ==== iw ====
Line 25: Line 28:
 iw reg set XX iw reg set XX
 </​code>​ </​code>​
-**''​Note:''​** The ath9k driver sets its own regulatory restrictions based on its [[wp>​EEPROM]]. Setting the domain from userland can only further restrict the regulatory settings. So if EEPROM says Japan, you can use all 14 channels, if you then set it to US, you can use merely the 12. It does not work the other way around, i.e. if EEPROM says US, you only can use the allowed 12 channels, no matter what you set in userspace! The value ''​98''​ represents a synthesized regulatory domain, based on the intersection of the available source of regulatory information (which can include the EEPROM, the userland setting, and a country IE from your AP).+**''​Note:''​** The ''​ath9k'' ​driver ​(and all other softmac drivers?​) ​sets its own regulatory restrictions based on its EEPROM, i.e. the [[doc:​techref:​flash.layout|ART (Atheros Radio Test) partition]] on flash. Setting the domain from userland can only further restrict the regulatory settings. So if EEPROM says Japan, you can use all 14 channels, if you then set it to US, you can use merely the 12. It does not work the other way around, i.e. if EEPROM says US, you only can use the allowed 12 channels, no matter what you set in userspace! The value ''​98''​ represents a synthesized regulatory domain, based on the intersection of the available source of regulatory information (which can include the EEPROM, the userland setting, and a country IE from your AP).
   * Question: Is there any way to get/set these raw settings (like, whatever it has in EEPROM)?   * Question: Is there any way to get/set these raw settings (like, whatever it has in EEPROM)?
   * Answer: Your "​expectation"​ of having the freedom to modify the EEPROM is valid as I agree with it too but current (US) legislation does not allow for it. So to support upstream drivers we just cannot allow for those type of changes. You won't get any support if you try to mess with that stuff unless we get a change in legislation that says otherwise. Please refer to:   * Answer: Your "​expectation"​ of having the freedom to modify the EEPROM is valid as I agree with it too but current (US) legislation does not allow for it. So to support upstream drivers we just cannot allow for those type of changes. You won't get any support if you try to mess with that stuff unless we get a change in legislation that says otherwise. Please refer to:
Line 31: Line 34:
     * http://​wireless.kernel.org/​en/​developers/​Regulatory/​statement     * http://​wireless.kernel.org/​en/​developers/​Regulatory/​statement
     * http://​wireless.kernel.org/​en/​developers/​Regulatory     * http://​wireless.kernel.org/​en/​developers/​Regulatory
 +    * [[https://​git.kernel.org/​cgit/​linux/​kernel/​git/​linville/​wireless-regdb.git/​tree/​db.txt|Regulations per country]]
  
 ==== Hostapd ==== ==== Hostapd ====
-The mac80211 subsystem moves all aspects of //master mode// into user space, thus it depends on ''​[[man>​hostapd]]''​ (also read [[http://​www.linuxwireless.org/​en/​users/​Documentation/​hostapd|Hostapd]]) to+The mac80211 subsystem moves all aspects of //master mode// ​(a.k.a. AP mode) into user space, thus it depends on ''​[[man>​hostapd]]''​ (also read [[http://​www.linuxwireless.org/​en/​users/​Documentation/​hostapd|Hostapd]]) to
   * handle authenticating clients,   * handle authenticating clients,
   * set encryption keys,   * set encryption keys,
Line 42: Line 46:
  
 ==== wpad ==== ==== wpad ====
-Is a hostapd + wpa_supplicant multicall binary.+Is a hostapd + [[wireless.utilities\wpa-supplicant|wpa_supplicant]] multicall binary.
  
 ==== hostapd-mini and wpad-mini ==== ==== hostapd-mini and wpad-mini ====
Line 54: Line 58:
 ^ ^^^ ^ ^^^
 | wpad                |   ​355.463 | This package contains a full featured IEEE 802.1x/​WPA/​EAP/​RADIUS Authenticator and Supplicant ​ | | wpad                |   ​355.463 | This package contains a full featured IEEE 802.1x/​WPA/​EAP/​RADIUS Authenticator and Supplicant ​ |
-| wpa-supplicant ​     |   ​220.602 | WPA Supplicant ​ |+[[wireless.utilities\wpa-supplicant|wpa-supplicant]] ​     ​| ​  ​220.602 | WPA Supplicant ​ |
 | wpa-cli ​            ​| ​   19.887 | WPA Supplicant command line interface ​ | | wpa-cli ​            ​| ​   19.887 | WPA Supplicant command line interface ​ |
 ^ ^^^ ^ ^^^
Line 64: Line 68:
 | xsupplicant ​        ​| ​  ​122.996 | This software allows a host to authenticate with a RADIUS server using 802.1x and various EAP protocols. | | xsupplicant ​        ​| ​  ​122.996 | This software allows a host to authenticate with a RADIUS server using 802.1x and various EAP protocols. |
  
-|{{:​meta:​icons:​tango:​dialog-information.png?​nolink}}| **''​wpad''​** package is a full featured IEEE 802.1x authenticator/​supplicant ([[wp>​Wi-Fi Protected Access|WPA]]/​[[wp>​Extensible Authentication Protocol|EAP]]/​[[wp>​Remote Authentication Dial In User Service|RADIUS]]),​ while **''​wpad-mini''​** only supports WPA-PSK (Pre-shared key). **''​wpad''​** obsoletes **''​hostapd''​** and ''​[[http://www.linuxwireless.org/​en/​users/​Documentation/​wpa_supplicant|WPA supplicant]]''​ as it offers both authentication service for the access point mode and supplicant services for the wireless client mode in one package. |+|{{:​meta:​icons:​tango:​dialog-information.png?​nolink}}| **''​wpad''​** package is a full featured IEEE 802.1x authenticator/​supplicant ([[wp>​Wi-Fi Protected Access|WPA]]/​[[wp>​Extensible Authentication Protocol|EAP]]/​[[wp>​Remote Authentication Dial In User Service|RADIUS]]),​ while **''​wpad-mini''​** only supports WPA-PSK (Pre-shared key). **''​wpad''​** obsoletes **''​hostapd''​** and ''​[[wireless.utilities\wpa-supplicant|wpa_supplicant]]''​ as it offers both authentication service for the access point mode and supplicant services for the wireless client mode in one package. |
  
 Also see [[doc/​uci/​wireless/​encryption#​atheros.and.generic.mac80211.wifi]] Also see [[doc/​uci/​wireless/​encryption#​atheros.and.generic.mac80211.wifi]]
  
 FIXME: FIXME:
-  * As far as I understand, wpad is a wrapper around hostapd with multicall support and wpa_supplicant built.+  * As far as I understand, wpad is a wrapper around hostapd with multicall support and [[wireless.utilities\wpa-supplicant|wpa_supplicant]] built.
   * Both wpad and wpad-mini are just wrappers around '​hostapd'​ with support packages, see [[https://​dev.openwrt.org/​browser/​trunk/​package/​hostapd/​Makefile]]   * Both wpad and wpad-mini are just wrappers around '​hostapd'​ with support packages, see [[https://​dev.openwrt.org/​browser/​trunk/​package/​hostapd/​Makefile]]
     * ''​wpad-mini''​ is the base system with only WPA(2)-PSK authentication.     * ''​wpad-mini''​ is the base system with only WPA(2)-PSK authentication.
Line 77: Line 81:
   * [[doc/​uci/​wireless/​encryption#​atheros.and.generic.mac80211.wifi]]   * [[doc/​uci/​wireless/​encryption#​atheros.and.generic.mac80211.wifi]]
  
-  * Actually, it's the other way around: ''/​usr/​sbin/​hostapd -> wpad'' ​hostapd is symlink to wpad+  * Actually, it's the other way around: ​hostapd is symlink to wpad, cf. ''/​usr/​sbin/​hostapd -> wpad''​. 
-  * Turning off debugging for ''​wpa_supplicant''​ decreased size of ''​wpad''​-package from ~365 KiB to ~286 KiB. Turning off debugging for hostapd did nothing. Because it's a different binary, not included in ''​wpad''​. +  * Turning off debugging for ''​[[wireless.utilities\wpa-supplicant|wpa_supplicant]]''​ decreased size of ''​wpad''​-package from ~365 KiB to ~286 KiB. Turning off debugging for hostapd did nothing. Because it's a different binary, not included in ''​wpad''​.
  
 ===== drivers without cfg80211-support ===== ===== drivers without cfg80211-support =====
Line 93: Line 96:
 </​code>​ </​code>​
  
-===== How to get list of connected clients ===== 
-<code bash> 
-# Proprietary Broadcom (wl) 
-wl -i wl0 assoclist 
  
-# Proprietary Atheros (madwifi) 
-wlanconfig ath0 list sta 
- 
-# MAC80211 
-iw dev wlan0 station dump 
- 
-# Universal 
-iwinfo wlan0/​wl0/​ath0 assoclist 
-</​code>​ 
doc/howto/wireless.utilities.1367840005.txt.bz2 · Last modified: 2013/05/06 13:33 by robthebrew