RAKWireless / rak_common_for_gateway

214 stars 124 forks source link

how to retransmit data in LoRa with the "RAK2245 Pi HAT" of the RAK7244C ? #49

Open tpxkhero opened 3 years ago

tpxkhero commented 3 years ago

Hello, I have a university project with the rak7244c, on which I have to pass the "RAK2245 Pi HAT" as a device. The Rak is not connected to the internet and I have to retransmit the data to another gateway. The problem is that I receive the data in LoRa and I have to retransmit it in LoRa too. Unfortunately I have never worked on LoRa and I have no idea how to make the "RAK2245 Pi HAT" retransmit in LoRa.

Is it possible? If yes, do you have any information on how to do it?

TaylorIsAGoodboy commented 2 years ago

RAK7244c can connect internet. please refer to https://downloads.rakwireless.com/LoRa/Pilot-Gateway-Pro-RAK7243/Application-Notes/

cstratton commented 2 years ago

I believe the question concerned a traffic forwarding role for a gateway where no traditional Internet service was available.

Operating the radio on a LoRa concentrator card is fairly complicated. There are some test programs built as part of the lora HAL which can transmit, but that may not be the best course of action, since there's no way in those to toggle between transmit and receive.

Rather, I'd recommend running a classic UDP packet forwarder, and then writing a custom local program for it to talk to rather than a network server. Your custom program can both do whatever is appropriate with the receive signal reports from the packet forwarder, and craft the desired transmit commands to push back through it. There's some move away from using UDP forwarders to talk to an external network server, but here both programs run on the same computer and you'd just be bouncing UDP packets through the virtual loopback network interface created by the hosting operating system.

The UDP protocol is documented here: https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT

(Content from that repo or its alternatives for different sx130x chips is pulled in when you build from this one, there may be a tiny protocol difference with some of the later chips, so check their repos for documentation, too)