Replies: 1 comment
-
Sorry, in above I meant to say the ESP32DevelopmentBoardSecure script. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I copied the script ESP32DevelopmentBoard.ino to run on an ESP32 Dev board under PlatformIO. It fails with the error:
.[E][WiFiClientSecure.cpp:127] connect(): start_ssl_client: -1
A quick web search found this solution: espressif/arduino-esp32#4992
The corrected connect() looks like this
void connect() {
Serial.print("checking wifi...");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(1000);
}
Serial.print("\nconnecting...");
net.setInsecure();
while (!client.connect("Arduino", "public", "public")) {
Serial.print(".");
delay(1000);
}
with the extra "net.setInsecure()" call it now connects. I don't understand why it needs to be Insecure, but there it is.
All the best, Kevin
Beta Was this translation helpful? Give feedback.
All reactions