Have already seen threads about using the BearSSL library but thought to fast track my sketch development I'd look at the sample sketch provided by the IDE. Specifically, Examples->Examples for the Arduino Giga R1->Examples from Custom Libraries->ArduinoBearSSL->WiFiSSLClient. Right away the code won't compile because the #include <WiFi101.h> should actually be #include <WiFi.h>. Then it compiles and successfully executes until it tries to make the connection to the Google server, but does not and exits saying no server connection. Can anyone explain what is going wrong here? We've tried with other server connections and all fail.
The libraries are not the same.
<WiFi101.h>Arduino WiFi Shield 101 / MKR1000 (WINC1500)|
<WiFi.h>ESP32, ESP8266 cores, or WiFiNINA-based boards (Nano 33 IoT, etc.)
I got this on line using Duckduckgo:
<WiFi101.h>
- Designed for Arduino WiFi Shield 101 and MKR1000 (both use the Atmel WINC1500 module).
- Provides
WiFi.begin()
,WiFi.config()
,WiFiServer
,WiFiUDP
, etc., specifically for that hardware github.com+15arduino.cc+15forum.arduino.cc+15. - Includes additional features like secure SSL/TLS support via
connectSSL()
arduino.cc. - Not compatible with ESP boards (ESP8266/ESP32) or non‑WINC1500 shields.
<WiFi.h>
- A more generic name, but actually refers to different WiFi libraries depending on your board:
- On ESP32, Arduino core defines
<WiFi.h>
, targeted at ESP32 WiFi hardware. - On ESP8266, core uses
<ESP8266WiFi.h>
(sometimes with legacy<WiFi.h>
redirects). - On WiFiNINA hardware (like Nano 33 IoT), uses
<WiFiNINA.h>
, also brought in via#include <WiFi.h>
in that core.
- On ESP32, Arduino core defines
Installing the GIGA R1 Board Package in your Arduino IDE automatically provides the WiFi library via the core—no need to separately install WiFi101 or WiFiNINA.
Simply Include it like this: #include <WiFi.h>
That's right. Wifi.h is the correct one. Still doesn't explain why this sketch won't allow connection to the sample server.
Sorry at this point without more information I do not have any other ideas as to what might be causing the problem. Personally I have never used the google server.
Thanks. Just wondering if anyone with a Giga, more experienced than I, could run that example sketch and determine why it doesn’t work, that would help immensely.
There's File > Examples > (Examples for Arduino Giga R1) WiFi -> WiFiSSLClient, which uses
class WiFiSSLClient : public arduino::ASslClient
which is
class ASslClient : public AClient
which are
/*
AClient.h - Copyable Client implementation for Mbed Core
More likely to work; unless there's a particular reason you want to use BearSSL?
Thanks, it works! Looking at earlier threads regarding SSL with the Giga it was said that you could only use the BearSSL. Clearly those were wrong. Much appreciate the help.
I'm back here because the WiFiSSLClient example sketch for the Giga R1 works fine when using the www.google.com site provided in the sketch. However, when using other sites, we cannot even get an initial connection. An example is www.pbs.org. Substitute that one and the sketch ends immediately without getting the connection confirmation.
Our target site for this project is https;//dev.chimeraarts.org.
If we use this URL-> https://dev.chimeraarts.org/equip/validate/621A9A/LASER1/START/ in a browser we get back the expected result. However if we use this site as a replacement for the google site sample, the Giga will not make the connection. Can you help us understand why this isn't working?
We're a Maker space in Northern California and we're conducting Arduino classes and this has stumped us.
Visiting https://dev.chimeraarts.org, you can view the certificate details (steps vary depending on browser) to see that the root certificate is "ISRG Root X1". Internet Security Research Group are the folks behind Let's Encrypt.
Apparently this root cert was added to the Mbed firmware update example two years ago. So you might try updating the firmware, and it will work.
It's easier to add the cert in your sketch. I posted the code for a similar site on an Opta -- same root cert -- earlier this year. (I don't have an Mbed board to try it.)
Also, the example I mentioned previously uses client.connect
, but there's also a connectSSL
. (The code I just linked uses the latter.) Does that make a difference?
Thanks for this answer but it wasn't working for us, until this email just came in from Arduino. I had sent the same issue to them long before I got on the forum
[image] Carlos A. (Arduino)
Jul 10, 2025, 17:10 GMT+2
Hello there,
Thank you for contacting Arduino. I apologize for the late reply.
Currently, the example included in the library for the GIGA is only able to connect to limited internet addresses, such as google.com and arduino.cc. This issue has already been reported to the corresponding team for further investigation. We apologize for the inconvenience.
In the meantime, we recommend using the ESP_SSLClient library, which is available through the Library Manager in the Arduino IDE. This library allows the GIGA to connect to the website you mentioned in your previous message.
I am attaching an example using this library so you can test it on your side.
Hope you find this information helpful. Is there anything else we can assist you with?
Kind regards,
Carlos A.
Arduino Support Team
Attachment(s)
customer-example.ino