Skip to content

[Bug] Arduino GIGA R1 – HTTPS requests falen op nieuwe boards (WiFiSSLClient) #1091

@PieterBollen

Description

@PieterBollen

When using the Arduino GIGA R1 WiFi we observe different behavior between an older GIGA R1 (purchased around 2023/2024) and a newer GIGA R1 (2025 batch).

The same sketch runs fine on the older board, but on the newer GIGA R1 the connection fails as soon as an HTTPS request is made using WiFiSSLClient.

⚙️ Hardware
• Older GIGA R1 WiFi → HTTPS requests (EnergyZero API) work correctly.
• Newer GIGA R1 WiFi → HTTPS requests fail (red LED starts blinking, no response).
• Same WiFi network, same sketch, same Arduino IDE version.

📂 Problem description
• HTTP requests work (we see a 301 redirect to https).
• HTTPS requests fail on the new GIGA R1 (client.connect() never succeeds, board LED turns red).
• On the older GIGA R1 the exact same sketch works and the JSON data is retrieved successfully.
#include <WiFi.h>
#include <WiFiSSLClient.h>

const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";

const char* host = "api.energyzero.nl";
const int port = 443;

WiFiSSLClient sslClient;

void setup() {
Serial.begin(115200);
delay(1000);

Serial.println("=== EnergyZero HTTPS Test ===");
Serial.println("Connecting to WiFi...");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(250);
Serial.print(".");
}
Serial.println("\n✅ WiFi connected");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());

String url = "/v1/energyprices?fromDate=2025-09-30T00:00:00+00:00"
"&tillDate=2025-10-01T00:00:00+00:00"
"&interval=4&usageType=1&inclBtw=true";

Serial.print("👉 Sending GET request to: https://");
Serial.println(host + url);

if (!sslClient.connect(host, port)) {
Serial.println("❌ Connection failed!");
return;
}

sslClient.println("GET " + url + " HTTP/1.1");
sslClient.println("Host: " + String(host));
sslClient.println("Connection: close");
sslClient.println();

while (sslClient.connected()) {
while (sslClient.available()) {
String line = sslClient.readStringUntil('\n');
Serial.println(line);
}
}

sslClient.stop();
}

void loop() {}
✅ Expected vs. ❌ Actual Results

On the older Arduino GIGA R1 (working board):
• The sketch connects to WiFi.
• The HTTPS request to https://api.energyzero.nl/v1/energyprices?... succeeds.
• Serial Monitor output example:
=== EnergyZero HTTPS Test ===
Connecting to WiFi...
✅ WiFi connected
IP address: 192.168.2.35
👉 Sending GET request to: https://api.energyzero.nl/v1/energyprices?...
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1623
...
{"Prices":[{"readingDate":"2025-09-30T00:00:00Z","price":0.1100}, ... ]}
• ✅ JSON data is received and parsed successfully.

On the newer Arduino GIGA R1 (problematic board):
• The sketch connects to WiFi (IP address is printed).
• When sending the HTTPS request, the connection fails.
• Serial Monitor output example:
=== EnergyZero HTTPS Test ===
Connecting to WiFi...
✅ WiFi connected
IP address: 192.168.2.53
👉 Sending GET request to: https://api.energyzero.nl/v1/energyprices?...
❌ Connection failed!
• After that, the red LED on the GIGA R1 starts blinking (error state).
• No JSON response is received.

📌 Summary:
• Same sketch.
• Same WiFi network.
• Same API endpoint.
• Works fine on the old board, but new board always fails on HTTPS connect.

📝 Conclusion
• The issue is hardware/firmware dependent:
• Old Arduino GIGA R1 → HTTPS works.
• New Arduino GIGA R1 → HTTPS always fails.
• This suggests either:
• A TLS/SSL regression in the firmware of the newer board.
• Or a difference in how the crypto / certificates are handled on the WiFi module.

📢 Suggested GitHub Issue (English)

You can open this on the ArduinoCore-mbed GitHub repo:
👉 https://github.com/arduino/ArduinoCore-mbed/issues

Example issue text:

Title:
[Bug] HTTPS requests fail on new Arduino GIGA R1 boards (works on older boards)

Board

  • Arduino GIGA R1 WiFi
  • Tested with two units:
    • Older board → HTTPS works fine
    • Newer board → HTTPS always fails

Core Version

  • arduino:mbed_giga 4.4.1 (also tested with 4.2.1)

Libraries

  • WiFi.h
  • WiFiSSLClient.h
  • ArduinoHttpClient.h
  • ArduinoJson.h
  • NTPClient.h

Sketch (minimal test case)

#include <WiFi.h>
#include <WiFiSSLClient.h>
#include <ArduinoHttpClient.h>

const char* ssid = "XXXXX";
const char* pass = "XXXXX";

WiFiSSLClient sslClient;
HttpClient client(sslClient, "api.energyzero.nl", 443);

void setup() {
Serial.begin(115200);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) delay(250);

Serial.print("IP: ");
Serial.println(WiFi.localIP());

Serial.println("👉 Sending HTTPS request...");
client.get("/v1/energyprices?fromDate=2025-09-30T00:00:00+00:00&tillDate=2025-10-01T00:00:00+00:00&interval=4&usageType=1&inclBtw=true");

int statusCode = client.responseStatusCode();
String response = client.responseBody();

Serial.print("Status: ");
Serial.println(statusCode);
Serial.println(response);
}

void loop() {}

Expected Result

  • Both boards connect to WiFi.
  • Both boards succeed in HTTPS GET request.
  • Status code 200 and JSON response received.

Actual Result

  • Old board → works as expected.
  • New board → fails with "❌ Connection failed" and red blinking LED.
  • No JSON received.

Notes

  • Same code, same WiFi network, same API endpoint.
  • HTTPS works on older hardware but consistently fails on newer hardware.
  • Appears to be a regression in TLS/SSL handling on new GIGA R1 units.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions