@filq
Hi,
After a long time, I succeeded to transmit a signal directly between 2 lorawan units without going through a router. but without being able to pass data
My configuration: 2 m5stack core + 2 lorawan unit, identical program.
I use the test functions:
the first m5stack, button A: "AT+CTX=868123000,0,22\r\n"
the second m5stack, button B: "AT+CRX=868123000,0\r\n"
or vice versa, it works.
Bonne journée
Christian
void setup()
{
init();
M5.Lcd.print("start\r\n");
Serial2.begin(115200, SERIAL_8N1, RX_PIN, TX_PIN); //Serial port 2 initialization
delay(500);
if (LoraWaitMsg(200))Serial.println(response);
LoraSendCmd("AT+CGSN?\r\n");// read serial number, optional
if (LoraWaitMsg(200))Serial.println(response);
}
void loop()
{
if (M5.BtnA.wasPressed())
{
M5.Lcd.print("send tx \r\n");
LoraSendCmd("AT+CTX=868123000,0,22\r\n");// set tx test
if (LoraWaitMsg(200))Serial.println(response);
}
if (M5.BtnB.wasPressed())
{
M5.Lcd.print("receive rx \r\n");
LoraSendCmd("AT+CRX=868123000,0\r\n");// set rx test
if (LoraWaitMsg(200))Serial.println(response);
}
if (M5.BtnC.wasPressed())
{
M5.Lcd.clear();
DispBtn();
M5.Lcd.setCursor(0, 10);
}
if (LoraWaitMsg(200))
{
M5.Lcd.clear();
M5.Lcd.setCursor(0, 10);
Serial.println(response);
M5.Lcd.print("receive : ");
M5.Lcd.print(response + "\r\n");
}
delay (100);
M5.update();
}