# Unable to connect to TTN - RasPi

**URL:** <https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798>\
**Category:** Product support\
**Tags:** support, raspberrypi3\
**Created:** [March 23, 2018, 2:51am UTC](https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798 "2018-03-23T02:51:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![philwilkinson40](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@philwilkinson40](https://forums.balena.io/u/philwilkinson40)\
**Post date:** [March 23, 2018, 2:51am UTC](https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798/1 "2018-03-23T02:51:21Z")

</div>

I have read all the posts related to issues in starting up raspi gateways but cannot see anything similar to my issue.

I have completed a RASPI3 The Things Network gateway setup [using this tutorial](https://www.thethingsnetwork.org/docs/gateways/rak831/).

The whole setup has progressed perfectly until the absolute final connection to The Things Network which returns a simple error, but impossible to debug!

print (“Router:\t\t\t”+router)  
TypeError: cannot concatenate ‘str’ and’NoneType’ objects

The only variation to the tutorial I carried out was during configuring the gateway on Resin panel. Previously Resin had ‘Environmental Variables’, which I presume are equivalent to ‘Device Service Variables’.  
Any ideas where to start fault find this ??

---

<div class="post-metadata">

**Author:** ![philwilkinson40](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@philwilkinson40](https://forums.balena.io/u/philwilkinson40)\
**Post date:** [March 23, 2018, 2:12pm UTC](https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798/4 "2018-03-23T14:12:09Z")

</div>

any ideas?

---

<div class="post-metadata">

**Author:** ![dfunckt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dfunckt/32/56_2.png) [@dfunckt](https://forums.balena.io/u/dfunckt)\
**Post date:** [March 23, 2018, 2:23pm UTC](https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798/5 "2018-03-23T14:23:36Z")

</div>

Hello, we’ve recently split the Environment Variables section on the device page into Device Service Variables and Device Configuration. The tutorial describes adding two variables (RESIN\_HOST\_CONFIG\_core\_freq, RESIN\_HOST\_CONFIG\_dtoverlay) that should now be added to the Device Configuration page \> Custom Configuration Variables. RESIN\_\* variables are reserved and can only be managed in this page. Can you try that and see if it works?

---

<div class="post-metadata">

**Author:** ![philwilkinson40](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@philwilkinson40](https://forums.balena.io/u/philwilkinson40)\
**Post date:** [March 23, 2018, 9:19pm UTC](https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798/7 "2018-03-23T21:19:48Z")

</div>

Thanks for responding,  
I had followed the tutorial on this,  
so RESIN\_HOST\_CONFIG\_core\_freq was input and set to 250 and RESIN\_HOST\_CONFIG\_dtoverlay was set to pi3-miniuart-bt.  
However, I noticed that both these variables had a status of ‘override’ for the Raspi gateway device, which I was able to correct.  
Sadly, following a reboot of the device the same error is returned and the service is exited.

I should have mentioned before. The RASPI device has been connected to Resin service without any problems. This is simply a connection to TheThingsNetwork problem. Just for reference, this is using the Australian frequency plan AU915.

Any more ideas?

---

<div class="post-metadata">

**Author:** ![philwilkinson40](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@philwilkinson40](https://forums.balena.io/u/philwilkinson40)\
**Post date:** [March 25, 2018, 12:46am UTC](https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798/8 "2018-03-25T00:46:59Z")

</div>

Hi Resin engineers,  
I have a fleet of RasPi gateways to deploy, and I am not getting very far with the first one! See gateway ambiguous failure code below.  
Can one of the resin engineers give me an idea if you have had no problems with lorawangw previously, and this is likely to be a TheThingsNetwork connection issue (or any other known issues).  
There must have been a big increase in deployed gateways since last month’s TheThingsNetwork conference in Amsterdam so any other issues identified would be useful.  
Thanks

```
   Traceback (most recent call last):
    25.03.18 08:35:57 (+0800) main File "/opt/ttn-gateway/run.py", line 137, in<module>
    25.03.18 08:35:57 (+0800) main print ("Router:\t\t\t"+router)
    25.03.18 08:35:57 (+0800) main TypeError: cannot concatenate 'str' and 'NoneType' objects
    25.03.18 08:35:58 (+0800) Service exited 'main ......'
```

---

<div class="post-metadata">

**Author:** ![eron93br](https://avatars.discourse-cdn.com/v4/letter/e/a87d85/32.png) [@eron93br](https://forums.balena.io/u/eron93br)\
**Post date:** [August 3, 2018, 6:37pm UTC](https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798/10 "2018-08-03T18:37:14Z")

</div>

same problem here, I got the gateway working but after 2 hours I got stucked on:

03.08.18 15:35:54 (-0300) main Traceback (most recent call last):  
03.08.18 15:35:54 (-0300) main File “/opt/ttn-gateway/run.py”, line 137, in   
03.08.18 15:35:54 (-0300) main print (“Router:\t\t\t”+router)  
03.08.18 15:35:54 (-0300) main TypeError: cannot concatenate ‘str’ and ‘NoneType’ objects  
03.08.18 15:35:59 (-0300) Service exited ‘main…’

---

<div class="post-metadata">

**Author:** ![sqweelygig](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/sqweelygig/32/150_2.png) [@sqweelygig](https://forums.balena.io/u/sqweelygig)\
**Post date:** [September 6, 2018, 4:07pm UTC](https://forums.balena.io/t/unable-to-connect-to-ttn-raspi/2798/11 "2018-09-06T16:07:08Z")

</div>

I notice when googling this error that [https://github.com/jpmeijers/ttn-resin-gateway-rpi/pull/20](https://github.com/jpmeijers/ttn-resin-gateway-rpi/pull/20) has been merged, and expect that it solves this problem.
