Connect to thinger through Enterprise WIFI

I can connect my device to thinger through private wifi using the default settings:

thing.add_wifi(SSID, SSID_PASSWORD);

But is it possible if I want to use thinger through an Enterprise WIFI (such as EDUROAM) which require user accounts and passwords and are there any tutorials available online?

Hi @Hans_Wu ,

I never tried to connect an ESP32 or ESP8266 to EDUROAM (but I know some people managed to get it working). If you have a working sketch (without Thinger) to connect to such networks, we can adapt the libraries to support it. Do you have any experience with it?

I am going to run a test later but I haven’t tried yet.
There is a ConnectWithWPA2Enterprise example code in the WIFININA library, which allows Arduino MKR to connect to the Enterprise WIFI, and it works for some people after updating the Arduino firmware.

OK @Hans_Wu, if you can investigate and test it with eduroam, it can be very useful, as I have not an eduroam network near.

Hi @alvarolb ,
I’ve tested the sample code last week but it doesn’t work. I am trying to figuring out the reason and will let you know if I have any progress.

Hello, I have this use case as well, and I would imagine it’s somewhat common.

What I am doing right now is establishing the enterprise WiFi separately from the thinger.add_wifi() call, but it would be really exciting if we could add more than one network and networks of more than one type with the add_wifi() method. I know this “enhancement” exists in the Thinger.io Arduino library github as an issue but hasn’t seen any activity for quite a while: Add support for adding multiple WiFis · Issue #8 · thinger-io/Arduino-Library · GitHub

The main use case here is providing fallback networks. One of the issues I face frequently is devices going offline after an OTA update. If the device could fallback to a known network that can be activated via a mobile phone hotspot, for example, that would be a huge help with regards recovering devices in the field.

If it’s of any help, I can be available to test this. Our code for connecting to enterprise WiFi is pretty simple, it can be done with the built-in WiFi library like so (for PEAP authentication, for the other two supported types, additional certificate parameters would be required):

WiFi.begin(WPA2_SSID, WPA2_AUTH_PEAP, WPA2_IDENTITY, WPA2_USERNAME, WPA2_PASSWORD);

Where WPA2_AUTH_PEAP is one of three available methods defined by WiFi:

typedef enum {
    WPA2_AUTH_TLS = 0,
    WPA2_AUTH_PEAP = 1,
    WPA2_AUTH_TTLS = 2
} wpa2_auth_method_t;

Alex