LoRaWAN LoPy Node connecting only rarely
I'm back again with yet another question, cheers in advance for the help.
I have successfully connected my gateway and it is receiving acknowledgments every minute. I have used the sample coding in 5.3.6 for the node with changes at lines 20-27 with:
Remove default channels
for index in range(0, 72):
Set simplified AU ISM 915 channel plan for TTN Australia
for index in range(0, 7):
lora.add_channel(index, frequency=916800000+index*200000, dr_min=0, dr_max=3)
As from the post at https://forum.pycom.io/topic/2016/failed-to-connect-to-gateway-fault-finding-steps/3
I removed the #'s to keep the text normal.
This seemed to fix the problem that I had before changing to this, and I now on the very rare occasion connect to the application on TTN. This however creates the error:
OSError: [Errno 95] EOPNOTSUPP.
While writing this I have found another post where they changed it to DR 3 and it fixed it, I am pretty sure this is not the problem however my laptop is nearly flat, rushing out the last part of this post before bed.
Will just post this much in case computer dies, left charger at work...
I also believe I might misunderstand how the nano Gateway and Node work, I have them right next to each other and have found no clear pattern between how close they are and how often I get a connection from my Node. My assumption was that the node sends data to the gateway which then sends it to the TTN, but it seems I am wrong on that one.
@jmarcelino That worked :D, was so simple...
jmarcelino last edited by jmarcelino
Sorry if I'm missing something but from what I got you are using a LoPy nano gateway and a LoPy node with the code above?
The problem is the LoPy nano gateway only listens on one frequency, only true full gateways listen on all 8.
Using the nano gateway replace the following on your node:
for index in range(0, 7): lora.add_channel(index, frequency=916800000+index*200000, dr_min=0, dr_max=3)
lora.add_channel(index, frequency=916800000, dr_min=0, dr_max=3)
(keep the section removing the 0-72 channels first as you have)
Also make sure your nano gateway is configured to listen on 916800000 Hz by setting config.py to
LORA_FREQUENCY = 916800000
I am yet to find a solution to connect the node to the TTN, and haven't been able to even get another random instance of a connection.