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

    Set join SF

    Scheduled Pinned Locked Moved LoPy
    7 Posts 5 Posters 3.0k 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.
    • K Offline
      kersing
      last edited by

      After checking the documentation and trying some options (like lora = LoRa(mode=LoRa.LORAWAN,sf=8)) it seems there is not way to specify the spreading factor to be used for an OTAA join? Am I missing something or is this essential feature on the backlog?

      1 Reply Last reply Reply Quote 0
      • R Offline
        rskoniec
        last edited by rskoniec

        lora.join method (OTAA, ABP) uses LoRaWAN stack (mode), so following a Note to lora.init method https://docs.pycom.io/pycom_esp32/library/network.LoRa.html you can't specify SF and some other params.

        lora.init Note:

        In LoRa.LORAWAN mode, only adr, public and tx_retries are used. All the other params will be ignored as theiy are handled by the LoRaWAN stack directly. On the other hand, these same 3 params are ignored in LoRa.LORA mode as they are only relevant for the LoRaWAN stack.

        LoRaWAN uses (ADR - Adaptive Data Rate) so LoRaWAN can automatically manage SF for each
        end-device (to optimize for fastest data rate versus range, for maximize battery life, achieves maximum network capacity).

        The machine is working as good as it's code.

        bmarkusB K 2 Replies Last reply Reply Quote 0
        • bmarkusB Offline
          bmarkus @rskoniec
          last edited by bmarkus

          @rskoniec said in Set join SF:

          LoRaWAN uses (ADR - Adaptive Data Rate) so LoRaWAN can automatically manage SF for each
          end-device (to optimize for fastest data rate versus range, for maximize battery life, achieves maximum network capacity).

          Use of ADR is optional, end device decides to use ADR or not. There are use cases where ADR is not optimal and you want to control RF settings. Also keep in mind use of ADR requires some attention on the device side.

          See article below. It is about Loriot server and Microchip RN2483 module but worth to read:

          http://openlora.com/forum/viewtopic.php?f=12&p=2730#p2730

          1 Reply Last reply Reply Quote 0
          • K Offline
            kersing @rskoniec
            last edited by

            @rskoniec said in Set join SF:

            LoRaWAN uses (ADR - Adaptive Data Rate) so LoRaWAN can automatically manage SF for each
            end-device (to optimize for fastest data rate versus range, for maximize battery life, achieves maximum network capacity).

            Thank you for your answer, however:
            If a node is known not to be near a gateway a join at SF12 takes seconds. Waiting for ADR to go from SF7 to SF12 takes minutes (due to airtime restrictions) and drains battery with a lot of avoidable transmissions. Also, ADR should not be used for nodes moving around as there is no way to know what transmission conditions will be on the next transmission, ADR in these cases could well result in avoidable packet loss.

            So might I suggest being able to set the spreading factor for LoRaWAN before (and after) a join needs to be implemented?
            (BTW, three other certified LoRaWAN implementations I'm using allow setting the SF before OTAA join, so it is not something out of the ordinary)

            C 1 Reply Last reply Reply Quote 1
            • C Offline
              cmsedore @kersing
              last edited by

              @kersing I have code ready to go that lets you set the SF and the uplink counter--I'm waiting for the source tree to be updated in Github before creating a pull request.

              1 Reply Last reply Reply Quote 0
              • affoltepA Offline
                affoltep
                last edited by

                @cmsedore Have you done the pull request? Both of your modifications to change SF and uplink counter would be essential.

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  cmsedore @affoltep
                  last edited by

                  @affoltep I have not done the pull request--the repository was modified and I haven't taken the time to sync this back up. I'll take a look in the next day or two to see if I can just clone the new repo and easily merge in the changes. It has been on my list to do the pull request for the SF change to make it easier to use my single channel gateway at home (while I patient wait for TTN to ship my full-fledged gateway).

                  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