Store PyGate Messages
-
@Gijs more importantly, if I’m not mistaken, frames are transported encrypted until they reach the LNS, so the gateway won’t be able to store anything useful.
One alternative could be to run an LNS on the gateway itself, but that radically changes the network architecture, and would cause all sorts of issues with redundant paths for instance.
-
@jcaron I think you are correct! However we don't want to "decrypt" the stored packages in a "custom" way. We just want to forward them to the LNS some minutes later (and only in case of a WiFI failure). Do you think that this would cause any kind of issues?
-
@anikolaid If you succeed in doing so, at least the downlink messages for the node will be lost, meanin that you cannot use confirmed messages for type A nodes. Unless the gateway creates downlink messages. But that would only possible for messages w/o encryped payload. I would have to lookup is confirm messages are such.
-
In the background, we are working on creating a stable solution for dropped connections (LTE and WiFi), it just takes some time to figure out what is the most reliable and sustainable approach..
-
@Gijs I'm aware of the stability issues you are facing. I would encourage you to focus also in the cases like the one I reported yesterday that the operation of the PyGate is totally impossible for the NB-IoT networks with IPv6 only support (there are already many operators that support only IPv6 in their NB-IoT networks).
This means for us that we need to abandon the really nice concept and implementation of the PyGate... -
@anikolaid You could possibly run some kind of local store-and-forward proxy. The details depend on the specific protocol used between the gateway and the LNS, I have to admit I have no idea what is fashionable these days or supported by the PyGate.
As advised by @robert-hh downlinks (and possibly confirmed messages) will be an issue. IIRC confirmation are just a flag in a header, no idea if that's within the encrypted part or not, though, would have to check the specs.
It would be interesting to see if there wouldn't be issues with deduplication as well (in case a frame is received by more than one gateway, one of which is temporarily offline).
Note that the "official" LoRaWAN approach to this is to add more gateways for redundancy.
-
@anikolaid
Re: Store PyGate Messages
1-2 years ago I used a RasPi + SX1308 gateway and modified lora_pkt_fwd to save packets to a file if the network server is not available. I think you can change lora_pkt_fwd to save packages. Only storage (PRAM or Flash) is required. -
@Gijs
Can i use PSRAM to save packages (of course with changes in lora_fwd_pkt) ? -
I've developed a nanogateway.py (to run on LoPy4, etc) modified software with "resend" capability : when WiFi is not working, the received LoRaWan packet is saved in a RAM buffer, then it checks if the WiFi is back and send the buffered packets (with some delay).
Saving to internal flash, etc, has the timing problem if some uplink/downlin packet is received.
-
@rcolistete Hi! Where is this available?
-
@x893 You probably could save the LoRa packets to PSRAM to buffer them. You might run into 'out of memory' issues, depending on the buffer size of course. I believe the Pygate itself also uses quite a lot of memory.
-
@d-alvrzx It is not published. But if the community is interested I can revise and better document the code and publish it.
But it is for nanogateway.py, so only 1 channel gateway using LoPy4/etc.
-
@rcolistete Ah, I understand. Thank you for the clarification. I was not informed of the nanogateway (1 channel) configuration for LoPy4, a quick google got me up to speed. Thanks.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login