larger buffer, cleaner executables
- Doubled the size of the underlying buffer for messages to prevent fractured csv results.
- Added
-i
option to apscan for Interface - Added
-s
and-p
options to connectap for SSID and PKS, respectively - Error handling in connectap
- Ensure a disconnection from a network before attempting a connection in connectap
I needed to change the overall size of the buffer because, where I live, the area is saturated by many networks, and the original buffer size lead to an attempt to parse a CSV that would become malformed as all the data arrived. I also attempted to handle the malformed CSV as best as I could, but those modifications do not appear to work as well as I would like. I left them in place just in case, though, as they did not appear to harm the existing code.
I added the other options to the executables because I needed to test the library in my real-world setting to ensure it works correctly before using this library for some professional work I need to finish.
I also noticed that if the wifi interface already had an established connection, running connectap on that interface would hang, making it impossible to change to a different network. I needed to test that DisableNetwork would appropriately address the problem, and that I could detect the issue with Status, before using this library for some professional work I need to finish. I figure it is worthwhile to leave these modifications in place for others to observe, either for instructional purposes, or to make this executable work better in general.