# Which packet forwarder to use?

**URL:** <https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239>\
**Category:** Raspberry Pi Gateways\
**Created:** [March 25, 2018, 9:42am UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239 "2018-03-25T09:42:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [March 25, 2018, 9:42am UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/1 "2018-03-25T09:42:32Z")

</div>

Hello all. Starting do scan through the forum, it is a littlle bit confusing. My question is: which packet forwarder should I use with RPI3/IC880a. At the moment, I run poly\_pkt\_fwd version 2.1 , but there may have been some progress since it was released.

---

<div class="post-metadata">

**Author:** ![Amedee](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/amedee/32/39610_2.png) [@Amedee](https://www.thethingsnetwork.org/forum/u/Amedee)\
**Post date:** [March 25, 2018, 10:29am UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/2 "2018-03-25T10:29:33Z")

</div>

It doesn’t matter too much in term of end result…

If you want to be a bit more ‘modern’ in term of architecture you can use the Semtech packet forwarder updated and maintained by @kersing [here](https://github.com/kersing/packet_forwarder/tree/master/mp_pkt_fwd).

I have recently upgraded one of mine from Legacy to Semtech, it is pretty pretty straightforward, I can go back and forth between both seamlessly.

From a gateway owner perspective, the nice thing about the Semtech gateway is that it can save packets statistics, so you can monitor the traffic on your gateway. There is no easy way to do that with the Legacy packet forwarder.

---

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [March 25, 2018, 12:32pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/3 "2018-03-25T12:32:50Z")

</div>

@Amedee, thank you for the swift reply. The traffic monitor option is indeed interesting.  
When you say: “pretty straightforward”, do you mean: just cloning the repository and running the install scripts?. Where do you keep the previous set-up, since the install place seems to be the same?

---

<div class="post-metadata">

**Author:** ![Amedee](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/amedee/32/39610_2.png) [@Amedee](https://www.thethingsnetwork.org/forum/u/Amedee)\
**Post date:** [March 25, 2018, 12:50pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/4 "2018-03-25T12:50:07Z")

</div>

My initial setup was based on the excellent [From zero to LoRaWAN in a weekend](https://github.com/ttn-zh/ic880a-gateway/wiki) howto.

For the “upgrade”, I wanted to be able to try and go back if things were going wrong…  
The easiest way to isolate environments is to use Docker. @jpmeijers maintains a [GitHub repo](https://github.com/jpmeijers/ttn-resin-gateway-rpi) to run Jac’s packet forwarder on [resin.io](http://resin.io)  
I am not ready yet to move to Resin, but you can use these scripts for plain Docker as well.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [March 25, 2018, 12:52pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/5 "2018-03-25T12:52:38Z")

</div>

Just to avoid confusion:

- Semtech is legacy
- my software is Multi Protocol packet forwarder, based on poly forwarder with TTN connector protocol (same as used by TTN gateways) added and updated to use the latest Semtech libraries for the concentrator boards.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [March 25, 2018, 12:54pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/6 "2018-03-25T12:54:02Z")

</div>

For a RPi you can always clone the SDcard to a second one and swap cards depending on which software you want to run…

---

<div class="post-metadata">

**Author:** ![Amedee](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/amedee/32/39610_2.png) [@Amedee](https://www.thethingsnetwork.org/forum/u/Amedee)\
**Post date:** [March 25, 2018, 12:56pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/7 "2018-03-25T12:56:14Z")

</div>

Providing you have easy access to your gateway 😉

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [March 25, 2018, 12:58pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/8 "2018-03-25T12:58:15Z")

</div>

While experimenting that is always a good idea. You never know when you mess up and need to reimage the card… (I also had two cards die on me over the years using RPis)

---

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [March 25, 2018, 1:06pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/9 "2018-03-25T13:06:35Z")

</div>

Thanks to all. Using several cards is surely a good approach. And yes. at the moment I run it in an open frame, just everything fixed to a metal bracket avoiding stress to the cables & connectors…

---

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [April 1, 2018, 8:16pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/10 "2018-04-01T20:16:15Z")

</div>

@Amedee Thanks again. I tried the Kerising packet forwarder. Installation went well so far, but the behaviour is unclear. When started from the command line, it forwards uplink messages, but does not forward downlink messages. If gets the RESP message, but does not send it to the concentrator.

When configured as a service, it refused to start. The log always tells:

```auto
Apr 01 22:00:45 raspberrypi ttn-gateway[733]: 22:00:45 INFO: [main] Starting the concentrator
Apr 01 22:00:45 raspberrypi ttn-gateway[733]: 22:00:45 ERROR: [main] failed to start the concentrator
Apr 01 22:00:45 raspberrypi systemd[1]: ttn-gateway.service: Main process exited, code=exited, status=1/FAILURE
Apr 01 22:00:45 raspberrypi systemd[1]: ttn-gateway.service: Unit entered failed state.
Apr 01 22:00:45 raspberrypi systemd[1]: ttn-gateway.service: Failed with result 'exit-code'.

```

This not only once, but over & over. mp\_pkt\_fwd is started as a service.

---

<div class="post-metadata">

**Author:** ![Amedee](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/amedee/32/39610_2.png) [@Amedee](https://www.thethingsnetwork.org/forum/u/Amedee)\
**Post date:** [April 1, 2018, 8:36pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/11 "2018-04-01T20:36:03Z")

</div>

There are some of gotchas, in particular if you have a RPi3

- Ensure you reset the ic880a before you start the packet forwarder
- Set `core_freq=250` in `/boot/config.txt` to avoid variable SPI speed
- Set `dtoverlay=pi3-miniuart-bt` in `/boot/config.txt` to get Bluetooth out of the way

That should do it.

---

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [April 1, 2018, 8:46pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/12 "2018-04-01T20:46:11Z")

</div>

Thanks. That solved the start problem.  
Still, downlink packets are not delivered. The log looks like that:

```auto
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: ### [UPSTREAM] ###
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # RF packets received by concentrator: 1
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # RF packets forwarded: 1 (16 bytes)
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # PUSH_DATA datagrams sent: 2 (840 bytes)
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # PUSH_DATA acknowledged: 100.00%
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: ### [DOWNSTREAM] ###
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # PULL_DATA sent: 3 (100.00% acknowledged)
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # PULL_RESP(onse) datagrams received: 1 (196 bytes)
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # RF packets sent to concentrator: 0 (22 bytes)
Apr 01 22:43:13 raspberrypi ttn-gateway[312]: # TX errors: 0

```

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [April 1, 2018, 8:55pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/13 "2018-04-01T20:55:45Z")

</div>

@robert-hh  
Why are you using the (old) Semtech protocol and not ttn-gateway-connector protocol?

Register the gateway _without_ setting the ‘legacy’ checkmark and in your local\_conf.json add:

```auto
	"servers": [
                {
                        "serv_type": "ttn",
                        "server_address": "bridge.eu.thethings.network",
                        "serv_gw_id": "<gateway ID from console>",
                        "serv_gw_key": "<key from console something like ttn-account-XXXXX>",
                        "serv_enabled": true
                }
]
```

With regards to the downlink packet that has not been sent to the concentrator, the log should show additional information on why it has not been sent.

---

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [April 1, 2018, 9:40pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/14 "2018-04-01T21:40:53Z")

</div>

@kersing. Yes, thanks for the hint about the protocol. I’ll do that, did not know where to configure. But still I’m wondering why the downlink messages are not received. After using the global\_conf.json file from [https://github.com/TheThingsNetwork/gateway-conf](https://github.com/TheThingsNetwork/gateway-conf), it tells now that “RF packets sent to concentrator: 1 (22 bytes)”, but the nod does not get tell it got them. The parameters in tcpdump look ok.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [April 1, 2018, 10:53pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/15 "2018-04-01T22:53:11Z")

</div>

Check the log file to see if there is any information in there.

---

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [April 2, 2018, 5:43am UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/16 "2018-04-02T05:43:22Z")

</div>

I know journalctl, which is pretty talkative, but does not tell much about this detail. Is there a different logfile for this topic?

---

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [April 2, 2018, 6:59am UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/17 "2018-04-02T06:59:27Z")

</div>

using the ttn-gateway-connector protocol the downlink works, which surprised me. Even before, a Rf signal was sent by the gateway exactly 1 s after the uplink request, but it was not received by the node.  
Another question: Now, when a downlink message is ofrwarded, the log shows something like:

```auto
Apr 02 08:46:34 raspberrypi ttn-gateway[590]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Apr 02 08:46:34 raspberrypi ttn-gateway[590]: # RF packets sent to concentrator: 1 (0 bytes)
`'`
What confuses me is this (0 bytes), while actually the message is received. Before, there was something like (22 bytes) in my test messages.
```

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [April 2, 2018, 9:58am UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/18 "2018-04-02T09:58:11Z")

</div>

> [@robert-hh](#):
>
> What confuses me is this (0 bytes)

Understandable. Because of the difference between the transport protocols it is harder to get the byte count right. I decided not to bother while implementing, there were more important issues to solve.  
I might visit it some time in the future. If it bothers you, log an issue at [github](https://github.com/kersing/packet_forwarder) or even better, fix it and send a pull request.

---

<div class="post-metadata">

**Author:** ![robert-hh](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/robert-hh/32/35697_2.png) [@robert-hh](https://www.thethingsnetwork.org/forum/u/robert-hh)\
**Post date:** [April 2, 2018, 10:54am UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/19 "2018-04-02T10:54:04Z")

</div>

Thanks for the response. At the moment I’m just OK, if it’s intentional. I will definitely look into the code some time. At first glance, it looks pretty large.

---

<div class="post-metadata">

**Author:** ![Roberto69](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/roberto69/32/44922_2.png) [@Roberto69](https://www.thethingsnetwork.org/forum/u/Roberto69)\
**Post date:** [January 14, 2021, 6:05pm UTC](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239/20 "2021-01-14T18:05:56Z")

</div>

After almost 3 years I would like to repeat this question. Which packet forwarder is the best to use it on RPi3 & iC880 concentrator?  
As @Amedee says “If you want to be a bit more ‘modern’ in term of architecture you can use the Semtech packet forwarder updated and maintained by @kersing here 199.”  
Is @kersing forwarder still the best choice after all of this time?

After 1038 days of uptime my GW needs some serviceing. Due to it’s difficult-to-reach location I would like to setup whatever is needed.

Actual forwarder is:  
14:04:58 \*\*\* Multi Protocol Packet Forwarder for Lora Gateway \*\*\*  
Version: 3.0.10  
14:04:58 \*\*\* Lora concentrator HAL library version info \*\*\*  
Version: 5.0.1; Options: native;  
…  
14:04:58 INFO: [Transports] Initializing protocol for 1 servers  
14:04:58 INFO: [TTN] server “router.eu.thethings.network” connected  
14:04:58 INFO: [main] Starting the concentrator  
14:04:59 ERROR: [main] failed to start the concentrator

Thank You!

[Next page](https://www.thethingsnetwork.org/forum/t/which-packet-forwarder-to-use/13239.md?page=2)
