🛠 Antenne et pièges RF du déploiement
Objectives
Master the radio part: antenna connector, antenna selection, SIM insertion, and RF errors that cause a perfectly wired deployment to fail. The SARA-R410M-02B module covers LTE bands 2/3/4/5/8/12/13/20/28 — the antenna must cover them (in Europe: B3 1800 MHz and B20 800 MHz for NB-IoT/LTE-M).
Hardware
- 1 MKR NB 1500 board
- Cellular antenna with its connector: the board uses an external antenna connector
- 1 data SIM card in the format expected by the connector
- Optionally, a remote antenna with an SMA cable for an enclosure
Complete code
// Test terrain : qualite du lien apres choix d'emplacement
#include <MKRGSM.h>
#include "arduino_secrets.h"
const char PINNUMBER[] = SECRET_PINNUMBER;
GSM gsm;
void setup {
Serial.begin(9600);
while (!Serial);
Serial.println("Attente enregistrement (max 3 min)...");
unsigned long t0 = millis;
while (gsm.begin(PINNUMBER) != GSM_READY) {
if (millis - t0 > 180000UL) {
Serial.println("ECHEC : pas de reseau -> antenne ? SIM ? couverture ?");
for (;;);
}
delay(1000);
}
Serial.println("Enregistre.");
// Sonde le modem : reponse AT+CSQ affiche rssi/ber
gsm.sendModemCommand("AT+CSQ", &Serial);
}
void loop {}
Expected verification
With the correct antenna and in a covered area, registration succeeds in less than 3 minutes and AT+CSQ returns a usable RSSI (see diagnostic tutorial). Move the board by 50 cm or rotate the antenna: the RSSI should vary — this is the cheapest test for your installation.
Common errors
- Powering up without an antenna: the module transmits at maximum power while searching for a network, which is inefficient and not recommended; always connect the antenna first.
- Metal enclosure or enclosure with a metal door: it attenuates the signal by 20 to 60 dB — use a plastic enclosure or a remote antenna.
- Poorly clipped U.FL connector: it unclips with barely a quarter turn; check the "click" after any transport.
- SIM inserted backwards or in the wrong format: forcing it bends the pins; locate the beveled corner.
- Low-cost "all networks" antenna tuned for 2.4 GHz (WiFi): ineffective on B20; choose an LTE 698–2700 MHz antenna.
- NB-IoT/LTE-M coverage varies significantly by operator and country: test on-site before industrializing.
Other tutorials for this board
Code examples for this board
attente-lte-nbiot.inoArduinochoix-bande.inoArduinopublish-mqtt-minimal.inoArduinoeconomie-energie.inoArduinogeoloc-cellules.inoArduinotest-coverage.inoArduino