# Multitech - TTN connection lost after bad connectivity

**URL:** <https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355>\
**Category:** MultiTech Gateways\
**Created:** [February 5, 2018, 12:19pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355 "2018-02-05T12:19:23Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![pe1mew](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pe1mew/32/48520_2.png) [@pe1mew](https://www.thethingsnetwork.org/forum/u/pe1mew)\
**Post date:** [February 21, 2018, 10:55am UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/21 "2018-02-21T10:55:29Z")

</div>

I see that the GW has received 5+2 messages (in this log snippet). They did not appear in the logging of console?

It seems as if connection status is not printed in your log:

> ```
> 21.02.18 11:56:31 (+0100) ### [CONNECTIONS] ###
> 21.02.18 11:56:31 (+0100) # bridge.eu.thethings.network: Connected
> 21.02.18 11:56:31 (+0100) # Semtech status report send.
> 21.02.18 11:56:31 (+0100) ##### END #####
> 
> ```

i presume you are using the updated version from Jac?

---

<div class="post-metadata">

**Author:** ![ecoadapt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ecoadapt/32/35697_2.png) [@ecoadapt](https://www.thethingsnetwork.org/forum/u/ecoadapt)\
**Post date:** [February 21, 2018, 11:17am UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/22 "2018-02-21T11:17:34Z")

</div>

Maybe I did’nt wait for a long enough time but no I did not see any connection status logs, and rebooted since.  
I use the version shown on the following URL:  
[https://www.thethingsnetwork.org/docs/gateways/multitech/aep.html](https://www.thethingsnetwork.org/docs/gateways/multitech/aep.html)  
Is that the one you’re refering to?

---

<div class="post-metadata">

**Author:** ![pe1mew](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pe1mew/32/48520_2.png) [@pe1mew](https://www.thethingsnetwork.org/forum/u/pe1mew)\
**Post date:** [February 21, 2018, 11:53am UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/23 "2018-02-21T11:53:38Z")

</div>

> [@ecoadapt](#):
>
> Is that the one you’re refering to?

I think @kersing can give an answer

---

<div class="post-metadata">

**Author:** ![ecoadapt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ecoadapt/32/35697_2.png) [@ecoadapt](https://www.thethingsnetwork.org/forum/u/ecoadapt)\
**Post date:** [February 21, 2018, 2:47pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/24 "2018-02-21T14:47:00Z")

</div>

I downloaded it from [https://github.com/kersing/multitech-installer/raw/master/installer.sh](https://github.com/kersing/multitech-installer/raw/master/installer.sh)  
(it uses TCP on port 1883, not UDP)

---

<div class="post-metadata">

**Author:** ![bsiege](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bsiege/32/46459_2.png) [@bsiege](https://www.thethingsnetwork.org/forum/u/bsiege)\
**Post date:** [February 21, 2018, 8:15pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/25 "2018-02-21T20:15:11Z")

</div>

I had never connectivity problems with the Multitech-Gateway over months. Something at the backend must have changed too. Now i have daily issues. At least it is Linux i can run a simple script who watches over the connection. Ok there are many new gateways since christmas, but the scaling should be calculable.

---

<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:** [February 21, 2018, 8:30pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/26 "2018-02-21T20:30:39Z")

</div>

The good news for RPi users, pull the current sources for all components, rebuild and your reconnect issues should disappear.

Once the new version is running the status should include the lines:

```auto
### [CONNECTIONS] ###
# bridge.eu.thethings.network: Connected
```

(Of course the bridge.eu.thethings.network part varies depending on the TTN server you connect to)

For the MultiTech owners, if you want to, grab an updated package from  
[http://office.the-box.com/mp-packet-forwarder\_3.0.20-r1\_arm926ejste.ipk](http://office.the-box.com/mp-packet-forwarder_3.0.20-r1_arm926ejste.ipk) , transfer to your MultiTech Conduit and use ‘opkg install mp-packet-forwarder\_3.0.20-r1\_arm926ejste.ipk’ to update to the new version. The installer will be updated as well, however that will take some time as testing the updated installer is time consuming.  
(Logging should include the same lines after update)

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [February 21, 2018, 8:35pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/27 "2018-02-21T20:35:48Z")

</div>

> [@kersing](#):
>
> rebuild and your reconnect issues should disappear.

great news… tnx Jack !

---

<div class="post-metadata">

**Author:** ![bsiege](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bsiege/32/46459_2.png) [@bsiege](https://www.thethingsnetwork.org/forum/u/bsiege)\
**Post date:** [February 21, 2018, 8:42pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/28 "2018-02-21T20:42:07Z")

</div>

Thanks, will try. Would you mind to publish the Checksums of the packet? md5sum sha256sum is supported by busybox on multitech.

---

<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:** [February 21, 2018, 8:51pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/29 "2018-02-21T20:51:36Z")

</div>

md5sum: 8f3364c09910df3077fd0f6930b4bea1 mp-packet-forwarder\_3.0.20-r1\_arm926ejste.ipk

---

<div class="post-metadata">

**Author:** ![ecoadapt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ecoadapt/32/35697_2.png) [@ecoadapt](https://www.thethingsnetwork.org/forum/u/ecoadapt)\
**Post date:** [February 22, 2018, 9:51am UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/30 "2018-02-22T09:51:24Z")

</div>

Great thanks! I installed it successfully on one of my gateways.

---

<div class="post-metadata">

**Author:** ![Paul\_Stewart](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/paul_stewart/32/46922_2.png) [@Paul\_Stewart](https://www.thethingsnetwork.org/forum/u/Paul_Stewart)\
**Post date:** [February 22, 2018, 11:09pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/31 "2018-02-22T23:09:32Z")

</div>

Thanks, put it on one of my testing gateways as well.

@kersing can you recommend ways to test it before it goes out into the field gateways? (or it should be OK?)

Also, does it replace the global\_conf.json file completely with a new one? (just wondering because on one of my gateways we put in the “autoquit” line, and wondering if I have to remove that or will it just get overwritten anyway. I saw that it was updated in the install of the ipk

cheers  
Paul

edit: never mind answered my own question, it gets overwritten

---

<div class="post-metadata">

**Author:** ![Charles](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/charles/32/45146_2.png) [@Charles](https://www.thethingsnetwork.org/forum/u/Charles)\
**Post date:** [February 23, 2018, 12:07am UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/32 "2018-02-23T00:07:51Z")

</div>

I had the same issue on another GW (4G Internet came after forwarder start and forwarder was never started because of on internet) and I kept things simple, every 5 minutes if forwarder is down restart it.

created a file `/etc/cron.d/forwarder_restart` with the following content (adjust for your os and forwarder)

```auto
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

*/5 * * * * root /etc/init.d/lora-packet-forwarder start

```

Of course check the init script to be sure forwarder does nothing if it already started

Since that no more issues, I know not clean, but took me 5 minutes and solved my issue.

---

<div class="post-metadata">

**Author:** ![pe1mew](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pe1mew/32/48520_2.png) [@pe1mew](https://www.thethingsnetwork.org/forum/u/pe1mew)\
**Post date:** [February 23, 2018, 5:46am UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/33 "2018-02-23T05:46:19Z")

</div>

Th difficulty with your solution @Charles is that it is less simple to implement while using resin.

---

<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:** [February 23, 2018, 11:25am UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/34 "2018-02-23T11:25:26Z")

</div>

> [@Paul\_Stewart](#):
>
> can you recommend ways to test it before it goes out into the field gateways? (or it should be OK?)

I’ve done extensive testing (aided by community members) and _I am confident_ the software is at the same level of reliability poly forwarder is at. However, it is still software and I haven’t mathematically proven it to be correct 🙂

> [@Paul\_Stewart](#):
>
> we put in the “autoquit” line, and wondering if I have to remove that or will it just get overwritten anyway.

As you found it will be overwritten. It is overwritten on every restart of the sotware on MultiTech conduits. Keep in mind “autoquit” only works for the semtech protocol, the ttn protocol has no option to quit the software when the connection is lost. (Yes, I have been tempted to take that route in order to work around the reconnect issues but in the end didn’t have to resort to it)

---

<div class="post-metadata">

**Author:** ![pe1mew](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pe1mew/32/48520_2.png) [@pe1mew](https://www.thethingsnetwork.org/forum/u/pe1mew)\
**Post date:** [March 13, 2018, 7:17am UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/35 "2018-03-13T07:17:18Z")

</div>

After 4 weeks of testing on multiple instances of the multi packet forwarder I can confirm that the current version of @kersing the multi packet forwarder is no longer suffering from link failures. It reconnects despite the bad 4G link quality.

---

<div class="post-metadata">

**Author:** ![Charles](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/charles/32/45146_2.png) [@Charles](https://www.thethingsnetwork.org/forum/u/Charles)\
**Post date:** [March 13, 2018, 12:27pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/36 "2018-03-13T12:27:00Z")

</div>

Great, what’s the best update option?

opkg the [ipk](http://office.the-box.com/mp-packet-forwarder_3.0.20-r1_arm926ejste.ipk) provided by @kersing above or can we update the version already installed by reinstall like that?

```auto
wget https://github.com/kersing/multitech-installer/raw/master/installer.sh --no-check-certificate

```

then

```auto
sh installer.sh

```

---

<div class="post-metadata">

**Author:** ![pe1mew](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pe1mew/32/48520_2.png) [@pe1mew](https://www.thethingsnetwork.org/forum/u/pe1mew)\
**Post date:** [March 13, 2018, 12:40pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/37 "2018-03-13T12:40:53Z")

</div>

@Charles For my trials I used production gateways that use the [resin.io](http://resin.io) implementation of @jpmeijers. That implementation is retrieving the last repository from @kersing during installation.

It is not the answer to your question but a quick explanation of what I have done.

---

<div class="post-metadata">

**Author:** ![Charles](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/charles/32/45146_2.png) [@Charles](https://www.thethingsnetwork.org/forum/u/Charles)\
**Post date:** [March 13, 2018, 12:46pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/38 "2018-03-13T12:46:11Z")

</div>

@pe1mew you can use [resin.io](http://resin.io) on multitech?

I would love using [resin.io](http://resin.io) but I always need specific features and I don’t know how to add them on resin (like service for blinking led, display information, install private lorawan server, install WiFi AP on GW, …)  
So these things take me less than 15 min to configure on RPI Zero with concentrator so I don’t have time to spend days to achieve the same on [resin.io](http://resin.io), but as I said I would love 😉

---

<div class="post-metadata">

**Author:** ![pe1mew](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/pe1mew/32/48520_2.png) [@pe1mew](https://www.thethingsnetwork.org/forum/u/pe1mew)\
**Post date:** [March 13, 2018, 12:53pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/39 "2018-03-13T12:53:56Z")

</div>

> [@Charles](#):
>
> you can use [resin.io](http://resin.io) on multitech?

Sorry for the confusion. I am running RapsberryPI and IMST IC880a gateways not Multitech.  
This was the first topic in my memory where the multi packet forwarder linking issue was mentioned that seems to affect all deployments of multi packet forwarder.

As I had good results I wanted to share them with the community and I choose this thread to share them as that seems the best to me.

I do know your led additions to the packet forwarder and they are nice and helpful but it is a derivation of the code of @kersing and it is not simple to maintain both.  
I think it is relatively easy to fork the [resin.io](http://resin.io) repo of @jpmeijers and replace the multi packet forwarder with your own fork.

It would be great to merge your features to the main trunk of multi packet forwarder. I my opinion that can be relative simple.

---

<div class="post-metadata">

**Author:** ![Charles](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/charles/32/45146_2.png) [@Charles](https://www.thethingsnetwork.org/forum/u/Charles)\
**Post date:** [March 13, 2018, 1:02pm UTC](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355/40 "2018-03-13T13:02:35Z")

</div>

@pe1mew  
I’m using @kersing packet forwarder, now the LED management is done by a python script running by systemd  
check the script `monitor*.py` there

> **[ch2i/LoraGW-Setup](https://github.com/ch2i/LoraGW-Setup)**
>
> SX1301 Lora Concentrator Raspberry PI based gateway setup - ch2i/LoraGW-Setup

So it should be easy to add them 😉

[Previous page](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355.md?page=1)

[Next page](https://www.thethingsnetwork.org/forum/t/multitech-ttn-connection-lost-after-bad-connectivity/12355.md?page=3)
