🛠 Mises à jour OTA et flash local DFU avec Particle CLI

Particle Boron · avance · Schéma : IMG-particle-boron-avance-3-boron-ota-flash-dfu.svg — deux chemins de mise à jour firmware : par le cloud Particle (OTA sans fil) et par USB en mode DFU avec le bouton MODE, vers la mémoire flash du Boron.

Objectives

The Boron bootloader accepts several update paths: OTA via the Particle cloud (remote particle flash), USB in DFU mode, Serial Y-Modem, and even factory re-flashing via buttons. Knowing how to switch between OTA and DFU is the absolute troubleshooting skill: a board that no longer boots, firmware that crashes before cloud connection, or a device "bricked" by deep discharge can be recovered in DFU. You will learn both workflows, Device OS version management (the BRN404X requires 4.x LTS and cannot run on 2.x), and listening mode for network reconfiguration.

Hardware

Complete Code

The test firmware, intentionally verbose to observe each step:

// Boron — firmware de test de mise a jour
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(SEMI_AUTOMATIC);

void setup {
    Serial.begin(9600);
    Serial.println("Firmware v2 OK");   // changez le numero a chaque flash
    Cellular.on;
    Cellular.connect;
}

void loop {
    if (Cellular.ready) {
        Particle.publish("fw", "v2", PRIVATE);
    }
    delay(300000);
}

The workflow commands:

# 1) OTA par le cloud (device online) :
particle list
particle flash <device> firmware.bin

# 2) Local via USB, device en mode normal :
particle flash --usb firmware.bin

# 3) DFU (device injoignable) : maintenir Reset, pulsation courte sur MODE,
#    relacher Reset, la LED clignote en jaune -> mode DFU
particle flash --usb firmware.bin
# ou en bas niveau :
dfu-util -d 2b04:d00d -a 0 -s 0x1000:leave -D firmware.bin

# 4) Revenir en mode normal si bloque :
particle usb start-mode normal
particle doctor

Expected Verification

In OTA: particle flash ends with "Flashing was successful" and the device comes back online with the new version (new serial line "Firmware v2 OK", fw event published). In DFU: the LED turns blinking yellow before flashing, dfu-util lists the device (dfu-util -l), and the board restarts on the new firmware. Recovery test: flash a firmware that crashes, then recover it in DFU — this is your safety net.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials