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

    LOPY on a lorawan public network,

    Scheduled Pinned Locked Moved LoPy
    lopy lorawanjoin issuesspreading facto
    12 Posts 5 Posters 2.3k Views 5 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.
    • L Offline
      lj Pybytes Beta
      last edited by

      Hello , I am using the LOPY on a lorawan public network, my device is far away from the nearest antenna, so I 'd like to do the joint on SF12.How can I set this ?.

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        livius @lj
        last edited by livius

        @lj
        Set it in the init of lora sf=12
        https://docs.pycom.io/chapter/firmwareapi/pycom/network/lora.html

        lok also about tx_power max 14 on 868 and 20 in 915
        lora.init(mode=LoRa.LORA, tx_power=14, sf=12)

        think about people first, then computers

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          chumelnicu @livius
          last edited by

          @livius how can help that in to one lorawan public network?

          I think was about how to set radio to SF12 in lorawan mode...

          L 1 Reply Last reply Reply Quote 0
          • D Offline
            danielm
            last edited by danielm

            Use datarate DR0:

            lora_sock.setsockopt(socket.SOL_LORA, socket.SO_DR, 0)
            

            I believe it does not apply for OTAA join, for which specific datarate sequence is pre-defined.

            1 Reply Last reply Reply Quote 0
            • L Offline
              livius @chumelnicu
              last edited by livius

              @chumelnicu
              Sorry, too fast reading..

              think about people first, then computers

              C 1 Reply Last reply Reply Quote 0
              • C Offline
                chumelnicu @livius
                last edited by

                @livius .. no problem ! :)

                1 Reply Last reply Reply Quote 0
                • L Offline
                  lj Pybytes Beta
                  last edited by

                  @danielm

                  I tested your proposal (Using datarate DR0) :

                  • effectively I don't know if this has an effect for the OTAA JOINT, but at least data are sent using SF12.
                    Thanks for the advice .
                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    danielm
                    last edited by

                    @lj
                    You are welcome. I believe that join attempts are sent with following sequence:
                    7x DR5, DR4, 7x DR5, DR3, 7x DR5, DR2, 7x DR5, DR1, 7x DR5, DR0
                    That means that in bad transmission conditions it may take several retries to achieve successful join.

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      brunoS
                      last edited by

                      Hello,

                      with something like

                      while lora.has_joined() is not True
                        try
                           lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=20000, dr=0)
                           ....
                      

                      Join is always at SF12, I verifed with spectral analyser

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        lj Pybytes Beta
                        last edited by

                        @brunoS
                        Hello , I added dr=0 as a param of my lora.join..command , seems to works ..but setting the timeout=20000, leads to timeout error in my case, so I left it to 0 as i am using the code exemple provided in the pycom documentation.
                        best

                        B 1 Reply Last reply Reply Quote 0
                        • B Offline
                          brunoS @lj
                          last edited by

                          @lj
                          You can " try catch" for intercept timeout exception and repet the JOIN to force DR=0.
                          With no timeout, join procedure use variable DR

                          1 Reply Last reply Reply Quote 0
                          • L Offline
                            lj Pybytes Beta
                            last edited by

                            Hello bruno,

                            this is what I did, instead of using the exemple code, I can set and catch the timeout error hence loop while not joint.

                            while lora.has_joined() is not True:
                            try:
                            lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=20000, dr=0)
                            except Exception as e:
                            print('Not joined yet...')

                            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