| 1 | [[PageOutline]] |
| 2 | |
| 3 | This information has been tested and created for use on the Gateworks Single Board Computers (SBCs)''', specifically the Ventana family that utilizes the Freescale i.MX6 processors. |
| 4 | |
| 5 | Gateworks SBCs can be viewed at the following link: [http://www.gateworks.com] |
| 6 | |
| 7 | [[Image(http://trac.gateworks.com/raw-attachment/wiki/OpenWrt/wireless/relayd/gw5100realsmall.png,200px)]] |
| 8 | |
| 9 | For information on various wireless technologies see the following pages: |
| 10 | * [wiki:wireless/modem Cellular Modems] |
| 11 | * [wiki:wireless/bluetooth Bluetooth] |
| 12 | |
| 13 | = 802.11 !WiFi = |
| 14 | Gateworks has had extensive experience with wireless radio's. This list includes miniPCI and miniPCIe, specifically with the Atheros wireless chipsets which happen to be one of the most common chipset's used under Linux in the industrial world. |
| 15 | |
| 16 | Out of box, our BSP's include the latest wireless drivers available. This allows our customers to get the latest and greatest support right away. |
| 17 | |
| 18 | [[Image(http://shop.gateworks.com/image/data/GW17001CC.jpg,200px)]] |
| 19 | |
| 20 | [=#radios] |
| 21 | == Common Wireless Radio Hardware == |
| 22 | Gateworks re-sells some of the more popular radios in our [http://shop.gateworks.com/index.php?route=product/category&path=70_74 on-line store] and has tested several others: |
| 23 | * '''Wireless 802.11AC''' |
| 24 | * Using ath10k Driver: |
| 25 | * [http://shop.gateworks.com/index.php?route=product/product&path=70_74&product_id=196 MiniPCIe Compex WLE900VX 7AA] - '''Standard Recommended Radio''' |
| 26 | * Pre-Certified with FCC |
| 27 | * 802.11b/g/a/c |
| 28 | * dual-band: 2.4, 5 |
| 29 | * 3x3 MIMO |
| 30 | * [http://www.compex.com.sg/index.php/minipcie/ Datasheet] |
| 31 | * MiniPCIe Compex WLE900N5 |
| 32 | * 802.11a/c |
| 33 | * single-band: 5 |
| 34 | * 3x3 MIMO |
| 35 | * MiniPCIe Unex DAXA-O1 |
| 36 | * 802.11n/a/c |
| 37 | * dual-band: 2.4, 5 |
| 38 | * 3x3 MIMO |
| 39 | * [http://www.taiwantrade.com.tw/EP/unex/products-detail/en_US/835711/DAXA-O1%3A_802.11ac_n_a_single_band_3x3_PCIe_mini_card,_QCA9880/ Datasheet] |
| 40 | * MiniPCIe [http://shop.gateworks.com/index.php?route=product/product&path=70_74&product_id=147 Doodle Labs ACE-DB-3 Radio] |
| 41 | * 802.11b/g/a/c |
| 42 | * tri-band: 2.4, 5, 4.9 |
| 43 | * 3x3 MIMO |
| 44 | * [http://www.doodlelabs.com/products/802-11-wifi-mimo-radio-transceivers/data-sheet-ace-db-3-aco-db-3-acm-db-3/ Datasheet] |
| 45 | * Using Intel iwlwifi Driver: |
| 46 | * MiniPCIe [http://www.intel.com/content/www/us/en/wireless-products/dual-band-wireless-ac-7260-bluetooth.html Intel 7260] |
| 47 | * 802.11 ac/a/b/g/n |
| 48 | * dual-band: 2.4, 5 |
| 49 | * 2x2 MIMO |
| 50 | * [http://ark.intel.com/products/75439/Intel-Dual-Band-Wireless-AC-7260 Other Specifications] |
| 51 | * '''Note: This card cannot emit radiation in the 5GHz range, i.e. AP mode does not work in 5GHz''' |
| 52 | |
| 53 | * '''Wireless 802.11N''' |
| 54 | * [http://shop.gateworks.com/index.php?route=product/product&path=70_74&product_id=172 MiniPCIe Unex DHXA-225] - '''Very common, cost effective''' |
| 55 | * [http://shop.gateworks.com/index.php?route=product/product&product_id=92 MiniPCIe Ubiquiti SR71E] |
| 56 | * [http://shop.gateworks.com/index.php?route=product/product&path=70_74&product_id=91 MiniPCIe Compex WLE350NX] - EOL, not recommended for new design |
| 57 | |
| 58 | * '''Wireless 802.11B/G''' |
| 59 | * miniPCIe [http://shop.gateworks.com/index.php?route=product/product&product_id=8 Ubiquiti XR2] |
| 60 | |
| 61 | Some additional radio vendors: |
| 62 | * Doodle Labs - High powered !WiFi radios [http://doodlelabs.com/] |
| 63 | * Compex - High powered !WiFi radios [http://www.compex.com.sg/] |
| 64 | * Unex - High powered !WiFi radios [http://www.unex.com.tw/wi-fi] |
| 65 | * Silex - WiFi radios [http://www.silexamerica.com/] |
| 66 | * Ubiquiti - High powered !WiFi 802.11abg radios [http://www.ubnt.com/] |
| 67 | |
| 68 | [=#prism] |
| 69 | === [http://www.doodlelabs.com/ Doodlelabs] Prism-FES (Front End Subsystems) === |
| 70 | [http://www.doodlelabs.com/ Doodlelabs] creates frequency shifting modules to allow frequencies between 700MHz - 6.5GHz, while using standard linux drivers. These systems are comprised of one ath9k/ath10k radio with a FES module on each chain. The below picture will help visualize this: |
| 71 | |
| 72 | [[Image(http://www.doodlelabs.com/wp-content/uploads/FES2-e1425744871125.png, 256px)]] |
| 73 | |
| 74 | In this system, a radio has two separate FES modules per chain. From the factory, Doodlelabs calibrates each chain on a specific radio to a particular FES module. This means that a radio with 2 chains is specifically paired with two FES modules. You can find which FES modules are paired with what radio by comparing serial numbers (Hint: all components in the system have the same serial). It's very highly recommended by Doodlelabs that nothing is mixed and matched. |
| 75 | |
| 76 | Radio's configured to be used in a Prism-FES all have EEPROM values programmed in to only allow a maximum of 10dBm output (per chain). '''Anything higher will damage the frequency translator'''. For this reason, Prism-FES's that are using ath10k are '''recommended to stay away from using the STA firmware (999.999.0.636)''' as we found that this firmware does not honor the EEPROM settings and configures the radio to output much higher than 10dBm. |
| 77 | |
| 78 | ==== Part Numbering Scheme ==== |
| 79 | Before we break this down further, the following terminology used by Doodlelabs is required: |
| 80 | |
| 81 | Grade Breakdown: |
| 82 | * Military Grade - This is their Industrial grade option. This grade has extended temp of -40C - +85C. This grade also has antenna port protection, and is built to a higher standard than their other radio's. |
| 83 | * Enterprise - This is their Indoor Commercial grade option. This grade has a temperature range of 0C - +60C and has no antenna port protection. |
| 84 | * Outdoors - This is their Outdoor Commercial grade option. This grade has a temperature range of -40C - +40C and has antenna port protection. |
| 85 | |
| 86 | The model number NM-770-2F is broken down into three sections: NM, 770, 2F |
| 87 | |
| 88 | * '''NM''' - The 'N' refers to this being an 80211N radio. If this were 'ACM', for example, that would mean the radio is a 80211AC radio. The last character of the first section refers to the grade the radio is. In this case, the 'M' stands for Military, or rugged, grade. |
| 89 | * '''770''' - This number refers to the middle frequency of the frequency range that the card supports. In this case, the card supports 746~798, the midpoint center frequency resulting in 770. If there is no number, and instead has either 'DB' or 'TB', that only means "Dual-Band" and "Tri-Band", respectively. When DB is specified, that refers to both the 2.4GHz and 5.8GHz range. TB refers to DB, but also includes the 4.9GHz frequency range. |
| 90 | * '''2F''' - The number '2' refers to the number of chains the radio has. In this case, there are two chains on this radio. A '3' would indicate three chains. The 'F' alludes to the fact that each chain get's frequency shifted through the frequency shifting module. This means that you're always going to have a FES module per chain. |
| 91 | |
| 92 | So in conclusion, the NM-770-2F system includes a 80211N radio with two chains, each getting frequency shifted by a FES module to the 770MHz range. |
| 93 | |
| 94 | ==== Licensed vs Unlicensed ==== |
| 95 | In the US, the difference between Licensed and Unlicensed comes down to how the FCC regulates the frequency spectrum. In general, Doodlelabs refers to 'unlicensed' radio's the 2.4GHz and 5GHz range frequencies. All other frequencies fall under being 'licensed'. |
| 96 | |
| 97 | ==== Frequency !Shifting/Power Level Mappings ==== |
| 98 | Coming Soon. |
| 99 | |
| 100 | ==== References ==== |
| 101 | * http://www.doodlelabs.com/products/prism-fes/ |
| 102 | * http://www.doodlelabs.com/products/mimo-radio-transceivers/ |
| 103 | |
| 104 | [=#support] |
| 105 | == Gateworks BSP Support == |
| 106 | Gateworks supports multiple Board Support Packages. The following table shows details on !WiFi support for each: |
| 107 | ||= BSP =||= Product Families =||= Drivers =||= Modes =|| |
| 108 | || OpenWrt || All || ath5k/ath9k/ath10k || AP / client || |
| 109 | || [wiki:Yocto Yocto] || Ventana || ath5k/ath9k/ath10k || AP / client || |
| 110 | || [wiki:Android] || Ventana || ath5k/ath9k || AP / client || |
| 111 | If you are looking for additional support please contact support@gateworks.com |
| 112 | |
| 113 | [=#openwrt] |
| 114 | === OpenWrt Wireless Configuration === |
| 115 | OpenWrt uses the standard Linux wireless utilities but configured and launched through its own configuration system. |
| 116 | |
| 117 | For more info on configuring Wireless for OpenWrt see: |
| 118 | * [wiki:OpenWrt/wireless OpenWrt Wireless Configuration] |
| 119 | |
| 120 | [=#yocto] |
| 121 | === Yocto Wireless Configuration === |
| 122 | Yocto uses the standard Linux utilities, init scripts, and conf files. |
| 123 | |
| 124 | For more info on configuring Wireless for Yocto see: |
| 125 | * [wiki:Yocto/Wireless Yocto Wireless Configuration] |
| 126 | |
| 127 | [=#android] |
| 128 | === Android Wireless Configuration === |
| 129 | Android uses the standard Linux utilities but wraps them around a Network Daemon that performs configuration and management. |
| 130 | |
| 131 | For more info on configuring Wireless for Android see: |
| 132 | * [wiki:Android/wireless Android Wireless Configuration] |
| 133 | |
| 134 | [=#linux] |
| 135 | == Wireless Configuration (Standard Linux) == |
| 136 | There are several tools and applications that are used by Linux to configure wireless devices: |
| 137 | * iw |
| 138 | * hostapd |
| 139 | * wpa_supplicant |
| 140 | |
| 141 | For more info on configuring Wireless for Yocto see: |
| 142 | * [wiki:Yocto/Wireless Yocto Wireless Configuration] |
| 143 | |
| 144 | === iw === |
| 145 | The 'iw' tool is the modern tool (which replaces the older set of WIRELESS_EXTENSION tools such as iwconfig, iwpriv, iwlist, etc) for configuration of wireless drivers. |
| 146 | |
| 147 | The full documentation is [http://wireless.kernel.org/en/users/Documentation/iw here] but some common commands we find useful are: |
| 148 | * list devices: |
| 149 | {{{ |
| 150 | iw dev ;# 'iw dev wlan0 info' for each dev |
| 151 | iw phy ;# 'iw phy phy0 info' for each dev |
| 152 | }}} |
| 153 | * list device info: |
| 154 | {{{ |
| 155 | iw dev wlan0 info ;# basic info: ifname, mode, mac (same as iw wlan0 info) |
| 156 | iw phy phy0 info ;# detailed info: antennas, supported modes, bands, freqs (same as iw phy0 info) |
| 157 | iw dev wlan0 link # info about link |
| 158 | }}} |
| 159 | * antenna info: |
| 160 | {{{ |
| 161 | iw phy phy0 | grep Antenna ;# get Antenna bitmasks |
| 162 | iw phy phy0 set antenna_gain <gainindbm> |
| 163 | iw phy phy0 set antenna <bitmap> | all <txbitmap> <rxbitmap> ;# set allowed antennas |
| 164 | }}} |
| 165 | * TX power info: |
| 166 | {{{ |
| 167 | iw dev wlan0 set txpower <auto|fixed|limit> [<txpowermbm>] |
| 168 | iw phy phy0 set txpower <auto|fixed|limit> [<txpowermbm>] |
| 169 | iw phy phy0 set distance <distance meters> ;# set appropriate coverage class (0-114750) |
| 170 | iw phy phy0 set coverage <coverage class> ;# set coverage class (1 for every 3us of air prop time 0-255) |
| 171 | }}} |
| 172 | * channel: |
| 173 | {{{ |
| 174 | iw dev wlan0 set channel <channel> [HT20|HT40+|HT40-] ;# or iw phy |
| 175 | iw dev wlan0 set freq <freq> [HT20|HT40+|HT40-] ;# or iw phy |
| 176 | iw dev wlan0 set freq <control freq> [20|40|80|80+80|160] [<center freq>] [<center freq2>] |
| 177 | iw phy phy0 set freq <freq> [HT20|HT40+|HT40-] |
| 178 | }}} |
| 179 | * 4-addr header parsing (WDS): |
| 180 | {{{ |
| 181 | iw dev wlan0 set 4addr <on|off> |
| 182 | }}} |
| 183 | * interface mode: |
| 184 | {{{ |
| 185 | iw dev wlan0 set type <managed|ibss|monitor|mesh|wds> |
| 186 | }}} |
| 187 | * rate masks (when fixed mask set you won't see T,p,P change in rc_stats but will see the stats change) |
| 188 | {{{ |
| 189 | iw dev set bitrates ;# clear masks |
| 190 | iw dev wlan0 set bitrates ht-mcs-5 19 ;# set MCS-19 |
| 191 | }}} |
| 192 | * interface creation: |
| 193 | {{{ |
| 194 | iw phy phy0 interface add <name> type <type> |
| 195 | iw phy phy0 interface add mon0 type monitor |
| 196 | iw dev <name> del ;# delete interface |
| 197 | }}} |
| 198 | |
| 199 | Notes: |
| 200 | * most commands allow specification of a network device (ie wlan0) or a phy (ie phy0) |
| 201 | * most 'set' commands will show current settings if a value isn't specified |
| 202 | * 'iw wlan0 ...' is short for 'iw dev wlan0 ...' and 'iw phy0 ...' is short for 'iw phy phy0 ...' |
| 203 | |
| 204 | References: |
| 205 | * http://wireless.kernel.org/en/users/Documentation/iw |
| 206 | * source: |
| 207 | - release tarballs: https://www.kernel.org/pub/software/network/iw/ |
| 208 | - git http://git.kernel.org/cgit/linux/kernel/git/jberg/iw.git (tagged per kernel release) |
| 209 | |
| 210 | === hostapd === |
| 211 | The hostapd application is the userspace application that configures and manages wireless drivers in Access Point (AP) mode. |
| 212 | |
| 213 | References: |
| 214 | * http://hostap.epitest.fi/hostapd/ |
| 215 | * http://wireless.kernel.org/en/users/Documentation/hostapd |
| 216 | * source: |
| 217 | - stable release tarballs: http://w1.fi/hostapd/ |
| 218 | - git git://w1.fi/srv/git/hostap.git (cgit: http://hostap.epitest.fi/cgit/hostap/) |
| 219 | |
| 220 | === wpa-supplicant === |
| 221 | The wpa-supplicant application is the userspace application that configures and manages wireless drivers in Station (STA) mode. |
| 222 | |
| 223 | References: |
| 224 | * http://hostap.epitest.fi/wpa_supplicant/ |
| 225 | * http://wireless.kernel.org/en/users/Documentation/wpa_supplicant |
| 226 | * source: |
| 227 | - stable release tarballs: http://w1.fi/hostapd/ |
| 228 | - git git://w1.fi/srv/git/hostap.git (cgit: http://hostap.epitest.fi/cgit/hostap/) |
| 229 | |
| 230 | [=#drivers] |
| 231 | == Linux Kernel Drivers == |
| 232 | There are various linux kernel drivers such as madwifi, ath5k, ath9k, ath10k, iwlwifi, to name a few. The below few sections will talk at length about several of them. |
| 233 | |
| 234 | [=#ath5k] |
| 235 | === Atheros AR5xxx 802.11abg cards (ath5k) === |
| 236 | There are two driver options for the Atheros AR5xxx based 802.11abg cards: |
| 237 | 1. madwifi driver - development of this driver has ceased but it still has been known to outperform the fully opensource ath5k replacement and has some additional features that are not (and will not be) in ath5k |
| 238 | 2. ath5k - mac80211 driver - driver should be stable, but does not get much attention anymore as most users have moved on to 802.11n or 802.11ac devices |
| 239 | * see [http://wireless.kernel.org/en/users/Drivers/ath5k ath5k] for more info |
| 240 | |
| 241 | Theoretical max throughput rate of 802.11abg is 54mbps. Typical performance is around 30mbps (TCP) |
| 242 | |
| 243 | [=#ath9k] |
| 244 | === Atheros AR9xxx 802.11abgn cards (ath9k) === |
| 245 | The linux-wireless 'ath9k' driver supports the Atheros AR9xxx based 802.11n cads. |
| 246 | |
| 247 | The 802.11n standard released in 2009 introduces some additions on top of the 802.11a standard: |
| 248 | * widening the channel bandwidth (up to 40MHz) |
| 249 | * Multiple Input(rx) Multiple Output(tx) streams (MIMO) up to 4 |
| 250 | * 64-QAM modulation |
| 251 | |
| 252 | Current popular hardware available supports up to 3x3 MIMO and up to 40MHz channel bandwidths using HT40+/HT40- which can 'theoretically yield' 300mbps of throughput. Actual results will vary based on CPU and bus bottlenecks, driver performance, and RF characteristics. |
| 253 | |
| 254 | We regularly obtain throughputs around 150mbps. |
| 255 | |
| 256 | See [http://wireless.kernel.org/en/users/Drivers/ath9k ath9k] for more info |
| 257 | |
| 258 | [=#ath10k] |
| 259 | === Atheros AR10xx 802.11ac cards (ath10k) === |
| 260 | The linux-wireless 'ath10k' driver supports the Atheros AR10xx based 802.11ac cards. |
| 261 | |
| 262 | The 802.11ac standard which was developed from 2011 through 2013 and approved in Jan 2014, introduces some additions on top of the 802.11n standards: |
| 263 | * widening the channel bandwidth (up to 160MHz) |
| 264 | * increased MIMO spatial streams (up to 8 vs 4 in 802.11n) |
| 265 | * multi-user MIMO (aka MU-MIMO) |
| 266 | * high-density modulation (up to 256-QAM vs 64-QAM for 802.11n) |
| 267 | |
| 268 | Current popular hardware available supports up to 3x3 MIMO and up to 80MHz channel bandwidths using VHT80 which can 'theoretically yield' 1.3gbps of throughput. Actual results will vary based on CPU and bus bottlenecks, driver performance, and RF characteristics. |
| 269 | |
| 270 | ath10k notes: |
| 271 | * 10.1.467.2-1 |
| 272 | * What we ship with |
| 273 | * Focuses as AP in which DFS works. STA mode works, but not well tested. No !AdHoc or P2P support |
| 274 | * Works in wireless bridge with upstream ath10k patches. These patches are in our 14.08 Branch (as well as trunk) of OpenWrt. |
| 275 | * 999.999.0.636 |
| 276 | * Supports both AP and STA, !AdHoc, and P2P. Has issues with DFS and cannot be configured an an AP in a wireless bridge |
| 277 | * Has less than half the performance than the 10.1.467.2-1 firmware. This was a primary reason for not choosing this firmware as our default shipped firmware. |
| 278 | * Monitor mode is not supported (crashes the firmware). |
| 279 | * TX Power inconsistent |
| 280 | |
| 281 | ==== Verifying / Checking Firmware Version ==== |
| 282 | To check which version of ath10k firmware is being used on the Single board computer, use the dmesg and grep command: |
| 283 | {{{ |
| 284 | root@OpenWrt:/# dmesg | grep ath10k |
| 285 | [ 10.934967] ath10k: qca988x hw2.0 (0x4100016c, 0x043202ff) fw 10.1.467.2-1 |
| 286 | root@OpenWrt:/# |
| 287 | |
| 288 | }}} |
| 289 | |
| 290 | ==== Multiple Firmware instructions ==== |
| 291 | To use one firmware vs. another, you simply need to rename, or relink it. Steps are details below: |
| 292 | {{{ |
| 293 | $ cd /lib/firmware/ath10k/QCA988X/hw2.0/ |
| 294 | $ ln -sf firmware-2-ct-full-community-beta.bin firmware-2.bin |
| 295 | $ # Reboot board |
| 296 | }}} |
| 297 | |
| 298 | That's it! You can use this method to link any firmware, so long as it's called firmware-2.bin (and if using the latest ath10k drivers, firmware-3.bin). |
| 299 | |
| 300 | ===== Candelatech ===== |
| 301 | [http://www.candelatech.com Candelatech] got their hands on the source code for the ath0k firmware and have been actively developing it. One of their latest enhancements to their firmware was to add adhoc support in conjunction with infrastructure (both 10.1 + 999.999 firmwares in one!). As it's still a beta firmware, we've put a binary on our site [http://dev.gateworks.com/sources/candelatech/firmware-2-ct-full-community-beta.bin here]. Use the above instructions to link it in and you should be able to get the best of both worlds. |
| 302 | |
| 303 | Finally, to see what's current in ath10k, see [http://wireless.kernel.org/en/users/Drivers/ath10k here] for more info |
| 304 | |
| 305 | [=#testing] |
| 306 | == Wireless Testing == |
| 307 | First, some testing vocabulary: |
| 308 | ||||= Symbol Legend =|| |
| 309 | ||= Key =||= Meaning =|| |
| 310 | || AP || Access Point || |
| 311 | || STA || Station || |
| 312 | || <---> || Ethernet Connection || |
| 313 | || <- -> || Wireless Connection || |
| 314 | || (S) || iperf server ^(1)^ || |
| 315 | || (C) || iperf client ^(2)^ || |
| 316 | || X || Doesn't Work || |
| 317 | || NA || Didn't Test || |
| 318 | ,,1. TCP server run with: iperf -s -w3M; UDP server run with: iperf -su,, [[BR]] |
| 319 | ,,2. TCP client run with: iperf -c $IP -i1 -t25 -w3M; UDP client run with: iperf -u -c $IP -i1 -t25 -b999M,, |
| 320 | |
| 321 | * Infrastructure mode means the following: |
| 322 | {{{ |
| 323 | 1. Testing between AP and STA |
| 324 | (S) (C) |
| 325 | AP<- ->STA |
| 326 | |
| 327 | 2. Testing between WAN and STA (Our standard infrastructure mode test) |
| 328 | (S) (C) |
| 329 | PC-A<--->AP<- ->STA |
| 330 | }}} |
| 331 | |
| 332 | * Wireless Bridging means the following: |
| 333 | {{{ |
| 334 | (S) (C) |
| 335 | PC-A<--->AP<- ->STA<--->PC-B |
| 336 | }}} |
| 337 | |
| 338 | * !AdHoc means the following: |
| 339 | {{{ |
| 340 | 1. No Bridge |
| 341 | (S) (C) |
| 342 | NODE1<- ->NODE2 (Our standard !AdHoc test) |
| 343 | |
| 344 | 2. With Bridge (Requires special software) |
| 345 | (S) (C) |
| 346 | PC-A<--->NODE1<- ->NODE2<--->PC-B |
| 347 | }}} |
| 348 | |
| 349 | Below is an example setup of how we test and with what hardware: |
| 350 | |
| 351 | [[Image(wireless/wifi:wirelesssetup.png)]] |
| 352 | |
| 353 | ,,1. 60dB Attenuators on each chain,, [[BR]] |
| 354 | ,,2. Directional Coupler (Krytar 1850 shown),, [[BR]] |
| 355 | ,,3. Power Sensor (Agilent 8481A shown),, [[BR]] |
| 356 | ,,4. Power Meter (HP E4418A shown),, [[BR]] |
| 357 | |
| 358 | The image above shows our testing setup. In general, to test TX Power, we use a Power Meter + Power Sensor + Directional Coupler. Further, when people talk about performance, they typically are talking about throughput from AP<- ->STA. When we talk about performance, we spell out specifically which network topology we are testing, who is generating/sending packets, and who is receiving. This should make it very clear where performance numbers came from and how you can compare against them. |
| 359 | |
| 360 | [=#performance] |
| 361 | === Performance === |
| 362 | We define performance as the rate at which data can travel at. This essentially means looking at throughput numbers via performance tools such as [https://iperf.fr/ iperf]. One of the ways we stress test our product is by running it through conditions that our customers might use. Since we also support a wide variety of wireless cards, we test a whole lot. The below sections will talk about how to tune a product to get the best performance and talk about the numbers we've gotten for each card we've tested. |
| 363 | |
| 364 | ==== Performance Tuning ==== |
| 365 | There are many characteristics that factor into performance (throughput): |
| 366 | * Radio factors: |
| 367 | * use wider channel bandwidths for the highest bandwidth (ie HT40 for 802.11n or VHT80/VHT160 for 802.11ac) |
| 368 | * RF characteristics (look at the driver's rate control statistics to ensure you are achieving the expected modulation rate. Modulation rates are dynamic and achieving the best one will result in the highest bandwidth) |
| 369 | * CPU factors: |
| 370 | * CPU performance bottleneck (which can be verified by watching output of 'top' while doing performance tests) can vary greatly based on SMP configuration, IRQ configuration, kernel netfilter modules, userspace services, and CPU cache configuration: |
| 371 | |
| 372 | Additional References: |
| 373 | * see [wiki:performance_tuning#WirelessTuning Wireless Tuning] for more information |
| 374 | * see [wiki:multicoreprocessing Multi-core Processing] for more information |
| 375 | |
| 376 | ==== Performance Comparison (Measured Data Rates) ==== |
| 377 | Below are our results with the following firmware modifications: |
| 378 | * Firewall was turned off |
| 379 | |
| 380 | ===== 802.11AC (ath10k|iwlwifi) ===== |
| 381 | ||= Radio =||= Chipset =||= Platform =||= OS Used =||||= Infrastructure Results^2^ =||||= Wireless Bridge Results^3^ =||||= !AdHoc Results^4^ =|| |
| 382 | || || || || || TCP || UDP || TCP || UDP || TCP || UDP || |
| 383 | || 3x3 ACE-DB-3 || QCA9880 || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA || 271^1^ || 380 || 4 || 9 || |
| 384 | || || || || Yocto 1.6 (backports 20140808) || NA || NA || NA || NA || NA || NA || |
| 385 | |||| |
| 386 | || 3x3 WLE900VX || QCA9880 || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA || 228 || 495^1^ || NA || NA || |
| 387 | || || || || Yocto 1.6 (backports 20140808) || NA || NA || NA || NA || NA || NA || |
| 388 | |||| |
| 389 | || 3x3 DAXA-O1 || QCA9880 || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA || 240 || 463 || 13^1^ || NA || |
| 390 | || || || || Yocto 1.6 (backports 20140808) || NA || NA || NA || NA || NA || NA || |
| 391 | ,,1. Best performing in this category,, [[BR]] |
| 392 | ,,2. Infrastructure tested by generating packets on PC-A and sourcing them on the STA. See [wiki:wireless#WirelessTesting the wireless testing] section for more details,, [[BR]] |
| 393 | ,,3. Wireless bridging works only with the 10.1.467.2-1 firmware with upstream patches,, [[BR]] |
| 394 | ,,4. !AdHoc works only with the 999.999.0.636 firmware and since there isn't wireless bridging, this number is based on NODE to NODE,, [[BR]] |
| 395 | |
| 396 | ===== 802.11N (ath9k) ===== |
| 397 | ||= Radio =||= Platform =||= OS Used =||||= Infrastructure Results^3^ =||||= Wireless Bridge Results =||||= !AdHoc Results^4^ =|| |
| 398 | || || || || TCP || UDP || TCP || UDP || TCP || UDP || |
| 399 | || 1x1 GTM671WFSd || GW2387 (Laguna) || OpenWrt (13.06 BSP) || NA || NA ||21 || 29 || NA || NA || |
| 400 | || (miniPCIe) || GW2388-4 (Laguna) || OpenWrt (14.08 BSP) || NA || NA ||NA || NA || NA || NA || |
| 401 | || || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA ||50 || 65 || NA || NA || |
| 402 | |||||||||||||||||||| |
| 403 | || 2x2 SR71-15 || GW2388-4 (Laguna) || OpenWrt (13.06 BSP) || NA || NA ||110 || 161 || NA || NA || |
| 404 | || (miniPCI) || || OpenWrt (14.08 BSP) || NA || NA ||101 || 151 || NA || NA || |
| 405 | || || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA ||92 || 112 || NA || NA || |
| 406 | |||||||||||||||||||| |
| 407 | || 2x2 WLM200N5-26 || GW2388-4 (Laguna) || OpenWrt (13.06 BSP) || NA || NA ||102 || 141 || NA || NA || |
| 408 | || (miniPCI) || || OpenWrt (14.08 BSP) || NA || NA ||108 || 151 || NA || NA || |
| 409 | || || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA ||88 || 106 || NA || NA || |
| 410 | |||||||||||||||||||| |
| 411 | || 2x2 SR71e || GW2388-4 (Laguna) || OpenWrt (13.06 BSP) || NA || NA ||122 || 147 || NA || NA || |
| 412 | || (miniPCIe) || || OpenWrt (14.08 BSP) || NA || NA ||102 || 151 || NA || NA || |
| 413 | || || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA ||190^2^ || 245^2^ || NA || NA || |
| 414 | |||||||||||||||||||| |
| 415 | || 3x3 HNMA-H5 || GW2388-4 (Laguna) || OpenWrt (13.06 BSP) || NA || NA ||108 || 156 || NA || NA || |
| 416 | || (miniPCI) || || OpenWrt (14.08 BSP) || NA || NA ||115 || 151 || NA || NA || |
| 417 | || || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA ||111 || 119 || NA || NA || |
| 418 | |||||||||||||||||||| |
| 419 | || 3x3 WLE300NX || GW2387 (Laguna) || OpenWrt (12.10 BSP) || NA || NA ||82.6 || 145 || NA || NA || |
| 420 | || (miniPCIe) || GW2388-4 (Laguna) || OpenWrt (13.06 BSP) || NA || NA ||100 || 138 || NA || NA || |
| 421 | || || || OpenWrt (14.08 BSP) || NA || NA ||107 || 140 || NA || NA || |
| 422 | || || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA ||240 || 367^1^ || NA || NA || |
| 423 | |||||||||||||||||||| |
| 424 | || 3x3 WLE350N5-25 || GW2388-4 (Laguna) || OpenWrt (13.06 BSP) || NA || NA ||153 || 178 || NA || NA || |
| 425 | || (miniPCIe) || || OpenWrt (14.08 BSP) || NA || NA ||150 || 181 || NA || NA || |
| 426 | || || GW5400 (Ventana) || OpenWrt (14.08 BSP) || NA || NA ||243^1^ || 355 || NA || NA || |
| 427 | ,,1. Best performing in this category (802.11n),, [[BR]] |
| 428 | ,,2. Best performing in this sub-category (802.11n, number of chains, form-factor),, [[BR]] |
| 429 | ,,3. Infrastructure tested by generating packets on PC-A and sourcing them on the STA. See [wiki:wireless#WirelessTesting the wireless testing] section for more details,, [[BR]] |
| 430 | ,,4. !AdHoc testing is based on NODE to NODE,, [[BR]] |
| 431 | |
| 432 | ===== 802.11ABG (ath5k|madwifi) ===== |
| 433 | ||= '''Radio''' ||= '''Platform''' ||= '''OS Used''' ||||= '''Infrastructure Results^2^''' ||||= '''Wireless Bridge Results''' ||||= '''!AdHoc Results''' || |
| 434 | || || || || TCP || UDP || TCP || UDP || TCP || UDP || |
| 435 | || CM9 || GW2388-4 (Laguna) || OpenWrt (12.10BSP) + madwifi || NA || NA || 10.4 || 11.5 || NA || NA || |
| 436 | || || || OpenWrt (12.10BSP) + ath5k || NA || NA || 30.1^1^ || 32.4^1^ || NA || NA || |
| 437 | ,,1. Best performing in this category,, [[BR]] |
| 438 | ,,2. Infrastructure tested by generating packets on PC-A and sourcing them on the STA. See [wiki:wireless#WirelessTesting the wireless testing] section for more details,, [[BR]] |
| 439 | |
| 440 | [=#terminology] |
| 441 | == !WiFi Terminology and Concepts == |
| 442 | |
| 443 | === mac80211 === |
| 444 | mac80211 refers to the Linux kernel 802.11 MAC layer software stack written for !SoftMAC radios. For many years all radio drivers utilize this layer and those drivers are referred to as 'mac80211 drivers'. An exception to this would be the popular 'madwifi' driver used for Atheros AR5XXX based 802.11abg radios (the mac80211 driver alternative to madwifi is the ath5k driver). |
| 445 | |
| 446 | References: |
| 447 | * http://wireless.kernel.org/en/developers/Documentation/mac80211 |
| 448 | |
| 449 | [=#crda] |
| 450 | === Regulatory Domain === |
| 451 | Different regulatory domain's exist around the world that are regulated by various bodies - examples include the FCC for North Ameriaca, and ETSI for many European countries. Modern Linux mac80211 based drivers use the crda (Central Regulatory Domain Agent) userspace agent for regulatory domain rule database and checking. It is comprised of a database of regulatory domain rules. |
| 452 | |
| 453 | Alternatively mac80211 can be configured at compile-time with CONFIG_CFG80211_INTERNAL_REGDB to use an internal regdb based on net/wireless/db.txt which can be easier to udpate if need be for your application (providing you are making changes that are legal in the regulatory domain you will be operating in). One example of where this would be useful is if you are licensed to operate in the US Public Safety band, which crda has no support for. |
| 454 | |
| 455 | Notes: |
| 456 | * OpenWrt uses this option |
| 457 | * If you enable CONFIG_CFG80211_INTERNAL_REGDB and fail to overwrite the default net/wireless/db.txt a default domain will be used which sets the 'no IR' flag on all channels (meaning you can not transmit) |
| 458 | |
| 459 | References: |
| 460 | * http://wireless.kernel.org/en/developers/Regulatory |
| 461 | * http://git.kernel.org/cgit/linux/kernel/git/linville/wireless-regdb.git/ |
| 462 | |
| 463 | |
| 464 | [=#acs] |
| 465 | === Automatic Channel Selection (ACS) === |
| 466 | The Automatic Channel Selection (ACS) feature is useful if you want the operating channel to be selected based on usage in your area. A specification exists on how this is done. |
| 467 | |
| 468 | Notes: |
| 469 | * a modern hostapd (2013-11-21) must be used and built with CONFIG_ACS |
| 470 | * specify channel=0 or channel=acs_survey in hostapd.conf |
| 471 | |
| 472 | References: |
| 473 | * http://wireless.kernel.org/en/users/Documentation/acs |
| 474 | |
| 475 | [=#dfs] |
| 476 | === Dynamic Frequency Selection (DFS) === |
| 477 | Dynamic Frequency Selection (DFS) is a specification required by certain regulatory domains on specific channels in order to eliminate conflicts with weather and government/military radar equipment. For this reason it is sometimes know as 'radar detection' (which is likely a better description of it). This is often required for channels on the 5.8GHz band and there are specific rules for how and if a radio can transmit on these channels. |
| 478 | |
| 479 | Because DFS is complex many small office and home office AP's as well as some enterprise AP's don't allow operation at all on DFS channels in the 5GHz band and many client devices are not certified for DFS operation. |
| 480 | |
| 481 | Notes: |
| 482 | * a modern hostapd (2013-11-21) must be used |
| 483 | * not supporting DFS limits the channels that can be used: |
| 484 | * In the US (FCC regulatory domain) there are 4 channels in the 5.8GHz band that do not require DFS and 4 that do |
| 485 | |
| 486 | The ath9k as well as ath10k (and possibly others) fully support ETSI DFS and FCC DFS requirements according to reports on the linux-wireless maillist and various radio certifications. |
| 487 | |
| 488 | References: |
| 489 | * http://wireless.kernel.org/en/developers/DFS |
| 490 | |
| 491 | [=#antennaselect] |
| 492 | === Antenna Selection === |
| 493 | MIMO (Multiple-In Multiple-Out) radios (802.11n and 802.11ac) have multiple transmit and multiple receive antennas (also known as 'chains'). On some devices/drivers you can configure which are used for tx as well as rx using the 'set antenna' command: |
| 494 | {{{ |
| 495 | iw phy0 info | grep Antenna # show available Antennas |
| 496 | iw phy0 set antenna 1 2 # set tx for antenna1, rx for antenna 2 |
| 497 | iw phy0 set antenna 1 3 # set tx for antenna1, rx for antenna 2 and 3 |
| 498 | }}} |
| 499 | * the values are a bitmask (ie 1 for antenna1, 2 for antenna2, 4 for antenna 3, 3 for antenna 1&2, 6 for antenna 2&3 etc) |
| 500 | * typically the interface needs to be in a down state (ifconfig wlan0 down) in order to set the antenna selection bitmasks |
| 501 | * not all drivers support this |
| 502 | |
| 503 | [=#guardband] |
| 504 | === Guard band Interval (GI) === |
| 505 | The guard band interval describes how long you wait in between packets before transmission. For 802.11 OFDM this is 800ns hjwever 802.11n (also supported in 802.11ac) introduced a 400ns option to increase data-rates. This new 400ns GI is referred to as a 'short' GI and the original 800ns is referred to as a 'long' GI. |
| 506 | |
| 507 | Notes: |
| 508 | * The rate control algorithm may decide between short GI and long GI based on statistics and alternate this over time |
| 509 | |
| 510 | [=#chwidth] |
| 511 | === Channel Width === |
| 512 | Channel Width refers to the bandwidth per channel and varies per 802.11 mode: |
| 513 | * [http://en.wikipedia.org/wiki/IEEE_802.11b-1999 802.11b] - defines 20MHz channel width (this allows for 3 non-overlapping channels out of the 11 channels defined in the 2.4GHz band) |
| 514 | * [http://en.wikipedia.org/wiki/IEEE_802.11n-2009 802.11n] - added the capability of 40MHz channels referred to as 'HT' or High Throughput channels. When using 40MHz HT channels you must specify HT40- to use the current channel specified frequency and the 20MHz below it, and HT40+ to use the current channel specified frequency and the 20MHz above it |
| 515 | * [http://en.wikipedia.org/wiki/IEEE_802.11ac 802.11ac] - added the capability of 80MHz and 160MHz channels referred to as 'VHT' or Very High Throughput channels |
| 516 | |
| 517 | Some drivers also support 'half' channel bandwidth (10MHz) and/or 'quarter' channel bandwidth (5Mhz) which is useful if you don't need the bandwidth provided by standard (20MHz) channels or HT/VHT channels and instead want more channel separation. |
| 518 | |
| 519 | Note that as you increase the channel width, you increase channel overlap and decrease separation. |
| 520 | |
| 521 | [=#mcs] |
| 522 | === Modulation Rates === |
| 523 | Various 802.11 specifications allow for varying modulation schemes which trade off error resilience, throughput, and effective distance. Each transmission can vary the modulation scheme and A 'rate control algorithm' has the ability to change this dynamically for each node being transmitted to based on different statistics. |
| 524 | |
| 525 | Modulation Schemes: |
| 526 | * [http://en.wikipedia.org/wiki/IEEE_802.11b-1999 802.11b] - allowed for 1M, 2M, 5.5M, 11M CCK modulation rates |
| 527 | * [http://en.wikipedia.org/wiki/IEEE_802.11g-2003 802.11g] - added additional OFDM modulation schemes to allow for 6M, 9M, 12M, 18M, 24M, 36M, 48M, and 54M modulation rates |
| 528 | * [http://en.wikipedia.org/wiki/IEEE_802.11n-2009 802.11n] - added additional modulation schemes to allow several more rates and introduced the concept of a Modulation and Coding Scheme (MCS) index to describe them |
| 529 | * [http://en.wikipedia.org/wiki/IEEE_802.11ac 802.11ac] - added 2 additional MCS indexes for new 256-QAM modulation schemes |
| 530 | |
| 531 | Notes: |
| 532 | * you can use the 'iw dev wlan0 set bitrates' command to set bitmasks to indicate which modulation rates to allow |
| 533 | * there is not a standard mac80211 way to determine what modulation rate is being used, or what the rate control algorithm is doing |
| 534 | * some devices/drivers use the mac80211 rate control algorithms (there are 2 to choose from at compile time) and others use algorithms baked into device firmware |
| 535 | * [http://mcsindex.com/ Modulation Table Online ] |
| 536 | |
| 537 | [=#adhoc] |
| 538 | === Adhoc mode (IBSS) === |
| 539 | Though not part of the 802.11 spec (was part of the 802.11 draft), a popular mode is referred to as 'adhoc' mode or 'IBSS' mode. In this mode there is no authentication/de-authentication and no concept of an Access Point. Instead a 'network' is defined by the 'BSSID' used by the nodes. Network discovery is performed by listening to beacons and beacon transmission is shared by nodes in a BSSID (each node has a beacon timer with a random backoff interval which is reset when a beacon matching the nodes network is received which tends to share the beacon transmission load). A scheme was defined so that nodes would join a network if a beacon is received matching the nodes network configuration and BSSID's would 'merge' depending on timestamps however this is not implemented consistently and can cause issues such as merge storms across various drivers/chipsets. Because of this often adhoc networks will define a BSSID instead. |
| 540 | |
| 541 | Because adhoc mode is not in the 802.11 spec and is not as popular as infrastructure mode (AP/STA) it isn't always as stable as infrastructure mode. |
| 542 | |
| 543 | While not required, Adhoc networking is often used as the underlying connection mode for layer2 (MAC layer) and layer3 (IP layer) MESH networks such as olsrd. |
| 544 | |
| 545 | When using adhoc mode, you do not need hostapd or wpa_supplicant and the iw tool can be used to join/leave adhoc network: |
| 546 | {{{ |
| 547 | iw phy phy0 interface add wlan0 type ibss # create an interface on phy0 called wlan0 configured for adhoc mode |
| 548 | iw dev wlan0 ibss join myssid 5180 # join the 'myssid' network, on 5180MHz (20MHz) and rely on IBSS discovery and merging |
| 549 | iw dev wlan0 ibss leave # leave the adhoc network |
| 550 | }}} |
| 551 | |
| 552 | Some other useful commands for adhoc nodes: |
| 553 | {{{ |
| 554 | iw dev wlan0 set type ibss # change an existing wlan0 device to ibss mode (if must be down) |
| 555 | iw dev wlan0 ibss join myssid 5180 0a:0b:0c:0d:0e:0f # join the 'myssid' network, on 5180MHz (20MHz) with fixed bssid |
| 556 | iw dev wlan0 ibss join myssid 5180 HT40- 0a:0b:0c:0d:0e:0f # join the 'myssid' network, on 5180MHz (40MHz using 5180 and the ch below) with fixed bssid |
| 557 | }}} |
| 558 | |
| 559 | === Frame Aggregation === |
| 560 | As data rates increase the overhead of management and headers starts to create bandwidth bottlenecks. The 802.11n specification introduced the concept of '''Frame Aggregation''' to combat this. Two types of aggregation was introduced: A-MPDU and A-MSDU. |
| 561 | |
| 562 | This does not need to be enabled and should be used automatically by the driver if the card has the capability. |
| 563 | |
| 564 | References: |
| 565 | * http://en.m.wikipedia.org/wiki/Frame_aggregation |
| 566 | |
| 567 | [=#qos] |
| 568 | === Quality of Service === |
| 569 | The 802.11e specification added various aspects to 802.11 to create the concept of multiple data queues with different priorities in order to create a quality of service. |
| 570 | |
| 571 | References: |
| 572 | * http://en.m.wikipedia.org/wiki/802.11e#Enhanced_distributed_channel_access_.28EDCA.29 |
| 573 | * https://wireless.wiki.kernel.org/en/developers/documentation/mac80211/queues |