🛠 Scanner les réseaux WiFi avec le module 1DX
Objectives
First network step with the GIGA R1 WiFi: use the embedded Murata 1DX (LBEE5KL1DX-883) radio module — WiFi 802.11b/g/n 2.4 GHz up to 65 Mbps + Bluetooth LE — to list nearby networks. You will understand the role of the u.FL antenna, the difference between the two available Arduino cores (mbed and Zephyr), and the FlashFormat reflex if the scan returns nothing.
Hardware
- Arduino GIGA R1 WiFi board
- Whip u.FL antenna screwed onto the u.FL connector — the board has no embedded antenna: without it, range collapses and the scan sees almost nothing
- USB-C cable + Arduino IDE 2.x with the "Arduino Giga R1" core installed (here the Zephyr core, FQBN
arduino:zephyr:giga)
Complete code
// GIGA R1 WiFi — scan des reseaux (core Zephyr, condense de ScanNetworksAdvanced)
#include <WiFi.h>
void setup {
Serial.begin(9600);
while (!Serial) {} // attend le moniteur (USB0 = USB-C)
if (WiFi.status == WL_NO_MODULE) {
Serial.println("Communication avec le module WiFi impossible !");
Serial.println("Verifiez l'antenne u.FL, puis lancez le sketch FlashFormat du core.");
while (true);
}
Serial.println("Scan en cours...");
}
void loop {
int n = WiFi.scanNetworks; // scan seul, sans connexion
if (n <= 0) { Serial.println("Aucun reseau, nouvelle tentative..."); delay(1000); return; }
Serial.print(n); Serial.println(" reseaux trouves :");
for (int i = 0; i < n; i++) {
Serial.print(WiFi.RSSI(i)); // signal en dBm
Serial.print("\tCh "); Serial.print(WiFi.channel(i));
Serial.print("\t"); Serial.print(WiFi.encryptionType(i));
Serial.print("\t"); Serial.println(WiFi.SSID(i));
}
delay(10000); // un scan toutes les 10 s
}
Expected verification
The serial monitor displays the list of SSIDs in range, along with the signal level in dBm, the channel, and the encryption type for each. Your router (2.4 GHz only — the 1DX does not support 5 GHz) should appear with an RSSI between approximately -30 dBm (very strong) and -80 dBm (limit).
Common errors
- u.FL antenna forgotten: this is THE peculiarity of this board; the antenna is included in the box but not installed. Without it, you get
WL_NO_MODULEor zero networks. - Empty scan after a core change: the 1DX firmware may be corrupted by failed updates; run the FlashFormat sketch provided with the core to restore it.
- mbed / Zephyr confusion: both cores exist ("Arduino Mbed OS Giga Boards" and "Arduino Zephyr Boards") and their WiFi library is specific to each; keep the same core for compiling and uploading.
- Searching for 5 GHz in vain: the module only supports 2.4 GHz 802.11b/g/n.
Other tutorials for this board
Code examples for this board
clignotante.inoArduinobouton.inoArduinorespiration.inoArduinoanalogique.inoArduinodac-onde.inoArduinooled-i2c.inoArduino