🛠 Mises à jour sécurisées et élément de sécurité ATECC608B
Objectives
Understand and leverage the Opta's hardware security chain: the embedded ATECC608B chip is a security element with 16 protected slots for keys and certificates, a unique 72-bit serial number, secure boot support, and X.509 compliance; Arduino announces secure OTA updates and regular cybersecurity assessments. This tutorial covers using OTA via Arduino Cloud (the officially documented path) and best practices for remote deployment.
Hardware
- Arduino Opta (WiFi variant for wireless OTA, or Ethernet for wired OTA)
- An Arduino Cloud account (paid plan required for remote deployment)
- Access to the dashboard at cloud.arduino.cc
- Arduino IDE for the base sketch linked to the thing
Complete code
// opta_ota_cloud.ino — squelette de programme deployable par OTA Arduino Cloud
// Les sections DEFINED VARIABLES/PROPERTIES sont generees par l'editeur cloud ;
// le code ci-dessous montre la logique metier autour.
#include <Arduino.h>
// Genere par Arduino Cloud (extrait representatif) :
// int seuil_temperature; // propriete cloud modifiable a distance
// bool arret_d_urgence; // propriete actionnable depuis le dashboard
unsigned long derniere_pub = 0;
void setup {
Serial.begin(9600);
pinMode(RELAY1, OUTPUT);
digitalWrite(RELAY1, LOW); // etat sur
// cloud.begin et compagnie sont inseres par l'editeur cloud.
}
void loop {
// 1. Synchroniser les proprietes cloud (chemin OTA/telecommande)
// cloud.updateProperties;
// 2. Logique locale : la securite ne depend PAS du cloud
bool urgence = false; // lire un entree physique, jamais une propriete reseau
digitalWrite(RELAY1, urgence ? LOW : HIGH);
// 3. Telemetrie periodique
if (millis - derniere_pub > 5000) {
derniere_pub = millis;
Serial.println("telemetrie publiee");
}
}
Expected verification
A sketch modified in the cloud editor and deployed reaches the connected Opta (Ethernet or WiFi) without on-site intervention; properties modified from the dashboard arrive in the program. The trust chain relies on the Arduino account, the encrypted channel, and the hardware identity provided by the ATECC608B. >
Common errors
- Relying on the cloud for security: a network property "arret_d_urgence" may never arrive (disconnection); safety functions must be read from wired physical inputs.
- Thinking OTA works only over USB: USB-C is for local programming; remote deployment goes through Arduino Cloud (or AWS/Azure IoT, official tutorials).
- Exposing OTA on an unsegmented network: isolate PLCs in a dedicated VLAN; the ATECC608B protects identity but not your cloud password.
- Core confusion: the migration from mbed to ArduinoCore-zephyr changes the loading mechanism (LLEXT + loader); test OTA on a bench before deploying to the entire fleet.
Other tutorials for this board
- Premier sketch : faire clignoter une LED sur Arduino Opta
- Lire une entrée numérique 24 V (capteur de proximité)
- Commander une charge 230 V avec un relais de sortie
- Server Modbus TCP : exposer les relais sur Ethernet
- Lire un capteur analogique 0–10 V sur les entrées Opta
- Remonter des données machine en MQTT via Ethernet
Code examples for this board
relais_securise.inoArduinoentrees_numeriques.inoArduinoanalogique_0_10v.inoArduinomodbus_tcp_esclave.inoArduinomodbus_rtu_maitre.inoArduinomqtt_telemetrie.inoArduino