arduino-libraries / Arduino_ConnectionHandler

GNU General Public License v3.0
97 stars 36 forks source link

WiFi Handler for WPA2 Enterprise networks #64

Open jaimemi opened 3 years ago

jaimemi commented 3 years ago

Hi 👋🏻

I have been struggling some time to connect my Arduino MKR1010 to the Arduino IoT Cloud by my university wifi network, which asks a username and password (WPA2 WiFi network).

For Arduino MKR1010, Arduino_ConnectionHandler establish a connection by creating a WiFi object from WiFiNINA and calling the method .begin(). This method only allows connections with WPA networks (SSID & Password).

If the method .beginEnterprise() from WiFiNINA was included in the class WiFiConnectionHandler fromArduino_WiFiConnectionHandler.cpp, it would be possible to connect to WPA2 Enterprise networks such as eduroam. Again, it only works for devices using WiFiNINA instead of WiFi101. I don’t know if there exists a similar method for the latter.

Lastly, I tried it myself and it works. It only took me minutes to update the code. And it doesn’t change what is made already.

Thanks for the nice library you created!

facchinm commented 3 years ago

Hi @jaimemi , feel free to post your patch and we'll be happy to review and merge it :slightly_smiling_face: Thanks for reporting, the use case looks very interesting!

jesmith-all commented 3 years ago

@facchinm @jaimemi see pull request #65

Believe this is more or less what @jaimemi is advocating for.

jesmith-all commented 3 years ago

I'll add that the alternative at the moment for students is to setup a Thing as you would want on IoT Cloud, then move to the online IDE, download the IoT Cloud generated sketch, modify a local copy of this library (as in #65), and then upload it from the offline IDE.

That's pretty clunky — I'm writing up a guide for this at the moment. Would be great to have the option to work from the online IDE or even just IoT Cloud.