LoRa Gateway Bridge to TTN

Hi all,

I’ve been working on a platform that intercepts LoRaWAN device messages on the gateway, with the net result of dropping packets that aren’t from an ‘approved’ list of devices. I’ve been using the LoRa Gateway Bridge running on a Laird Sentrius which points to a MQTT server on a Pi (for now). I can happily collect packet data as I’m very familiar with JSON and MQTT.

That being said, I’m struggling to then ‘connect’ the LoRa Gateway Bridge to TTN afterwards. I understand that this process is currently trivial with the LoRa Server, however for testing and legacy reasons (+ because our platform is currently built around TTN), I want to push the data there.

Does TTN have some kind of MQTT server that I can directly forward the packets from the LoRa Gateway Bridge to, without having to convert the data?

So, as a terribly illustrated flow, it would look like this

Gateway UDP -> LoRa Gateway Bridge -> [My custom interceptor piece] -> Push data via MQTT to TTN


I don’t believe they support the LoRa Gateway Bridge data-format, but it would be better to ask them :slight_smile:

Shortly I will open-source an other component which you can put behind the packet-forwarder which can forward packet-forwarder UDP data to different backends (LoRa Gateway Bridge, TTN, …). Example config:

gateway_ids = [

gateway_ids = [

It is a kind of poly-packet-forwarder but instead you can keep the vanilla packet-forwarder and put this inbetween :slight_smile: It will also allow you to configure per backend which gateways must be forwarded. Uplink and downlink will be supported.

1 Like

@brocaar I also started doing very similar.
Im happy to contribute to your implementation.

Please let me know the current status.

I have completed the implementation. Only I was traveling the last days so I had not had the time to open-source this.

Great, looking forward to it.

Hi @brocaar,

I tested the packet_multiplexer and it works as intended. And thanks for the work!

Im wondering about the need for gateways_ids for the backend configuration.
It looks like the code iterates over it to build and maintain the backends map. But do you think it is possible to build it as the multiplexer sees data from new gateways, like how it happens in the gateway-bridge.

That is not how I intended it to be. In my case I needed something where I could tell per backend which gateways would be forwarded. But it should not be hard to implement this.

If you are interested in contributing, would you be interested to make a pull-request where the ID "*" would act as a kind of catch-all?

Sure. Let me take stab at it.
Will send a pull requests once it is in a decent shape.


Even i am in need of forwarding the packets to the local loraserver bridge and also to the TTN network…

You have mentioned that the multiplexer backend is working. Where do I find it? How to implement it?


Please see: https://github.com/brocaar/lora-packet-multiplexer. It is not (yet) fully documented and I don’t provide binaries (yet).

Hey many thanks for the link. I will wait for the documentation, lest I screw up my lorawan server side mechanism! Many thanks for the amazing work you are doing… :slight_smile:

Excellent piece of functionality! Any idea if Laird will support something like this on their RG1xx Gateways. I see they support your Gateway Bridge.

I don’t know, but (and this is slightly offtopic, so please continue this discussion here: https://forum.loraserver.io/t/announching-lora-gateway-os/3160/2)… Their bootloader and kernel-source is open-source so it should be possible to port this to Yocto recipes. I believe the RG1xx gateway can boot from a SD Card meaning you could run the LoRa Gateway OS on it and have more flexibility with regards to installing software. If somebody would like to help out (at91bootstrap, u-boot, kernel knowledge and working with Yocto is required), that would be great (please respond in the LoRa Gateway OS topic)!

Hi, just a question. How to install this software on the gateway?Could you please add some mor documentation`?Would be very nice!

1 Like

Yes please! I need this also

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

Yes the multiplexer Utility.

Can the multiplexer utility be installed on the gateway it self?
Is there an easy way to compile it without using docker? Can it be available via repository?

To all your questions: yes :slight_smile: It is just a matter of finding the time to work on this (or somebody who would like to help out with this). Currently I have some other LoRa Server things on my backlog that I’m working on.

Yes I understand your side. Can’t you just do a quick topics on how to setup using docker? I am getting an error when running “docker-compose build”.

Also, using this multiplexer unity can downlinks also be replicated? Or does it sill with the same issue as when using multi packet forwarder?.

I really need this to work as I have deployment project next month.