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

    OTAA/ABP node unable to join TTN

    Scheduled Pinned Locked Moved LoPy
    lopy
    12 Posts 4 Posters 1.9k 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.
    • V Offline
      Vicky_
      last edited by Vicky_

      I have successfully connected the gateway to TTN, but the node isn't working.

      alt text

      OTAA:
      alt text

      ABP:
      alt text

      Is it because of this part of coding? Most of the coding follow the example at github. Except the dev_addr, nwk_swkey and app_swkey

      # remove all the non-default channels
      for i in range(3, 16):
          lora.remove_channel(i)
      
      # set the 3 default channels to the same frequency
      lora.add_channel(0, frequency=config.LORA_FREQUENCY, dr_min=0, dr_max=4)
      lora.add_channel(1, frequency=config.LORA_FREQUENCY, dr_min=0, dr_max=4)
      lora.add_channel(2, frequency=config.LORA_FREQUENCY, dr_min=0, dr_max=4)
      

      i am in Asia, using frequency 923MHz. i have try data rate 1, 2, 3 and 4.

      Can anyone help? thanks

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

        Could you provide a screenshot of your console connected to your gateway? Such as acknowledgements it is getting?

        e.g.
        Push Ack
        Pull Ack

        1 Reply Last reply Reply Quote 0
        • V Offline
          Vicky_
          last edited by Vicky_

          @Burgeh Thanks for replying me! Sure

          alt text

          i dont know why sometimes it will receive packet even my node is not activated and it did not show on TTN traffic.

          B robert-hhR 2 Replies Last reply Reply Quote 0
          • B Offline
            Burgeh @Vicky_
            last edited by

            @vicky_

            I also have this issue with receiving random packets although my gateway does not have the push or pull ack

            V 1 Reply Last reply Reply Quote 0
            • V Offline
              Vicky_ @Burgeh
              last edited by

              @burgeh ohh i see. hopefully someone can help us out. :')

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

                Hi @vicky_

                That is the wrong node script to use for AS923, that one is only meant for EU868.

                We’ll have a correct one up shortly.

                V 1 Reply Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh @Vicky_
                  last edited by

                  @vicky_ once the gateway is up, you'll reeceive messages from any node in reach. That's intentional.

                  1 Reply Last reply Reply Quote 0
                  • V Offline
                    Vicky_ @jmarcelino
                    last edited by Vicky_

                    @jmarcelino I also tried US915 but nothing shows up on the console. Thank you so much!! I can't wait to see that. I am in the midst doing my project. Thanks a lot.

                    @robert-hh ohh i see. lesson learned. thanks for clarifying this for me :DD

                    @Burgeh I am not sure if you are in Asia region as well

                    B 1 Reply Last reply Reply Quote 0
                    • B Offline
                      Burgeh @Vicky_
                      last edited by Burgeh

                      @vicky_
                      I'm using the US servers, but I am running into pretty much the exact same thing, OTAA can't join and ABP joins and "sends" a packet, but I never receive it or get anymore information on it. My gateway updates on the TTN and has push/pull acks

                      @jmarcelino
                      Is the current code for USA working as well? I see it is quite a bit different the EU, besides the frequency/region difference. Same issue as stated above. Also would the join data rate be an issue? Some of the tutorials show it being there some not, it says it's optional, but when I add it, it has an error no matter what dr I put.

                      robert-hhR 1 Reply Last reply Reply Quote 0
                      • robert-hhR Offline
                        robert-hh @Burgeh
                        last edited by

                        @burgeh Using a xxPy as nanogateway is kind of a luck with versions up to 1.17.0.b1, because it does not keep the timings well. The joins response has to be forwarded back to the node 5 s +/- 10ms after the request. At the moment, the time used for that is the rtc timer, which is not precise. You may be lucky with a specific device and moment. The reason is known and a fix will come soon (I hope).
                        For the same reason, downlink messages may also not arrive at the node.
                        At least, you should see in the gateway logs the requesst to the TTn server and the downlink messages, which will be sent, but unfortunately not at the right time.

                        B 1 Reply Last reply Reply Quote 1
                        • B Offline
                          Burgeh @robert-hh
                          last edited by

                          @robert-hh
                          Thanks for the information! Is there a document stating this or has this been your expierence?

                          robert-hhR 1 Reply Last reply Reply Quote 0
                          • robert-hhR Offline
                            robert-hh @Burgeh
                            last edited by

                            @burgeh The timing requirements are defined in the Lora Specs. The details about the implementation and its's behaviour are a result of my measurements and the code analysis. Nevertheless, the changed firmware works reliably, and Daniel is about to publish it some time.
                            The trail of my tests are here:
                            https://forum.pycom.io/topic/2728/lopy-and-nanogateway-example-inaccurate-timing-prevent-otaa-join
                            and here:
                            https://forum.pycom.io/topic/2676/abp-mode-and-frame-counters/18
                            You see, I spiraled a bit around the problem.

                            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