[SOLVED] LoRaWAN Nano Gateway and TTN - Status not connected
I have created TTN GW from their console, checked "Legacy Semtech Pakcet Forwarder
, selectedttn-router-eu`: https://console.thethingsnetwork.org/gateways/eui-240ac4fffe00ba00
TTN console still gives me "Status not connected".
I've used the LoRaWAN Nano GW exaple from this: https://docs.pycom.io/pycom_esp32/pycom_esp32/tutorial/includes/lorawan-nano-gateway.html
Any ideas how to get GW connected to TTN?
There have been problems with The Things Network in the past few days causing gateways to be shown as offline
Keep an eye on ther NOC section of https://status.thethings.network for updates
For me still nothing, I have take the code from the example in Github and changed the firewall of my router to accept UDP from 1700 and still nothing.
OK, found the issue - it was the matter of a closed UDP port 1700 on my home router.
After opening the port on home WiFi router config, LoPy NanoGateway is detected as "connected" on TTN.
Here is my
# boot.py -- run on boot-up import param import os import machine from machine import UART uart = UART(0, 115200) os.dupterm(uart) if machine.reset_cause() != machine.SOFT_RESET: from network import WLAN wl = WLAN() wl.mode(WLAN.STA) original_ssid = wl.ssid() original_auth = wl.auth() print("Scanning for known wifi nets") available_nets = wl.scan() nets = frozenset([e.ssid for e in available_nets]) known_nets_names = frozenset([key for key in param.known_nets]) net_to_use = list(nets & known_nets_names) try: net_to_use = net_to_use net_properties = param.known_nets[net_to_use] pwd = net_properties['pwd'] sec = [e.sec for e in available_nets if e.ssid == net_to_use] if 'wlan_config' in net_properties: wl.ifconfig(config=net_properties['wlan_config']) wl.connect(net_to_use, (sec, pwd), timeout=10000) while not wl.isconnected(): machine.idle() # save power while waiting print("Connected to "+net_to_use+" with IP address:" + wl.ifconfig()) except Exception as e: print("Failed to connect to any known network") wl.init(mode=WLAN.AP, ssid=original_ssid, auth=original_auth, channel=6, antenna=WLAN.INT_ANT)
Can it be that enabling UART is posing the problems?
I have compared example from GitHub with the one from the documentation - practically no differences. Which might lead to the conclusion that new firmware broke LoRaWAN nano Gateway.
It should be noted that I am not sending anything to this GW - I am just trying to connect it to TTN. Should I be sending something to it to force it into "active" mode?
@jmarcelino I took the latest code from the github repo. I thought that this one should be most up to date.
Just to confirm did you use the nano-gateway code on that webpage or from the much more up-to-date repository linked from it? I.e.