i’m trying to send sensor data to lora server, it was work but it didn’t got any data ,
here is my code
// Should be a message for us now
uint8_t len = sizeof(buf);
if (rf95.recv(buf, &len))
RH_RF95::printBuffer("request: ", buf, len);
Console.print("got request: ");
// Send a reply
uint8_t data = "abc";
Console.println("Sent a reply");
I’m new in coding and very appreciate to fix my code
You appear to be using RadioHead or similar code which uses the radio to send simple LoRa-modulated packets. That may be useful for a few, simple, point-to-point cases.
In contrast, LoRaServer implements LoRaWAN - a rather complex higher level protocol built on top of LoRa. To communication with LoRaServer, your node will need to implement a full LoRaWAN stack.
It’s not a question of fixing your existing code, but rather of starting over from a demo of a LoRaWAN software stack.
Things you might look at:
Additionally, keep in mind that RadioHead expects to be running point-to-point between two node-class radios like the RFM95 (or the SX1276 found in it). In contrast, LoRaServer expects to be connected (via the Internet or local loopback) to one or more gateways based on a “LoRa Concentrator” using the the far more expensive SX130x multichannel receive processors, and to use that to interact with a variety of nodes.