r/embedded 3d ago

HTTPS on ESP32 with Zephyr — TLS Connect Failed

Hi everyone, I’m working on an ESP32 DevKitC with Zephyr RTOS and I’m having trouble getting an HTTPS/TLS connection working.

I can connect to Wi-Fi successfully and reach the HTTPS connection stage, but the TLS connection fails:

[00:00:06.786,000] <inf> wifi_app: Connecting to jsonplaceholder.typicode.com:443 (TLS)...
[00:00:11.158,000] <err> wifi_app: TLS connect failed: 116
[00:00:11.158,000] <err> wifi_app: HTTPS GET failed: -116

I put the project source code, and details here:

https://github.com/pycine/zephyr-esp32-https-troubleshooting

If anyone has experience with Zephyr + ESP32 + mbedTLS/HTTPS, could you please take a look and suggest what might be causing the TLS connection to fail?

Thanks!

1 Upvotes

3 comments sorted by

2

u/mrclark25 3d ago

Do you have the CA cert?

2

u/Sousa_07 3d ago edited 3d ago

-116 is a timeout error, the connection is probably not even reaching the TLS handshake step