I am currently running with a portable device running Ubuntu 15.10. The idea is that this unit will have no screen (a secondary device will be optionally connected to it, but standalone, it's for data recording out in the field), and read from a list of SSIDs and Wifi-Passwords to connect to them when available.
We are currently using Mono C# on the device, but hitting a snag when it comes to wifi.
My question is this: Is there a class or DLL I need to implement inside of the C# environment to get the Access Points, and connect using a password, or alternatively, a terminal tool that will A) return a list of APs available and B) can take in an SSID and Password and attempt a connection?
Thank you for your help.
Current Solution: I run a process of nmcli, attempting to parse the incoming stream (not good at this on Linux yet), to get a list of SSIDs.
After some comparison, I run another process, calling "nmcli dev wifi connect password " based on a text file.
This is currently working, but I'm wondering if there are better solutions.
Edit 2: The major issue with the above is that, if a bad password is provided, it launches the Password Required window and locks up the system.
Edit 3: After messing around with the nm-applet, killing it to stop the pop up, a series of 802.1X errors appeared, though not every time. If I attempt the connection enough times, it succeeds eventually.
Edit 4: Re-installing network-manager seems to have fixed a few problems, but still buggy.
Edit 5: In regards to iwConfig, I tried that, but I found that when I used iwlist wlan0 scan | grep ESSID, it only returned the current connected network 9/10 times.