diff --git a/libraries/WiFiS3/examples/WiFiWebClientSSL/WiFiWebClientSSL.ino b/libraries/WiFiS3/examples/WiFiWebClientSSL/WiFiWebClientSSL.ino index 4efdb3ee6..ee7afc531 100644 --- a/libraries/WiFiS3/examples/WiFiWebClientSSL/WiFiWebClientSSL.ino +++ b/libraries/WiFiS3/examples/WiFiWebClientSSL/WiFiWebClientSSL.ino @@ -1,8 +1,8 @@ /* TLS WiFi Web client - Remember to update the CA certificates using CertificateUploader sketch - before using this sketch. + Board CA Root certificate bundle is embedded inside WiFi firmware: + https://github.com/arduino/uno-r4-wifi-usb-bridge/blob/main/certificates/cacrt_all.pem Find the full UNO R4 WiFi Network documentation here: https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples#wi-fi-web-client-ssl @@ -12,7 +12,7 @@ #include "WiFiSSLClient.h" #include "IPAddress.h" -#include "arduino_secrets.h" +#include "arduino_secrets.h" ///////please enter your sensitive data in the Secret tab/arduino_secrets.h char ssid[] = SECRET_SSID; // your network SSID (name) @@ -31,41 +31,41 @@ WiFiSSLClient client; /* -------------------------------------------------------------------------- */ void setup() { -/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ //Initialize serial and wait for port to open: Serial.begin(115200); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } - + // check for the WiFi module: if (WiFi.status() == WL_NO_MODULE) { Serial.println("Communication with WiFi module failed!"); // don't continue while (true); } - + String fv = WiFi.firmwareVersion(); if (fv < WIFI_FIRMWARE_LATEST_VERSION) { Serial.println("Please upgrade the firmware"); } - + // attempt to connect to WiFi network: while (status != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); Serial.println(ssid); // Connect to WPA/WPA2 network. status = WiFi.begin(ssid, pass); - + // wait 10 seconds for connection: delay(10000); } - + printWifiStatus(); - + Serial.println("\nStarting connection to server..."); // if you get a connection, report back via serial: - + if (client.connect(server, 443)) { Serial.println("connected to server"); // Make a HTTP request: @@ -79,7 +79,7 @@ void setup() { /* just wrap the received data up to 80 columns in the serial print*/ /* -------------------------------------------------------------------------- */ void read_response() { -/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ uint32_t received_data_num = 0; while (client.available()) { /* actual data reception */ @@ -88,15 +88,15 @@ void read_response() { Serial.print(c); /* wrap data to 80 columns*/ received_data_num++; - if(received_data_num % 80 == 0) { + if(received_data_num % 80 == 0) { Serial.println(); } - } + } } /* -------------------------------------------------------------------------- */ void loop() { -/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ read_response(); // if the server's disconnected, stop the client: @@ -112,7 +112,7 @@ void loop() { /* -------------------------------------------------------------------------- */ void printWifiStatus() { -/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ // print the SSID of the network you're attached to: Serial.print("SSID: "); Serial.println(WiFi.SSID());