From TTN packet-forwarder to LoRaServer


#1

Hi there,

I’m fairly new with LoRaServer, so sorry in advance for any dumb question :sweat_smile:

Currently, I have a LoRaWAN gateway running with the packet-forwarder and connected to TTN. It’s been working for over a year according to this guide (as you see, I’m using a Raspberry Pi and an iC880A concentrator).

I’m interested in LoRaWAN’s MAC layer so I think that LoRaServer could be a good option to start developing (correct me if I’m wrong). I think it’s possible to adapt my current hardware for that purpose (see this post), but I’d like to know to what extent the TTN-forwarding functionality could be maintained.

In short:

  1. How could I adapt the gateway configuration so that messages are forwarded to both ends (TTN and LoRaServer)?
  2. According to the architecture, do I need to implement the LoRa Gateway Bridge apart, or can I do it in the same Raspberry Pi that acts as gateway?

Thank you in advance for your help.

Best Regards,
Celia


#2

Hi,

Q1: not supported for now
Q2: both scenario are supported, it’s your decision…

But if you want to test your GW with LORASERVER, it could be something like this…

In a config with LORA-GATEWAY-BRIDGE running into a virtual server not on the GW.

********* port validation ****************************
login into your LORA-GATEWAY-BRIDGE
su
cd /etc/lora-gateway-bridge
nano lora-gateway-bridge.toml
validate udp_bind = “0.0.0.0:1700” (default port for GW)

port = 1700

************* PI changes for Loraserver **************
login into your PI

cd /opt/ttn-gateway/bin
sudo cp global_conf.json global_conf.json.ttn
sudo cp global_conf.json global_conf.json.loraserver
sudo nano global_conf.json.loraserver

update this section with these parms from lora-gateway-bridge.toml

"gateway_conf": {
..........................
..........................
..........................
..........................
    /* change with default server address/ports, or overwrite in local_conf.json */
    "server_address": "xxx.xxx.xxx.xxx",   (LORA-GATEWAY-BRIDGE IP)
    "serv_port_up": 1700,			(port from lora-gateway-bridge.toml)
    "serv_port_down": 1700,			(port from lora-gateway-bridge.toml)
..........................
..........................
..........................
..........................
..........................
}

}

save your changes

************* PI implementation for Loraserver **************
sudo systemctl status ttn-gateway (just to validate the current status for information)
sudo systemctl stop ttn-gateway
sudo cp global_conf.json.loraserver global_conf.json
sudo systemctl start ttn-gateway
sudo systemctl status ttn-gateway (just to validate the current status for information

Regards.


#3

Wow, thank you very much! I’ll leave here my feedback when everything’s working :grin:

Regards,
Celia


#4

And you have to disable the downlink in one of the services for the devices, which will be redirected to both servers!
Only one server should respond to every device!
The other server/service should be used only for monitoring.


#5

Hola Celia,

Question 1: you just need a small UDP packet replicator running inside the raspberry-pi gateway. Each UDP packet comming from localhost:1700 must be duplicated, one forwarded to your LORA-GATEWAY-BRIDGE IP:port and other forwarded to router.eu.thethings.network:1700. Downlink direction is not so easy.

But @brocaar already developed such replicator. You can find it here