09-09-2014 02:46 AM
I'm trying to access the wireless network card and list the available SSID's, like how Windows is doing it. Present a list of the SSID's of the available Wi-Fi networks. Is this information available in e.g. .NET libraries? I've been searching this for a while, but haven't found anything so far...
Solved! Go to Solution.
09-09-2014 02:58 PM - edited 09-09-2014 02:59 PM
Oh this is an easy one if you know netsh. Use the command line call "netsh wlan show networks". Attatched is an example saved in 2013.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-10-2014 01:41 AM
Oh, this is cool! 🙂 It's possible to use netsh both to get SSID and signal quality information, and even to connect to and disconnect from networks.
Thanks a million! Never thought it would be this easy. 🙂
09-10-2014 08:40 AM
@ojohnsen79 wrote:
Oh, this is cool! 🙂 It's possible to use netsh both to get SSID and signal quality information, and even to connect to and disconnect from networks.
Thanks a million! Never thought it would be this easy. 🙂
Yup it is really a neat utility. I have testers setup offsite that upload reports to a central location. This relies on a network connection, so each tester has a wireless card. The problem is the environment these testers are in have spotty WIFI reception, and the network often goes down needing a retry of the uploading of reports.
So I made a program that runs in the system tray, and will check internet connection every 30 minutes. If the network goes down, it will disconnect from the wireless network, then attempt to connect again. After another 30 minutes if there is no connection I disable the wireless card, and enable it. This has solved all kinds of Windows device issues, and connection issues. Some times routers just have issues and forcing a disconnector, or a disable really helps. All of this is done using that comman line program.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-18-2017 03:47 PM
Hello,
Is possible that you send to me the example in 2012 version? I need a similar aplication.
Thanks in advance.
Regards.
01-18-2017 05:07 PM
2012 Version attached.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-29-2017 12:21 PM
I have a related question: is it possible to connect to a wifi network using "netsh wlan" command set? My ultimate goal is to provide a LabVIEW user interface for surveying wifi networks (which can be done as Hooovahh described) and then connecting to one. I know that in principle it can be done with netsh wlan if this PC already has been connected to this network before, but what if it's the first time?
This problem came up in a project where LV application serves as the Windows shell and the end user has no access to anything except the LV interface. Naturally I can use System Exec, DLL's, .NET and all other toys, but I have not been able to figure out how to connect, and I don't want to dive into the Microsoft Native Wifi API.
Any suggestions? Thanks!
SL
11-29-2017 02:49 PM
I've never tested it but several sites list that this is possible:
https://www.hanselman.com/blog/HowToConnectToAWirelessWIFINetworkFromTheCommandLineInWindows7.aspx
https://stackoverflow.com/questions/41163737/how-to-connect-to-a-wifi-using-cmd-only
https://www.techworm.net/2016/10/connect-manage-delete-wi-fi-networks-using-command-prompt.html
In my situation the network credentials were already saved, and the connection is to be established automatically, so all i did was disable the network adapter and then reenable it which would cause it to disconnect and then connect again.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-29-2017 06:29 PM
Thanks Hooovahh! I've seen all these links in my web search. One problem with this approach is that in order to connect using netsh wlan you need admin rights, and I hope to be able to work around this. After all, with regular Windows WiFi, you can connect as a regular user. One possible workaround that I will explore is to ask the user to connect on another PC and give him a batch file to export the connection profile, then import it on my instrument and connect using this profile (I don't think one needs admin rights for that). We'll see. Worst case, I'll have to install the Windows SDK, dig into the wifi API, possibly build a DLL in Visual Studio and then try to call it in LV...
12-14-2017 02:19 PM
I have created a Community Example Program which performs the scanning of WiFi hotspots (SSID's) nearby, lists them in a ring, shows available network profiles and connects to a chosen hotspot (kudos welcome;) :
WiFi Network Scanning and Connecting with LabVIEW - Discussion Forums - National Instruments
https://forums.ni.com/t5/Example-Program-Drafts/WiFi-Network-Scanning-and-Connecting-with-LabVIEW/ta...