I am having no luck with OTAA. About a year ago I activated a TTN gateway and bought several Lopy 1 modules, but then things got busy and this is my first chance to get back to it. Gateway has been powered (and working, I believe, the whole time). It has received 49 messages and transmitetd 3. Still a noob, so bear with me. I read all the examples I could find and I believe I understand the process.
First I upgraded my units:
I created an app and registered my devices, using cut and paste:
My gateway appears to be reporting in just fine:
I think I am using the correct code:
# main.py -- put your code here! from network import LoRa import time import binascii lora = LoRa(mode=LoRa.LORAWAN) app_eui = binascii.unhexlify('70B3D57ED0017149') #print('Joining black module') #app_key = binascii.unhexlify('B18CBC14B7CD3D032D8DA37D940BC476') print('Joining green module') app_key = binascii.unhexlify('DE27959ACA592EF7E6CB7A5DE151150E') 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!')
I have two modules, green and black and both give the same result- just ‘Not joined yet…’ repeated every 2.5 seconds.
Just to be sure I brought the gateway into the same room as the nodes, to rule out an RF link problem, it makes no difference.
I saw a reference to waiting for a “downlink window”. How long do you have to wait? I have left the node script running for hours, it doesn’t do anything.
In the console the status of both devices is “Never seen”. The Application Data is blank. My gateway has 4 blue LEDs lit steadily.
I haven’t located anyone locally who can help me debug, hence the appeal to the forum. I have seen similar questions on the forum and then they just suddenly they start to work. Hopefully my problem can be similarly resolved! I have a great site for Northern Colorado, my horizon from the north through the east to the south is about 100km away, and I am about 200m above average terrain on the side of a hill.
I am using Atom with Pymakr on a Windows 10 machine, seems to interact just fine with the Lopys.