I am using RUI3 V4.2.0 and trying the LoRa P2P communication. I am attaching the code. The device is transmitting the first time but after that it is not transmitting. After every reset it will send the data once. I have flashed the AT command firmware and tried sending data using AT+PSEND=data and it is successfully working multiple times.
In header file lora_util.h i have defined as follows #define LORA_BAND (LORA_REGION_IN865) #define LORA_REGION_IN865 865000000 #define LORA_REGION_EU868 868000000
That should work right? Or should I give it directly in the API without using macros?
Why do you use api.system.restoreDefault();?
It is not necessary to restore system defaults on every reboot. It is only needed if something is messed up with the settings.