Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error When Radio turned off - Windows 10 #42

Open
Garethb83 opened this issue Jan 14, 2020 · 2 comments
Open

Error When Radio turned off - Windows 10 #42

Garethb83 opened this issue Jan 14, 2020 · 2 comments

Comments

@Garethb83
Copy link

If I have WIFI turned off in Windows, this is throwing an error when trying to getAplist.

Once we instantiate Wifi client class, prior to running functions, how best to check if radio is enabled or not before running further functions?

@AsoftDev
Copy link

AsoftDev commented Jan 14, 2020

I had the same problem in my GetAccessPoints function I do a check on WlanInterface.IsRadioOn see below excerpt. I am wondering if NoWifiAvailable should return TRUE when radio is off. It doesn't currently do that.

    	/// <summary>
	/// Returns a list over all available access points
	/// </summary>
	public List<AccessPoint> GetAccessPoints()
	{
               List<AccessPoint> accessPoints = new List<AccessPoint>();
               if (_client.NoWifiAvailable)
                   return accessPoints;

               foreach (WlanInterface wlanIface in _client.Interfaces)
               {
                   if (wlanIface.IsRadioOn())
                   {

@Garethb83
Copy link
Author

Thanks. I will give that a go and see if it resolves it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants