Professional Documents
Culture Documents
One application for Horst is testing external antennas, for example directional high gain antennas. The Mesh Potato, like many routers, has two antennas, numbered 1 and 2. Antenna 1 is a tx/rx antenna,
and Antenna 2 is only rx, sometimes called a "diversity" antenna. This helps with multipath issues where the signal received by one antenna may be very weak, but very strong in another antenna just a
few cm away. Multipath effects are especially common during indoor operation.
Now we usually connect external antennas to Antenna 1, as we use external antennas for long range tx/rx operation. However the Mesh Potato Wifi driver tends to favour Antenna 2 for receive. So when
testing antennas you can get confusing results: sometimes packets are received on Antenna 1 and sometimes on Antenna 2. These will usually have different signal strengths and will confuse antenna
testing results.
So if you are using Horst to test antennas (or testing antennas with other software), it is useful to disable the receive only Antenna 2. First disable automatic antenna selection:
root@OpenWrt:~# athstats
74 tx management frames
2691 tx failed due to too many retries
361969 long on-chip tx retries
13509527 tx frames with no ack marked
120624 tx frames with an alternate rate
761053 rx failed due to bad CRC
46146 PHY errors
15 transmit override receive
52 OFDM restart
46079 CCK restart
rssi of last ack: 17
rssi of last rcv: 24
739402 switched default/rx antenna
Antenna profile:
[1] tx
7247393 rx 37256094
[2] tx
7769498 rx
9750180
The last two lines from athstats indicate how many packets were received on Antenna 1 and how many on Antenna 2. After Antenna 1 is selected no more packets should be received on antenna 2. Try
running athstats several times to check.
Note that a reboot is required to re-enable diversity (Antenna 2) operation, this:
Audio Ping
option diversity 0
option rxantenna 1
option txantenna 1
Wifi Devices
The wifi-device refer to physical radio devices present on the system. The options present in this section describe properties common across all wireless networks on this radio
interface, such as channel or antenna selection.
In most cases there is only one radio adapter present on the device, so only one such section is defined, however on multi-radio hardware there may be multiplewifi-device sections each referring to a different adapter.
A minimal wifi-device declaration may look like the example below. Note that identifiers and options may vary for different chipset types or drivers.
config 'wifi-device' 'wl0'
option 'type'
'broadcom'
The possible options for device sections are listed in the table below. Note that not all options are used for all chipset/driver types, refer to the comments for further details.
Common Options
Type
Requir
ed
Default
Description
type
strin
g
yes
(autodete
cted)
The type is determined on firstboot during the initial radio device detection it is usually not required to change it. Used values are broadcom on brcm47xx,
or mac80211 for b43, ath5k and ath9k
phy
strin
g
no/
yes
(autodete
cted)
macaddr
MAC
addr
ess
yes/
no
(autodete
cted)
Specifies the radio adapter associated to this section, it is not used to change
the device mac but to identify the underlying interface.
disabled
bool
ean
no
channel
integ
er or
"aut
o"
yes
auto
hwmode
strin
g
no
(driver
default)
Selects the wireless protocol to use, possible values are 11b, 11g, and 11a (note
that 11ng and 11naare not available options, see ticket 17541)
(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
Name
htmode
strin
g
no
channel is above).
VHT20 / VHT40 / VHT80 / VHT160 (channel width in 802.11ac, extra channels are
picked according to the specification)
Cf. why.can.t.i.use.ht40.with.channel.11 andhttp://hostap.epitest.fi/cgit/hos
tap/tree/hostapd/hostapd.conf (search for HT40) in the web page.
This option is only used for type mac80211
chanbw
integ
er
no
20
ht_capab
strin
g
no
(driver
default)
Specifies the available capabilities of the radio. The values are autodetected.
Seehttp://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
txpower
integ
er
no
(driver
default)
diversity
bool
ean
no
rxantenna
integ
er
no
(driver
default)
Specifies the antenna for receiving, the value may be driver specific, usually
it is 1 for the first and 2for the second antenna. Specifying 0 enables
automatic selection by the driver if supported. This option has no effect if
diversity is enabled
txantenna
integ
er
no
(driver
default)
no
(driver
default)
Selects the antenna, possible values are vertical for internal vertical
polarization, horizontal for internal horizontal polarization or external to use
the external antenna connector
Only used on the Ubiquiti NanoStation device family instead of the
rxantenna/txantenna settings.
no
(driver
default)
Specifies the country code, affects the available channels and transmission
powers. For typebroadcom a two letter country code is used (EN or DE).
The madwifi driver expects a numeric code.
no
1
if country is
set,
otherwise
antenna
strin
g
country
varie
s
country_i
e
bool
ean
distance
integ
er
no
(driver
default)
noscan
bool
ean
no
no
100
(hostapd
default)
Set the beacon interval. This is the time interval between beacon frames,
measured in units of 1.024 ms. hostapd permits this to be set between 15
and 65535. This option only has an effect on ap andadhoc wifi-ifaces.
Only supported by mac80211 (in trunk)
no
(hostapd/
driver
default)
Set the supported basic rates. Each basic_rate is measured in kb/s. This
option only has an effect onap and adhoc wifi-ifaces.
Only supported by mac80211 (in trunk)
beacon_in
terval
integ
er
basic_rat
e
list
require_m
ode
strin
g
no
none
(AP mode) Set the minimum mode that connecting clients need to support
to be allowed to connect. Supported values: g = 802.11g, n = 802.11n, ac =
802.11ac
log_level
integ
er
no
Broadcom Options
The options below are only used by the proprietary Broadcom driver (type broadcom).
Name
Type
Required
Default
Description
frameburst
boolean
no
maxassoc
integer
no
(driver default)
slottime
integer
no
(driver default)
Madwifi Options
The following options are only used by the Madwifi driver (type atheros).
Name
Type
Required
Default
Description
softled
boolean
no
outdoor
boolean
no
regdomain
number
no
(driver default)
Wifi Networks
A complete wireless configuration contains at least one wifi-iface section per adapter to define a wireless network on top of the hardware. Some drivers support multiple wireless
networks per device:
broadcom if the core revision is greater or equal 9 (see dmesg | grep corerev)
madwifi always supports multiple networks
mac80211 STA mode supported on trunk. STA and AP at the same time is not yet supported(r22989).
'wl0'
option 'network'
'lan'
option 'mode'
'ap'
option 'ssid'
'MyWifiAP'
'secret passphrase'
Common Options
The most common configuration option for wifi-iface sections are listed below.
Name
device
Type
string
Required
yes
Default
Description
mode
string
yes
ap
disabled
boolean
no
ssid
string
yes
OpenWrt
bssid
BSSID
address
no
(driver default)
with.
mesh_id
Mesh ID
no
none
hidden
boolean
no
isolate
boolean
no
doth
boolean
no
wmm
boolean
no
network
string
yes
lan
none
encryption
key
string
integer or
string
no
no
(none)
key1
string
no
(none)
key2
string
no
(none)
key3
string
no
(none)
key4
string
no
(none)
macfilter
string
no
disable
maclist
list of MAC
addresses
no
(none)
iapp_interface
string
no
(none)
no
rsn_preauth
ieee80211w
boolean
integer
no
ieee80211w_max_timeout
integer
no
(hostapd
default)
ieee80211w_retry_timeout
integer
no
(hostapd
default)
maxassoc
integer
no
(hostapd/driver
default)
macaddr
mac
address
no
(hostapd/driver
default)
dtim_period
integer
no
2 (hostapd
default)
short_preamble
boolean
no
65535 (hostapd
default)
(driver default)
integer
max_listen_int
no
integer
mcast_rate
no
See the WPA tables below for a full listing of WPA related options used for WPA2 Enterprise (802.1x)
See the WPS Options below for a full listing of Wi-Fi Protected Setup options.
boolean
wds
no
Madwifi Options
The options in the table below only work with type atheros.
Name
Type
Required
Default
Description
ar
boolean
no
Enables AR support
bgscan
boolean
no
bursting
boolean
no
compression
boolean
no
ff
boolean
no
frag
integer
no
(none)
Fragmentation threshold
minrate
integer
no
(driver
default)
maxrate
integer
no
(driver
default)
nosbeacon
boolean
no
sw_merge
boolean
no
probereq
boolean
no
rate
integer
no
(driver
default)
rts
integer
no
(driver
default)
turbo
boolean
no
uapsd
boolean
no
wds
boolean
no
wdssep
boolean
no
xr
boolean
no