Pycom fipy works fine with ABP, but not with OTAA
-
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(): time.sleep(2.5) 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?
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