FAQ - Kerlink Gateway

Yes, ppp0 is the preferred interface.

Right, so here’s what ifconfig brings up

eth0      Link encap:Ethernet  HWaddr 02:4B:08:05:02:CA
          inet addr:192.168.0.138  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::4b:8ff:fe05:2ca/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25389 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3111 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3018068 (2.8 MiB)  TX bytes:573352 (559.9 KiB)
          Interrupt:29

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1935 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1935 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:124558 (121.6 KiB)  TX bytes:124558 (121.6 KiB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:2.65.132.105  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:82 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:5128 (5.0 KiB)  TX bytes:367 (367.0 B)

sl0       Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:172.16.0.1  P-t-P:172.16.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:296  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

The modem is being assigned an IP address by the network operator, and there is some data being sent.
But when testing with a loramote, all information is sent via the ethernet conection instead.
Bearer priorities are set to “ppp0, eth0, eth1”.
Checking the log, I find this:

daemon.warn pppd[1214]: Could not determine remote IP address: defaulting to 10.64.64.64

Here is the network configuration.

# defines hostname prefix
HOSTNAME=Wirgrid_

# activates lo0 at startup
LOOP=yes

# activates eth0 at startup
ETHERNET=yes
# claims dhcp request on eth0
ETHDHCP=yes
# if fix addr is selected on eth0
ETHIPADDR=192.168.4.155
ETHNETMASK=255.255.255.0
ETHBROADCAST=192.168.4.255
ETHGATEWAY=192.168.4.1

# Disable Ethernet Power if no link detected
ETHAUTODETECT=no

# activates eth0:1 at startup
ETHERVIRT=no

# activates sl0 at startup
SLIP=yes

# Selector operator APN
GPRSAPN=data.tre.se
# Enter pin code if activated
GPRSPIN=
# Update /etc/resolv.conf to get dns facilities
GPRSDNS=yes
# PAP authentication
GPRSUSER=	
GPRSPASSWORD=

# activates router at startup
ROUTER=yes
DEVOUT=eth0
DEVIN=ppp0
DHCPD=yes
DHCPDSTARTADDRPOST=90
DHCPDSTOPADDRPOST=120

# manual DNS server                            
DNSSERVER1=8.8.8.8
DNSSERVER2=8.8.4.4

#Bearer priority order
BEARERS_PRIORITY="ppp0,eth0,eth1"

What is the output when you type route in terminal?

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
10.64.64.64     *               255.255.255.255 UH    0      0        0 ppp0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
172.16.0.2      *               255.255.255.255 UH    0      0        0 sl0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
`

EDIT: I managed to get it working today by setting ppp0 as the default interface with “route add default dev ppp0”.

The ppp0 is still not the default route. Strange since you configured it right. Did you do a restart with LAN cable unplugged?

That I have, I have to start gprs manually and set ppp0 as the default interface manually. After doing that, the 3G backhaul works perfectly. Why gprs isn’t starting and being set as the default root automatically, I do not know.

Have you enabled autoconnect in the knet daemon? I also takes a while to catchup.

That I have, which makes it all the more strange.

<!-- ############## connection parameters ############## -->

<!-- nb of second to retry to connect to server if connection failed-->
<CONNECT retry_timeout="10" />
<!-- port nunmber for local application kms connection -->
<CONNECT kms_port="35035" />
<!-- enable the autoconnect feature (YES/NO) -->
<CONNECT auto_connection="YES" />

Hi, I just installed my kerlink using this guide http://thethingsnetwork.org/wiki/Installing-your-Kerlink

Well all up & running, my gateway is receiving packets, and sending them to TTN… here the example of my node that sent hundreds of them already successfully through my both gateways… also the AA555A0008060760 gw (the kerlink)… http://thethingsnetwork.org/api/v0/nodes/02030800/

but my GW though is still not visible: http://thethingsnetwork.org/api/v0/gateways/AA555A0008060760/

while my other GW (receiving the same packages, see above) is visible: http://thethingsnetwork.org/api/v0/gateways/1DEE091A321845BF/

also on ttnstatus.org the gateway isnt listed, the lorank-8 is…

what can I have done wrong? I just followed the guide, and both gateways use an almost exact configuration (except for the GW ID)

Any suggestions?

Niels

@niels
Is the kerlink sending status packages? Probably not as that would make the gateway appear on the API page and on ttnstatus.org. (tcpdump will show packets with readable (in the ascii part text containing “{“stat”” if it is)

For status messages you should have (fake) GPS enabled in the configuration. (For fake you’ll need to set the coordinates as well, but I think kerlink has real GPS??)

There is a wrong link in the how to. This old software does not send a status update. Just replaced it. Please try again.

cool… will update it tomorrow…

maybe it would be nice to be able to automatically alter the status messages in both the api and the TTN-specific packetforwarder software so that the “remark” on ttnstatus.org is also automatically filled… instead of having to manual: New Gateway Registration ?

i’ve seen local_conf.json files having stuff like:

"gateway_conf": {
    /* Email of gateway operator, max 40 chars*/
    "contact_email": "", 
    /* Public description of this device, max 64 chars */
    "description": ""    
}

Yes! and also the interactive map with long latitude. I beleve those field are only possible with the poly packed forwarder. But that’s it the one in de dota file I updated yesterday.

Greeting. Where I can configure PPPoE connection in Kerlink Gateway? Now, I can connecting with 3G (i have staion with 3g modem modification) and DHCP. But, when I haven’t DHCP-server, how my gateway will receive the Internet?

on my kerlink’s firmware the pppd libs are there ( e.g. ./usr/lib/pppd/2.4.5/rp-pppoe.so )

so you should be able to configure pppoe like any other linux pppoe client (google for a pppoe client setup guide)

1 Like

If you’re still figuring out how to configure the Kerlink to use GPRS/3G, things to consider are: choose your ip_link address in /knet/knetd.xml wisely as the auto connect mechanism depends on this. Also make sure the poly packet forwarder is restarted whenever there is an interface change (i.e. ppp0 comes up/goes down) as it will break your IP config if it isn’t.

Read more here: https://ipv6.net/blog/how-to-configure-the-kerlink-iot-gateway-using-the-gprs3g-modem/

Cheers!
Erwin

1 Like

I`m trying to add a Kerklink Gateway to the TheThingsNetwork but the local config file seems to be invalid. I cannot figure out how to get the gateway_ID correct. It is MAC based right?

{ "gateway_conf": { "gateway_ID": "xxxxxx", "serv_port_up": 1700, "serv_port_down": 1700, "server_address": "croft.thethings.girovito.nl", "forward_crc_valid": true, "forward_crc_error": false, "forward_crc_disabled": true } }

I think it is not MAC based, but serial number. Look at the format in the other gateways, it should be something like “AA555A0008060599”.

I did not find any serial number on the casing or inside the Kerlink which reseambles the AA555 number

from the manual ;

Please note that the pkt-fwd.sh script will automatically update the gateway_ID field in local_conf.json file, based on the gateway MAC address, so that it is sure to use a unique gateway ID on the network.
Revision 0.7 – August 13th 2015 Page 10 of 11 www.semtech.com ©2014 Semtech Corporation

WIRELESS & SENSING PRODUCTS
For example, if the gateway’s MAC address is 02:4B:08:04:00:53, the gateway_ID in local_conf.json will be “xxxxxxxx08040053”. The last 8 digits of the gateway_ID correspond to the last 8 digits of the MAC address.