Differences

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

doc:howto:wireless.utilities [2013/05/06 13:33]
robthebrew
doc:howto:wireless.utilities [2013/06/22 14:50] (current)
lorema
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 process, so 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 (ath9k, b43, 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 APIs, and 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 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 ''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''.
Line 93: Line 97:
</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> 

Back to top

doc/howto/wireless.utilities.1367840005.txt.bz2 · Last modified: 2013/05/06 13:33 by robthebrew