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

    Connecting Lopy4 Nano LoraWAN gateway to chirpstack/loraserver

    Scheduled Pinned Locked Moved LoPy
    1 Posts 1 Posters 306 Views 1 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.
    • J Offline
      JaRay
      last edited by

      I've fairly new to LoRa, and am currently working with a Lopy4 and the nanogateway example to setup a local chirpstack server. The trouble is that I am having trouble seeing the gateway within chirpstack.

      Using the example code I have the config.py file setup like this

      import machine
      import ubinascii
      
      WIFI_MAC = ubinascii.hexlify(machine.unique_id()).upper()
      # Set  the Gateway ID to be the first 3 bytes of MAC address + 'FFFE' + last 3 bytes of MAC address
      GATEWAY_ID = WIFI_MAC[:6] + "FFFE" + WIFI_MAC[6:12]
      
      SERVER = '0.0.0.0'
      PORT = 1700
      
      #NTP = "pool.ntp.org"
      #NTP_PERIOD_S = 3600
      
      WIFI_SSID = 'chirpstack'
      WIFI_PASS = 'chirpstack'
      
      ## for EU868
      #LORA_FREQUENCY = 868100000
      #LORA_GW_DR = "SF7BW125" # DR_5
      
      #for US915
      LORA_FREQUENCY = 903900000 #125kHz channel 8
      LORA_GW_DR = "SF10BW125" # DR_0
      LORA_NODE_DR = 0
      

      Here I am running a hotspot on my machine with ssid 'chirpstack' and password 'chirpstack'. I've had to remove communication to the NTP server due to it being blocked on my network.

      After uploading the files to the lopy4 I get the following:

      [     7.234] Starting LoRaWAN nano gateway with id: b'------FFFE------'
      [     8.511] WiFi connected to: chirpstack
      [     8.520] Opening UDP socket to 0.0.0.0 (0.0.0.0) port 1700...
      [     8.536] Setting up the LoRa radio at 903.9001 Mhz using SF10BW125
      [     8.548] LoRaWAN nano gateway online
      [     8.555] You may now press ENTER to enter the REPL
      

      I removed the id here, but I get an actual id when it runs. I've also made sure a gateway is setup in chirpstack expecting this id.

      So it looks like everything is connecting just fine, however when I go to chirpstack and look at the gateway I see:

      Last seen
      
      Never
      

      I should also note that I am using the docker version of chirpstack located here, https://github.com/brocaar/chirpstack-docker

      I've tried running it as is along with editting the config files to be more in line with the chirpstack examples like here, https://www.chirpstack.io/gateway-bridge/install/config/

      Has anyone had luck getting the nanogateway to connect and what steps did it take?

      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