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

    nano-gateway bringup

    Scheduled Pinned Locked Moved Getting Started
    gatewaylopy4 bringup
    13 Posts 4 Posters 1.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.
    • M Offline
      malachib
      last edited by malachib

      I've spent about 2 hours on this now, cannot get gateway to show 'connected' on TTN.

      nanogw.start() produces:

      [ 13423.390] Starting LoRaWAN nano gateway with id: b'30AEA4FFFE783508'
      [ 13424.872] WiFi connected to: fact.home
      [ 13424.876] Syncing time with pool.ntp.org ...
      [ 13425.484] RTC NTP sync complete
      [ 13425.493] Opening UDP socket to us-west.thethings.network (13.66.229.235) port 1700...
      [ 13425.509] Setting up the LoRa radio at 868.1 Mhz using SF7BW125
      [ 13425.520] LoRaWAN nano gateway online
      

      0_1533180857237_Screen Shot 2018-08-01 at 8.30.06 PM.png

      (/assets/uploads/files/1533180731775-screen-shot-2018-08-01-at-8.30.06-pm-resized.png)

      Probably I'm missing something simple...

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

        @malachib In which region are you located? You have selected the EU868 plan, but an US router. My section of config.py looks like:

        SERVER = 'router.eu.thethings.network'
        PORT = 1700
        
        NTP = "pool.ntp.org"
        NTP_PERIOD_S = 3600
        
        M 1 Reply Last reply Reply Quote 0
        • M Offline
          malachib @robert-hh
          last edited by

          @robert-hh I'm in USA but the Lopy folks sent me the wrong gear, so I actually do have 868 parts here in the US (shh, don't tell the FCC)

          bmarkusB 1 Reply Last reply Reply Quote 0
          • bmarkusB Offline
            bmarkus @malachib
            last edited by

            @malachib said in nano-gateway bringup:

            @robert-hh I'm in USA but the Lopy folks sent me the wrong gear, so I actually do have 868 parts here in the US (shh, don't tell the FCC)

            Antenna may be an issue, but device itself is the same for EU868 and US915, just reconfigure it.

            M 1 Reply Last reply Reply Quote 1
            • M Offline
              malachib @bmarkus
              last edited by malachib

              @bmarkus Alright I'll do that. I got an odd error when I set it up for US bands, so I just assumed. I'll post the error if it persists

              EDIT: Here's the error

              (manual bringup)

              lora = LoRa(mode=LoRa.LORAWAN, frequency=903900000)
              Traceback (most recent call last):
                File "<stdin>", line 1, in <module>
              ValueError: frequency 903900000 out of range
              

              (nano gateway bringup)

              [    22.361] Opening UDP socket to us-west.thethings.network (13.66.229.235) port 1700...
              [    22.379] Setting up the LoRa radio at 903.9001 Mhz using SF7BW125
              Traceback (most recent call last):
                File "<stdin>", line 1, in <module>
                File "lib/startmal.py", line 19, in <module>
                File "/flash/lib/nanogateway.py", line 167, in start
              ValueError: frequency 903900000 out of range
              

              I see some folks saying to add region=LoRa.US915 but my LoRa class doesn't have US915 in it

              EDIT2: Upgraded to 1.18.0.r1 and selected US regions. Now everything is configured to 915MHz but initial problem still persists

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

                @malachib Besides antenna (did you plug in the right antenna port for US915? see https://docs.pycom.io/chapter/datasheets/downloads/lopy4-pinout.pdf), your router may suppress UDP packets. When the nanogateway is running, you should see lines like:

                [143209.052] Pull ack
                [143224.058] Push ack
                
                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  malachib @robert-hh
                  last edited by malachib

                  @robert-hh I've plugged in the antenna across from the reset button, near the "p part pf pycom

                  I never see those 'push' or 'pull' messages that you describe

                  I'm running an Apple Airport Express. I'm under the impression UDP packets work OK (VoIP and video games work well) but have not done a conclusive test actually. I presumed the gateway only initiates contact to server, not vice versa, but am getting some indication I may have to setup port forwarding. perhaps?

                  EDIT:

                  I've added port forwarding, but no change. DNS resolution does work from the board, and mDNS works on other equipment on the network so WLAN UDP appears online. I tried tcpdump but I don't quite know how to make it promiscuous enough to capture traffic between LoPy4 and the router....

                  1 Reply Last reply Reply Quote 0
                  • danD Offline
                    dan
                    last edited by

                    Hi @malachib,

                    If I understand correctly, you're running the US config now. Have you changed it in the TTN console as well? (in your initial post, it shows EU)

                    robert-hhR M 2 Replies Last reply Reply Quote 1
                    • robert-hhR Offline
                      robert-hh @dan
                      last edited by robert-hh

                      @dan According to my tests, that does not affect the server connectivity. Only donwlink messages would be configured for the wrong frequency plan. But obviously it should be set to the proper region.

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        malachib @dan
                        last edited by

                        @dan that is correct

                        0_1533232965725_Screen Shot 2018-08-02 at 11.01.14 AM.png

                        [    40.615] Starting LoRaWAN nano gateway with id: b'30AEA4FFFE783508'
                        [    40.640] WiFi connected to: fact.home
                        [    40.647] Syncing time with pool.ntp.org ...
                        [    50.104] RTC NTP sync complete
                        [    50.324] Opening UDP socket to us-west.thethings.network (13.66.229.235) port 1700...
                        [    50.340] Setting up the LoRa radio at 903.9001 Mhz using SF7BW125
                        [    50.351] LoRaWAN nano gateway online
                        [    50.357] You may now press ENTER to enter the REPL
                        
                        >>> 
                        >>> 
                        
                        robert-hhR 1 Reply Last reply Reply Quote 0
                        • robert-hhR Offline
                          robert-hh @malachib
                          last edited by

                          @malachib If I look into the documentation of TTN and the default json script
                          https://github.com/TheThingsNetwork/gateway-conf/blob/master/US-global_conf.json,
                          I see the following server address: router.us.thethings.network
                          Maybe you try that one in config.py of the nanogateway.

                          M 2 Replies Last reply Reply Quote 1
                          • M Offline
                            malachib @robert-hh
                            last edited by

                            @robert-hh I'll try that. I got the us-west address directly from the gateway configuration screen FYI

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              malachib @robert-hh
                              last edited by

                              @robert-hh that did it!

                              router.us.thethings.network was the key! Nowhere do I see that URL on TTN gateway config, so you really saved my bacon there. Thank you!

                              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