Connecting Lopy4 Nano LoraWAN gateway to chirpstack/loraserver

  • 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 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 = ''
    PORT = 1700
    #NTP = ""
    #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 ( 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

    I should also note that I am using the docker version of chirpstack located here,

    I've tried running it as is along with editting the config files to be more in line with the chirpstack examples like here,

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

Log in to reply

Pycom on Twitter