🛠 Première configuration du module LoRa

Arduino MKR WAN 1310 · intermediaire · Schéma : IMG-mkr-wan-1310-intermediaire-1-mkrwan1310-premiere-config-lora.svg — MKR WAN 1310 reliée à un ordinateur, antenne micro-UFL vissée, flèche vers le module Murata CMWX1ZZABZ et la mise à jour du firmware.

Objectives

Get the LoRa radio of the MKR WAN 1310 up and running: the Murata CMWX1ZZABZ module embeds a second processor (STM32L0 + Semtech SX1276 transceiver) that communicates via AT commands over SPI. We update its firmware, then check the version, band, and radio serial number (deviceEUI). Note: this board has no Wi-Fi or Bluetooth; connectivity is LoRa/LoRaWAN only.

Hardware

Complete code

// Mise en route du module : version, bande, deviceEUI — MKR WAN 1310
#include <MKRWAN.h>

LoRaModem modem; // module embarqué (SPI + broches de contrôle)

void setup {
  Serial.begin(115200);
  while (!Serial);
  // Étape 1 : lancer l'exemple MKRWAN > MKRWANFWUpdate_standalone UNE fois
  // pour flasher le firmware AT récent (sinon "Firmware version mismatch").
  if (!modem.begin(EU868)) {          // bande choisie à l'exécution (AT+BAND)
    Serial.println("Demarrage module impossible");
    while (1) {}
  }
  Serial.print("Firmware AT : "); Serial.println(modem.version);
  Serial.print("deviceEUI  : "); Serial.println(modem.deviceEUI);
  // Le deviceEUI sert à enregistrer l'objet sur The Things Network.
}

void loop {}

Expected verification

The console displays a firmware version (1.1.x or 1.2.x) and a 16-digit hexadecimal deviceEUI. These two values should be noted for the following LoRaWAN tutorials.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials