How to connect MQTT with TLS for Arduino R4 Wifi

Sorry, I'm new with Arduino. I see many tutorial show that we can connect aws iot to arduino esp32, esp8266 by mqtt(TLS). But there are not any examples for Uno R4 Wifi. Is there any way to do it?. Below is the CACert, Device Cert, private key , from esp32, esp8266 tutorial, which is used to send mqtt message to aws IOT

@JohnMith1, Did you get any movement on this. I'd like to connect an Arduino R4 wifi to AWS but am just getting into the TLS 1.2 requirements.

Thank you

Although it has been long time since the last post, I would like to provide information here that may be useful for someone who are looking for it.

At current time, the WIFiS3 library of Arduino Uno R4 has not had functions to set the client certificate and private key. Therefore, it is impossible to connect to AWS IoT.

I think that it will be possible in the future. To know if it is possible or not, you can check the library WiFiS3/src/WiFiSSLClient.h. Currently, it supports only setCACert() function. If the functions for setting Cert and Private key are available, it is possible to connect to AWS IoT.

At the current, you can use Arduino Nano ESP32 instead of Arduino Uno R4 WiFi to connect to AWS IoT. You can refer to the Arduino Nano ESP32 - AWS IoT tutorial.

So glad you posted this. With just enough understanding about TLS and certs to be dangerous (mainly from YouTube aws iot tutorials for ESP32 that work fine with WiFi.h and WiFiClientSecure.h), I have been trying to find the secret sauce to make the R4 WiFi work with AWS IoT Core. Your insight on the missing functions in WiFiSSLClient.h for the other certs has constantly nagged me and I thought maybe there was some magic library I should be using instead. Like a detective on a murder case, I just couldn't let it go and kept going over everything again and again thinking I was missing something. However, after several weeks of searching (albeit I learned a ton and am grateful), I saw you post a day ago and was relieved that I could finally put the R4 aside for now. Looking at using the Nano ESP32 or maybe just a straight ESP32-S3. It seems if I don't have any need for the Nano footprint I could do without the extra microcontroller. Anyway, THANK YOU!

1 Like