Changes between Initial Version and Version 1 of OpenWrt/wireless


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (23 months ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenWrt/wireless

    v1 v1  
     1[[PageOutline]]
     2
     3This 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
     5Gateworks 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= OpenWrt 802.11 Wireless =
     9
     10For wireless info regarding to other BSP's see:
     11 * [wiki:Yocto/Wireless Yocto wireless networking]
     12 * [wiki:Android#WirelessNetworking Android wireless networking]
     13
     14== General Configuration ==
     15OpenWrt its own system configuration called Unified Configuration Interface or [http://wiki.openwrt.org/doc/uci UCI]. You can use the '''uci''' command-line utility to get/set configuration or edit the files directly under /system/config (if you know what your doing). Often we will provide uci command-line examples because these can be easily cut-n-pasted into a shell.
     16
     17Wireless radio configuration is contained in /etc/config/wireless, but the network configuration is contained in /etc/config/network. Each physical radio has a 'wifi-device' config section and each virtual interface (there is always one or more per physical radio) has a 'wifi-iface' config section that also specifies a 'network' config that links back to a section in /etc/config/network.
     18
     19Example configuration for a single radio (WLE300NX 802.11N) with a wireless Access Point:
     20 * looking at /etc/config/wireless
     21{{{
     22root@OpenWrt:/# cat /etc/config/wireless
     23config wifi-device  radio0
     24        option type     mac80211
     25        option channel  11
     26        option hwmode   11ng
     27        option path     pci0001:00/0001:00:01.0
     28        option htmode   HT20
     29        list ht_capab   LDPC
     30        list ht_capab   SHORT-GI-20
     31        list ht_capab   SHORT-GI-40
     32        list ht_capab   TX-STBC
     33        list ht_capab   RX-STBC1
     34        list ht_capab   DSSS_CCK-40
     35
     36config wifi-iface
     37        option device   radio0
     38        option network  lan
     39        option mode     ap
     40        option ssid     OpenWrt
     41        option encryption none
     42}}}
     43 * using UCI:
     44{{{
     45root@OpenWrt:/# uci show wireless
     46wireless.radio0=wifi-device
     47wireless.radio0.type=mac80211
     48wireless.radio0.channel=11
     49wireless.radio0.hwmode=11ng
     50wireless.radio0.path=pci0001:00/0001:00:01.0
     51wireless.radio0.htmode=HT20
     52wireless.radio0.ht_capab=LDPC SHORT-GI-20 SHORT-GI-40 TX-STBC RX-STBC1 DSSS_CCK-40
     53wireless.@wifi-iface[0]=wifi-iface
     54wireless.@wifi-iface[0].device=radio0
     55wireless.@wifi-iface[0].network=lan
     56wireless.@wifi-iface[0].mode=ap
     57wireless.@wifi-iface[0].ssid=OpenWrt
     58wireless.@wifi-iface[0].encryption=none
     59}}}
     60
     61
     62For more info:
     63 * [http://wiki.openwrt.org/doc/uci/wireless OpenWrt Wiki for Wireless]
     64 * [http://wiki.openwrt.org/doc/uci OpenWrt UCI]
     65
     66
     67== Adding a Wireless Radio ==
     68Here are the steps to add a wireless radio to your board:
     69 1. Insert Wireless Card into Mini-PCI / Mini-PCIe slot.
     70 2. Power on and boot Gateworks Single Board Computer
     71 3. The wireless configuration is located in the file /etc/config/wireless. Run the command '''cat /etc/config/wireless''' to display this file and ensure your device is detected (each physical radio will have a 'wifi-device' section with the 'macaddr' option matching the unique MAC address of the radio
     72 4. By default newly detected wireless devices are disabled. You will have to comment out or remove the 'option disabled 1' in the appropriate wifi-device section.
     73
     74
     75== Re-detecting Wireless Radios ==
     76If something happens to your /etc/config/wireless file, you can force a re-detection with:
     77{{{
     78wifi detect > /etc/config/wireless
     79}}}
     80
     81
     82== Enabling a Wireless Radio ==
     83By default OpenWrt does not enable the radios it detects. You must do this using the LuCI web-admin or via shell commands.
     84
     85Using UCI shell command to enable radio0:
     86{{{
     87uci delete wireless.radio0.disabled
     88uci commit
     89}}}
     90
     91
     92== Radio Identification ==
     93Each Physical radio detected in a system has a 'wifi-device' section. Which radio each section pertains to is specified by either:
     94 * a 'macaddr' linking the config section to a specific radio regardless of bus/slot it is detected on (making it easy to move radios around in physical slots if that is your desire). For example:
     95{{{
     96        option macaddr  '04:f0:21:01:3d:02'
     97}}}
     98 * a 'path' pointing to a specific bus/slot (making it easy to refer to a radio in a specific physical location regardless of the radio's unique mac address or order of detection. For example the following specifies the first slot on the first PCI bus:
     99{{{
     100        option path     'pci0001:00/0001:00:01.0'
     101}}}
     102 * a 'phy' pointing to the order the radio was detected in the system (making it easy to refer to the 'first' radio detected (''phy0'') or the 'second' radio detected (''phy1'') for example)
     103{{{
     104        option phy      'phy0'
     105}}}
     106
     107== Troubleshooting ==
     108Here are the common pitfalls of OpenWrt wireless configuration:
     109 * If the '''/etc/config/wireless''' file does not exist or does not contain a 'wifi-device' section matching your card, the card is not being detected
     110  * use the latest Gateworks OpenWrt BSP for the latest wireless drivers
     111  * If the drivers that are loaded on the system do not support the card, the card will not come up.   
     112  * Be sure the proper wireless drivers are loaded on the system for the wireless chipset being used. Using the command '''opkg list''' will show installed packages and drivers.
     113  * Check to see if the card shows up when using shell commands '''lspci''' (for miniPCI and miniPCIe based cards) or '''lsusb''' (for USB based cards)
     114   * If not then the card is not getting powered, the slot it is in does not have USB or PCI routed to it, or the card is malfunctioning.
     115 * Make sure you have 'enabled' the card (see above). By default OpenWrt puts newly detected cards in the disabled state (option disabled 1)
     116
     117
     118== Driver Support ==
     119OpenWrt uses a fairly modern Linux kernel and drivers from the Linux Backports project which provides support for drivers for many common 802.11 devices.
     120
     121Some popular drivers (and notes specific to them are):
     122 * ath9k (802.11n based Qualcomm / Atheros cards):
     123  * htmod can be set to HT20 (20MHz channel width), HT40- or HT40+ (40MHz channel widths)
     124 * ath10k (802.11ac based Qualcomm / Atheros cards):
     125  * htmode can be set to VHT40 (40MHz channel width), VHT80 (80MHz channel width), VHT160 (160MHz channel width, if your card supports it)
     126  * Sample 802.11AC configuration file for !OpenWrt in /etc/config/wireless using a ACE-DB-3 Doodle Lab Wireless Card in Access Point Mode with a SSID of OpenWrt and no security below:
     127{{{
     128config wifi-device  radio0
     129        option type     mac80211
     130        option channel  157
     131        option hwmode   11a
     132        option path     'soc0/soc.0/1ffc000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:05.0/0000:05:00.0'
     133        option htmode   VHT80
     134
     135config wifi-iface
     136        option device   radio0
     137        option network  lan
     138        option mode     ap
     139        option ssid     OpenWrt
     140        option encryption none
     141}}}
     142
     143== Wireless Configurations ==
     144 * [wiki:OpenWrt/wireless/access_point standard Access Point]
     145 * [wiki:OpenWrt/wireless/client standard Wireless client (without Bridging)]
     146 * [wiki:OpenWrt/wireless/wireless_bridge Wireless Bridge - Layer2 bridge using wireless and WDS]
     147 * [wiki:OpenWrt/wireless/relayd relayd - Bridge like Client Mode (when using an AP w/o WDS]
     148
     149 * [wiki:performance_tuning#WirelessTuning Wireless Throughput Tuning for Higher Numbers]
     150
     151== Networking ==
     152 * [wiki:OpenWrt/network_config Configure Network settings such as IP Address]
     153