Sign in to follow this  
Followers 0
Jodri

Detect wifi is 5Ghz capable

2 posts in this topic

I'd like to detect if there is a wifi interface available and if this wifi interface is 5Ghz or 2.4Ghz . Any suggestions?

 

Share this post


Link to post
Share on other sites



Probably the easiest way:

Run(@ComSpec & " /k " & "netsh wlan show drivers")

If the radio type supported shows N or A/C it is a good bet it supports 5GHz

I would think you could do it from WMI as well, something like this (pseudo):

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$oWMI = ObjGet("winmgmts:\\.\root\cimv2")
$oItems = $oWMI.ExecQuery("SELECT * FROM Win32_NetworkAdapter", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
   For $item In $oItems
      ConsoleWrite("Caption: " & $item.Caption & ", Max Speed of: " & $item.MaxSpeed & @CRLF)
   Next

I can't test at the moment, but you may be able to use the MaxSpeed parameter to determine what bands you have access to.

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0