User Tools

Site Tools


doc:uci:wireless

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:uci:wireless [2014/07/28 20:11]
valentt
doc:uci:wireless [2015/07/27 20:45] (current)
Teekin Added which file a setting should go to
Line 36: Line 36:
 | ''​macaddr''​ | MAC address | yes/no | //​(autodetected)//​ | Specifies the radio adapter associated to this section, it is //not// used to change the device mac but to identify the underlying interface. | | ''​macaddr''​ | MAC address | yes/no | //​(autodetected)//​ | Specifies the radio adapter associated to this section, it is //not// used to change the device mac but to identify the underlying interface. |
 | ''​disabled''​ | boolean | no | ''​0''​ | Disables the radio adapter if set to ''​1''​. Removing this option or setting it to ''​0''​ will enable the adapter | | ''​disabled''​ | boolean | no | ''​0''​ | Disables the radio adapter if set to ''​1''​. Removing this option or setting it to ''​0''​ will enable the adapter |
-| ''​channel''​ | integer or "​auto"​ | yes | ''​auto''​ | Specifies the wireless channel to use. | +| ''​channel''​ | integer or "​auto"​ | yes | ''​auto''​ | Specifies the wireless channel to use. "​auto"​ defaults to the minimum channel available ​
-| ''​hwmode''​ | string | no | //(driver default)// | Selects the wireless protocol to use, possible values are ''​11b'',​ ''​11g'',​ ''​11a''​''​11ng'' ​(11N+11G, 2.4GHz, mac80211 only), ​''​11na'' ​(11N+11A5GHz, mac80211 only) | +| ''​hwmode''​ | string | no | //(driver default)// | Selects the wireless protocol to use, possible values are ''​11b'',​ ''​11g'', ​and ''​11a'' ​(note that ''​11ng'' ​and ''​11na'' ​are not available optionssee [[https://​dev.openwrt.org/​ticket/​17541|ticket 17541]]) | 
-| ''​htmode''​ | string | no | //(driver default)// | Specifies the channel width in 802.11n and 802.11ac mode, possible values are:\\ ''​HT20''​ (single 20MHz channel),\\ ''​HT40-''​ (2x 20MHz channels, primary/​control channel is upper, secondary channel is below)\\ ''​HT40+''​ (2x 20MHz channels, primary/​control channel is lower, secondary channel is above).\\ ''​VHT20''​ / ''​VHT40''​ / ''​VHT80''​ / ''​VHT160''​ (channel width in 802.11ac, extra channels are picked according to the specification) \\ Cf. [[doc/​faq/​faq.wireless#​why.can.t.i.use.ht40.with.channel.11]] and [[http://​hostap.epitest.fi/​cgit/​hostap/​tree/​hostapd/​hostapd.conf]] (search for HT40) in the web page. \\ :!: **This option is only used for type ''​mac80211''​** |+| ''​htmode''​ | string | no | //(driver default)// | Specifies the channel width in 802.11n and 802.11ac mode, possible values are:\\ ''​HT20''​ (single 20MHz channel),\\ ''​HT40-''​ (2x 20MHz channels, primary/​control channel is upper, secondary channel is below)\\ ''​HT40+''​ (2x 20MHz channels, primary/​control channel is lower, secondary channel is above).\\ ''​HT40''​ (2x 20Mz channels, auto selection of upper or lower secondary channel on versions 14.07 and above). \\ ''​NONE''​ (disables 802.11n rates and enforce the usage of legacy 802.11 b/g/a rates)\\ ''​VHT20''​ / ''​VHT40''​ / ''​VHT80''​ / ''​VHT160''​ (channel width in 802.11ac, extra channels are picked according to the specification) \\ Cf. [[doc/​faq/​faq.wireless#​why.can.t.i.use.ht40.with.channel.11]] and [[http://​hostap.epitest.fi/​cgit/​hostap/​tree/​hostapd/​hostapd.conf]] (search for HT40) in the web page. \\ :!: **This option is only used for type ''​mac80211''​** |
 | ''​chanbw''​ | integer | no | 20 | Specifies a narrow channel width, possible values are: ''​5''​ (5MHz channel), ''​10''​ (10MHz channel) or ''​20''​ (20MHz channel). \\ :!: **Only supported by the ''​ath9k''/''​ath5k''​ driver (since Attitude Adjustment)** | | ''​chanbw''​ | integer | no | 20 | Specifies a narrow channel width, possible values are: ''​5''​ (5MHz channel), ''​10''​ (10MHz channel) or ''​20''​ (20MHz channel). \\ :!: **Only supported by the ''​ath9k''/''​ath5k''​ driver (since Attitude Adjustment)** |
 | ''​ht_capab''​ | string | no | //(driver default)// | Specifies the available capabilities of the radio. The values are autodetected. ​ See [[http://​hostap.epitest.fi/​cgit/​hostap/​tree/​hostapd/​hostapd.conf]] for options (search for ht_capab in web page). \\ :!: **This option is only used for type ''​mac80211''​** | | ''​ht_capab''​ | string | no | //(driver default)// | Specifies the available capabilities of the radio. The values are autodetected. ​ See [[http://​hostap.epitest.fi/​cgit/​hostap/​tree/​hostapd/​hostapd.conf]] for options (search for ht_capab in web page). \\ :!: **This option is only used for type ''​mac80211''​** |
Line 72: Line 72:
 | ''​outdoor''​ | boolean | no | ''​0''​ | Enables outdoor channels in the 5GHz band | | ''​outdoor''​ | boolean | no | ''​0''​ | Enables outdoor channels in the 5GHz band |
 | ''​regdomain''​ | number | no | //(driver default)// | Overrides the regulatory domain setting | | ''​regdomain''​ | number | no | //(driver default)// | Overrides the regulatory domain setting |
- 
 ==== Wifi Networks ==== ==== Wifi Networks ====
  
Line 92: Line 91:
  
   * ''​wl0''​ is the identifier for the underlying [[doc:​uci:​wireless#​wifi.devices|radio hardware]]   * ''​wl0''​ is the identifier for the underlying [[doc:​uci:​wireless#​wifi.devices|radio hardware]]
-  * ''​lan''​ specifies the [[doc:​uci:​network#​interfaces|network interface]] the wifi is attached to+  * ''​lan''​ specifies the [[doc:​uci:​network#​interfaces|network interface]] the wifi is attached to
   * ''​ap''​ is the opetion mode, //Access Point// in this example   * ''​ap''​ is the opetion mode, //Access Point// in this example
   * ''​MyWifiAP''​ is the broadcasted SSID   * ''​MyWifiAP''​ is the broadcasted SSID
Line 106: Line 105:
 | ''​device''​ | string | yes | //(first device id)// | Specifies the used wireless adapter, must refer to one of the defined ''​wifi-device''​ sections | | ''​device''​ | string | yes | //(first device id)// | Specifies the used wireless adapter, must refer to one of the defined ''​wifi-device''​ sections |
 | ''​mode''​ | string | yes | ''​ap''​ | Selects the //​[[http://​wireless.kernel.org/​en/​users/​Documentation/​modes|operation mode]]// of the wireless network interface controller (some are supported simultaneously by some drivers):\\ ''​ap''​ for Access Point,\\ ''​sta''​ for managed (client) mode,\\ ''​adhoc''​ for Ad-Hoc,\\ ''​wds''​ for static WDS, \\ ''​monitor''​ for monitor mode,\\ ''​mesh''​ for [[wp>​IEEE 802.11s]] mesh mode\\ :!: **''​mesh''​ mode only supported by ''​mac80211''​ (in trunk)**| | ''​mode''​ | string | yes | ''​ap''​ | Selects the //​[[http://​wireless.kernel.org/​en/​users/​Documentation/​modes|operation mode]]// of the wireless network interface controller (some are supported simultaneously by some drivers):\\ ''​ap''​ for Access Point,\\ ''​sta''​ for managed (client) mode,\\ ''​adhoc''​ for Ad-Hoc,\\ ''​wds''​ for static WDS, \\ ''​monitor''​ for monitor mode,\\ ''​mesh''​ for [[wp>​IEEE 802.11s]] mesh mode\\ :!: **''​mesh''​ mode only supported by ''​mac80211''​ (in trunk)**|
-| ''​disabled''​ | boolean | no | ''​1''​ | When set to 1, wireless network is disabled. |+| ''​disabled''​ | boolean | no | ''​0''​ | When set to 1, wireless network is disabled. |
 | ''​ssid''​ | string | yes | ''​OpenWrt''​ | The broadcasted SSID of the wireless network (for managed mode the SSID of the network you're connecting to) | | ''​ssid''​ | string | yes | ''​OpenWrt''​ | The broadcasted SSID of the wireless network (for managed mode the SSID of the network you're connecting to) |
 | ''​bssid''​ | BSSID address | no | //(driver default)// | Override the BSSID of the network, only applicable in ''​adhoc''​ or ''​sta''​ mode. In ''​wds''​ mode specifies the BSSID of another AP to create WDS with. | | ''​bssid''​ | BSSID address | no | //(driver default)// | Override the BSSID of the network, only applicable in ''​adhoc''​ or ''​sta''​ mode. In ''​wds''​ mode specifies the BSSID of another AP to create WDS with. |
Line 114: Line 113:
 | ''​doth''​ | boolean | no | ''​0''​ | Enables 802.11h support.\\ :!: **Not supported for the ''​mac80211''​ type yet** | | ''​doth''​ | boolean | no | ''​0''​ | Enables 802.11h support.\\ :!: **Not supported for the ''​mac80211''​ type yet** |
 | ''​wmm''​ | boolean | no | ''​1''​ | Enables WMM (802.11e) support. Required for 802.11n support | | ''​wmm''​ | boolean | no | ''​1''​ | Enables WMM (802.11e) support. Required for 802.11n support |
-| ''​network''​ | string | yes | ''​lan''​ | Specifies the [[doc:​uci:​network#​interfaces|network interface]] to attach the wireless to |+| ''​network''​ | string | yes | ''​lan''​ | Specifies the [[doc:​uci:​network#​interfaces|network interface]] to attach the wireless to. :!: Most wireless drivers do not support bridging in client mode (see [[doc/​howto/​clientmode#​bridged.client.mode.issues|Bridged Client Mode Issues]] and [[doc:​recipes:​relayclient]],​ as well as notes on specific devices, e.g. [[toh:​asus:​wl500gp]] and tplink wr841nd), the wifi interface cannot be attached to networks that are creating a bridge or already have switches interfaces connected, if the wifi interface uses the mode '​sta'​. ​|
 | ''​encryption''​ | string | no | ''​none''​ | Wireless encryption method. ''​none''​ for an open network, ''​wep''​ for WEP, ''​psk''​ for WPA-PSK, or ''​psk2''​ for WPA2-PSK. See the [[doc:​uci:​wireless#​WPA.Modes|WPA modes]] table for additional possible values.\\ For an access point in **WEP** mode, the default is "open system"​ authentication. Use ''​wep+shared''​ for "​shared key" authentication (less secure), ''​wep+open''​ to explicitly use "open system,"​ or ''​wep+mixed''​ to allow either. ''​wep+mixed''​ is only supported by hostapd. | | ''​encryption''​ | string | no | ''​none''​ | Wireless encryption method. ''​none''​ for an open network, ''​wep''​ for WEP, ''​psk''​ for WPA-PSK, or ''​psk2''​ for WPA2-PSK. See the [[doc:​uci:​wireless#​WPA.Modes|WPA modes]] table for additional possible values.\\ For an access point in **WEP** mode, the default is "open system"​ authentication. Use ''​wep+shared''​ for "​shared key" authentication (less secure), ''​wep+open''​ to explicitly use "open system,"​ or ''​wep+mixed''​ to allow either. ''​wep+mixed''​ is only supported by hostapd. |
 | ''​key''​ | integer or string | no | //(none)// | In any **WPA-PSK** mode, this is a string that specifies the pre-shared passphrase from which the pre-shared key will be derived. If a 64-character hexadecimal string is supplied, it will be used directly as the pre-shared key instead.\\ In **WEP** mode, this can be an integer specifying which key index to use (''​key1'',​ ''​key2'',​ ''​key3'',​ or ''​key4''​.) Alternatively,​ it can be a string specifying a passphrase or key directly, as in ''​key1''​.\\ In any **[[doc:​uci:​wireless#​wpa.enterprise.access.point|WPA-Enterprise AP]]** mode, this option has a different interpretation. | | ''​key''​ | integer or string | no | //(none)// | In any **WPA-PSK** mode, this is a string that specifies the pre-shared passphrase from which the pre-shared key will be derived. If a 64-character hexadecimal string is supplied, it will be used directly as the pre-shared key instead.\\ In **WEP** mode, this can be an integer specifying which key index to use (''​key1'',​ ''​key2'',​ ''​key3'',​ or ''​key4''​.) Alternatively,​ it can be a string specifying a passphrase or key directly, as in ''​key1''​.\\ In any **[[doc:​uci:​wireless#​wpa.enterprise.access.point|WPA-Enterprise AP]]** mode, this option has a different interpretation. |
Line 125: Line 124:
 | ''​iapp_interface''​ | string | no | //(none)// | Specifies a [[doc:​uci:​network#​interfaces|network interface]] to be used for 802.11f (IAPP) - only enabled when defined. | | ''​iapp_interface''​ | string | no | //(none)// | Specifies a [[doc:​uci:​network#​interfaces|network interface]] to be used for 802.11f (IAPP) - only enabled when defined. |
 | ''​rsn_preauth''​ | boolean | no | ''​0''​ | Allow preauthentication for WPA2-EAP networks (and advertise it in WLAN beacons). Only works if the specified network interface is a bridge. | | ''​rsn_preauth''​ | boolean | no | ''​0''​ | Allow preauthentication for WPA2-EAP networks (and advertise it in WLAN beacons). Only works if the specified network interface is a bridge. |
-| ''​ieee80211w''​ | integer | no | ''​0''​ | Enables MFP (802.11w) support (0 = disabled, 1 = optional, 2 = required).\\ :!: **Only supported by the ''​ath9k''​ driver (in trunk)**| +| ''​ieee80211w''​ | integer | no | ''​0''​ | Enables MFP (802.11w) support (0 = disabled, 1 = optional, 2 = required).\\ :!: **Only supported by the ''​ath9k''​ driver (since 10.03)**| 
-| ''​ieee80211w_max_timeout''​ | integer | no | //(hostapd default)// | Specifies the 802.11w Association SA Query maximum timeout.\\ :!: **Only supported by the ''​ath9k''​ driver (in trunk)** | +| ''​ieee80211w_max_timeout''​ | integer | no | //(hostapd default)// | Specifies the 802.11w Association SA Query maximum timeout.\\ :!: **Only supported by the ''​ath9k''​ driver (since 10.03)** | 
-| ''​ieee80211w_retry_timeout''​ | integer | no | //(hostapd default)// | Specifies the 802.11w Association SA Query retry timeout .\\ :!: **Only supported by the ''​ath9k''​ driver (in trunk)** |+| ''​ieee80211w_retry_timeout''​ | integer | no | //(hostapd default)// | Specifies the 802.11w Association SA Query retry timeout .\\ :!: **Only supported by the ''​ath9k''​ driver (since 10.03)** |
 | ''​maxassoc''​ | integer | no | //​(hostapd/​driver default)// | Specifies the maximum number of clients to connect. | | ''​maxassoc''​ | integer | no | //​(hostapd/​driver default)// | Specifies the maximum number of clients to connect. |
 | ''​macaddr''​ | mac address | no | //​(hostapd/​driver default)// | Overrides the MAC address used for the wifi interface. | | ''​macaddr''​ | mac address | no | //​(hostapd/​driver default)// | Overrides the MAC address used for the wifi interface. |
Line 173: Line 172:
 | ''​psk2+ccmp''​\\ ''​psk2+aes''​\\ ''​psk2''​ | WPA2 Personal (PSK) | CCMP | | ''​psk2+ccmp''​\\ ''​psk2+aes''​\\ ''​psk2''​ | WPA2 Personal (PSK) | CCMP |
 | ''​psk+tkip+ccmp''​\\ ''​psk+tkip+aes''​ | WPA Personal (PSK) | TKIP, CCMP | | ''​psk+tkip+ccmp''​\\ ''​psk+tkip+aes''​ | WPA Personal (PSK) | TKIP, CCMP |
-| ''​psk+tkip''​\\ ''​psk''​ | WPA Personal (PSK) | TKIP | +| ''​psk+tkip''​ | WPA Personal (PSK) | TKIP | 
-| ''​psk+ccmp''​\\ ''​psk+aes''​ | WPA Personal (PSK) | CCMP |+| ''​psk+ccmp''​\\ ''​psk+aes''​\\ ''​psk''​ | WPA Personal (PSK) | CCMP |
 | ''​mixed-psk+tkip+ccmp''​\\ ''​mixed-psk+tkip+aes''​\\ ''​mixed-psk''​ | WPA/WPA2 Personal (PSK) mixed mode | TKIP, CCMP | | ''​mixed-psk+tkip+ccmp''​\\ ''​mixed-psk+tkip+aes''​\\ ''​mixed-psk''​ | WPA/WPA2 Personal (PSK) mixed mode | TKIP, CCMP |
 | ''​mixed-psk+tkip''​ | WPA/WPA2 Personal (PSK) mixed mode | TKIP | | ''​mixed-psk+tkip''​ | WPA/WPA2 Personal (PSK) mixed mode | TKIP |
Line 190: Line 189:
 === WPA Enterprise (Access Point) === === WPA Enterprise (Access Point) ===
  
-Listing of Access Point related options for WPA Enterprise.+Listing of Access Point related options for WPA Enterprise. ​[[doc:​howto:​wireless.security.8021x|Basic WPA Enterprise configuration instructions]]
  
 ^ Name ^ Default ^ Description ^ ^ Name ^ Default ^ Description ^
Line 210: Line 209:
 | ''​dae_port''​ | ''​3799''​ | Port the Dynamic Authorization Extension server listens on. | | ''​dae_port''​ | ''​3799''​ | Port the Dynamic Authorization Extension server listens on. |
 | ''​dae_secret''​ | //(none)// | Shared DAE secret. | | ''​dae_secret''​ | //(none)// | Shared DAE secret. |
 +| ''​dynamic_vlan''​ | ''​0''​ | Dynamic VLAN assignment |
 +| ''​vlan_naming''​ | ''​1''​ | VLAN Naming |
 +| ''​vlan_tagged_interface''​ | //(none)// | VLAN Tagged Interface |
 +| ''​vlan_bridge''​ | //(none)// | VLAN Bridge Naming Scheme - added in [[https://​dev.openwrt.org/​changeset/​43473/​|r43473]] |
  
 :!: The ''​dae''​ options were introduced in [[https://​dev.openwrt.org/​changeset/​37734/​trunk|r37734]] :!: The ''​dae''​ options were introduced in [[https://​dev.openwrt.org/​changeset/​37734/​trunk|r37734]]
  
 :!: To enable Dynamic Authorization Extensions, both ''​dae_client''​ and ''​dae_secret''​ must be set. :!: To enable Dynamic Authorization Extensions, both ''​dae_client''​ and ''​dae_secret''​ must be set.
 +
 +:!: (Dynamic) VLAN Support added in [[https://​dev.openwrt.org/​changeset/​41872|r41872]]
  
 === WPA Enterprise (Client) === === WPA Enterprise (Client) ===
Line 256: Line 261:
 Minimal steps needed to get WPS running: Minimal steps needed to get WPS running:
  
-  * Add ''​option wps_pushbutton '​1'​ ''​ to a ''​config wifi-iface''​ section that is configured for WPA2-PSK+  * Add ''​option wps_pushbutton '​1'​ ''​ to a ''​config wifi-iface''​ section that is configured for WPA2-PSK ​in /​etc/​config/​wireless
   * opkg update   * opkg update
   * opkg remove wpad-mini   * opkg remove wpad-mini
   * opkg install wpad hostapd-utils   * opkg install wpad hostapd-utils
   * reboot   * reboot
 +
 +After rebooting, instead of pushing the WPS button, you can manually initiate the WPS process (which is safer than using the button if it doubles as a reset button, like on the [[toh:​tp-link/​tl-wr1043nd|TL-WR1043ND v2]] e.g.):
 +
 +<​code>​hostapd_cli wps_pbc</​code>​
 +
 +=== Fast BSS transition Options ===
 +
 +:!: The options in the table below only work with type ''​mac80211''​ in trunk, since [[https://​dev.openwrt.org/​changeset/​45051/​|r45051]].
 +
 +^ Name ^ Type ^ Required ^ Default ^ Description ^
 +| ''​ieee80211r''​ | boolean | no | ''​0''​ | Enables fast BSS transition (802.11r) support. |
 +| ''​nasid''​ | string | yes | (none) | PMK-R0 Key Holder identifier (dot11FTR0KeyHolderID). \\ 1 to 48 octet identifier. |
 +| ''​mobility_domain''​ | string | no | ''​4f57''​ | Mobility Domain identifier (dot11FTMobilityDomainID,​ MDID) \\ MDID is used to indicate a group of APs (within an ESS, i.e., sharing the same SSID) between which a STA can use Fast BSS Transition. \\ 2-octet identifier as a hex string. |
 +| ''​r0_key_lifetime''​ | integer | no | ''​10000''​ | Default lifetime of the PMK-RO in minutes [1-65535]. |
 +| ''​r1_key_holder''​ | string | no | ''​00004f577274''​ | PMK-R1 Key Holder identifier (dot11FTR1KeyHolderID). \\ 6-octet identifier as a hex string. |
 +| ''​reassociation_deadline''​ | integer | no | ''​1000''​ | Reassociation deadline in time units (TUs / 1.024 ms) [1000-65535] |
 +| ''​r0kh''​ | string | no | (none) | List of R0KHs in the same Mobility Domain. \\ format: <MAC address>,<​NAS Identifier>,<​128-bit key as hex string> \\ This list is used to map R0KH-ID (NAS Identifier) to a destination MAC address when requesting PMK-R1 key from the R0KH that the STA used during the Initial Mobility Domain Association. |
 +| ''​r1kh''​ | string | no | (none) | List of R1KHs in the same Mobility Domain. \\ format: <MAC address>,<​R1KH-ID>,<​128-bit key as hex string> \\ This list is used to map R1KH-ID to a destination MAC address when sending PMK-R1 key from the R0KH. This is also the list of authorized R1KHs in the MD that can request PMK-R1 keys. |
 +| ''​pmk_r1_push''​ | boolean | no | ''​0''​ | Whether PMK-R1 push is enabled at R0KH. |
 +
 +=== Inactivity Timeout Options ===
 +
 +^ Name ^ Type ^ Required ^ Default ^ Description ^
 +| ''​disassoc_low_ack''​ | boolean | no | ''​1''​ | Disassociate stations based on excessive transmission failures or other indications of connection loss. This depends on the driver capabilities and may not be available with all drivers. |
 +| ''​ap_max_inactivity''​ | integer | no | ''​300''​ | Station inactivity limit in seconds: If a station does not send anything in ap_max_inactivity seconds, an empty data frame is sent to it in order to verify whether it is still in range. If this frame is not ACKed, the station will be disassociated and then deauthenticated. See [[http://​w1.fi/​cgit/​hostap/​plain/​hostapd/​hostapd.conf|hostapd.conf]] for more information. |
 +| ''​skip_inactivity_poll''​ | boolean | no | ''​0''​ | The inactivity polling can be disabled to disconnect stations based on inactivity timeout so that idle stations are more likely to be disconnected even if they are still in range of the AP. |
 +| ''​max_listen_interval''​ | integer | no | ''​65535''​ | Maximum allowed Listen Interval (how many Beacon periods STAs are allowed to remain asleep). |
 +
 +See [[http://​w1.fi/​cgit/​hostap/​plain/​hostapd/​hostapd.conf|hostapd.conf]] for more information.
  
 ===== Configuring Encryption ===== ===== Configuring Encryption =====
Line 293: Line 327:
     uci commit wireless; wifi     uci commit wireless; wifi
  
-Note that option '​htmode'​ should be set to either HT40+ (for channels 1-7) or HT40- (for channels 5-11). You have to use WPA2 encryption with AES.+Note that option '​htmode'​ should be set to either HT40+ (for channels 1-7) or HT40- (for channels 5-11) or simply HT40 on versions >= to 14.07. You have to use WPA2 encryption with AES.
  
 For an explanation of the HT40+ vs. HT40- options, and other related information (e.g. for use of 5GHz band channels) see: [[http://​hostap.epitest.fi/​cgit/​hostap/​tree/​hostapd/​hostapd.conf]]. For an explanation of the HT40+ vs. HT40- options, and other related information (e.g. for use of 5GHz band channels) see: [[http://​hostap.epitest.fi/​cgit/​hostap/​tree/​hostapd/​hostapd.conf]].
  
 ===== DFS / Radar Detection ===== ===== DFS / Radar Detection =====
-In many countries, operating WiFi devices in the 5GHz band requires radar detection and DFS ([[http://​wifi-insider.com/​wlan/​dfs.htm|explanation)]]. More technical details of the Linux implementation can be found at [[http://​wireless.kernel.org/​en/​developers/​DFS]]. ​+In many countries, operating WiFi devices in the 5GHz band requires radar detection and DFS ([[http://​wifi-insider.com/​wlan/​dfs.htm|explanation)]]. More technical details of the Linux implementation can be found [[http://​wireless.kernel.org/​en/​developers/​DFS|here]]. 
  
 DFS works roughly as follows in Linux: The driver (e.g. ath9k) detects radar pulses and reports this to nl80211 where the information is processed. If a series of pulses matches one of the defined radar patterns, this will be reported to user space application (hostapd) which in turn reacts by switching to another channel. DFS works roughly as follows in Linux: The driver (e.g. ath9k) detects radar pulses and reports this to nl80211 where the information is processed. If a series of pulses matches one of the defined radar patterns, this will be reported to user space application (hostapd) which in turn reacts by switching to another channel.
  
-As of July 2014, DFS and radar detection are supported ​in OpenWRT trunk (Barrier ​Braker). Both features are not supported in currect stable release ​(Attitude Adjustment).+[[https://​lists.openwrt.org/​pipermail/​openwrt-devel/​2014-July/​026497.html|As of July 2014]], DFS and radar detection are supported ​from OpenWrt 14.07 (Barrier ​Breakeron, 12.09 (Attitude Adjustment) ​and earlier do not support this. By default, however, OpenWrt uses [[http://​wiki.openwrt.org/​doc/​devel/​packages/​wpad-mini|wpad-mini]],​ which **does not support DFS**. To use DFS, rebuild your image (using the [[http://​wiki.openwrt.org/​doc/​howto/​obtain.firmware.generate|image generator]] or the [[http://​wiki.openwrt.org/​about/​toolchain|buildroot]]),​ include both hostapd and wpa-supplicant as static packages, and remove wpad-mini.
  
 Currently, many members of the mac80211 family of WiFi drivers do support radar detection. ​ DFS is mandatory for most channels in the 5GHz band (exception: indoor-only channels) in many countries. ​ If you define a channel in your wireless config that requires DFS according to your country regulations,​ the 5GHz radio device won't start up if you run an OpenWRT version that lacks DFS support or if your system is not configured properly. Currently, many members of the mac80211 family of WiFi drivers do support radar detection. ​ DFS is mandatory for most channels in the 5GHz band (exception: indoor-only channels) in many countries. ​ If you define a channel in your wireless config that requires DFS according to your country regulations,​ the 5GHz radio device won't start up if you run an OpenWRT version that lacks DFS support or if your system is not configured properly.
Line 332: Line 366:
  option encryption none  option encryption none
 </​code>​ </​code>​
 +
 +If in doubt, double check your hostapd-phy.conf to make sure it contains the following values, and that your country code is set:
 +<​code>​
 +country_code=DE
 +ieee80211n=1
 +ieee80211d=1
 +ieee80211h=1
 +hw_mode=a
 +</​code>​
 +
 +
 +If radar detection is working, DFS channels will show up like this (here for Belgium, //iw phy1 info// output trimmed):
 +<​code>​
 + Frequencies:​
 + * 5220 MHz [44] (17.0 dBm)
 + * 5240 MHz [48] (17.0 dBm)
 + * 5260 MHz [52] (20.0 dBm) (radar detection)
 +   DFS state: usable (for 2155257 sec)
 +   DFS CAC time: 60000 ms
 + * 5280 MHz [56] (20.0 dBm) (radar detection)
 +   DFS state: usable (for 2155257 sec)
 +   DFS CAC time: 60000 ms
 +</​code>​
 +
 +:!: **DFS in ath9k only supports 20MHz channel width**
 +
 +If you select a channel that requires DFS in your country, and enable HT40, this will result in the following error:
 +
 +<​code>​
 +Configuration file: /​var/​run/​hostapd-phy1.conf
 +wlan1: interface state UNINITIALIZED->​COUNTRY_UPDATE
 +wlan1: interface state COUNTRY_UPDATE->​HT_SCAN
 +wlan1: interface state HT_SCAN->​DFS
 +wlan1: DFS-CAC-START freq=5680 chan=136 sec_chan=-1,​ width=0, seg0=0, seg1=0, cac_time=60s
 +DFS start_dfs_cac() failed, -1
 +Interface initialization failed
 +wlan1: interface state DFS->​DISABLED
 +wlan1: AP-DISABLED
 +hostapd_free_hapd_data:​ Interface wlan1 wasn't started
 +</​code>​
 +
 +Changing your configuration to HT20 should resolve this.
  
 ==== DFS for IBSS / Ad-Hoc Mode ==== ==== DFS for IBSS / Ad-Hoc Mode ====
Line 338: Line 414:
 Patches for IBSS / Ad-Hoc mode were posted in linux-wireless mailing list: [[http://​marc.info/?​l=linux-wireless&​m=137823021907805&​w=2|2013-09-03 [PATCH 0/4] add IBSS-DFS support]]. Patches for IBSS / Ad-Hoc mode were posted in linux-wireless mailing list: [[http://​marc.info/?​l=linux-wireless&​m=137823021907805&​w=2|2013-09-03 [PATCH 0/4] add IBSS-DFS support]].
  
-Output of //iw phy <​5ghz>​ info//+Output of //iw phy <​5ghz>​ info// ​(trimmed)
 <​code>​ <​code>​
  Frequencies:​  Frequencies:​
- * 5180 MHz [36] (15.0 dBm) 
- * 5200 MHz [40] (19.0 dBm) 
  * 5220 MHz [44] (15.0 dBm)  * 5220 MHz [44] (15.0 dBm)
  * 5240 MHz [48] (15.0 dBm)  * 5240 MHz [48] (15.0 dBm)
Line 348: Line 422:
    DFS state: usable (for 2731982 sec)    DFS state: usable (for 2731982 sec)
  * 5280 MHz [56] (15.0 dBm) (radar detection)  * 5280 MHz [56] (15.0 dBm) (radar detection)
-   DFS state: usable (for 2731982 sec) 
- * 5300 MHz [60] (15.0 dBm) (radar detection) 
-   DFS state: usable (for 2731982 sec) 
- * 5320 MHz [64] (15.0 dBm) (radar detection) 
-   DFS state: usable (for 2731982 sec) 
- * 5500 MHz [100] (15.0 dBm) (radar detection) 
-   DFS state: usable (for 2731982 sec) 
- * 5520 MHz [104] (19.0 dBm) (radar detection) 
    DFS state: usable (for 2731982 sec)    DFS state: usable (for 2731982 sec)
 </​code>​ </​code>​
doc/uci/wireless.1406571116.txt.bz2 · Last modified: 2014/07/28 20:11 by valentt