Pycom fipy works fine with ABP, but not with OTAA

  • Banned

    I have a Things Gateway established here with a ThingsNode connecting and communicating with it without trouble using ABP.

    My poor little Pycom fipy, on the other hand, will only connect with ABP. If I try the following example using OTAA, I receive no response from the TTN gateway and the fipy merely loops printing "Not joined yet."

    Any suggestions on how I can debug and figure out what's going on?

    from network import LoRa
    import time
    import binascii
    lora = LoRa(mode=LoRa.LORAWAN)
    app_eui = binascii.unhexlify('<app eui key here>')
    app_key = binascii.unhexlify('<app key here>')
    lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0)
    # wait until the module has joined the network
    while not lora.has_joined():
        print('Not joined yet...')
    print('Network joined!')```

  • @Dale-Fletcher Which firmware version do you use?

    The time window for receiving a OTAA join confirmation is small (~10 ms after 5 or 6 seconds) and the PyCom (ESP32) device have not
    You could try to join with a lower data rate or init Lora with a higher spreading factor. That will increase the time window for receive.
    Edit: Do you see the join request in the TTN gateway console?

Log in to reply

Pycom on Twitter