Nouveau : le pare-feu IA surveille toute la plateforme et explique chaque incident en termes simples. Découvrez comment ça marche

Reply To: ESP32 driving a RAK3172 over UART: no reply to AT commands, then how to join

I fought the exact same module for our trailers, three things were wrong in my first try and you have all three I think.

The RAK3172 talks 115200 by default, not 9600. AT commands need rn at the end, print("AT") sends nothing the module acts on. And your TX/RX are the right way round in the wiring but swapped in begin(): the third argument is the ESP32’s RX pin, so it must be the pin wired to the module’s TX.

Serial2.begin(115200, SERIAL_8N1, 17, 16);   // RX=17 (to RAK TX), TX=16
Serial2.print("ATrn");                      // expect OK

Then for joining I send this once at startup:

AT+NWM=1                 // LoRaWAN mode
AT+NJM=1                 // OTAA
AT+BAND=4                // EU868
AT+CLASS=A
AT+DEVEUI=AC1F09FFFE0A1B2C
AT+APPEUI=0000000000000000
AT+APPKEY=<32 hex digits>
AT+JOIN=1:0:10:8         // wait for +EVT:JOINED
AT+SEND=2:0B5A01         // port 2, payload as hex

In Hermetry, Devices, New device, LoRaWAN device, OTAA, and put in the same DevEUI, JoinEUI (all zeros is fine) and AppKey, version 1.0.3, class A. The join badge on the device’s LoRaWAN tab goes to Joined when it works. Steps are on Add an OTAA device.

Still waiting for the gateway to reconnect.
Solution acceptée♥ 6