I am searching for a way to determine if a STA connected supports dual band capability, as this is a key need for a bandsteering algorithm, because before you streer a STA you first need to know if the device can operate in the other band.
// ---------------------------------- First I will show how far i have reached --------------------------------------
Theoretically this information goes in the association request frames, but some devices does not include this information. In this example we have a device which indicates every operating class supported:
Here is clear that this device is only 5 GHz capable and supports operating classes for 20/40/80 MHz width. And this is correct, the device is a TP-Link RE200 operating as STA in the 5 GHz radio.
But with my mobile (Motorola G7) this is different, the information is missing. Anyway, I think that in this kind of cases there is no so much to do, maybe register when the device connects in each band so in the future the system can remember that capability.
So, the interesting part is obtaining the association frames of the wifi clients, or the capability information that they contain. The nearer I have been from it is by calling hostapd via ubus like this:
ubus call hostapd.wlan0 get_clients
And the answer is:
{
"freq": 5745,
"clients": {
"24:46:c8:bb:08:5f": {
"auth": true,
"assoc": true,
"authorized": true,
"preauth": false,
"wds": false,
"wmm": true,
"ht": true,
"vht": false,
"wps": false,
"mfp": false,
"rrm": [
0,
0,
0,
0,
0
],
"extended_capabilities": [
0,
0,
0,
2
],
"aid": 1,
"signature": "wifi4|probe:0,1,45,221(0050f2,8),htcap:016e,htagg:03,htmcs:000000ff|assoc:0,1,48,45,221(0050f2,2),127,htcap:016e,htagg:03,htmcs:000000ff,extcap:00000002",
"bytes": {
"rx": 3240243,
"tx": 106593816
},
"airtime": {
"rx": 0,
"tx": 155166212
},
"packets": {
"rx": 16435,
"tx": 87252
},
"rate": {
"rx": 6000,
"tx": 150000
},
"signal": -33,
"capabilities": {
}
}
}
}
Where the relevant part seems to be the field named "signature", specifically the "assoc" section:
"signature": "wifi4
|probe:0,1,45,221(0050f2,8),htcap:016e,htagg:03,htmcs:000000ff
|assoc:0,1,48,45,221(0050f2,2),127,htcap:016e,htagg:03,htmcs:000000ff,extcap:00000002",
Here I have noticed that the number list "0,1,48,45,221,127" are the tag identifiers:
So, in the "signature" field all the tagged parameters of the association request frame are being registered, but no its content, just part of it, which is here in the second part of the section ("htcap:016e,htagg:03,htmcs:000000ff,extcap:00000002" in the example).
// ------------------------------------------------------- So... --------------------------------------------------------
-
This is possible to obtain the whole association request information from a desired associated STA?
-
There is another way to know the dual band capability of a STA device?
I think that answering this questions are a must to anyone who wants to develop a bandsteering algorithm.