Arduino IOT Cloud Detailed Architecture for MQTT, OTA, Enrollment

Hi!

I was looking for any documentation regarding the details of the Arduino IoT Cloud architecture.

I could not find this anywhere on the Arduino website, so I went through the code, but as it has been a while since I used C++, not everything was transparent to me.

The reason for this question is I wanted to fully self-host a version of Arduino IoT Cloud, and I think it should be doable with Mosquitto, Node RED, InfluxDB, Grafana, and maybe a small web server for the OTA updates.

Here's what I have so far, plus pieces I am missing. Any help would be greatly appreciated! Also, please correct anything that I got wrong information here.

Device Initialisation

Device enrolment done with initial sketch from Arduino cloud, with this sketch I assume being uploaded through the Arduino Connect Agent.

Not sure what the contents are, and what it does, besides generating Thing ID and registering a client certificate with the Arduino Mosquitto broker.

MQTT Broker

To self-host, we would need to generate CA and server certificate for mosquitto.

Then to have the MQTT server cert embedded in the code in AIoTSSCert.h of the Arduino IoT Cloud library.

What are the topic structures for the MQTT?

Principle of Operation

I assume everything is done through MQTT?

It appears that a self-hosted MQTT broker could be passed as an argument to the Arduino IoT Cloud library, with begin(bool const enable_watchdog, String brokerAddress, uint16_t brokerPort).

OTA

OTA seems to be done through a link sent to the device and an OTA_REQ flag.

What else needs to be provided for OTA to work? It says the CRC is verified, where is that stored? MQTT?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.