TTN Gateway Connector for Kerlink

Does someone compiled / is going to compile a release of TTN Gateway Connector for Kerlink Platform?

You can use mp_pkt_fwd which ā€˜speaksā€™ the ttn gateway connector protocol, no need to add additional software in the stack.
A beta (soon to be released) can be found at my website.

3 Likes

Thank you very much. Unfortunately when launching mp_pkt_fwd I get:
ERROR: global_conf.json is not a valid JSON file

I got the global_conf file from https://github.com/TheThingsNetwork/gateway-conf
and it looks correct JSON.

Any idea/suggestion?
D

Is the file in the same directory youā€™re starting the software from? Or the directory specified with the '-c ā€™ switch?

Same directory:

[root@Wirgrid_080e0f59 thethingsnetwork]# ls
5t_local_conf.json    manifest.xml          poly-pkt-fwd.sh
EU_global_conf.json   mp_pkt_fwd            poly_pkt_fwd
global_conf.json      old_global_conf.json  readme.md
local_conf.json       old_local_conf.json
[root@Wirgrid_080e0f59 thethingsnetwork]# ./mp_pkt_fwd
*** Multi Protocol Packet Forwarder for Lora Gateway ***
Version: 3.0.0
*** Lora concentrator HAL library version info ***
Version: 4.0.0; Options: native;
***
INFO: Little endian host
INFO: found global configuration file global_conf.json, parsing it
ERROR: global_conf.json is not a valid JSON file
[root@Wirgrid_080e0f59 thethingsnetwork]#

What does the content of your global_conf.json look like? Try downloading the correct one for your frequency plan from https://github.com/TheThingsNetwork/gateway-conf and replace yours.

1 Like

It is exactly the EU_global_conf.json, downloaded from github, which I renamed in global_conf.json

Downloaded on a Windows PC by any chance? I suspect there might be CR/LF issues. Is there weet available on the kerlink to download it directly to the gateway?

Good point! Now it run smoothly!
ā€¦even if i get now an

> ERROR: [TTN] Connection to server "bridge.eu.thethings.network" failed

Googling on forums, it seems there is some problem server-side. I tried using 40.114.249.243 address too, with same result.
May I ask you which server you are connecting to?

My guess would be that you have a firewall on your network blocking connections to bridge.eu.thethings.network:1883. If you have a computer with telnet installed, you can try to run this command to check: telnet bridge.eu.thethings.network 1883. You will not see any output, but it should not give an error.

For example if it is not blocked by a firewall:

$ telnet bridge.eu.thethings.network 1883
Trying 52.169.76.203...
Connected to bridge.eu.thethings.network.
Escape character is '^]'.

And if it is blocked:

$ telnet bridge.eu.thethings.network 1884
Trying 52.169.76.203...

ā€¦and just hangs on that until you CTRL+C. Or you should get an error message.

Please let us know if this is the reason or not.

Not a firewall problem: this is what I get with tcpdump (suppose it may help):

> 11:50:35.394986 IP 172.21.212.249.56918 > 52.169.76.203.1883: tcp 0
>         0x0000:  4500 0034 6799 4000 4006 d0a7 ac15 d4f9  E..4g.@.@.......
>         0x0010:  34a9 4ccb de56 075b dbe1 a65e 0000 0000  4.L..V.[...^....
>         0x0020:  8002 3908 cb96 0000 0204 05b4 0101 0402  ..9.............
>         0x0030:  0103 0304                                ....
> 11:50:35.437127 IP 52.169.76.203.1883 > 172.21.212.249.56918: tcp 0
>         0x0000:  4500 0034 0000 4000 3106 4741 34a9 4ccb  E..4..@.1.GA4.L.
>         0x0010:  ac15 d4f9 075b de56 13e2 2539 dbe1 a65f  .....[.V..%9..._
>         0x0020:  8012 7210 5973 0000 0204 05a0 0101 0402  ..r.Ys..........
>         0x0030:  0103 0307 aac9 c937                      .......7
> 11:50:35.437516 IP 172.21.212.249.56918 > 52.169.76.203.1883: tcp 0
>         0x0000:  4500 0028 679a 4000 4006 d0b2 ac15 d4f9  E..(g.@.@.......
>         0x0010:  34a9 4ccb de56 075b dbe1 a65f 13e2 253a  4.L..V.[..._..%:
>         0x0020:  5010 0391 08b1 0000                      P.......
> 11:50:35.439848 IP 172.21.212.249.56918 > 52.169.76.203.1883: tcp 278
>         0x0000:  4500 013e 679b 4000 4006 cf9b ac15 d4f9  E..>g.@.@.......
>         0x0010:  34a9 4ccb de56 075b dbe1 a65f 13e2 253a  4.L..V.[..._..%:
>         0x0020:  5018 0391 384c 0000 1093 0200 044d 5154  P...8L.......MQT
>         0x0030:  5404 ce00 1400 0d74 746e 2d72 6f75 7465  T......ttn-route
>         0x0040:  722d 6575 000a 6469 7363 6f6e 6e65 6374  r-eu..disconnect
>         0x0050:  0076 0a0d 7474 6e2d 726f 7574 6572 2d65  .v..ttn-router-e
>         0x0060:  751a 6574 746e 2d61 6363 6f75 6e74 2d76  u.ettn-account-v
>         0x0070:  322e 4f65 5730 754e 517a 5534 5a76 3552  2.OeW0uNQzU4Zv5R
>         0x0080:  6873 5f44 485f 5449 5163 5a48 3435 5536  hs_DH_TIQcZH45U6
>         0x0090:  4530 4642 3848 7348 6663 6934 376a 6c66  E0FB8HsHfci47jlf
>         0x00a0:  3433 5274 4b36 344e 5979 325a 6c44 7639  43RtK64NYy2ZlDv9
>         0x00b0:  6e35 3243 7069 6d4c 514b 4b65 7662 7073  n52CpimLQKKevbps
>         0x00c0:  5a49 3455 7044 4b51 000d 7474 6e2d 726f  ZI4UpDKQ..ttn-ro
>         0x00d0:  7574 6572 2d65 7500 6574 746e 2d61 6363  uter-eu.ettn-acc
>         0x00e0:  6f75 6e74 2d76 322e 4f65 5730 754e 517a  ount-v2.OeW0uNQz
>         0x00f0:  5534 5a76 3552 6873 5f44 485f 5449 5163  U4Zv5Rhs_DH_TIQc
>         0x0100:  5a48 3435 5536 4530 4642 3848 7348 6663  ZH45U6E0FB8HsHfc
>         0x0110:  6934 376a 6c66 3433 5274 4b36 344e 5979  i47jlf43RtK64NYy
>         0x0120:  325a 6c44 7639 6e35 3243 7069 6d4c 514b  2ZlDv9n52CpimLQK
>         0x0130:  4b65 7662 7073 5a49 3455 7044 4b51       KevbpsZI4UpDKQ
> 11:50:35.481269 IP 52.169.76.203.1883 > 172.21.212.249.56918: tcp 0
>         0x0000:  4500 0028 b2aa 4000 3106 94a2 34a9 4ccb  E..(..@.1...4.L.
>         0x0010:  ac15 d4f9 075b de56 13e2 253a dbe1 a775  .....[.V..%:...u
>         0x0020:  5010 00ed 0a3f 0000 0000 0000 0000 13b9  P....?..........
>         0x0030:  99f1                                     ..
> 11:50:35.592064 IP 52.169.76.203.1883 > 172.21.212.249.56918: tcp 4
>         0x0000:  4500 002c b2ab 4000 3106 949d 34a9 4ccb  E..,..@.1...4.L.
>         0x0010:  ac15 d4f9 075b de56 13e2 253a dbe1 a775  .....[.V..%:...u
>         0x0020:  5018 00ed ea2b 0000 2002 0005 0000 a0ad  P....+..........
>         0x0030:  d820                                     ..
> 11:50:35.592266 IP 52.169.76.203.1883 > 172.21.212.249.56918: tcp 0
>         0x0000:  4500 0028 b2ac 4000 3106 94a0 34a9 4ccb  E..(..@.1...4.L.
>         0x0010:  ac15 d4f9 075b de56 13e2 253e dbe1 a775  .....[.V..%>...u
>         0x0020:  5011 00ed 0a3a 0000 0000 0000 0000 ef68  P....:.........h
>         0x0030:  5fd6                                     _.
> 11:50:35.596166 IP 172.21.212.249.56918 > 52.169.76.203.1883: tcp 0
>         0x0000:  4500 0028 679c 4000 4006 d0b0 ac15 d4f9  E..(g.@.@.......
>         0x0010:  34a9 4ccb de56 075b dbe1 a775 13e2 253e  4.L..V.[...u..%>
>         0x0020:  5010 0391 0797 0000                      P.......
> 11:50:35.630183 IP 172.21.212.249.56918 > 52.169.76.203.1883: tcp 0
>         0x0000:  4500 0028 679d 4000 4006 d0af ac15 d4f9  E..(g.@.@.......
>         0x0010:  34a9 4ccb de56 075b dbe1 a775 13e2 253f  4.L..V.[...u..%?
>         0x0020:  5010 0391 0796 0000                      P.......

Jac, thanks for this - always been a fan of your multi forwarders!

Weā€™re just testing this out on a Kerlink over at ThingsManchester, but Iā€™ve run into an error thatā€™s stumping me:

ERROR: Version of calibration firmware not expected, actual:119 expected:2
ERROR: [main] failed to start the concentrator

Just a little background: the Kerlink has been installed with the original ThingsNetwork forwarder, and - for testing - weā€™ve updated with the github global_conf.json and amended local_conf.json to have the new-format servers block (as mentioned on your website). Weā€™re running mp_pkt_fwd manually to watch the logs, when this message appears last.

Is there something fundamental Iā€™ve missed? Are there firmware updates applied by the official TTN forwarder that Iā€™ve missed, or parts that are dependancies for your forwarder?

Thanks for any insights!

- Dave

This error frequently shows when the clock source is not defined correctly. (Should be 0 for Kerlink iirc) It might also help to try restarting a couple of times.

There are no dependencies on other code and the code attempts to send the required firmware to the radio when starting so that should not be an issue.

BTW, the kerlink build is ā€˜ancientā€™ and out-of-date with respects to the code base. If you want to proceed to run it Iā€™ll build an up-to-date version.

Thanks Jac,

Weā€™re counting on the GPS to provide the clock, and sometimes it takes a while for the Kerlink GPS to get a fix. Do you think that could be the source of this error?

Do you mean the system running on the Kerlink is wildly out of date? Weā€™re still running the OS from around a year ago - I will try updating the system before giving it another shot.

We did a number of restarts, each time taking a new error profile, but itā€™s not optimal for production hardware!

Iā€™d drop back to the official TTN forwarder, but your multi gateway solution suits us much better. With theyā€™d roll that into the official system.

Sorry, we are talking about different clocks. The one I am referring to is the ā€œclksrcā€ for the SX1301, not the one used for system time.

In my experience on an RPi it sometimes requires more then one start of the forwarder to get it going, once it is running it is stable.

2 Likes