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

    LoRaWAN nano gateway and activation issues

    Scheduled Pinned Locked Moved LoPy
    lorawan
    20 Posts 7 Posters 5.2k 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.
    • M Offline
      moenad @bucknall
      last edited by

      @bucknall

      I have the exact same code running, I followed the documentation properly. Trying the RAK811 right now, ABP works, OTAA doesn't.
      ABP also works fine on the lopy node, I thought first it only works once because the same counter data "PKT #1"... wasn't showing again.
      I have the channels restricted on the RAK811 also, similar to the ones mentioned in the docs.

      One more thing, the up to date instructions you linked first is using ABP not OTAA. So the main issue for me is getting OTAA to work.

      B 1 Reply Last reply Reply Quote 0
      • B Offline
        bucknall @moenad
        last edited by

        @moenad Hmm ok - I have an instance running with the exact code (the docs OTAA example) I linked to below and it's functioning correctly.

        Maybe try removing the previous TTN application you set up and creating another one? I had issues previously with TTN seeming to not issue the correct Application EUI for my devices.

        I did notice that it takes quite some time for the device to connect via OTAA however...

        Developer Evangelist - Pycom

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          moenad @bucknall
          last edited by

          @bucknall I did that multiple times :) I also removed the gateway and re-created it.

          I'm also running the latest firmware.

          B 1 Reply Last reply Reply Quote 0
          • B Offline
            bucknall @moenad
            last edited by

            @moenad hmm I'm stumped in that case because I also followed the instructions as to ensure that I was replicating any issues!

            Would you mind sharing your code with me (via private message/email - alex@pycom.io) so I can see what/if there are any differences to what I'm using?

            Developer Evangelist - Pycom

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              moenad @bucknall
              last edited by

              @bucknall

              Honestly, there's nothing worth sharing.

              I copy pasted this file as is: https://github.com/pycom/pycom-libraries/blob/master/examples/lorawan-nano-gateway/nanogateway.py, same for main.py in the same repo. The only file I edited in the config.py are not LoRa related (WIFI SSID and Password). Gateway is available in Europe.
              For the LoRawan node, I'm running this example as is (copy/pasted) https://github.com/pycom/pycom-libraries/blob/master/examples/lorawan-nano-gateway/otaa_node.py
              I changed the dev_eui, app_eui and app_key to match the ones in the TTN.

              I'm still in the first stages with lopy, haven't started working on my own project yet.

              B 1 Reply Last reply Reply Quote 0
              • B Offline
                bucknall @moenad
                last edited by

                @moenad It might sound a little silly but do you have the antenna connected to the correct connector (closest to the LED)?

                Developer Evangelist - Pycom

                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  moenad @bucknall
                  last edited by

                  @bucknall Yes, I do. As I said, ABP is working, OTAA is stuck in an infinite loop of Join Request/Accept exactly like the OP mentioned in his post.

                  B 1 Reply Last reply Reply Quote 0
                  • B Offline
                    bucknall @moenad
                    last edited by

                    @moenad I only ask because the LoPy will work without an antenna but it should not be used in this manner.

                    Let me create/add another device to the TTN and see if I can replicate your issue.

                    Developer Evangelist - Pycom

                    J J 2 Replies Last reply Reply Quote 0
                    • J Offline
                      jmarcelino @bucknall
                      last edited by jmarcelino

                      Activation problems usually boil down to one of two issues:

                      1. You have a firewall on your WiFi which is blocking inbound UDP to the LoPy

                      2. The join accept is processed too late along the path to meet the node's receive window. This is where it gets a bit more complicated.

                      For what are, to me, dubious reasons TTN insists on sending downlinks such as join accept messages at the very last moment. If you look at your timestamp on your screenshots you see the join request at 11:42:28 and the the join accept at 11:42:33 or 5 seconds later.

                      The problem is 5 seconds - according to the LoRaWAN spec - is exactly when the node expects the join accept reply, so if you have a slower network or the LoPy is doing something else the window is easily missed.

                      TTN doesn't need to do this as most gateways have the ability to queue packets for transmission in advance, but for some reason they do.

                      I've had a look in the past and maybe the _type == PULL_RESP handling block in the nanogateway.py code could be optimised to help with this but optimising timing critical network code can - paradoxically - be time consuming ...

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        johncaipa @bucknall
                        last edited by

                        @bucknall i have the same problem of @moenad OTTA with nanogateway, (but not with Conduit for example). Could you find any solution to this?

                        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