Wireless Driver README: Difference between revisions
Jump to navigation
Jump to search
m (Reverted edits by 115.251.231.56 (Talk) to last revision by 189.24.24.109) |
|||
(13 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{OLPC}} |
|||
== DRIVER LOADING == |
|||
== OVERVIEW == |
|||
This page describes all the mechanisms available to configure the behaviour of the wireless subsystem. Through the times, some of these configuration features were removed from the driver, or implemented in another way. An old version of this page is kept [http://wiki.laptop.org/go/Wireless_Driver_OLDREADME here], as a reference (if you notice that a certain iwpriv command is not available any more, and it is listed in this old version, this means that the command was removed from the driver). |
|||
== DRIVER LOADING == |
|||
<pre> |
<pre> |
||
o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/ |
o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/ |
||
Line 6: | Line 12: | ||
insmod usb8388.ko [fw_name=usb8388.bin] |
insmod usb8388.ko [fw_name=usb8388.bin] |
||
</pre> |
</pre> |
||
== IWPRIV COMMAND == |
== IWPRIV COMMAND == |
||
<pre> |
|||
<pre> |
|||
NAME |
NAME |
||
This manual describes the usage of private commands used in Marvell WLAN |
This manual describes the usage of private commands used in Marvell WLAN |
||
Linux Driver. All the commands available in Wlanconfig will not be available |
Linux Driver. All the commands available in Wlanconfig will not be available |
||
in the iwpriv. |
|||
in the iwpriv. The Marvell WLAN Linux driver for OLPC has two virtual interfaces, |
|||
namely ethX and mshX. |
|||
ethX: used for infrastructure networks as well as for creating legacy adhoc networks |
|||
mshX: used for mesh mode operation |
|||
SYNOPSIS |
SYNOPSIS |
||
iwpriv <ethX> <command> [sub-command] ... |
iwpriv <ethX> <command> [sub-command] ... |
||
Region Commands: |
|||
iwpriv ethX version |
|||
iwpriv ethX scantype [sub-command] |
|||
iwpriv ethX getSNR <n> |
|||
iwpriv ethX getNF <n> |
|||
iwpriv ethX getRSSI <n> |
|||
iwpriv ethX setrxant <n> |
|||
iwpriv ethX getrxant |
|||
iwpriv ethX settxant <n> |
|||
iwpriv ethX gettxant |
|||
iwpriv ethX authalgs <n> |
|||
iwpriv ethX pre-TBTT <n> |
|||
iwpriv ethX 8021xauthalgs <n> |
|||
iwpriv ethX encryptionmode <n> |
|||
iwpriv ethX setregioncode <n> |
iwpriv ethX setregioncode <n> |
||
iwpriv ethX getregioncode |
iwpriv ethX getregioncode |
||
iwpriv ethX setbcnavg <n> |
|||
iwpriv ethX getbcnavg |
|||
iwpriv ethX setdataavg <n> |
|||
iwpriv ethX setlisteninter <n> |
|||
iwpriv ethX getlisteninter |
|||
iwpriv ethX setmultipledtim <n> |
|||
iwpriv ethX getmultipledtim |
|||
iwpriv ethX atimwindow <n> |
|||
iwpriv ethX deauth |
|||
iwpriv ethX adhocstop |
|||
iwpriv ethX radioon |
|||
iwpriv ethX radiooff |
|||
iwpriv ethX reasso-on |
|||
iwpriv ethX reasso-off |
|||
iwpriv ethX scanmode [sub-command] |
|||
iwpriv ethX setwpaie <n> |
|||
iwpriv ethX wlanidle-off |
|||
iwpriv ethX wlanidle-on |
|||
iwpriv ethX getcis |
|||
iwpriv ethX getlog |
|||
iwpriv ethX getadhocstatus |
|||
iwpriv ethX adhocgrate <n> |
|||
Version 4 Command: |
|||
iwpriv ethX inactivityto <n> |
|||
iwpriv ethX sleeppd <n> |
|||
iwpriv ethX enable11d <n> |
|||
iwpriv ethX tpccfg <n> |
|||
iwpriv ethX powercfg <n> |
|||
LED Behaviour Commands: |
|||
Version 5 Command: |
|||
iwpriv ethX ledgpio <n> |
iwpriv ethX ledgpio <n> |
||
iwpriv ethX |
iwpriv ethX ledbhv <n> |
||
iwpriv ethX lolisteninter <n> |
|||
iwpriv ethX rateadapt <n> <m> |
|||
iwpriv ethX txcontrol <n> |
|||
iwpriv ethX psnullinterval <n> |
|||
iwpriv ethX prescan <n> |
|||
iwpriv ethX getrxinfo |
|||
iwpriv ethX gettxrate |
|||
iwpriv ethX beaconinterval |
|||
WOL (Wake-on-Lan) Filter Commands: |
|||
[TODO: updating this information] |
|||
iwpriv get_wol_rule, iwpriv set_wol_rule, iwpriv reset_wol_rule |
|||
Management Frames Control Commands: |
|||
iwpriv bcn_control <n> <m> |
|||
iwpriv setprspretrylt <n> |
|||
BT (Blinding Table) Commands: |
|||
The blinding table (BT) contains a list of mac addresses that will be, |
The blinding table (BT) contains a list of mac addresses that will be, |
||
by default, ignored by the firmware. It is also possible to invert this |
by default, ignored by the firmware. It is also possible to invert this |
||
behavior so that we will ignore all traffic except for the portion |
behavior so that we will ignore all traffic except for the portion |
||
coming from mac addresess in the list. It is primarily used for |
coming from mac addresess in the list. It is primarily used for |
||
debugging and testing networks. It can be edited and inspected with |
debugging and testing networks. It can be edited and inspected with |
||
the following commands: |
the following commands: |
||
Line 94: | Line 57: | ||
iwpriv ethX bt_set_invert <n> |
iwpriv ethX bt_set_invert <n> |
||
FWT Commands: |
FWT (Forwarding Table) Commands: |
||
The forwarding table (FWT) is a feature used to manage mesh network |
The forwarding table (FWT) is a feature used to manage mesh network |
||
routing in the firmware. The FWT is essentially a routing table that |
routing in the firmware. The FWT is essentially a routing table that |
||
Line 120: | Line 83: | ||
MESH Commands: |
MESH Commands: |
||
The MESH commands are used to configure various features of the mesh |
The MESH commands are used to configure various features of the mesh |
||
routing protocol. The following commands are supported: |
routing protocol. The following commands are supported: |
||
Line 126: | Line 88: | ||
iwpriv ethX mesh_get_ttl |
iwpriv ethX mesh_get_ttl |
||
iwpriv ethX mesh_set_ttl ttl |
iwpriv ethX mesh_set_ttl ttl |
||
iwpriv ethX mesh_get_bcastr rate |
|||
iwpriv ethX mesh_set_bcastr rate |
|||
iwpriv ethX get_rreq_delay |
|||
iwpriv ethX set_rreq_delay delay |
|||
iwpriv ethX get_route_exp |
|||
iwpriv ethX set_route_exp time |
|||
iwpriv ethX get_link_costs |
|||
iwpriv ethX set_link_costs "cost54 cost36 cost11 cost1" |
|||
DESCRIPTION |
DESCRIPTION |
||
Line 134: | Line 104: | ||
perform this command on. it could be eth0, eth1 etc. |
perform this command on. it could be eth0, eth1 etc. |
||
setregioncode |
|||
version |
|||
This command is used to set the region code in the station. |
|||
where value is 'region code' for various regions like |
|||
USA FCC, Canada IC, Spain, France, Europe ETSI, Japan ... |
|||
Usage: |
|||
scantype |
|||
iwpriv ethX setregioncode 0x10: set region code to USA (0x10). |
|||
This command is used to set the scan type to be used by the driver in |
|||
the scan command. This setting will not be used while performing a scan |
|||
for a specific SSID, as it is always done with scan type being active. |
|||
where the sub-commands are: - |
|||
active -- to set the scan type to active |
|||
passive -- to set the scan type to passive |
|||
get -- to get the scan type set in the driver |
|||
getregioncode |
|||
getSNR |
|||
This command is used to get the region code information set in the |
|||
station. |
|||
Ratio of Beacon and Data. |
|||
where value is:- |
|||
0 -- Beacon non-average. |
|||
1 -- Beacon average. |
|||
2 -- Data non-average. |
|||
3 -- Data average. |
|||
ledgpio |
|||
If no value is given, all four values are returned in the order mentioned |
|||
This command is used to set/get LEDs. |
|||
above. |
|||
iwpriv ethX ledgpio <LEDs> |
|||
Note: This command is available only when STA is connected. |
|||
will set the corresponding LED for the GPIO Line. |
|||
iwpriv ethX ledgpio |
|||
getRSSI |
|||
will give u which LEDs are Enabled. |
|||
This command gets the average and non average value os Receive Signal |
|||
Strength of Beacon and Data. |
|||
where value is:- |
|||
0 -- Beacon non-average. |
|||
1 -- Beacon average. |
|||
2 -- Data non-average. |
|||
3 -- Data average. |
|||
Usage: |
|||
Note: This command is available only when STA is connected. |
|||
iwpriv eth1 ledgpio 1 0 2 1 3 4 |
|||
will enable |
|||
LED 1 -> GPIO 0 |
|||
LED 2 -> GPIO 1 |
|||
LED 3 -> GPIO 4 |
|||
iwpriv eth1 ledgpio |
|||
getNF |
|||
shows LED information in the format as mentioned above. |
|||
This command gets the average and non average value of Noise Floor of |
|||
Beacon and Data. |
|||
where value is:- |
|||
0 -- Beacon non-average. |
|||
1 -- Beacon average. |
|||
2 -- Data non-average. |
|||
3 -- Data average. |
|||
Note: LED0 is invalid |
|||
Note: This command is available only when STA is connected. |
|||
Note: Maximum Number of LEDs are 16. |
|||
ledbhv |
|||
setrxant |
|||
This command can be used to change default LEDs behaviors. |
|||
A given LED behavior can be on, off or blinking. The duty/cycle can be set |
|||
when behavior is programmed as blinking. |
|||
The options that can be sent are:- |
|||
1 -- Antenna 1. |
|||
2 -- Antenna 2. |
|||
0xFFFF -- Diversity. |
|||
Usage: |
|||
iwpriv ethX setrxant 0x01: select Antenna 1. |
|||
getrxant |
|||
This command is used to get the mode for Rx antenna. |
|||
settxant |
|||
This command is used to set the mode for Tx antenna. |
|||
The options that can be sent are:- |
|||
1 -- Antenna 1. |
|||
2 -- Antenna 2. |
|||
0xFFFF -- Diversity. |
|||
Usage: |
|||
iwpriv ethX settxant 0x01: select Antenna 1. |
|||
gettxant |
|||
This command is used to get the mode for Tx antenna. |
|||
authalgs |
|||
This command is used by the WPA supplicant to set the authentication |
|||
algorithms in the station. |
|||
8021xauthalgs |
|||
This command is used by the WPA supplicant to set the 8021.x |
|||
authentication algorithm type station. |
|||
where values can be:- |
|||
1 -- None |
|||
2 -- LEAP |
|||
4 -- TLS |
|||
8 -- TTLs |
|||
16 -- MD5 |
|||
encryptionmode |
|||
This command is used by the WPA supplicant to set the encryption algorithm. |
|||
Usage: |
|||
where values can be:- |
|||
1. To get default LED behavior |
|||
0 -- NONE |
|||
iwpriv mshX ledbhv <firmware state> |
|||
1 -- WEP40 |
|||
2 -- TKIP |
|||
3 -- CCMP |
|||
4 -- WEP104 |
|||
2. To set or change default LED behavior |
|||
pre-TBTT |
|||
iwpriv mshX ledbhv <firmware state> <lednum> <behavior> <arg> |
|||
This command is used to set pre-TBTT time period where value is in microseconds. |
|||
firmware state: The following are some of the relevant states. |
|||
00: disconnected |
|||
01: firmware is scanning |
|||
02: firmware is connected and awake |
|||
03: firmware is sleeping |
|||
04: connected deep sleep |
|||
06: firmware disconnected link lost |
|||
07: firmware disconnected disassociated |
|||
09: data transfer while firmware is associated and not scanning. |
|||
(If firmware is already in this state, LED behavior does not change |
|||
on this data transfer). |
|||
10: firmware idle, not scanning, not disconnected or disassociated. |
|||
lednum: 1 or 2 for first and second LED. |
|||
behavior: 0 for steady ON, 1 - steady off and 2- blinking. |
|||
arg: It is used when behavior is 2 to set duty and cycle. It is defined as |
|||
(duty << 4 | cycle). Here duty could be 0..4 and cycle 0..5 for 34, |
|||
74, 149, 298, 596, 1192 ms respectively. |
|||
Examples: |
|||
1. To get default behavior for scan |
|||
iwpriv mshX ledbhv 1 |
|||
2. To get default behavior while data transfer |
|||
iwpriv mshX ledbhv 9 |
|||
3. To turn off LED 2 + iwpriv mshX ledbhv 2 2 1 0 |
|||
iwpriv mshX ledbhv 10 2 1 0 |
|||
4. To enable LED 2 and blink LED 1 while data transfer. |
|||
iwpriv mshX ledbhv 9 2 0 0 |
|||
iwpriv mshX ledbhv 9 1 2 4 |
|||
5. To change duty cycle of LED 2 during data transfer |
|||
iwpriv mshX ledbhv 9 2 2 36 |
|||
6. To turn ON LED 2 when firmware is disassociated/disconnected. |
|||
iwpriv mshX ledbhv 0 2 0 0 |
|||
bcn_control |
|||
setregioncode |
|||
Sets the beacon interval |
|||
This command is used to set the region code in the station. |
|||
where value is 'region code' for various regions like |
|||
USA FCC, Canada IC, Spain, France, Europe ETSI, Japan ... |
|||
Usage: |
|||
iwpriv ethX setregioncode 0x10: set region code to USA (0x10). |
|||
getregioncode |
|||
This command is used to get the region code information set in the |
|||
station. |
|||
setbcnavg |
|||
Set the weighting factor for calculating RSSI. |
|||
getbcnavg |
|||
Get weighting factor for calculating RSSI. |
|||
setdataavg |
|||
Set the weighting factor for calculating SNR. |
|||
setlisteninter |
|||
This command is used to set the listen interval in the |
|||
station. |
|||
Usage: |
|||
where the value ranges between 1 - 255 |
|||
iwpriv ethX bcn_control 1|0 interval |
|||
1|0 = enable|disable beacons |
|||
interval is the time between beacons in milliseconds |
|||
setprspretrylt |
|||
getlisteninter |
|||
Sets the number of retries for probe responses |
|||
This command is used to get the listen interval value set in the |
|||
station. |
|||
Usage: |
|||
setmultipledtim |
|||
iwpriv ethX setprspretrylt <n> |
|||
This command is used to set the multiple dtim value in the |
|||
n = number of retries (from 0 to 15) |
|||
station. |
|||
where the value is 1,2,3,4,5,0xfffe |
|||
0xfffe means the firmware will use listen interval in association |
|||
command for waking up |
|||
getmultipledtim |
|||
This command is used to get the multiple dtim value set in the station. |
|||
fwt_add |
|||
atimwindow |
|||
This command is used to insert an entry into the FWT table. The list of |
|||
parameters must follow the following structure: |
|||
station. |
|||
iwpriv ethX fwt_add da ra [metric dir rate ssn dsn hopcount ttl expiration sleepmode snr] |
|||
where the value ranges between 0 - 50 |
|||
The parameters between brackets are optional, but they must appear in |
|||
deauth |
|||
the order specified. For example, if you want to specify the metric, |
|||
This command is used to send the de-authentication to the AP with which |
|||
you must also specify the dir, ssn, and dsn but you need not specify the |
|||
the station is associated. This command is valid only when |
|||
hopcount, expiration, sleepmode, or snr. Any unspecified parameters |
|||
station is in Infrastructure mode. |
|||
will be assigned the defaults specified below. |
|||
The different parameters are:- |
|||
Note: This command is available only when STA is connected. |
|||
da -- DA MAC address in the form 00:11:22:33:44:55 |
|||
ra -- RA MAC address in the form 00:11:22:33:44:55 |
|||
metric -- route metric (cost: smaller-metric routes are |
|||
preferred, default is 0) |
|||
dir -- direction (1 for direct, 0 for reverse, |
|||
default is 1) |
|||
rate -- data rate used for transmission to the RA, |
|||
as specified for the rateadapt command, |
|||
ssn -- Source Sequence Number (time at the RA for |
|||
adhocstop |
|||
reverse routes. Default is 0) |
|||
This command is used to stop beacon transmission from the station and |
|||
dsn -- Destination Sequence Number (time at the DA |
|||
go into idle state in ad-hoc mode. |
|||
for direct routes. Default is 0) |
|||
hopcount -- hop count (currently unused, default is 0) |
|||
Note: This command is available only when STA is connected. |
|||
ttl -- TTL (Only used in reverse entries) |
|||
expiration -- entry expiration (in ticks, where a tick is |
|||
1024us, or ~ 1ms. Use 0 for an indefinite |
|||
entry, default is 0) |
|||
sleepmode -- RA's sleep mode (currently unused, default is |
|||
0) |
|||
snr -- SNR in the link to RA (currently unused, |
|||
default is 0) |
|||
The command does not return anything. |
|||
radioon |
|||
This command is used to turn on the RF antenna. |
|||
fwt_del |
|||
radiooff |
|||
This command is used to remove an entry to the FWT table. The list of |
|||
parameters must follow the following structure: |
|||
iwpriv ethX fwt_del da ra [dir] |
|||
scanmode |
|||
This command is used to set the station to scan for either IBSS |
|||
networks or BSS networks or both BSS and IBSS networks. This |
|||
command can be used with sub commands, |
|||
where the different parameters are:- |
|||
da -- DA MAC address (in the form "00:11:22:33:44:55") |
|||
ra -- RA MAC address (in the form "00:11:22:33:44:55") |
|||
dir -- direction (1 for direct, 0 for reverse, |
|||
default is 1) |
|||
The command does not return anything. |
|||
fwt_lookup |
|||
setwpaie |
|||
This command is used to get the best route in the FWT table to a given |
|||
host. The only parameter is the MAC address of the host that is being |
|||
looked for. |
|||
iwpriv ethX fwt_lookup da |
|||
This command is used by WPA supplicant to send the WPA-IE to the driver. |
|||
wlanidle-off |
|||
This command is used to get into idle state. |
|||
where:- |
|||
Note: This command is available only when STA is connected. |
|||
da -- DA MAC address (in the form "00:11:22:33:44:55") |
|||
The command returns an output string identical to the one returned by |
|||
wlanidle-on |
|||
fwt_list described below. |
|||
This command is used to get off the idle state. |
|||
Note: This command is available only when STA is connected. |
|||
fwt_list |
|||
This command is used to list a route from the FWT table. The only |
|||
parameter is the index into the table. If you want to list all the |
|||
routes in a table, start with index=0, and keep listing until you get a |
|||
"(null)" string. Note that the indicies may change as the fwt is |
|||
updated. It is expected that most users will not use fwt_list directly, |
|||
but that a utility similar to the traditional route command will be used |
|||
to invoke fwt_list over and over. |
|||
iwpriv ethX fwt_list index |
|||
getlog |
|||
This command is used to get the 802.11 statistics available in the |
|||
station. |
|||
Note: This command is available only when STA is connected. |
|||
The output is a string of the following form: |
|||
getadhocstatus |
|||
This command is used to get the ad-hoc Network Status. |
|||
da ra valid metric dir rate ssn dsn hopcount ttl expiration |
|||
The various status codes are: |
|||
sleepmode snr precursor |
|||
AdhocStarted |
|||
AdhocJoined |
|||
AdhocIdle |
|||
InfraMode |
|||
AutoUnknownMode |
|||
where the different fields are:- |
|||
Note: This command is available only when STA is connected. |
|||
da -- DA MAC address (in the form "00:11:22:33:44:55") |
|||
ra -- RA MAC address (in the form "00:11:22:33:44:55") |
|||
valid -- whether the route is valid (0 if not valid) |
|||
metric -- route metric (cost: smaller-metric routes are preferred) |
|||
dir -- direction (1 for direct, 0 for reverse) |
|||
rate -- data rate used for transmission to the RA, |
|||
as specified for the rateadapt command |
|||
ssn -- Source Sequence Number (time at the RA for reverse routes) |
|||
dsn -- Destination Sequence Number (time at the DA for direct routes) |
|||
hopcount -- hop count (currently unused) |
|||
ttl -- TTL (only used in reverse entries) |
|||
expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry) |
|||
sleepmode -- RA's sleep mode (currently unused) |
|||
snr -- SNR in the link to RA (currently unused) |
|||
precursor -- predecessor in direct routes |
|||
fwt_list_route |
|||
adhocgrate |
|||
This command is equivalent to fwt_list. |
|||
and request(2) the status which g_rate is disabled/enabled, |
|||
for Ad-hoc creator. |
|||
fwt_list_neigh |
|||
where value is:- |
|||
This command is used to list a neighbor from the FWT table. The only |
|||
0 -- Disabled |
|||
parameter is the neighbor ID. If you want to list all the neighbors in a |
|||
1 -- Enabled |
|||
table, start with nid=0, and keep incrementing nid until you get a |
|||
2 -- Get |
|||
"(null)" string. Note that the nid from a fwt_list_route command can be |
|||
used as an input to this command. Also note that this command is meant |
|||
mostly for debugging. It is expected that users will use fwt_lookup. |
|||
One important reason for this is that the neighbor id may change as the |
|||
neighbor table is altered. |
|||
iwpriv ethX fwt_list_neigh nid |
|||
ledgpio |
|||
This command is used to set/get LEDs. |
|||
The output is a string of the following form: |
|||
iwpriv ethX ledgpio <LEDs> |
|||
will set the corresponding LED for the GPIO Line. |
|||
ra sleepmode snr references |
|||
iwpriv ethX ledgpio |
|||
will give u which LEDs are Enabled. |
|||
where the different fields are:- |
|||
Usage: |
|||
ra -- RA MAC address (in the form "00:11:22:33:44:55") |
|||
iwpriv eth1 ledgpio 1 0 2 1 3 4 |
|||
sleepmode -- RA's sleep mode (currently unused) |
|||
will enable |
|||
snr -- SNR in the link to RA (currently unused) |
|||
LED 1 -> GPIO 0 |
|||
references -- RA's reference counter |
|||
LED 2 -> GPIO 1 |
|||
LED 3 -> GPIO 4 |
|||
fwt_reset |
|||
iwpriv eth1 ledgpio |
|||
This command is used to reset the FWT table, getting rid of all the |
|||
shows LED information in the format as mentioned above. |
|||
entries. There are no input parameters. |
|||
iwpriv ethX fwt_reset |
|||
Note: LED0 is invalid |
|||
Note: Maximum Number of LEDs are 16. |
|||
inactivityto |
|||
This command is used by the host to set/get the inactivity timeout value, |
|||
which specifies when WLAN device is put to sleep. |
|||
Usage: |
|||
iwpriv ethX inactivityto [<timeout>] |
|||
The command does not return anything. |
|||
where the parameter are: |
|||
timeout: timeout value in milliseconds. |
|||
fwt_cleanup |
|||
Example: |
|||
This command is used to perform user-based garbage recollection. The |
|||
iwpriv eth1 inactivityto |
|||
FWT table is checked, and all the entries that are expired or invalid |
|||
"get the timeout value" |
|||
are cleaned. Note that this is exported to the driver for debugging |
|||
purposes, as garbage collection is also fired by the firmware when in |
|||
space problems. There are no input parameters. |
|||
iwpriv |
iwpriv ethX fwt_cleanup |
||
"set timeout value to X ms" |
|||
The command does returns the number of invalid/expired routes deleted. |
|||
fwt_time |
|||
sleeppd |
|||
This command returns a card's internal time representation. It is this |
|||
time that is used to represent the expiration times of FWT entries. The |
|||
number is not consistent from card to card; it is simply a timer count. |
|||
The fwt_time command is used to inspect the timer so that expiration |
|||
times reported by fwt_list can be properly interpreted. |
|||
iwpriv ethX fwt_time |
|||
Usage: |
|||
iwpriv ethX sleeppd [<sleep period>] |
|||
mesh_get_ttl |
|||
where the parameter are: |
|||
Period: sleep period in milliseconds. Range 10~60. |
|||
The mesh ttl is the number of hops a mesh packet can traverse before it |
|||
Example: |
|||
is dropped. This parameter is used to prevent infinite loops in the |
|||
iwpriv eth1 sleeppd 10 |
|||
mesh network. The value returned by this function is the ttl assigned |
|||
"set period as 10 ms" |
|||
to all mesh packets. Currently there is no way to control the ttl on a |
|||
iwpriv eth1 sleeppd |
|||
per packet or per socket basis. |
|||
"get the sleep period configuration" |
|||
iwpriv ethX mesh_get_ttl |
|||
enable11d |
|||
This command is used to control 11d |
|||
where value is:- |
|||
1 -- Enabled |
|||
0 -- Disabled |
|||
2 -- Get |
|||
mesh_set_ttl ttl |
|||
Set the ttl. The argument must be between 0 and 255. |
|||
iwpriv ethX mesh_set_ttl <ttl> |
|||
tpccfg |
|||
Enables or disables automatic transmit power control. |
|||
mesh_get_bcastr |
|||
The first parameter turns this feature on (1) or off (0). When turning |
|||
on, the user must also supply four more parameters in the following |
|||
order: |
|||
-UseSNR (Use SNR (in addition to PER) for TPC algorithm), |
|||
-P0 (P0 power level for TPC), |
|||
-P1 (P1 power level for TPC), |
|||
-P2 (P2 power level for TPC). |
|||
Shows the rate index used for mesh broadcast and multicast packets. The |
|||
P0,P1 amd P2 are the levels of power used in the TPC algorithm, where P0<P1<P2. |
|||
mapping to actual rates is the same as for rateadapt command. |
|||
For TPC, the power is dynamically adjusted only at the highest trasmit rate |
|||
(11 Mbps for 802.11b and 54 Mbps for 802.11g). |
|||
iwpriv ethX mesh_get_bcastr rate |
|||
mesh_set_bcastr rate |
|||
Usage: |
|||
iwpriv ethX tpccfg: Get current configuration |
|||
iwpriv ethX tpccfg 0: disable auto TPC |
|||
iwpriv ethX tpccfg 0x01 0x00 0x05 0x0a 0x0d: enable auto TPC; do not use SNR; |
|||
P0=0x05; P1=0x0a; P2=0x0d; |
|||
iwpriv ethX tpccfg 0x01 0x01 0x05 0x0a 0x0d: enable auto TPC; use SNR; |
|||
P0=0x05; P1=0x0a; P2=0x0d. |
|||
Sets the rate index for mesh broadcast and muticast packets. The mapping |
|||
powercfg |
|||
to actual rates is the same as for rateadapt command. |
|||
Enables or disables power adaptation. |
|||
iwpriv ethX mesh_set_bcastr rate |
|||
The first parameter turns this feature on (1) or off (0). When turning |
|||
on, the user must also supply three more parameters in the following |
|||
order: |
|||
-P0 (P0 power level for Power Adaptation), |
|||
-P1 (P1 power level for Power Adaptation), |
|||
-P2 (P2 power level for Power Adaptation). |
|||
get_rreq_delay |
|||
PO is used for rates 54 and 48. |
|||
P1 is used for rates 6,9,12,18,,24 and 36. |
|||
P2 is used for rates 1,2,5.5 and 11. |
|||
Usage: |
|||
iwpriv ethX powercfg: Get current configuration |
|||
iwpriv ethX powercfg 0: disable power adaptation |
|||
iwpriv ethX powercfg 1 0x0d 0x0f 0x12: enable power adaptation; |
|||
P0=0x0d; P1=0x0f; P2=0x12. |
|||
Note :- |
|||
Please refer to the TPC/RA app note for implementation and use case details. |
|||
scanprobes |
|||
This command sets number of probe requests per channel. |
|||
Usage: |
|||
iwpriv ethX scanprobes 3 (set scan probes to 3) |
|||
iwpriv ethX scanprobes (get scan probes) |
|||
lolisteninter |
|||
This command sets the value of listen interval. |
|||
Usage: |
|||
iwpriv ethX lolisteninter 234 (set the lolisteninter to 234) |
|||
iwpriv ethX lolisteninter (get the lolisteninter value) |
|||
rateadapt |
|||
This command sets the data rates bitmap. |
|||
Where <n> |
|||
0: Disable auto rate adapt |
|||
1: Enable auto rate adapt |
|||
<m> |
|||
data rate bitmap |
|||
Bit Data rate |
|||
0 1 Mbps |
|||
1 2 Mbps |
|||
2 5.5 Mbps |
|||
3 11 Mbps |
|||
4 Reserved |
|||
5 6 Mbps |
|||
6 9 Mbps |
|||
7 12 Mbps |
|||
8 18 Mbps |
|||
9 24 Mbps |
|||
10 36 Mbps |
|||
11 48 Mbps |
|||
12 54 Mbps |
|||
12-15 Reserved |
|||
Usage: |
|||
iwpriv ethX rateadapt |
|||
read the currect data rate setting |
|||
iwpriv ethX rateadapt 1 0x07 |
|||
enable auto data rate adapt and |
|||
data rates are 1Mbps, 2Mbsp and 5.5Mbps |
|||
Shows the delay to forward a RREQ frame. This delay allows the node to |
|||
forward just the best route in case the same RREQ arrives to the node |
|||
through different routes. The argument is shown in 1/100 seconds. |
|||
iwpriv ethX get_rreq_delay |
|||
txcontrol |
|||
This command is used to set the Tx rate, ack policy, and retry limit on a per packet basis. |
|||
set_rreq_delay delay |
|||
Where value <n> is: |
|||
if bit[4] == 1: |
|||
bit[3:0] -- 0 1 2 3 4 5 6 7 8 9 10 11 12 13-16 |
|||
Data Rate(Mbps) -- 1 2 5.5 11 Rsv 6 9 12 18 24 36 48 54 Rsv |
|||
Sets the RREQ forward delay. The delay is interpreted as 1/100 seconds. |
|||
bit[12:8] |
|||
if bit[12] == 1, bit[11:8] specifies the Tx retry limit. |
|||
iwpriv ethX set_rreq_delay delay |
|||
bit[14:13] specifies per packet ack policy: |
|||
bit[14:13] |
|||
1 0 use immediate ack policy for this packet |
|||
1 1 use no ack policy for this packet |
|||
0 x use the per-packet ack policy setting |
|||
Usage: |
|||
iwpriv ethX txcontrol 0x7513 |
|||
Use no-ack policy, 5 retires for Tx, 11Mbps rate |
|||
get_route_exp |
|||
Shows the mesh route expiration time, in seconds. |
|||
iwpriv ethX get_route_exp |
|||
psnullinterval |
|||
This command is used to set/request NULL package interval for Power Save |
|||
under infrastructure mode. |
|||
set_route_exp time |
|||
where value is:- |
|||
-1 -- Disabled |
|||
n>0 -- Set interval as n (seconds) |
|||
Gets the mesh route, expiration time, in seconds. |
|||
prescan |
|||
This command is used to enable (1)/disable(0) auto prescan before assoicate to the ap |
|||
iwpriv ethX set_route_exp time |
|||
where value is:- |
|||
0 -- Disabled |
|||
1 -- Enabled |
|||
2 -- Get |
|||
get_link_costs |
|||
getrxinfo |
|||
This command gets non average value of Signal to Noise Ratio of Data and rate index. |
|||
Gets the mesh hop base cost for each used rate. The output gives us the |
|||
The following table shows RateIndex and Rate |
|||
base cost for hops at 54Mbps, 36Mbps, 11Mbps and 1Mbps, in that order. |
|||
The base cost gets divided by a battery state factor to get the actual |
|||
cost. A cost of 0 means that rate is deactivated. |
|||
iwpriv ethX get_link_costs |
|||
RateIndex Data rate |
|||
0 1 Mbps |
|||
1 2 Mbps |
|||
2 5.5 Mbps |
|||
3 11 Mbps |
|||
4 Reserved |
|||
5 6 Mbps |
|||
6 9 Mbps |
|||
7 12 Mbps |
|||
8 18 Mbps |
|||
9 24 Mbps |
|||
10 36 Mbps |
|||
11 48 Mbps |
|||
12 54 Mbps |
|||
13-15 Reserved |
|||
set_link_costs "cost54 cost36 cost11 cost1" |
|||
gettxrate |
|||
This command gets current Tx rate index of the first packet associated with Rate Adaptation. |
|||
Sets the mesh hop base cost for the used speeds. The input parameter |
|||
The following table shows RateIndex and Rate |
|||
will specify the cost for hops at 54Mbps, 36Mbps, 11Mbps and 1Mbps, in |
|||
that order. A cost of 0 will disable a specific rate. |
|||
0 1 Mbps |
|||
1 2 Mbps |
|||
2 5.5 Mbps |
|||
3 11 Mbps |
|||
4 Reserved |
|||
5 6 Mbps |
|||
6 9 Mbps |
|||
7 12 Mbps |
|||
8 18 Mbps |
|||
9 24 Mbps |
|||
10 36 Mbps |
|||
11 48 Mbps |
|||
12 54 Mbps |
|||
13-15 Reserved |
|||
bcninterval |
|||
This command is used to sets beacon interval in adhoc mode when an argument |
|||
is given, and gets current adhoc beacon interval when no argument is given. |
|||
The valid beacon interval is between 20 - 1000, default beacon interval is 100. |
|||
Usage: |
|||
iwpriv ethX bcninterval 100 (set adhoc beacon interval to 100) |
|||
iwpriv ethX bcninterval (get adhoc beacon interval) |
|||
fwt_add |
|||
This command is used to insert an entry into the FWT table. The list of |
|||
parameters must follow the following structure: |
|||
iwpriv ethX fwt_add da ra [metric dir rate ssn dsn hopcount ttl expiration sleepmode snr] |
|||
The parameters between brackets are optional, but they must appear in |
|||
the order specified. For example, if you want to specify the metric, |
|||
you must also specify the dir, ssn, and dsn but you need not specify the |
|||
hopcount, expiration, sleepmode, or snr. Any unspecified parameters |
|||
will be assigned the defaults specified below. |
|||
The different parameters are:- |
|||
da -- DA MAC address in the form 00:11:22:33:44:55 |
|||
ra -- RA MAC address in the form 00:11:22:33:44:55 |
|||
metric -- route metric (cost: smaller-metric routes are |
|||
preferred, default is 0) |
|||
dir -- direction (1 for direct, 0 for reverse, |
|||
default is 1) |
|||
rate -- data rate used for transmission to the RA, |
|||
as specified for the rateadapt command, |
|||
default is 3 (11Mbps) |
|||
ssn -- Source Sequence Number (time at the RA for |
|||
reverse routes. Default is 0) |
|||
dsn -- Destination Sequence Number (time at the DA |
|||
for direct routes. Default is 0) |
|||
hopcount -- hop count (currently unused, default is 0) |
|||
ttl -- TTL (Only used in reverse entries) |
|||
expiration -- entry expiration (in ticks, where a tick is |
|||
1024us, or ~ 1ms. Use 0 for an indefinite |
|||
entry, default is 0) |
|||
sleepmode -- RA's sleep mode (currently unused, default is |
|||
0) |
|||
snr -- SNR in the link to RA (currently unused, |
|||
default is 0) |
|||
The command does not return anything. |
|||
fwt_del |
|||
This command is used to remove an entry to the FWT table. The list of |
|||
parameters must follow the following structure: |
|||
iwpriv ethX fwt_del da ra [dir] |
|||
where the different parameters are:- |
|||
da -- DA MAC address (in the form "00:11:22:33:44:55") |
|||
ra -- RA MAC address (in the form "00:11:22:33:44:55") |
|||
dir -- direction (1 for direct, 0 for reverse, |
|||
default is 1) |
|||
The command does not return anything. |
|||
fwt_lookup |
|||
This command is used to get the best route in the FWT table to a given |
|||
host. The only parameter is the MAC address of the host that is being |
|||
looked for. |
|||
iwpriv ethX fwt_lookup da |
|||
where:- |
|||
da -- DA MAC address (in the form "00:11:22:33:44:55") |
|||
The command returns an output string identical to the one returned by |
|||
fwt_list described below. |
|||
fwt_list |
|||
This command is used to list a route from the FWT table. The only |
|||
parameter is the index into the table. If you want to list all the |
|||
routes in a table, start with index=0, and keep listing until you get a |
|||
"(null)" string. Note that the indicies may change as the fwt is |
|||
updated. It is expected that most users will not use fwt_list directly, |
|||
but that a utility similar to the traditional route command will be used |
|||
to invoke fwt_list over and over. |
|||
iwpriv ethX fwt_list index |
|||
The output is a string of the following form: |
|||
da ra valid metric dir rate ssn dsn hopcount ttl expiration |
|||
sleepmode snr precursor |
|||
where the different fields are:- |
|||
da -- DA MAC address (in the form "00:11:22:33:44:55") |
|||
ra -- RA MAC address (in the form "00:11:22:33:44:55") |
|||
valid -- whether the route is valid (0 if not valid) |
|||
metric -- route metric (cost: smaller-metric routes are preferred) |
|||
dir -- direction (1 for direct, 0 for reverse) |
|||
rate -- data rate used for transmission to the RA, |
|||
as specified for the rateadapt command |
|||
ssn -- Source Sequence Number (time at the RA for reverse routes) |
|||
dsn -- Destination Sequence Number (time at the DA for direct routes) |
|||
hopcount -- hop count (currently unused) |
|||
ttl -- TTL (only used in reverse entries) |
|||
expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry) |
|||
sleepmode -- RA's sleep mode (currently unused) |
|||
snr -- SNR in the link to RA (currently unused) |
|||
precursor -- predecessor in direct routes |
|||
fwt_list_route |
|||
This command is equivalent to fwt_list. |
|||
fwt_list_neigh |
|||
This command is used to list a neighbor from the FWT table. The only |
|||
parameter is the neighbor ID. If you want to list all the neighbors in a |
|||
table, start with nid=0, and keep incrementing nid until you get a |
|||
"(null)" string. Note that the nid from a fwt_list_route command can be |
|||
used as an input to this command. Also note that this command is meant |
|||
mostly for debugging. It is expected that users will use fwt_lookup. |
|||
One important reason for this is that the neighbor id may change as the |
|||
neighbor table is altered. |
|||
iwpriv ethX fwt_list_neigh nid |
|||
The output is a string of the following form: |
|||
ra sleepmode snr references |
|||
where the different fields are:- |
|||
ra -- RA MAC address (in the form "00:11:22:33:44:55") |
|||
sleepmode -- RA's sleep mode (currently unused) |
|||
snr -- SNR in the link to RA (currently unused) |
|||
references -- RA's reference counter |
|||
fwt_reset |
|||
This command is used to reset the FWT table, getting rid of all the |
|||
entries. There are no input parameters. |
|||
iwpriv ethX fwt_reset |
|||
The command does not return anything. |
|||
fwt_cleanup |
|||
This command is used to perform user-based garbage recollection. The |
|||
FWT table is checked, and all the entries that are expired or invalid |
|||
are cleaned. Note that this is exported to the driver for debugging |
|||
purposes, as garbage collection is also fired by the firmware when in |
|||
space problems. There are no input parameters. |
|||
iwpriv ethX fwt_cleanup |
|||
The command does returns the number of invalid/expired routes deleted. |
|||
fwt_time |
|||
This command returns a card's internal time representation. It is this |
|||
time that is used to represent the expiration times of FWT entries. The |
|||
number is not consistent from card to card; it is simply a timer count. |
|||
The fwt_time command is used to inspect the timer so that expiration |
|||
times reported by fwt_list can be properly interpreted. |
|||
iwpriv ethX fwt_time |
|||
mesh_get_ttl |
|||
The mesh ttl is the number of hops a mesh packet can traverse before it |
|||
is dropped. This parameter is used to prevent infinite loops in the |
|||
mesh network. The value returned by this function is the ttl assigned |
|||
to all mesh packets. Currently there is no way to control the ttl on a |
|||
per packet or per socket basis. |
|||
iwpriv ethX mesh_get_ttl |
|||
mesh_set_ttl ttl |
|||
Set the ttl. The argument must be between 0 and 255. |
|||
iwpriv ethX mesh_set_ttl <ttl> |
|||
iwpriv ethX set_link_costs "cost54 cost36 cost11 cost1" |
|||
</pre> |
</pre> |
||
== ETHTOOL == |
== ETHTOOL == |
||
<pre> |
<pre> |
||
Use the -i option to retrieve version information from the driver. |
Use the -i option to retrieve version information from the driver. |
||
Line 812: | Line 455: | ||
<pre> |
<pre> |
||
those commands are used via debugfs interface |
those commands are used via debugfs interface |
||
Line 989: | Line 631: | ||
will be displayed upon completion by use of the getscantable ioctl. |
will be displayed upon completion by use of the getscantable ioctl. |
||
</pre> |
</pre> |
||
[[Category:Network]] |
|||
[[Category:Developers]] |
Latest revision as of 00:42, 12 July 2012
This page is monitored by the OLPC team.
OVERVIEW
This page describes all the mechanisms available to configure the behaviour of the wireless subsystem. Through the times, some of these configuration features were removed from the driver, or implemented in another way. An old version of this page is kept here, as a reference (if you notice that a certain iwpriv command is not available any more, and it is listed in this old version, this means that the command was removed from the driver).
DRIVER LOADING
o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/ o. Load driver by using the following command: insmod usb8388.ko [fw_name=usb8388.bin]
IWPRIV COMMAND
NAME This manual describes the usage of private commands used in Marvell WLAN Linux Driver. All the commands available in Wlanconfig will not be available in the iwpriv. SYNOPSIS iwpriv <ethX> <command> [sub-command] ... Region Commands: iwpriv ethX setregioncode <n> iwpriv ethX getregioncode LED Behaviour Commands: iwpriv ethX ledgpio <n> iwpriv ethX ledbhv <n> WOL (Wake-on-Lan) Filter Commands: [TODO: updating this information] iwpriv get_wol_rule, iwpriv set_wol_rule, iwpriv reset_wol_rule Management Frames Control Commands: iwpriv bcn_control <n> <m> iwpriv setprspretrylt <n> BT (Blinding Table) Commands: The blinding table (BT) contains a list of mac addresses that will be, by default, ignored by the firmware. It is also possible to invert this behavior so that we will ignore all traffic except for the portion coming from mac addresess in the list. It is primarily used for debugging and testing networks. It can be edited and inspected with the following commands: iwpriv ethX bt_reset iwpriv ethX bt_add <mac_address> iwpriv ethX bt_del <mac_address> iwpriv ethX bt_list <id> iwpriv ethX bt_get_invert <n> iwpriv ethX bt_set_invert <n> FWT (Forwarding Table) Commands: The forwarding table (FWT) is a feature used to manage mesh network routing in the firmware. The FWT is essentially a routing table that associates a destination mac address (da) with a next hop receiver address (ra). The FWT can be inspected and edited with the following iwpriv commands, which are described in greater detail below. Eventually, the table will be automatically maintained by a custom routing protocol. NOTE: FWT commands replace the previous DFT commands. What were the DFT commands?, you might ask. They were an earlier API to the firmware that implemented a simple MAC-layer forwarding mechanism. In the unlikely event that you were using these commands, you must migrate to the new FWT commands which can be used to achieve the same functionality. iwpriv ethX fwt_add [parameters] iwpriv ethX fwt_del [parameters] iwpriv ethX fwt_lookup [parameters] iwpriv ethX fwt_list [parameters] iwpriv ethX fwt_list_route [parameters] iwpriv ethX fwt_list_neigh [parameters] iwpriv ethX fwt_reset [parameters] iwpriv ethX fwt_cleanup iwpriv ethX fwt_time MESH Commands: The MESH commands are used to configure various features of the mesh routing protocol. The following commands are supported: iwpriv ethX mesh_get_ttl iwpriv ethX mesh_set_ttl ttl iwpriv ethX mesh_get_bcastr rate iwpriv ethX mesh_set_bcastr rate iwpriv ethX get_rreq_delay iwpriv ethX set_rreq_delay delay iwpriv ethX get_route_exp iwpriv ethX set_route_exp time iwpriv ethX get_link_costs iwpriv ethX set_link_costs "cost54 cost36 cost11 cost1" DESCRIPTION Those commands are used to send additional commands to the Marvell WLAN card via the Linux device driver. The ethX parameter specifies the network device that is to be used to perform this command on. it could be eth0, eth1 etc. setregioncode This command is used to set the region code in the station. where value is 'region code' for various regions like USA FCC, Canada IC, Spain, France, Europe ETSI, Japan ... Usage: iwpriv ethX setregioncode 0x10: set region code to USA (0x10). getregioncode This command is used to get the region code information set in the station. ledgpio This command is used to set/get LEDs. iwpriv ethX ledgpio <LEDs> will set the corresponding LED for the GPIO Line. iwpriv ethX ledgpio will give u which LEDs are Enabled. Usage: iwpriv eth1 ledgpio 1 0 2 1 3 4 will enable LED 1 -> GPIO 0 LED 2 -> GPIO 1 LED 3 -> GPIO 4 iwpriv eth1 ledgpio shows LED information in the format as mentioned above. Note: LED0 is invalid Note: Maximum Number of LEDs are 16. ledbhv This command can be used to change default LEDs behaviors. A given LED behavior can be on, off or blinking. The duty/cycle can be set when behavior is programmed as blinking. Usage: 1. To get default LED behavior iwpriv mshX ledbhv <firmware state> 2. To set or change default LED behavior iwpriv mshX ledbhv <firmware state> <lednum> <behavior> <arg> firmware state: The following are some of the relevant states. 00: disconnected 01: firmware is scanning 02: firmware is connected and awake 03: firmware is sleeping 04: connected deep sleep 06: firmware disconnected link lost 07: firmware disconnected disassociated 09: data transfer while firmware is associated and not scanning. (If firmware is already in this state, LED behavior does not change on this data transfer). 10: firmware idle, not scanning, not disconnected or disassociated. lednum: 1 or 2 for first and second LED. behavior: 0 for steady ON, 1 - steady off and 2- blinking. arg: It is used when behavior is 2 to set duty and cycle. It is defined as (duty << 4 | cycle). Here duty could be 0..4 and cycle 0..5 for 34, 74, 149, 298, 596, 1192 ms respectively. Examples: 1. To get default behavior for scan iwpriv mshX ledbhv 1 2. To get default behavior while data transfer iwpriv mshX ledbhv 9 3. To turn off LED 2 + iwpriv mshX ledbhv 2 2 1 0 iwpriv mshX ledbhv 10 2 1 0 4. To enable LED 2 and blink LED 1 while data transfer. iwpriv mshX ledbhv 9 2 0 0 iwpriv mshX ledbhv 9 1 2 4 5. To change duty cycle of LED 2 during data transfer iwpriv mshX ledbhv 9 2 2 36 6. To turn ON LED 2 when firmware is disassociated/disconnected. iwpriv mshX ledbhv 0 2 0 0 bcn_control Sets the beacon interval Usage: iwpriv ethX bcn_control 1|0 interval 1|0 = enable|disable beacons interval is the time between beacons in milliseconds setprspretrylt Sets the number of retries for probe responses Usage: iwpriv ethX setprspretrylt <n> n = number of retries (from 0 to 15) fwt_add This command is used to insert an entry into the FWT table. The list of parameters must follow the following structure: iwpriv ethX fwt_add da ra [metric dir rate ssn dsn hopcount ttl expiration sleepmode snr] The parameters between brackets are optional, but they must appear in the order specified. For example, if you want to specify the metric, you must also specify the dir, ssn, and dsn but you need not specify the hopcount, expiration, sleepmode, or snr. Any unspecified parameters will be assigned the defaults specified below. The different parameters are:- da -- DA MAC address in the form 00:11:22:33:44:55 ra -- RA MAC address in the form 00:11:22:33:44:55 metric -- route metric (cost: smaller-metric routes are preferred, default is 0) dir -- direction (1 for direct, 0 for reverse, default is 1) rate -- data rate used for transmission to the RA, as specified for the rateadapt command, ssn -- Source Sequence Number (time at the RA for reverse routes. Default is 0) dsn -- Destination Sequence Number (time at the DA for direct routes. Default is 0) hopcount -- hop count (currently unused, default is 0) ttl -- TTL (Only used in reverse entries) expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry, default is 0) sleepmode -- RA's sleep mode (currently unused, default is 0) snr -- SNR in the link to RA (currently unused, default is 0) The command does not return anything. fwt_del This command is used to remove an entry to the FWT table. The list of parameters must follow the following structure: iwpriv ethX fwt_del da ra [dir] where the different parameters are:- da -- DA MAC address (in the form "00:11:22:33:44:55") ra -- RA MAC address (in the form "00:11:22:33:44:55") dir -- direction (1 for direct, 0 for reverse, default is 1) The command does not return anything. fwt_lookup This command is used to get the best route in the FWT table to a given host. The only parameter is the MAC address of the host that is being looked for. iwpriv ethX fwt_lookup da where:- da -- DA MAC address (in the form "00:11:22:33:44:55") The command returns an output string identical to the one returned by fwt_list described below. fwt_list This command is used to list a route from the FWT table. The only parameter is the index into the table. If you want to list all the routes in a table, start with index=0, and keep listing until you get a "(null)" string. Note that the indicies may change as the fwt is updated. It is expected that most users will not use fwt_list directly, but that a utility similar to the traditional route command will be used to invoke fwt_list over and over. iwpriv ethX fwt_list index The output is a string of the following form: da ra valid metric dir rate ssn dsn hopcount ttl expiration sleepmode snr precursor where the different fields are:- da -- DA MAC address (in the form "00:11:22:33:44:55") ra -- RA MAC address (in the form "00:11:22:33:44:55") valid -- whether the route is valid (0 if not valid) metric -- route metric (cost: smaller-metric routes are preferred) dir -- direction (1 for direct, 0 for reverse) rate -- data rate used for transmission to the RA, as specified for the rateadapt command ssn -- Source Sequence Number (time at the RA for reverse routes) dsn -- Destination Sequence Number (time at the DA for direct routes) hopcount -- hop count (currently unused) ttl -- TTL (only used in reverse entries) expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry) sleepmode -- RA's sleep mode (currently unused) snr -- SNR in the link to RA (currently unused) precursor -- predecessor in direct routes fwt_list_route This command is equivalent to fwt_list. fwt_list_neigh This command is used to list a neighbor from the FWT table. The only parameter is the neighbor ID. If you want to list all the neighbors in a table, start with nid=0, and keep incrementing nid until you get a "(null)" string. Note that the nid from a fwt_list_route command can be used as an input to this command. Also note that this command is meant mostly for debugging. It is expected that users will use fwt_lookup. One important reason for this is that the neighbor id may change as the neighbor table is altered. iwpriv ethX fwt_list_neigh nid The output is a string of the following form: ra sleepmode snr references where the different fields are:- ra -- RA MAC address (in the form "00:11:22:33:44:55") sleepmode -- RA's sleep mode (currently unused) snr -- SNR in the link to RA (currently unused) references -- RA's reference counter fwt_reset This command is used to reset the FWT table, getting rid of all the entries. There are no input parameters. iwpriv ethX fwt_reset The command does not return anything. fwt_cleanup This command is used to perform user-based garbage recollection. The FWT table is checked, and all the entries that are expired or invalid are cleaned. Note that this is exported to the driver for debugging purposes, as garbage collection is also fired by the firmware when in space problems. There are no input parameters. iwpriv ethX fwt_cleanup The command does returns the number of invalid/expired routes deleted. fwt_time This command returns a card's internal time representation. It is this time that is used to represent the expiration times of FWT entries. The number is not consistent from card to card; it is simply a timer count. The fwt_time command is used to inspect the timer so that expiration times reported by fwt_list can be properly interpreted. iwpriv ethX fwt_time mesh_get_ttl The mesh ttl is the number of hops a mesh packet can traverse before it is dropped. This parameter is used to prevent infinite loops in the mesh network. The value returned by this function is the ttl assigned to all mesh packets. Currently there is no way to control the ttl on a per packet or per socket basis. iwpriv ethX mesh_get_ttl mesh_set_ttl ttl Set the ttl. The argument must be between 0 and 255. iwpriv ethX mesh_set_ttl <ttl> mesh_get_bcastr Shows the rate index used for mesh broadcast and multicast packets. The mapping to actual rates is the same as for rateadapt command. iwpriv ethX mesh_get_bcastr rate mesh_set_bcastr rate Sets the rate index for mesh broadcast and muticast packets. The mapping to actual rates is the same as for rateadapt command. iwpriv ethX mesh_set_bcastr rate get_rreq_delay Shows the delay to forward a RREQ frame. This delay allows the node to forward just the best route in case the same RREQ arrives to the node through different routes. The argument is shown in 1/100 seconds. iwpriv ethX get_rreq_delay set_rreq_delay delay Sets the RREQ forward delay. The delay is interpreted as 1/100 seconds. iwpriv ethX set_rreq_delay delay get_route_exp Shows the mesh route expiration time, in seconds. iwpriv ethX get_route_exp set_route_exp time Gets the mesh route, expiration time, in seconds. iwpriv ethX set_route_exp time get_link_costs Gets the mesh hop base cost for each used rate. The output gives us the base cost for hops at 54Mbps, 36Mbps, 11Mbps and 1Mbps, in that order. The base cost gets divided by a battery state factor to get the actual cost. A cost of 0 means that rate is deactivated. iwpriv ethX get_link_costs set_link_costs "cost54 cost36 cost11 cost1" Sets the mesh hop base cost for the used speeds. The input parameter will specify the cost for hops at 54Mbps, 36Mbps, 11Mbps and 1Mbps, in that order. A cost of 0 will disable a specific rate. iwpriv ethX set_link_costs "cost54 cost36 cost11 cost1"
ETHTOOL
Use the -i option to retrieve version information from the driver. # ethtool -i eth0 driver: libertas version: COMM-USB8388-318.p4 firmware-version: 5.110.7 bus-info: Use the -e option to read the EEPROM contents of the card. Usage: ethtool -e ethX [raw on|off] [offset N] [length N] -e retrieves and prints an EEPROM dump for the specified ethernet device. When raw is enabled, then it dumps the raw EEPROM data to stdout. The length and offset parameters allow dumping cer- tain portions of the EEPROM. Default is to dump the entire EEP- ROM. # ethtool -e eth0 offset 0 length 16 Offset Values ------ ------ 0x0000 38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00
DEBUGFS COMMANDS
those commands are used via debugfs interface rdmac rdbbp rdrf These commands are used to read the MAC, BBP and RF registers from the card. These commands take one parameter that specifies the offset location that is to be read. This parameter must be specified in hexadecimal (its possible to preceed preceding the number with a "0x"). Path: /debugfs/libertas_wireless/ethX/registers/ Usage: echo "0xa123" > rdmac ; cat rdmac echo "0xa123" > rdbbp ; cat rdbbp echo "0xa123" > rdrf ; cat rdrf wrmac wrbbp wrrf These commands are used to write the MAC, BBP and RF registers in the card. These commands take two parameters that specify the offset location and the value that is to be written. This parameters must be specified in hexadecimal (its possible to preceed the number with a "0x"). Usage: echo "0xa123 0xaa" > wrmac echo "0xa123 0xaa" > wrbbp echo "0xa123 0xaa" > wrrf sleepparams This command is used to set the sleepclock configurations Path: /debugfs/libertas_wireless/ethX/ Usage: cat sleepparams: reads the current sleepclock configuration echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration. where: p1 is Sleep clock error in ppm (0-65535) p2 is Wakeup offset in usec (0-65535) p3 is Clock stabilization time in usec (0-65535) p4 is Control periodic calibration (0-2) p5 is Control the use of external sleep clock (0-2) p6 is reserved for debug (0-65535) subscribed_events The subscribed_events directory contains the interface for the subscribed events API. Path: /debugfs/libertas_wireless/ethX/subscribed_events/ Each event is represented by a filename. Each filename consists of the following three fields: Value Frequency Subscribed To read the current values for a given event, do: cat event To set the current values, do: echo "60 2 1" > event Frequency field specifies the reporting frequency for this event. If it is set to 0, then the event is reported only once, and then automatically unsubscribed. If it is set to 1, then the event is reported every time it occurs. If it is set to N, then the event is reported every Nth time it occurs. beacon_missed Value field specifies the number of consecutive missing beacons which triggers the LINK_LOSS event. This event is generated only once after which the firmware resets its state. At initialization, the LINK_LOSS event is subscribed by default. The default value of MissedBeacons is 60. failure_count Value field specifies the consecutive failure count threshold which triggers the generation of the MAX_FAIL event. Once this event is generated, the consecutive failure count is reset to 0. At initialization, the MAX_FAIL event is NOT subscribed by default. high_rssi This event is generated when the average received RSSI in beacons goes above a threshold, specified by Value. low_rssi This event is generated when the average received RSSI in beacons goes below a threshold, specified by Value. high_snr This event is generated when the average received SNR in beacons goes above a threshold, specified by Value. low_snr This event is generated when the average received SNR in beacons goes below a threshold, specified by Value. extscan This command is used to do a specific scan. Path: /debugfs/libertas_wireless/ethX/ Usage: echo "SSID" > extscan Example: echo "LINKSYS-AP" > extscan To see the results of use getscantable command. getscantable Display the current contents of the driver scan table (ie. get the scan results). Path: /debugfs/libertas_wireless/ethX/ Usage: cat getscantable setuserscan Initiate a customized scan and retrieve the results Path: /debugfs/libertas_wireless/ethX/ Usage: echo "[ARGS]" > setuserscan where [ARGS]: chan=[chan#][band][mode] where band is [a,b,g] and mode is blank for active or 'p' for passive bssid=xx:xx:xx:xx:xx:xx specify a BSSID filter for the scan ssid="[SSID]" specify a SSID filter for the scan keep=[0 or 1] keep the previous scan results (1), discard (0) dur=[scan time] time to scan for each channel in milliseconds probes=[#] number of probe requests to send on each chan type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any) Any combination of the above arguments can be supplied on the command line. If the chan token is absent, a full channel scan will be completed by the driver. If the dur or probes tokens are absent, the driver default setting will be used. The bssid and ssid fields, if blank, will produce an unfiltered scan. The type field will default to 3 (Any) and the keep field will default to 0 (Discard). Examples: 1) Perform an active scan on channels 1, 6, and 11 in the 'g' band: echo "chan=1g,6g,11g" > setuserscan 2) Perform a passive scan on channel 11 for 20 ms: echo "chan=11gp dur=20" > setuserscan 3) Perform an active scan on channels 1, 6, and 11; and a passive scan on channel 36 in the 'a' band: echo "chan=1g,6g,11g,36ap" > setuserscan 4) Perform an active scan on channel 6 and 36 for a specific SSID: echo "chan=6g,36a ssid="TestAP"" > setuserscan 5) Scan all available channels (B/G, A bands) for a specific BSSID, keep the current scan table intact, update existing or append new scan data: echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan 6) Scan channel 6, for all infrastructure networks, sending two probe requests. Keep the previous scan table intact. Update any duplicate BSSID/SSID matches with the new scan data: echo "chan=6g type=1 probes=2 keep=1" > setuserscan All entries in the scan table (not just the new scan data when keep=1) will be displayed upon completion by use of the getscantable ioctl.