Hello all,
I have an Arduino program that basically takes in data from some sensors and sends them to a server (AWS).
My issue right now is that I am unable to connect my client to the server. I think there might be something wrong with the server URL, but I have been talking to AWS support and now it seems like the problem may be in my actual code.
Here are the snippets of code that is returning the error:
WiFiClient client;
char server[] = "https://ifuuemgoak.execute-api.us-east-1.amazonaws.com";
int remote_port = 443;
Here is where the error is coming up:
Serial.println("Attempt to connect");
if (!client.connectSSL(server, remote_port)) {
Serial.println("Connection Failed");
return;
}
Obviously, the client is not connecting so it keeps printing "Connection Failed".
I don't know if this helps but when I print WiFi.status() I get WL_CONNECTED, I'm not sure what this means. Could somebody tell me if there is something wrong with my code? Also is there some test server URL I could use to see if connectSSL() is working at all here?
Thanks in advance, let me know if you need any other materials from me.