Closed fengrun85 closed 3 years ago
I commented this lines out, like suggested, but i still get the same -301 Error. I'm using a ESP32.
Is there a way to get this thing working?
I solved this by addin
client.setInsecure();
Into the sketch.
The order of the #define and #include statement matters.
// ... the above line must be before the following 2 includes.
// The #include
Take a look at this example, https://github.com/mathworks/thingspeak-arduino/tree/master/examples/ArduinoMKR1000/WriteSingleFieldSecure
Using Arduino MKR Wifi 1010
Had a sketch pre-2.0 working until I upgraded to 2.0.
I added
#define TS_ENABLE_SSL
and included WifiSSLClient.hError in Serial Monitor was -301
Turned on debug and found that the connection was back to port 80 instead of 443
Commented out two lines in the Thingspeak.h file and it worked.
The check for the WifiSSLClient.h was not working even if I included the library in my sketch.
By default WifiNina library already includes WifiSSLClient in it. In fact, when I first included WifiSSLClient.h, it threw an compile error because it conflicts with Wifi101's WifiSSLClient. I had to delete my Wifi101 to remove this conflict.
Suggest you find a better way to check for Wifi SSL Client