pycom / pycom-libraries

MicroPython libraries and examples that work out of the box on Pycom's IoT modules
330 stars 378 forks source link

Connect LoRaWan nano-gateway to a local network server #82

Closed BouTayehGaby closed 5 years ago

BouTayehGaby commented 5 years ago

Hello!

I am using a Pycom expansion board with a lopy4 as a nano-gateway. I was able to connect the gateway with TTN (The Things Network) and send data from a sensor with no problems. However, I wanted to use a local network server due to some privacy concerns. Therefore, I have installed the following compact server for private LoRaWAN networks: https://github.com/gotthardp/lorawan-server

I have installed this network server on my laptop. The nano-gateway and my laptop are connected to the same local router. The question is, what should I put as a server in the config.py file? The network server I have installed uses port 1680 to listen to incoming packets. So there is no problem with the port number. I have tried to put the private IP address of my PC as the Server Url, but it didn't work. I have used Wireshark to track outgoing UDP packets but couldn't find any UDP packet being transferred from my nano-gateway (192.168.4.1) to my laptop (Private IP address of my laptop).

Since I am not an expert in networking I would be very grateful if someone could point out what's wrong with my configuration.

Thank you.

eflorent2020 commented 5 years ago

Glad to know you connected to TTN EU with nanogateway ! I might not be able to help you on how a third party software works. Your private nanogateway IP looks strange ending with .1 is most often used for a LAN router. You might also be interested in loraserver.io wich is an interesting LoraWAN radio server implementation. In your nano gateway replacing the TTN server with your private server IP will work out of the box.