LoRa Gateway Bridge to TTN

I’ve updated the repo with the commit below. I hope this helps you:

Hi, nice. got it compiled an the multiplexer recieves packets. But it won’t connect to my loraserver and/ or TTN.
My config.
Packetforwarder(ttn etc) -> port 1800 to multiplexer -> Multiplexer Host ttn.x.y.:1700 is that correct?
Thx daniel

Hello Daniel,

Post your config.

This is how I have the port multiplexer configured and it works fine:

Packet forwarder → multiplexer → backends(this could be lora-gateway-bridge, TTN, Loriot or all the above). Remember it’s multiplexing UDP so everything that understands the packet forwarder protocol should go after or out(backend section) of the multiplexer.

I run the packet multiplexer on a separate box.

Configure the packet forwarder to send to the ip address that the multiplexer is running on at port 1800 for instance.

log_level=4
bind="0.0.0.0:1800"
#To lora-gateway-bridge which then sends to Loraserver
 [[packet_multiplexer.backend]]
 host="lora-gateway-bridge-ip-here:1700"
 gateway_ids = [
   "gatewayid0","gatewayid1","gatewayid2","gatewayid3"
 ]

#This sends the same traffic from the forwarder to TTN
[[packet_multiplexer.backend]]
host=“router.us.thethings.network:1700”
gateway_ids = [
“gatewayid0”,“gatewayid1”,“gatewayid2”,“gatewayid3”
]

Understand that this might cause scheduling conflict issues with down links if you’re using different network servers like TTN plus Loriot plus Loraserver but it’ll send all of the packets to multiple locations. I have tested it with 5 backends and it works as it should.

Hi,

thx for this answer. My config is like yours, but the Gateways in TTN and loraserver don’t show status connected. Is that correct?
netstat -na shows Port 1700/ 1800 connections but the status of the gateways woun’t become conected.
Debug =5 shows “packet recieved from gateway, and sending packet to gateway” in lora-multiplexer-console.
TTN-Service ist ok, shows packet transmitted, with CRC OK 100%. TTN PAcket forwarder as desicribed " localserver, port 1800" .

Any Idea?

thx Daniel

Hi, the multiplexer doesn’t forward any data to the loraserver. Gateway direct (without multiplexer) to loraserver works fine.In the console there is sending, recieving but with a tcpdump on the loraserver i cannot see any packets. I switched to a standalone multiplexer, so i can say it’s not a firewall problem.

What does your multiplexer config look like?

Once you start the multiplexer you’ll see traffic come in on the console. If you don’t see traffic then your packet forwarder is not sending to the multiplexer.

log_level=4
bind=“0.0.0.0:1800”

[[packet_multiplexer.backend]]
host=“lip-of-my-loraserver:1700”
gateway_ids = [
“macbased-ID.”,
]

Console shows traffic, packet send to gateway, packet recieved from gateway.

I’ve updated the repository README + made pre-compile Debian & Ubuntu packages: https://github.com/brocaar/lora-packet-multiplexer.

Hi, I’m new to the forums. Currently I maintain a LoRaServer for our appliactions. Will this be needed for future implementations?

Hi, it is possible to install lora-packet-multiplexer on LoRa Gateway OS? I want to connect my gateway to TTN.

I think I need some help.
I have a LoRa Light Gateway from IMST. The Gateway is based on a Raspberry PI 2, the IMST IC880A LoRaWanConcentrator and Debian Jessi. The connection to TTN works smoothly. Now I want to run the LoRa server in parallel (runs in a Docker container on a separate machine). In order to operate both servers in parallel, the LoRa-Packet-Multiplexer should be installed on the LoRa-Gateway. I followed the instructions of brocaar. I installed ‘apt-transport-https’, ‘dirmngr’ and ‘lora-packet-multiplexer’ on the Light-Gateway (Pi2/Jessi).
Unfortunately, the service can not start. The error message of the service is:
Jun 19 19:02:55 ttn-gateway systemd [1]: lora-packet-multiplexer.service holdoff time over, scheduling restart.
Jun 19 19:02:55 ttn-gateway systemd [1]: Stopping LoRa Packet Multiplexer …
Jun 19 19:02:55 ttn-gateway systemd [1]: Starting LoRa Packet Multiplexer …
Jun 19 19:02:55 ttn-gateway systemd [1]: lora-packet-multiplexer.service start request repeated too fast, refusing to start.
Jun 19 19:02:55 ttn-gateway systemd [1]: Failed to start LoRa Packet Multiplexer.
Jun 19 19:02:55 ttn-gateway systemd [1]: Unit lora-packet-multiplexer.service entered failed state.
The lora-packet-multiplexer.toml has the following content:
[general]
log_level = 4
[Packet_multiplexer]
bind = “0.0.0.0:1680”
To lora-gateway-bridge (loraserver)
[[Packet_multiplexer.backend]]
host = “192.168.2.11:1701”
gateway_ids = [“mac-address of the docker-container”]
To TTN
[[Packet_multiplexer.backend]]
host = “router.eu.thethings.network:1700”
gateway_ids = [“eu of the TTN Gateway”]

What does not fit together here? Where could the mistake be?

i have exactly the same problem, log of the multiplexer shows packet send to gateway and packet received from gateway so the forwarders oft the gateways seem to correctly send to the multiplexer but at ttn and at the loraserver instance the gw does not show up as connected.
Could you solve your issue?

Hi, you have to use the default semtech packet forwarder. The TTN forwarder doen’t work. That solved my problem.

Hi i am trying to install the multiplexer seeking your README documentation. and I get euros “package not found within the respository” I am not pretty sure what I am doing wrong any help I will appreciate it:

lexfc @loraservermpx01 : ~ $ sudo apt install chirpstack-packet-multiplexer

Reading package lists… Done

Building dependency tree

Reading state information… Done

E: Unable to locate package chirpstack-packet-multiplexer

have you any idea what can be wrong ?

I seek the info explained in the README reviewing the repository I do not able to see the multiplexer package within the repository:

here the ChirpStack packages content and the multiplexer are not in there:
$ sudo cat * | grep -i chirps

cat: auxfilesPackage: chirps tack-application-server

: Is a directoryFilename: pool/main/c/ chirps tack-application-server/ chirps tack-application-server_3.5.1_linux_amd64.deb

Description: ChirpS tack Application Server

Vendor: ChirpS tack

Package: chirps tack-application-server

Filename: pool/main/c/ chirps tack-application-server/ chirps tack-application-server_3.5.0_linux_amd64.deb

Description: ChirpS tack Application Server

Vendor: ChirpS tack

Package: chirps tack-gateway-bridge

Filename: pool/main/c/ chirps tack-gateway-bridge/ chirps tack-gateway-bridge_3.4.1_linux_amd64.deb

Description: ChirpS tack Gateway Bridge

Homepage: https://www. chirps tack.io/

Vendor: ChirpS tack

Package: chirps tack-gateway-bridge

Filename: pool/main/c/ chirps tack-gateway-bridge/ chirps tack-gateway-bridge_3.4.0_linux_amd64.deb

Description: ChirpS tack Gateway Bridge

Homepage: https://www. chirps tack.io/

Vendor: ChirpS tack

Package: chirps tack-geolocation-server

Filename: pool/main/c/ chirps tack-geolocation-server/ chirps tack-geolocation-server_3.3.1_linux_amd64.deb

Description: ChirpS tack Geolocation Server

Homepage: https://www. chirps tack.io/

Vendor: ChirpS tack

Package: chirps tack-geolocation-server

Filename: pool/main/c/ chirps tack-geolocation-server/ chirps tack-geolocation-server_3.3.0_linux_amd64.deb

Description: ChirpS tack Geolocation Server

Homepage: https://www. chirps tack.io/

Vendor: ChirpS tack

Package: chirps tack-network-server

Filename: pool/main/c/ chirps tack-network-server/ chirps tack-network-server_3.4.1_linux_amd64.deb

Description: ChirpS tack Network Server

Homepage: https://www. chirps tack.io/

Vendor: ChirpS tack

Package: chirps tack-network-server

Filename: pool/main/c/ chirps tack-network-server/ chirps tack-network-server_3.4.0_linux_amd64.deb

Description: ChirpS tack Network Server

Homepage: https://www. chirps tack.io/

Vendor: ChirpS tack

Depends: chirps tack-application-server

This is a transitional package to migrate from lora-app-server to chirps tack-application-server. It can safely be removed.

Depends: chirps tack-gateway-bridge

This is a transitional package to migrate from lora-gateway-bridge to chirps tack-gateway-bridge. It can safely be removed.

Depends: chirps tack-geolocation-server

This is a transitional package to migrate from lora-geo-server to chirps tack-geolocation-server. It can safely be removed.

Depends: chirps tack-network-server

This is a transitional package to migrate from loraserver to chirps tack-network-server. It can safely be removed.

Hi,

I let the packet forwarder on port 1700, set the chirpstack-gateway-bridge bind to udp:1800 and configured the multiplexer with:

log_level=4
bind="0.0.0.0:1700"

[[packet_multiplexer.backend]]
  host="127.0.0.1:1800"
  gateway_ids = [
    "<the gateway id>"
  ]

#This sends the same traffic from the forwarder to TTN
[[packet_multiplexer.backend]]
  host="router.us.thethings.network:1700"
  gateway_ids = [
    "<the gateway id>"
  ]

it is working well.
Many thanks!

PS: I used the ubuntu packet on Raspbian Buster :slight_smile:

1 Like

This should be fixed :slight_smile: Could you try again?

Greate !!! :smiley:

now is fixed I got the package installation thaks for your updates, now trying to configure seeking your guide.

I have another question i see that the multiplexing is performed via gwy id it’s possible to have multiplex regarding EUI of payload ?.

depending of the rx packages i want to divert it to a gwy.

Thanks so much for your kindly answer.

This is not possible as the DevEUI is only present in the join-request message. An option could be to add a NetID prefix filter.

1 Like

I have a ‘small’ problem.
I’m running the chirpstack-packet-multiplexer behind the Semtech UDP forwarder.
Everything works fine on the chirpstack side. I can see the join and uplink packets and also see the data (payload). But on the TTN-side I only see the join packets but no downlink and no data (payloads). Here my configration (chirpstack-packet-multiplexer.toml):

[general]
log_level=4
[packet_multiplexer]
bind=“0.0.0.0:1700”
[[packet_multiplexer.backend]]
#TTN
host=“router.eu.thethings.network:1700”
uplink_only=false
gateway_ids = [“b827ebfffecdeefa”]
[[packet_multiplexer.backend]]
#chirpstack-gateway-bridge
host=“127.0.0.1:1800”
uplink_only=false
gateway_ids = [“b827ebfffecdeefa”]

If I work without the multiplexer the packets are transmitted correctly to TTN. Does anyone have an idea what does not fit together?
Greetings
Stefan

With this software to which software are you referring to? The multiplexer utility?