Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Store PyGate Messages

    Scheduled Pinned Locked Moved Getting Started
    16 Posts 7 Posters 110 Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jcaron @Gijs
      last edited by

      @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.

      A 1 Reply Last reply Reply Quote 1
      • A Offline
        anikolaid @jcaron
        last edited by

        @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?

        robert-hhR J 2 Replies Last reply Reply Quote 0
        • robert-hhR Offline
          robert-hh @anikolaid
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • G Offline
            Gijs
            last edited by

            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..

            A 1 Reply Last reply Reply Quote 1
            • A Offline
              anikolaid @Gijs
              last edited by

              @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...

              1 Reply Last reply Reply Quote 0
              • J Offline
                jcaron @anikolaid
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • X Offline
                  x893 @anikolaid
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • X Offline
                    x893 @Gijs
                    last edited by

                    @Gijs
                    Can i use PSRAM to save packages (of course with changes in lora_fwd_pkt) ?

                    G 1 Reply Last reply Reply Quote 0
                    • rcolisteteR Offline
                      rcolistete
                      last edited by

                      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.

                      My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

                      D 1 Reply Last reply Reply Quote 1
                      • D Offline
                        d.alvrzx @rcolistete
                        last edited by

                        @rcolistete Hi! Where is this available?

                        rcolisteteR 1 Reply Last reply Reply Quote 0
                        • G Offline
                          Gijs @x893
                          last edited by

                          @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.

                          1 Reply Last reply Reply Quote 0
                          • rcolisteteR Offline
                            rcolistete @d.alvrzx
                            last edited by rcolistete

                            @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.

                            My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

                            D 1 Reply Last reply Reply Quote 1
                            • D Offline
                              d.alvrzx @rcolistete
                              last edited by

                              @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.

                              1 Reply Last reply Reply Quote 0

                              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
                              • 1 / 1
                              • First post
                                Last post

                              Pycom on Twitter

                              Pycom