Pybytes and Chirpstack + OTAA + Thingsboard cloud



  • Hi all,

    since i am new to the whole pycom environment i constantly get in touch with some challanges here is the latest one:

    the goal is to use thingsboard cloud + chirpstack with a LoPy4.0 Node and LoPy4.0 based 8 chan gateway. i have managed to get it all running so far, but here is one thing i definitely dont understand: when using chirpstack, with OTAA i need to provide my node with a set of 3 keys, whereby only 2 are available on the chirpstack page, the app_key and the dev_eui/LoraMAC. i have no clue where to get the app_eui from ??
    and here is the strange thing about: when i use the provided example with without the app_eui i doesnt connect succesfull, but when i fill in a fake app_eui it works. Why ???

    # create an OTAA authentication parameters, change them to the provided credentials
    app_eui = ubinascii.unhexlify('XXXXXXXXXXXXXXXXXX')
    app_key = ubinascii.unhexlify('XXXXXXXXXXXXXXXXXX')
    #uncomment to use LoRaWAN application provided dev_eui
    dev_eui = ubinascii.unhexlify('XXXXXXXXXXXX')
    
    # Uncomment for US915 / AU915 & Pygate
    # for i in range(0,8):
    #     lora.remove_channel(i)
    # for i in range(16,65):
    #     lora.remove_channel(i)
    # for i in range(66,72):
    #     lora.remove_channel(i)
    
    # join a network using OTAA (Over the Air Activation)
    #uncomment below to use LoRaWAN application provided dev_eui
    #lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0)
    lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=0)
    #lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_key), timeout=0)
    


  • Because the app eui is not checked for validity locally, but rather with the Chirpstack server somewhere in the backend. All three parameters are used to resolve the packets coming in over LoRa to your project console in Chirpstack.

    If you're planning on using the Pybytes / Pycom Chirpstack server, you should configure your device (node) through Pybytes to use a LoRa connection and all the keys will be handled automatically. A gateway setup should be very similar to setting up to TTN, except for the different server address / (possibly) gateway eui. If youre not using the Pycom Chirpstack server, all three parameters should be available somewhere as far as I know.

    Let me know if that answers your question


Log in to reply
 

Pycom on Twitter