For the node you need 2 files: config.py and either abp_node.py or otaa_node.py depending on whether you want to use ABP or OTAA.
If you are using the code in abp_node.py then the frequency for the node is fixed to config.LORA_FREQUENCY. The value of config.LORA_FREQUENCY is set in config.py (which should also be uploaded to the LoPy) and is set by defaul to 868.100 in line 20:
LORA_FREQUENCY = 868100000
All you need to change in in the code for the node are the three lines with:
dev_addr = struct.unpack(">l", binascii.unhexlify(‘26 01 14 7D’.replace(’ ‘,’’)))
nwk_swkey = binascii.unhexlify(‘3C 74 F4 F4 0C AE A0 21 30 3B C2 42 84 FC F3 AF’.replace(’ ‘,’’))
app_swkey = binascii.unhexlify(‘0F FA 70 72 CC 6F F6 9A 10 2A 0F 39 BE B0 88 0F’.replace(’ ‘,’’))
The values for these you get from the TTN console for the node.
Note: if you reset the node using ABP, you will have to reset the “frames up” counter for the device on the TTN console, otherwise it will ignore all packages until the LoPy package counter has reached at least the counter in the console.
If you don’t want to fuss with the counter, then best to use config.py + otaa_node.py for the node. Here, you need only change the values for
dev_eui = binascii.unhexlify(‘AA BB CC DD EE FF 77 78’.replace(’ ‘,’’))
app_eui = binascii.unhexlify(‘70 B3 D5 7E F0 00 3B FD’.replace(’ ‘,’’))
app_key = binascii.unhexlify(‘36 AB 76 25 FE 77 0B 68 81 68 3B 49 53 00 FF D6’.replace(’ ‘,’’))
Here also, config.LORA_FREQUENCY is used to set the frequency.
The nano-gateway LoPY needs 3 files: main.py + config.py + nanogateway.py
In config.py you set the credentials for your Wifi network. The nodes don’t need access to wifi, but the gateway of course does.
As you can see in main.py, the gateway uses the exact same config.LORA_FREQUENCY variable to start the gateway.
So, the frequency of LoPy node and gateway should be identical if you didn’t change that in the config.py and used the config.py on both node and gateway.
If you did all that and it still doesn’t work, then I don’t know how to help you and I can only hope that @jmarcelino knows what else to try in that case.