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

    2 LoRaWAN Nodes went for a train ride through the Netherlands….

    Scheduled Pinned Locked Moved Projects
    lorawanthethingsnetwolopyfieldtest
    9 Posts 3 Posters 3.5k Views 4 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.
    • PiAirP Offline
      PiAir
      last edited by

      0_1491540913942_small_picture_node.jpg
      I took the LoPy (and a Marvin node) with me on a 2,5 hour train ride through the Netherlands. The LoPy tried to send messages through TheThingsNetwork, the Marvin via KPN (commercial LoRaWAN network in the Netherlands).

      Full post here

      One question I have after the test is why the LoPy only transmitted using SPF7 while the Marvin often switched to SPF12. I will try to connect the LoPy to KPN also and run similar tests to see if it switches spreading factor in those cases.
      Anyone know more about how a node decides what SPF to switch to? I don't see anything in the code for either of the nodes that would suggest switching.

      J 1 Reply Last reply Reply Quote 0
      • RobTuDelftR Offline
        RobTuDelft
        last edited by

        What is Adaptive Data Rate (ADR)? Adaptive Data Rate is a method where the actual data rate is adjusted to ensure reliable packet delivery, optimal network performance, and scale for capacity. For example, nodes close to the gateway will use a higher data rate (shorter time on air) and a lower output power. Only nodes that are at the very edge of the link budget will use the lowest data rate and highest output power. The ADR method can accommodate changes in the network infrastructure and support varying path loss. To maximize both battery life of end ‐ devices and overall network capacity, the LoRa network infrastructure manages the data rate and RF output for each end ‐ device individually by implementing ADR

        From here.

        My LoPy does the same by the way on the KPN network, always SF7.

        Without data you're just another person with an opinion.
        Hackster | About me

        1 Reply Last reply Reply Quote 1
        • J Offline
          jmarcelino @PiAir
          last edited by jmarcelino

          @PiAir
          The only mechanism for automatic switching is Adaptive Data Rate(ADR) however - as the page I linked to says - you should not use this for moving nodes because it uses a sample of the last 20 transmissions.

          On a moving node by the time you have 20 samples the result will likely be wrong for the current location.

          In any case you can enable this on the LoPy by setting adr=True in the LoRa() init.

          In some modules you can set SF12 manually ( or any high SF > 9) but that's not encouraged (or allowed if we go by the latest draft) in the LoRaWAN spec for public networks and indeed TTN is planning to cut out nodes that do it - SF12 is really heavy and sucks the air(time) out of the network.

          On the other hand some networks (which don't implement ADR) require it. It's a confusing situation, compounded by some issues in the TTN ADR implementation.

          PiAirP 1 Reply Last reply Reply Quote 1
          • PiAirP Offline
            PiAir
            last edited by

            I understand from this page that in LoRa.LORAWAN mode, only adr, public and tx_retries are used and that sf=7 by default, but also dat adr=false (so Adaptive Data Rate is off by default, why?). And so since my code (basically the default code from github) does not contain the initialisation, it makes sense that it sticks to SPF=7 (with ADR being off).

            Next test: switch ADR to true and test again.

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jmarcelino @PiAir
              last edited by

              ADR is off by default because:

              1. ADR should only be enabled for static nodes
              2. Many public networks still don't have working ADR
              PiAirP 1 Reply Last reply Reply Quote 0
              • PiAirP Offline
                PiAir @jmarcelino
                last edited by

                @jmarcelino said in 2 LoRaWAN Nodes went for a train ride through the Netherlands….:

                ADR is off by default because:

                1. ADR should only be enabled for static nodes
                2. Many public networks still don't have working ADR

                OK, did not know that, and it does make sense if the rational is that the node would probably not be in range long enough for the gateway to tell it to change the SPF.
                Apparently the Marvin does have ADR enabled by default (I didn't set it there either) and the KPN LoRaWAN network here in the Netherlands "tells" the node to change the SPF. So shouldn't we be able to set the SPF higher than 7 for moving nodes like the ones in my experiment? Because in this use-case, the node will miss a lot of gateways on route that would be in range if it used a higher SPF.

                PiAirP 1 Reply Last reply Reply Quote 0
                • PiAirP Offline
                  PiAir @jmarcelino
                  last edited by

                  @jmarcelino said in 2 LoRaWAN Nodes went for a train ride through the Netherlands….:

                  @PiAir
                  The only mechanism for automatic switching is Adaptive Data Rate(ADR) however - as the page I linked to says - you should not use this for moving nodes because it uses a sample of the last 20 transmissions.

                  On a moving node by the time you have 20 samples the result will likely be wrong for the current location.

                  In any case you can enable this on the LoPy by setting adr=True in the LoRa() init.

                  In some modules you can set SF12 manually ( or any high SF > 9) but that's not encouraged (or allowed if we go by the latest draft) in the LoRaWAN spec for public networks and indeed TTN is planning to cut out nodes that do it - SF12 is really heavy and sucks the air(time) out of the network.

                  On the other hand some networks (which don't implement ADR) require it. It's a confusing situation, compounded by some issues in the TTN ADR implementation.

                  Sorry, had not seen this earlier reply which answers the questions I asked a few minutes ago. :)

                  1 Reply Last reply Reply Quote 0
                  • PiAirP Offline
                    PiAir @PiAir
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • PiAirP Offline
                      PiAir
                      last edited by

                      Correction to my previous comment, the default Marvin code contains the send_LoRa_Command("mac set adr on"); command.
                      So indeed it switches on ADR on purpose and not by default.

                      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