Enterprise WPA and ESP32
I recently gave Adafruit's IO service a try. You can get a few data sensor feeds recorded and graphed on the web. They have a somehow limited version for free and a more complete offering for paying customers.
A current project required to record a few sensor samples per minute and Adafruit's free service seemed to fit the bill. I was using ESP32 with BME280 sensor to gather humidity, temperature, and atmospheric pressure and to store it somewhere in the cloud.
I was testing this on campus, where we have a corporate wifi network that uses a Radius server for PEAP authentication. I assumed ESP32 could only use WPA with a pre-shared key but I was wrong. I googled around and found that some people were using it with Eduroam. Eduroam is a European-wide Academic wifi network and it is present in our campus too, so what harm was in trying?
I found this code that might work so I tried it out, and it did work at the first try! Brilliant!
But there were a couple of details that did not work ok. On the one hand, I was using my personal account for getting this access to work, that means I needed to use my personal credentials on the board's firmware so it can connect. On the other hand, though wifi connection was quick and worked ok, security policy blocked all traffic except HTTP protocol. That meant I could not use it for MQTT protocol which, you have guessed, it was the protocol I was using for sending sensor data to the cloud server.
So, while I had access to the campus network, it was useless for my purpose. A long time ago, I had noticed another SSID on the campus network with IoT on its name. A bit of digging lead me to learn that security policies on that other network allowed a wider number of protocols, so after a significant number of email messages and phone calls, I obtained temporary user credentials that will allow me to connect to that other network, same PEAP/MSCHAPv2 authentication as we have in Eduroam, and finally get the ESP32 board to use the campus network with MQTT protocol. The image above shows a sample case of temperature information gathered while I was writing this entry.
A current project required to record a few sensor samples per minute and Adafruit's free service seemed to fit the bill. I was using ESP32 with BME280 sensor to gather humidity, temperature, and atmospheric pressure and to store it somewhere in the cloud.
I was testing this on campus, where we have a corporate wifi network that uses a Radius server for PEAP authentication. I assumed ESP32 could only use WPA with a pre-shared key but I was wrong. I googled around and found that some people were using it with Eduroam. Eduroam is a European-wide Academic wifi network and it is present in our campus too, so what harm was in trying?
I found this code that might work so I tried it out, and it did work at the first try! Brilliant!
But there were a couple of details that did not work ok. On the one hand, I was using my personal account for getting this access to work, that means I needed to use my personal credentials on the board's firmware so it can connect. On the other hand, though wifi connection was quick and worked ok, security policy blocked all traffic except HTTP protocol. That meant I could not use it for MQTT protocol which, you have guessed, it was the protocol I was using for sending sensor data to the cloud server.
So, while I had access to the campus network, it was useless for my purpose. A long time ago, I had noticed another SSID on the campus network with IoT on its name. A bit of digging lead me to learn that security policies on that other network allowed a wider number of protocols, so after a significant number of email messages and phone calls, I obtained temporary user credentials that will allow me to connect to that other network, same PEAP/MSCHAPv2 authentication as we have in Eduroam, and finally get the ESP32 board to use the campus network with MQTT protocol. The image above shows a sample case of temperature information gathered while I was writing this entry.
Comments