Hi @PeteKnight, I having some issue on connecting to the Blynk IoT. I manage to connect my esp32 module to WPA2 enterprise WIFI. Attached is the code that I manage to connect to NETWORK, I got comment out the part that failed to link with Blynk.
#include <WiFi.h> //Wifi library
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include "esp_wpa2.h" //wpa2 library for connections to Enterprise networks
#define EAP_IDENTITY "xxx"
#define EAP_PASSWORD "xxx"
#define BLYNK_TEMPLATE_ID "xxx"
#define BLYNK_DEVICE_NAME "xxx"
#define BLYNK_AUTH_TOKEN "xxx"
#define BLYNK_PRINT Serial
//SSID NAME
const char* ssid = "xxxx";
char auth[] = BLYNK_AUTH_TOKEN;
char pass[] = EAP_PASSWORD;
void setup() {
Serial.begin(115200);
delay(10);
Serial.println();
Serial.print(F("Connecting to network: "));
Serial.println(ssid);
WiFi.disconnect(true); //disconnect form wifi to set new wifi connection
WiFi.mode(WIFI_STA); //init wifi mode
WiFi.begin(ssid, WPA2_AUTH_PEAP, EAP_IDENTITY, EAP_IDENTITY, EAP_PASSWORD); //without CERTIFICATE, NO ANONYMOUS IDENTITY
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(F("."));
}
Serial.println("");
Serial.println(F("WiFi is connected!"));
Serial.println(F("IP address set: "));
Serial.println(WiFi.localIP()); //print LAN IP
//Blynk.begin(auth, ssid, pass);
}
void loop() {
//Blynk.run();
yield();
}
I still not manage connect to Blynk application. I have enter all the important information which incluse auth token , device name , template id and so on. I have shift the circled code to the top. I got try to serial print “HI” after the blynk.begin but nothing appears.
#include <WiFi.h> //Wifi library
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include "esp_wpa2.h" //wpa2 library for connections to Enterprise networks
#define BLYNK_TEMPLATE_ID "xxx"
#define BLYNK_DEVICE_NAME "xxx"
#define BLYNK_AUTH_TOKEN "k7kzZF8NpkVTLjWtO2bog9iRyWQt--z6"
#define EAP_IDENTITY "xxx"
#define EAP_PASSWORD "xxx"
#define BLYNK_PRINT Serial
//SSID NAME
char auth[] = BLYNK_AUTH_TOKEN;
const char* ssid = "xxx";
char username[] = EAP_IDENTITY;
char pass[] = EAP_PASSWORD;
void setup() {
Serial.begin(115200);
delay(10);
Serial.println();
Serial.print(F("Connecting to network: "));
Serial.println(ssid);
WiFi.disconnect(true); //disconnect form wifi to set new wifi connection
WiFi.mode(WIFI_STA); //init wifi mode
WiFi.begin(ssid, WPA2_AUTH_PEAP, EAP_IDENTITY, EAP_IDENTITY, EAP_PASSWORD); //without CERTIFICATE, NO ANONYMOUS IDENTITY
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(F("."));
}
Serial.println("");
Serial.println(F("WiFi is connected!"));
Serial.println(F("IP address set: "));
Serial.println(WiFi.localIP()); //print LAN IP
Blynk.begin(auth, ssid, username, pass);
}
void loop() {
Blynk.run();
yield();
}
Hi @PeteKnight , I still get the same output which the WIFI is connected but didn’t manage to link to Blynk. Below is the code is this what u mean? got try to serial print “HI” after the blynk.begin but nothing appears, i only print until showing the ip address
#define BLYNK_TEMPLATE_ID "xxx"
#define BLYNK_DEVICE_NAME "xxx"
#define BLYNK_AUTH_TOKEN "xxx"
#include <WiFi.h> //Wifi library
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include "esp_wpa2.h" //wpa2 library for connections to Enterprise networks
#define EAP_IDENTITY "xxx"
#define EAP_PASSWORD "xxx"
#define BLYNK_PRINT Serial
//SSID NAME
char auth[] = BLYNK_AUTH_TOKEN;
const char* ssid = "xxx";
char pass[] = EAP_PASSWORD;
void setup() {
Serial.begin(115200);
delay(10);
Serial.println();
Serial.print(F("Connecting to network: "));
Serial.println(ssid);
WiFi.disconnect(true); //disconnect form wifi to set new wifi connection
WiFi.mode(WIFI_STA); //init wifi mode
WiFi.begin(ssid, WPA2_AUTH_PEAP, EAP_IDENTITY, EAP_IDENTITY, EAP_PASSWORD); //without CERTIFICATE, NO ANONYMOUS IDENTITY
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(F("."));
}
Serial.println("");
Serial.println(F("WiFi is connected!"));
Serial.println(F("IP address set: "));
Serial.println(WiFi.localIP()); //print LAN IP
Blynk.begin(auth, ssid, pass);
}
void loop() {
Blynk.run();
yield();
}
Try hitting the + New Topic button, select the category of “Need help with my project” then start reading. Copy the text if necessary, then abandon the process of creating the new topic.
Provide ALL of the requested information, plus the other things I’ve asked for (serial monitor output that isn’t a screenshot etc).
Once you’ve done that we’ll carry-on the discussion.
Hi, this is the information needed.
Hardware model :NodeMCU - 32S
Smartphone OS : android vsersion 12
Blynk server is used.
Blynk library version is 1.1.0
HI @PeteKnight, I having some issue on connecting to the Blynk IoT. I manage to connect my esp32 module to WPA2 enterprise WIFI. Attached is the code that I manage to connect to NETWORK but failed to link with Blynk.server.
The serial monitor shows that the wifi is connected and the ip address is printed on the serial monitor. But the message after the Blynk.begin() is not printed , thanks
16:50:02.003 → Connecting to network: LabWLAN
16:50:02.614 → …
16:50:07.971 → WiFi is connected!
16:50:07.971 → IP address set:
16:50:07.971 → 10.158.102.11
#define BLYNK_TEMPLATE_ID "xxx"
#define BLYNK_DEVICE_NAME "xxx"
#define BLYNK_AUTH_TOKEN "xxx"
#include <WiFi.h> //Wifi library
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include "esp_wpa2.h" //wpa2 library for connections to Enterprise networks
#define EAP_IDENTITY "xxx"
#define EAP_PASSWORD "xxx"
#define BLYNK_PRINT Serial
//SSID NAME
char auth[] = BLYNK_AUTH_TOKEN;
const char* ssid = "xxx";
//char username[] = EAP_IDENTITY;
//char pass[] = EAP_PASSWORD;
//BlynkTimer timer;
void setup() {
Serial.begin(115200);
delay(10);
Serial.println();
Serial.print(F("Connecting to network: "));
Serial.println(ssid);
WiFi.disconnect(true); //disconnect form wifi to set new wifi connection
WiFi.mode(WIFI_STA); //init wifi mode
WiFi.begin(ssid, WPA2_AUTH_PEAP, EAP_IDENTITY, EAP_IDENTITY, EAP_PASSWORD); //without CERTIFICATE, NO ANONYMOUS IDENTITY
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(F("."));
}
Serial.println("");
Serial.println(F("WiFi is connected!"));
Serial.println(F("IP address set: "));
Serial.println(WiFi.localIP()); //print LAN IP
//Blynk.begin(auth, ssid, pass);
Blynk.begin(auth, ssid, EAP_PASSWORD);
Serial.println("connected to the Blynk server");
}
void loop() {
Blynk.run();
yield();
}
I gave you a variety of possible things to try, and steps to follow in my last post, and you’ve responded with a serial monitor output which seems to show that you’ve tried using SSL, but you’ve not provided any more information about other things that you’ve tried, and what the results were.