XIAO ESP32S3 & Wio-SX1262 Meshtastic impossible to update firmware

#include <Wire.h>
#include <Adafruit_AHTX0.h>

#define LORA_SERIAL Serial1
#define LORA_BAUD 9600
#define RXD2 7 // XIAO GPIO7 → Wio-E5 TX
#define TXD2 6 // XIAO GPIO6 → Wio-E5 RX

Adafruit_AHTX0 aht;

const char* DEV_EUI = “XXXXXXXXXXXXXXX”;
const char* APP_EUI = “XXXXXXXXXXXXXXX”;
const char* APP_KEY = “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”;

#define SOIL_SENSOR_PIN A0

void sendAT(String cmd, int wait = 1000) {
LORA_SERIAL.println(cmd);
delay(wait);
while (LORA_SERIAL.available()) {
Serial.write(LORA_SERIAL.read());
}
}

void joinLoRaWAN() {
sendAT(“AT+ID=DevEui,” + String(DEV_EUI));
sendAT(“AT+ID=AppEui,” + String(APP_EUI));
sendAT(“AT+KEY=APPKEY,” + String(APP_KEY));
sendAT(“AT+MODE=LWOTAA”);
sendAT(“AT+DR=EU868”);
sendAT(“AT+JOIN”, 5000);
}

void setup() {
Serial.begin(115200);
delay(1000);

LORA_SERIAL.begin(LORA_BAUD, SERIAL_8N1, RXD2, TXD2);
delay(1000);

if (!aht.begin()) {
Serial.println(“:x: Erro ao inicializar o sensor AHT20.”);
} else {
Serial.println(“:white_check_mark: AHT20 iniciado com sucesso.”);
}

joinLoRaWAN();
}

void loop() {
sensors_event_t humidity, temperature;
aht.getEvent(&humidity, &temperature);

float temp = temperature.temperature;
float hum = humidity.relative_humidity;
int soil = analogRead(SOIL_SENSOR_PIN);

Serial.printf(“:thermometer: Temp: %.2f°C | :droplet: Hum: %.2f%% | :seedling: Solo: %d\n”, temp, hum, soil);

uint16_t temp_int = (uint16_t)(temp * 100);
uint16_t hum_int = (uint16_t)(hum * 100);
uint16_t soil_int = (uint16_t)soil;

char payload[20];
sprintf(payload, “%04X%04X%04X”, temp_int, hum_int, soil_int);

String cmd = “AT+MSGHEX="” + String(payload) + “"”;
Serial.println(":satellite: Enviando: " + cmd);
sendAT(cmd, 3000);

delay(10 * 60 * 1000);
}

It’s better like this? I have a couple lines in portuguese but should not interfere with the rest of the code