What's new

query wireless stationlist

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

hautele

New Around Here
-> Gui "Wireless Log" - "Low Level Details"

Hi,
Anyone knows if there is a way to get this information via console cli too?
I need to retrieve the wireless stationlist for some homeautomation tasks.
If there are other, better ways to get it, please let me know. I'm new to AsusWrt.
Thanks a lot,
kind regards
Jon

-----------------------------------

SSID: "NoBrain_2.4GHZ"
noise: -89 dBm Channel: 1l
BSSID: 7A:12:C9:CD:20:FF Capability: ESS ShortSlot RRM
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
HE Capable:
Chanspec: 2.4GHz channel 3 40MHz (0x1803)
Primary channel: 1
HT Capabilities: 40Mhz SGI20 SGI40
Supported HT MCS : 0-23
Supported VHT MCS:
NSS1 Tx: 0-11 Rx: 0-11
NSS2 Tx: 0-11 Rx: 0-11
NSS3 Tx: 0-11 Rx: 0-11
Supported HE MCS:
80 Mhz:
NSS1 Tx: 0-11 Rx: 0-11
NSS2 Tx: 0-11 Rx: 0-11
NSS3 Tx: 0-11 Rx: 0-11

Interference Level: Acceptable
Mode : AP Only

Stations List
----------------------------------------
idx MAC Associated Authorized RSSI PHY PSM SGI STBC MUBF NSS BW Tx rate Rx rate Connect Time
1 FF:C5:D3:62:FF:C9 Yes Yes -61dBm n No No No No 1 20M 65M 39M 00:33:37

SSID: "NoBrain_5GHZ"
noise: -90 dBm Channel: 52/80
BSSID: FF:10:C9:CD:20:A1 Capability: ESS RRM
Supported Rates: [ 6(b) 9 12 18 24(b) 36 48 54 ]
HE Capable:
Chanspec: 5GHz channel 58 80MHz (0xe03a)
Primary channel: 52
HT Capabilities: 40Mhz SGI20 SGI40
Supported HT MCS : 0-31
Supported VHT MCS:
NSS1 Tx: 0-11 Rx: 0-11
NSS2 Tx: 0-11 Rx: 0-11
NSS3 Tx: 0-11 Rx: 0-11
NSS4 Tx: 0-11 Rx: 0-11
Supported HE MCS:
80 Mhz:
NSS1 Tx: 0-11 Rx: 0-11
NSS2 Tx: 0-11 Rx: 0-11
NSS3 Tx: 0-11 Rx: 0-11
NSS4 Tx: 0-11 Rx: 0-11
160 Mhz:
NSS1 Tx: 0-11 Rx: 0-11
NSS2 Tx: 0-11 Rx: 0-11
NSS3 Tx: 0-11 Rx: 0-11
NSS4 Tx: 0-11 Rx: 0-11

Interference Level: Acceptable
Mode : AP Only

DFS status: state In-Service Monitoring(ISM) time elapsed 81000ms radar channel cleared by DFS channel 52/80 (0xE03A)

Channel Information
----------------------------------------
Channel 36 A Band
Channel 40 A Band
Channel 44 A Band
Channel 48 A Band
Channel 52 A Band, RADAR Sensitive
Channel 56 A Band, RADAR Sensitive
Channel 60 A Band, RADAR Sensitive
Channel 64 A Band, RADAR Sensitive
Channel 100 A Band, RADAR Sensitive, Passive
Channel 104 A Band, RADAR Sensitive, Passive
Channel 108 A Band, RADAR Sensitive, Passive
Channel 112 A Band, RADAR Sensitive, Passive
Channel 116 A Band, RADAR Sensitive, Passive
Channel 120 A Band, RADAR Sensitive, Passive
Channel 124 A Band, RADAR Sensitive, Passive
Channel 128 A Band, RADAR Sensitive, Passive
Channel 132 A Band, RADAR Sensitive, Passive
Channel 136 A Band, RADAR Sensitive, Passive
Channel 140 A Band, RADAR Sensitive, Passive

Stations List
----------------------------------------
idx MAC Associated Authorized RSSI PHY PSM SGI STBC MUBF NSS BW Tx rate Rx rate Connect Time
86:5B:52:71:FF:FF Yes Yes -63dBm n Yes Yes Yes No 1 40M 120M 6M 00:01:31

 
There are many threads discussing this. Try using wl -i eth6 assoclist, adjusting eth6 to match whatever WiFi interfaces you're interested in.
 
Thanks for your reply - it helps.
i will check wl out - seems to be a very comprehensive tool
jon
 
I have searched (on this site and via Google) far and wide for this, but the exact same question of this thread remains: what underlying CLI tool is used to generate the very convenient all-in-one "Stations List" output in the Low Level Details fade-in window?

"wl assoclist" as suggested above is JUST NOT the same thing - that's a bare-bones client MAC list.
Every other piece of output there seems to be generated by "wl status", "wl chan_info" - also not sure where "Interference Level" and "Mode" info comes from.

I have looked through /www/Main_WStatus_Content.asp - but my ASP code skills (and Java) are basically non-existent - ask me about shell scripts, Perl and Python and I am ok - but I can't figure out what it does here:

2 functions to open/close the window are there : (do these form a relative URL? using a browser to hit the /Main_WStatus_Content.asp#details_window URI does exactly nothing)

function open_details_window(){
$("#details_window").fadeIn(300);
}
function hide_details_window(){
$("#details_window").fadeOut(300);
}

I will omit the parts where the "input class" mouse button clicks call the 2 functions above, but then there is:

div id="details_window" class="contentM_details pop_div_bg"

With contentM_details seemingly being defined in the style section of the page.

Where are the calls to details_window going to?
I can't find any references to it in any other file in /www , even if I run all non-text files through "strings *"

Who is familiar with this code and what it calls and could put all of this to rest?

Thank you....
 
I have searched (on this site and via Google) far and wide for this, but the exact same question of this thread remains: what underlying CLI tool is used to generate the very convenient all-in-one "Stations List" output in the Low Level Details fade-in window?
It doesn't use the CLI. RMerlin has stated that the C code queries the hardware directly.
 
It doesn't use the CLI. RMerlin has stated that the C code queries the hardware directly.


I've now downloaded the 7GB of source from Github, and a recursive search for "Stations List" turns up a few hits - with the most likely one being here:

/release/src-rt/router/httpd/sysdeps/web-broadcom.c

It's a massive 180KB piece of C code - which I am a bit rusty in after not using it for over 30 years - but it seems that it

- executes "wl authe_sta_list" to build the MAC list of authenticated+associated devices
- calls wl_sta_info() for all MACs, which executes "wl sta_info" to gather various bits and pieces from there
- calls wl_sta_info_nss() , wl_sta_info_bw() to gather NSS and BW (through interface structures I don't understand)
- calls wl_ioctl() to learn the RSSI : this is an enormously complex function and seemingly the low-level interface to the chipset with a large number of queryable parameters, it's used massively through the entire program: definitions appear to be in each and every driver version in the code repository, one of which is /release/src-rt-5.04axhnd.675x/bcmdrivers/broadcom/net/wl/impl87/sys/components/wlioctl/include/wlioctl_defs.h : you know a function is serious if it's header definitions file is 100KB(!)
- the "Tx Rate / Rx Rate" counters are seemingly derived from the "wl sta_info"
- the "Connect Time" (which someone asked about in another thread I ran into today) is calculated from sta_info's "in network" counter (in secs)

So TL;DR is: replicating the "Stations List" output via a shell script would be a fairly significant undertaking - not "big" compared to some of the scripts I've seen here, but awkward and complicated (as shell scripts go) - it's unclear whether all parameters can be gathered, but it seems so.

Now, could someone comment on a direct URL/URI one could access into the UI to only return the details page ?
E.g.: what the .asp does, but not rendering it as a fade-in/out window?

Thank you.
 
executes "wl authe_sta_list" to build the MAC list of authenticated+associated devices
It doesn't. Everything is retrieved directly by querying the radio over ioctl() calls.

You can't retrieve the same content through scripting. The userspace wl command only provides some of these information, and there is no public documentation available for it, it's part of BCM's confidential SDK.

The HTML page doesn't do anything beside format and display the data inserted in it through activescript tags (<% nvram_dump("wlan11b_2g.log",""); %> in the case of Asus' original unformatted list), dynamically inserted in the page at the time it gets parsed by the httpd daemon.
 
Though this is an older version of the wl manual and likely “leaked”, but literally the 2nd hit if you google. wl command manual


This is the same information that you can get by typing wl -h from the command line, it's not hidden. It's the detailed documentation and ioctl() stuff that's secret.
 
Last edited:
This is the same information that you can get by typing wl -h from the command line, it's not hidden. It's the detailed documentation and ioctl() stuff that's secret.

Fair enough lol. For some reason I was under the impression it didn’t give detailed information about each command just the command options listed. Not sure why I thought that.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top