From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search

Togo (Talk | contribs)
(new - help improve it...!)
Next diff →

Revision as of 19:09, 7 October 2006

'wl' is probably the most important tool in the routers firmware to accers and control wireles hardware. It can be accesed from a telnet or SSH terminal or through a web interface.

This is a part of the usage instructions you see when executing 'wl':

txpwr Set tx power in milliwatts. Range [1, 84]. (Deprecated: Use txpwr1 instead)

txpwr1 Set tx power in in various units. Choose one of (default: dbm):

       -d dbm units
       -q quarter dbm units
       -m milliwatt units

Can be combined with:

       -o turn on override to disable regulatory and other limitations

Use wl txpwr -1 to restore defaults


       Turn the tx path power on or off on 2050 radios


       Return current tx power limit


       Set the transmit power for A band(0-63).
       -1 - default value

atten Set the transmit attenuation for B band. Args: bb radio txctl1.

       auto to revert to automatic control

phyreg Get/Set a phy register.


       Get/Set a radio register.

shmem Get/Set a shared memory location.

macreg Get/Set any mac registers(include IHR and SB)

       macreg offset size[2,4] [value]

antdiv Set antenna diversity for rx

       0 - force use of antenna 0
       1 - force use of antenna 1
       3 - automatic selection of antenna diversity

txant Set the transmit antenna

       0 - force use of antenna 0
       1 - force use of antenna 1
       3 - use the RX antenna selection that was in force during
           the most recently received good PLCP header


       Print driver rate selection tunables and per-scb state to stdout
       based on remote station mac address[xx:xx:xx:xx:xx:xx]

plcphdr Set the plcp header.

       "long" or "auto" or "debug"

phytype Get phy type

scbdump print driver scb state to stdout


       set driver rate selection tunables
       arg 1: tunable id
       arg 2: tunable value


       Set or Get WEP status
       wepstatus [on|off]


       Set or get index of primary key

addwep Set an encryption key. The key must be 5, 13 or 16 bytes long, or

       10, 26, 32, or 64 hex digits long.  The encryption algorithm is
       automatically selected based on the key size. keytype is accepted
       only when key length is 16 bytes/32 hex digits and specifies
       whether AES-OCB or AES-CCM encryption is used. Default is ccm.
       addwep <keyindex> <keydata> [ocb | ccm] [notx] [xx:xx:xx:xx:xx:xx]

rmwep Remove the encryption key at the specified key index.

wep Set WEP options.

       wl wep [options]
       [on|enable|1]   enable WEP
       [off|disable|0] disable WEP
       [sw|software]   perform WEP in software
       [hw|hardware]   perform WEP in hardware

tkip Set TKIP options.

       wl tkip [options]
       [on|enable|1]   enable TKIP
       [off|disable|0] disable TKIP
       [sw|software]   perform TKIP in software
       [hw|hardware]   perform TKIP in hardware

aes Set AES options.

       wl aes [options]
       [on|enable|1]   enable AES
       [off|disable|0] disable AES
       [sw|software]   perform AES in software
       [hw|hardware]   perform AES in hardware

keys Prints a list of the current WEP keys

tsc Print Tx Sequence Couter for key at specified key index.


       Generate wsec errors
       wsec_test <test_type> <keyindex|xx:xx:xx:xx:xx:xx>
       type 'wl wsec_test ?' for test_types


       Enable or disable TKIP countermeasures (TKIP-enabled AP only)
       0 - disable
       1 - enable


       Drop unencrypted packets if WSEC is enabled
       0 - disable
       1 - enable

eap restrict traffic to 802.1X packets until 802.1X authorization succeeds

       0 - disable
       1 - enable


       restrict traffic to 802.1X packets until 802.1X authorization succeeds


       do not restrict traffic to 802.1X packets until 802.1X authorization succeeds


       deauthenticate a STA from the AP with optional reason code (AP ONLY)

wsec wireless security bit vector

       1 - WEP enabled
       2 - TKIP enabled
       4 - AES enabled
       8 - WSEC in software


       Bitvector of WPA authorization modes:
       1       WPA NONE
       2       WPA-802.1X/WPA-Professional
       4       WPA-PSK/WPA-Personal
       64      WPA2-802.1X/WPA2-Professional
       128     WPA2-PSK/WPA2-Personal
       0       disable WPA

set_pmk Set passphrase for PMK in driver-resident supplicant.

scan Initiate a scan.

       Default an active scan across all channels for any SSID.
       Optional arg: SSID, the SSID to scan.
       -s S, --ssid=S          SSID to scan
       -t ST, --scan_type=ST   [active|passive] scan type
       --bss_type=BT           [bss/infra|ibss/adhoc] bss type to scan
       -b MAC, --bssid=MAC     particular BSSID MAC address to scan, xx:xx:xx:xx:xx:xx
       -n N, --nprobes=N       number of probes per scanned channel
       -a N, --active=N        dwell time per channel for active scanning
       -p N, --passive=N       dwell time per channel for passive scanning
       -h N, --home=N          dwell time for the home channel between channel scans
       -c L, --channels=L      comma or space separated list of channels to scan

passive Puts scan engine into passive mode


       Get/Set regulatory domain mode (802.11d). Driver must be down.

spect Get/Set 802.11h Spectrum Management mode.

       0 - Off
       1 - Loose interpretation of spec - may join non-11h APs
       2 - Strict interpretation of spec - may not join non-11h APs


       Return results from last scan.

assoc Print information about current network association.

       (also known as "status")

status Print information about current network association.

       (also known as "assoc")


       Disassociate from the current BSS/IBSS.


       Return valid channels for the current settings.


       Return valid channels for the current settings.


       Return valid channels for the country specified.
       Arg 1 is the country abbreviation
       Arg 2 is the band(a or b)


       Return current tx power settings


       Suppress all scans for testing.
       0 - allow scans
       1 - suppress scans

evm Start an EVM test on the given channel, or stop EVM test.

       Arg 1 is channel number 1-14, or "off" or 0 to stop the test.
       Arg 2 is optional rate (1, 2, 5.5 or 11)

rateset Returns or sets the supported and basic rateset, (b) indicates basic

       With no args, returns the rateset. Args are
       rateset "default" | "all" | <arbitrary rateset>
               default - driver defaults
               all - all rates are basic rates
               arbitrary rateset - list of rates
       List of rates are in Mbps and each rate is optionally followed
       by "(b)" or "b" for a Basic rate. Example: 1(b) 2b 5.5 11
       At least one rate must be Basic for a legal rateset.


       Set the roam trigger RSSI threshold.  (integer)


       Set the roam candidate qualification delta.  (integer)


       Set the roam candidate qualification delta.  (integer)


       Returns or sets the 11g override for the supported rateset
       With no args, returns the rateset. Args are a list of rates,
       or 0 or -1 to specify an empty rateset to clear the override.
       List of rates are in Mbps, example: 1 2 5.5 11


       Get/Set scan channel time


       Get/Set unassociated scan channel dwell time


       Get/Set scan home channel dwell time


       Get/Set passive scan channel dwell time


       Get/Set scan parameter for number of probes to use per channel scanned


       Get/Set probe response timeout


       Get last channel quality measurment


       Start a channel quality measurment

country Select Country code for use with 802.11d

       Use either long name or abbreviation from ISO 3166.
       Use 'wl country list [band(a or b)]' for the list of supported countries

locale OBSOLETE: use "wl country"

       Select the country:

join Join a specified network SSID.

       Join syntax is: join <ssid> [key xxxxx] [imode bss|ibss] [amode open|shared|wpa|wpapsk|wpanone]

ssid Set or get the current SSID.

       Setting will initiate an assoication attempt if in infrastructure mode,
       or join/creation of an IBSS if in IBSS mode,
       or creation of a BSS if in AP mode.

mac Set or get the list of source MAC address matches.

       wl mac xx:xx:xx:xx:xx:xx [xx:xx:xx:xx:xx:xx ...]
       To Clear the list: wl mac none

macmode Set the mode of the MAC list.

       0 - Disable MAC address matching.
       1 - Deny association to stations on the MAC list.
       2 - Allow association to stations on the MAC list.

wds Set or get the list of WDS member MAC addresses.

       Set using a space separated list of MAC addresses.
        wl wds xx:xx:xx:xx:xx:xx [xx:xx:xx:xx:xx:xx ...]

lazywds Set or get "lazy" WDS mode (dynamically grant WDS membership to anyone).

noise Get noise (moving average) right after tx in dBm


       Manufacturing test: set frequency accuracy mode.
       freqacuracy syntax is: fqacurcy <channel>
       Arg is channel number 1-14, or 0 to stop the test.

crsuprs Manufacturing test: set carrier suppression mode.

       carriersuprs syntax is: crsuprs <channel>
       Arg is channel number 1-14, or 0 to stop the test.


       Manufacturing test: set longtraining mode.
       longtrain syntax is: longtrain <channel>
       Arg is A band channel number or 0 to stop the test.

int Interrupt Test - remember to precede by 'wl down' and follow by 'wl up'

lbt Loopback Test - remember to precede by 'wl down' and follow by 'wl up'

band Returns or sets the current band

       auto - auto switch between available bands (default)
       a - force use of 802.11a band
       b - force use of 802.11b band

bands Return the list of available 802.11 bands

phylist Return the list of available phytypes


       Get current 11g Short Slot Timing mode. (0=long, 1=short)


       Get/Set 11g Short Slot Timing mode override. (-1=auto, 0=long, 1=short)


       Get/Set AP Restriction on associations for 11g Short Slot Timing capable STAs.
       0 - Do not restrict association based on ShortSlot capability
       1 - Restrict association to STAs with ShortSlot capability


       AP only (G mode): Check for beacons without NONERP element (0=Examine beacons, 1=Ignore beacons)

pktcnt Get the summary of good and bad packets.

upgrade Upgrade the firmware on an embedded device

gmode Set the 54g Mode (LegacyB|Auto||GOnly|BDeferred|Performance|LRS)


       Get G protection mode. (0=disabled, 1=enabled)


       Get/Set 11g protection mode control alg. (0=always off, 1=monitor local association, 2=monitor overlapping BSS)


       Get/Set 11g protection type to CTS (0=disable, 1=enable)


       Get/Set 11g protection mode override. (-1=auto, 0=disable, 1=enable)


       Get/Set 11g legacy ERP inclusion (0=disable, 1=enable)


       AP only: inactivity timeout value for authenticated stas


       AP only: Get the list of associated MAC addresses.

rssi Get the current RSSI val, for an AP you must specify the mac addr of the STA

isup Get driver operational state (0=down, 1=up)


       Get/Set High frequency watchdog timeout (tx_power) [15 sec]


       Get/Set Low frequency watchdog timeout (nrssislope) [60 sec]


       Get/Set Very Low frequency watchdog timeout (measurelo) [120 sec]

radar Enable/Disable radar


       Dump rssi values from aci scans


       Get/Set interference mitigation mode. Choices are:
       0 = none
       1 = non wlan
       2 = wlan manual
       3 = wlan automatic

aciargs Get/Set various aci tuning parameters. Choices are:

       enter:  CRS glitch trigger level to start detecting ACI
       exit:   CRS glitch trigger level to exit ACI mode
       glitch  Seconds interval between ACI scans when glitchcount is continuously high
       spin:   Num microsecs to delay between rssi samples
       Usage: wl aciargs [enter x][exit x][spin x][glitch x]


       Disable/Enable frameburst mode


       Get/Set power output percentage

wet Get/Set wireless ethernet bridging mode

bi Get/Set the beacon period (bi=beacon interval)

dtim Get/Set DTIM


       Get WDS link remote endpoint's MAC address


       Get WDS link local endpoint's WPA role (old)


       Get/Set WDS link local endpoint's WPA role


       Get authenticated sta mac address list


       Get authorized sta mac address list


       Send an 802.11h measurement request.
       Usage: wl measure_req <type> <target MAC addr>
       Measurement types are: TPC, Basic, CCA, RPI
       Target MAC addr format is xx:xx:xx:xx:xx:xx

quiet Send an 802.11h quiet command.

       Usage: wl quiet <TBTTs until start>, <duration (in TUs)>, <offset (in TUs)>

csa Send an 802.11h channel switch anouncement

       Usage wl csa <mode> <when (in TBTTs)> <channel>


       Send an 802.11h Power Constraint IE
       Usage: wl constraint 1-255 db

rm_req Request a radio measurement of type basic, cca, or rpi

       specify a series of measurement types each followed by options.
       example: wl rm_req cca -c 1 -d 50 cca -c 6 cca -c 11
       -t n  numeric token id for measurement set or measurement
       -c n  channel
       -d n  duration in TUs (1024 us)
       -p    parallel flag, measurement starts at the same time as previous
       Each measurement specified uses the same channel and duration as the
       previous unless a new channel or duration is specified.

rm_rep Get current radio measurement report

wme Set WME (Wireless Multimedia Extensions) mode (0=off, 1=on)

wme-ac wl wme-ac sta/ap [be, bk, vi, vo] [ecwmax, ecwmin, txop, aifsn, acm] value


       wl sta_info <xx:xx:xx:xx:xx:xx>

cap driver capabilities


       debug malloc info


       channel info

add_ie Add a vendor proprietary IE to 802.11 management packets Usage: wl add_ie <pktflag> length OUI hexdata <pktflag>: Bit 0 - Beacons

          Bit 1 - Probe Rsp
          Bit 2 - Assoc/Reassoc Rsp
          Bit 3 - Auth Rsp

Example: wl add_ie 3 10 00:90:4C 0101050c121a03

        to add this IE to beacons and probe responses

del_ie Delete a vendor proprietary IE from 802.11 management packets Usage: wl del_ie <pktflag> length OUI hexdata <pktflag>: Bit 0 - Beacons

          Bit 1 - Probe Rsp
          Bit 2 - Assoc/Reassoc Rsp
          Bit 3 - Auth Rsp

Example: wl del_ie 3 10 00:90:4C 0101050c121a03

list_ie Dump the list of vendor proprietary IEs

rand Get a 2-byte Random Number from the MAC's PRNG Usage: wl rand