FAQ - Kerlink Gateway

Can anyone tell the default password of the Kerlink Gateway, the one listed in the manual is not correct.

did you try ā€˜rootā€™?

thanks, root for name and pw worked

Hi all, just got two Kerlinks here and trying to get them to talk to TTN. I changed the local_conf.json as suggested but after starting ./pkt-fwd.sh I see some things I donā€™t expect. Is there anyone willing to give me a hand?

First of all: I see I need to setup a portforward to the Kerlinkā€™s IP, is there no way around it? It really surprises me, as it supports a SIM too but most of the operators wonā€™t give you a public IP (so : behind NAT) and there is no way to setup inbound port forwards.

WARNING: [down] ignoring invalid packet
WARNING: [down] ignoring invalid packet
WARNING: [down] ignoring invalid packet

-snap-

INFO: [down] the last 3 PULL_DATA were not ACKed, exiting application

INFO: End of downstream thread

INFO: End of upstream thread

-snap-

END

INFO: concentrator stopped successfully
INFO: Exiting packet forwarder program

@Fokko or @devlaam?

OkƩ so the WARNING: [down] ignoring invalid packet is common. There are a lot of strange things over 868 which are no LoRa at all, or some packages from far away nodes/gateways. If you want to know more there is a package logger.

As it seems, you gateway is not in contact with the server/internet. The port doesnā€™t have to be forwarded since the gateway initiates a socket.
Then are you having long ping latencies, do you have a connection at al. Maybe tee server was down for a moment. Please try to run de pkg-fwd.sh a couple of times.

Thanks for the clarification on the invalid packet.

Why do I see the ā€˜concentrator stopped successfullyā€™ and ā€˜Exiting packet forwarder programā€™ after a while? I did not stop anything.

The software is stopping due to errors it seems.

When I remove the added stuff from local_conf.json this does not happen. With tcpdump I can see packets being sent to iot.semtech.com but the gateway does not show up in their overview.

I see pull_data acks returning from Semtech:

INFO: [down] PULL_ACK received in 26 ms
INFO: [down] PULL_ACK received in 26 ms
INFO: [down] PULL_ACK received in 26 ms

At the same time I see UDP packets sent to semtech (and answers coming back).

It seems the TTN server is not responding to the pull_data commands (correctly), although I did see some packets:

INFO: Auto-quit after 3 non-acknowledged PULL_DATA

20:49:54.097783 IP (tos 0x0, ttl 64, id 19847, offset 0, flags [DF], proto UDP (17), length 40)
192.168.1.27.57860 > 54.229.214.112.1700: [udp sum ok] UDP, length 12
0x0000: 4500 0028 4d87 4000 4011 1e25 c0a8 011b Eā€¦(M.@.@ā€¦%ā€¦
0x0010: 36e5 d670 e204 06a4 0014 35b2 0151 ff02 6ā€¦pā€¦5ā€¦Qā€¦
0x0020: aa55 5a00 0806 05a2 .UZā€¦
20:49:54.125439 IP (tos 0x0, ttl 51, id 36451, offset 0, flags [DF], proto UDP (17), length 32)
54.229.214.112.1700 > 192.168.1.27.57860: [udp sum ok] UDP, length 4
0x0000: 4500 0020 8e63 4000 3311 ea50 36e5 d670 Eā€¦c@.3ā€¦P6ā€¦p
0x0010: c0a8 011b 06a4 e204 000c 47c1 0151 ff01 ā€¦Gā€¦Qā€¦
0x0020: 0000 0000 0000 0000 0000 0000 0000 3db7 ā€¦=.
0x0030: 685d h]

I might be wrong here but it seems the TTN server is responding wrong to my PULL_DATA message:

According to the Semtech documentation Iā€™m sending protocol 0x01, token 0x7e 0x4e and PULL_DATA identifier 0x02, plus the EUI of my gateway in the remaining 8 octets. Next I receive a response from the TTN server:

Again protocol 0x01, token 0x7e 0x4e, but this time the next octet is 0x01, this is a PUSH_Ack and not a PULL_Ack. This seems why the Kerlink is barfing over this: it is expecting a 0x04.

This is something @johan has to look into or he already knows the answer. I did not debug a gateway voor a while now, but it could be a bug got in the backend.

@Arjan If I understood @johan correctly he would like to have an issue registered at GitHub issue tracker for croft regarding your findings.

Roger, done.

1 Like

Hi @Arjan

We are configuring a Kerlink gateway in Brazil and have the same type of problem that you had. The gateway is sending that to Semtech (iot.semtech.com) and being listed there but when the json file is changed it stops working. How did you solved the problem with your gateway? Any tip or workaround?

Thanks
Flavio

Adding this in your local_conf.json will ā€˜fixā€™ it:

ā€œautoquit_thresholdā€: 0,

I suspect there is an issue in the TTN gateway, itā€™s not responding correctly to PULL_ACK requests, I reported it to @johan and he labeled the issue as ā€˜bugā€™ ā€¦

Besides that Iā€™ve now installed the TTN Polyforwarder via a dota file from the link below, but it seems it was removed for some reason? @johan ?

https://github.com/TheThingsNetwork/kerlink-station-firmware/tree/master/dota

@Arjan saw it, can confirm, will fix tonight along with few other things

2 Likes

@johan am I mistaken or has the polyforwarder dota been removed from github?

The polyforwarder dota did not work correctly as it supposed to do. It never did. Where cleaning up github and since it had been long a go I made the dotafile en never got around fixing it I removed it.
We have to make a new/better one.

Ah, that might explain some strange things Iā€™m seeing at the moment. Iā€™ll revert back to the demo forwarder then.

Greetings.
Iā€™m trying to connect my gateway to the internet through 3G. Configuring with this manual. I connect to gateway by ssh with Putty.
How can i see, that 3G have link, and where can i look for port and IP, recieved by gateway?
P.s. im not very familiar with *nix
Many thanks.