Packet forwarder future


It has been indicated TTN whish to move away
from the packet forwarder.
Will the new SW is planned to support the gateway not coming from TTN - Raspberry Pi based among others ?

(Hylke Visser) #2

The replacement for the packet forwarder will initially support Linux or FreeRTOS based gateways. As it will be open source, you'll be able to port it to anything else if needed :slight_smile:

(Jac Kersing) #3

I've been assured TTN will allow gateways using the current Semtech demo protocol (UDP) to connect as well, so current setups will be able to connect, just not use the more reliable new protocol.


Is the newest packet forwarder protocal?

Thank you!

(Jac Kersing) #5

If you are referring to the TTN protocol, then no it is not. The TTN protocol is not UDP based. It is the newest version of the Semtech reference protocol.


Our goal is to write a piece of code on Raspberry Pi to forward packets to TTN.

1) Could I use to forward packet to TTN?

2) If 1) is not true or not recommanded, where can I find TTN's protocol documentation?

Thank you!

(Jac Kersing) #7

There is already software to forward packets to TTN for the RPi available on github. Why do you want to duplicate the effort?

1) Yes you can.

2) If you really want to duplicate the effort, check TTN gateway connector and packet forwarder bridge code, that is currently all the information on the TTN protocol I am aware of. (I have a working packet forwarder using this protocol which will be available on RPi in the near future).


For practice and better understanding :stuck_out_tongue:


My colleague and I successfully forward mote's data to TTN via UDP by following the protocal

We could subscribe our uplink in MQTT.

Now we want to replace UDP requests by MQTT.
I try to publish some JSON to the uplink topic but get nothing back from neither MQTT subscriptions nor TTN console.
Here's the JSON:

	"port": 1,
	"counter": 514,  // I make sure this number is increasing
	"payload_raw": "SGVsbG8sIHdvcmxkIGZyb20gQXJkdWlubyBBQlAu",
	"payload_fields": {},
	"metadata": {
		"time": "2017-01-09T18:53:39.469094015Z",
		"frequency": 903.5,
		"modulation": "LORA",
		"data_rate": "SF7BW125",
		"coding_rate": "4/5",
		"gateways": [{
			"gtw_id": "eui-b827ebffff78cded",
			"timestamp": 2604218849,
			"time": "1754-08-30T22:53:41.128654848Z",
			"channel": 0,
			"rssi": -115,
			"snr": 3,
			"rf_chain": 0,
			"latitude": 43.7712,
			"longitude": -79.6273

How can I publish uplink to TTN's MQTT broker?

Thank you!


Is there a RabbitMQ way to forward package to TTN?

(Jac Kersing) #12

Why would you want to?


RPC + MQTT reminds me RabbitMQ.

(Jac Kersing) #14


Again, why would you want to use RabbitMQ to forward a package?


nvm, I'm using protocol buffer/gRPC to forward package now.


Actually it's more on the downlink side instead of forwarding package. is trying to poll data from the server every N seconds. Since I'd like to get the downframe near real time in case there are some class C motes, periodic UDP requests won't meet the requirement. I don't want to set up a very high polling frequency as a solution.

MQTT solves my downlink problem. So I was wondering if I could use MQTT to publish uplink until arjanvanb indicated that I should use protocol buffer/gRPC. I think gRPC doesn't work under publish/subscribe mechanism so I have to poll the downlink periodically as what I did for UPD. (I'm not sure about the gRPC mechanism, please correct me if I'm wrong).

Right now our plan is to subscribe the downlink by MQTT and forwarding data by protocol buffer. Maybe I have a little bit OCD so that I want the uplink/downlink working under same mechanism.

I see this project, and also RPC + MQTT makes me think of RabbitMQ. So I was wondering maybe TTN is using RabbitMQ somewhere on the backend and there is a RabbitMQ way to publish/subscribe uplink/downlink?

I'm not sure if my understanding is correct, so please give me some advise.

Thank you!