Detect WiFi client's WiFi connection [5gh or 2.4g]hz]

Hello Folks,
My setup:

OpenWRT x86 router [no WiFi] ---- 3rd Party WiFi Access Points with stock FW -- Users.

Without looking at AP's status page, Is there a way to programmatically detect if a user is connected to 5Ghz or 2.4GHz WiFi, from the OpenWRT router?

Assume NO access to the AP [SSH or GUI].

  1. Mac address. Is there any pattern followed by user's device manufacturers?
  2. Estimate By (ar)ping response time? [The AP to user distance is not known]
  3. Anything else?

That all depends on what the 3rd party AP has in terms of an API.

If this is the assumption, then the answer is no, it is not possible. Full stop.

1 Like

Hi,

If your AP is only an AP, it should not take care of DHCP.
So you should get all clients on your DHCP server, I guess the openwrt. Visible on the status/overview page of openwrt. Also stored in /tmp/dhcp.leases.

It will only work for client using DHCP for network config.

Hello Dr :slight_smile:

I do get the MAC & IP address from /tmp/dhcp.leases
From there how do I find out if client is connected over 5Ghz or 2.4Ghz. That's my original question.

I appreciate you posting.

As psherman pointed out, the answer is no, fullstop.

The information which band is used doesn't go past the AP taking its signal, after that it's normal ethernet traffic - with the same MAC address regardless of the band (for many reasons, but your client only has a single radio, a single wireless MAC).

1 Like

There is no way to do this if your AP doesn't have an ssh/web interface that you can scrape for this information.

There is no way to detect which wifi band a client is using without querrying the AP itself.

Would there be a way to use the clients MAC, and do a lookup "somewhere", to see if it belongs to an AC or N radio ?

Since the WiFi is not on the OpenWRT router, doesn't seem any radio information likely to be available.

I might do a profiling on apring response time between router and client over both GHzs and see if it differs enough. A 5Ghz should have faster response time.

The only "somewhere" on the AP - is the AP. The OP told us to assume no access to the AP.

I'm actually wondering how this is OpenWrt-related?

:thinking:

That's not necessarily true. Radio waves move at the speed of light. If all things are [relatively] equal, there should be no [noticeable] difference.

No, this won't work reliably. The response time will very much depend on the physical proximity, signal quality, and also the device itself (i.e. a mobile device may have long response times when it is sleeping, etc.).

1 Like

Try reading what I wrote, one more time.

If I get your drift...
This appears to be a popular question on different forums.
The verdict seems to be that there IS certain pattern to be found between MAC addresses of 5 Vs 2.4 Ghz's, but its different for each vendor, and not documented. In that case, this way doesn't seem to be worth pursuing.

Sorry :slight_smile: but this forum is addictive.

1 Like

On concurrent-dualband routers/ APs, yes - but those have two independent radios (even if DBDC), which each get their own MAC. Your typical client only has a single (dualband) radio, with a single MAC, which doesn't change just because you change channels or bands.

1 Like

Further building on what @slh said, and dispelling the idea that you can simply us a MAC address lookup to see if something belongs to an AC or N radio...

  • A client device that is AC will almost always be dual-band... while they will typically attempt to use 5G whenever possible, actual conditions with respect to signal quality will often cause them to dynamically switch between 2.4G and 5G radio links.
  • An 802.11n based device can still be dual-band. 802.11n was the 2nd standard (in the consumer device category) to the use 5GHz (the first was 802.11a).

As has been stated numerous times now, you cannot, under any circumstances, determine the band that a given client is using without some access to the AP's status (i.e. ssh or web interface + a method to read and interpret the data).

I'll add that it often doesn't even matter unless your intent is to tune the radio system and/or placement to improve performance. Dual band clients will (usually) select the band that gives them the best performance (2.4G is more resillient through walls and has greater range, 5G is faster when conditions allow). And of course, you can easily deduce the band or single band devices (which are almost always 2.4G only, and will typically have that in the product specs if you actually need to know).

2 Likes

One use case could be that if a user complains of slow internet, I would like to quickly check if the user's device is connected/limited to 2.4GHz.
This may not be always the rootcause of slow internet, but often times it is.

Then you need to log onto the wifi AP to find out. If it doesn't give you that information, you can either deal with the lack of info, or you can buy a device that can provide you with that information and/or one that is supported by OpenWrt which could then report that data.

1 Like