FAQ - Kerlink Gateway

Oke I get the LCP: timeout sending Config-Requests error if I try to connect without the simcard. Are you sure the simcard is in there correctly? Maybe the simcard is not supported or something, please try a different one.

I found the actual command, it makes no difference but gets rid of all the funny characters.

pppd /dev/gsm_ppp 115200

@fokko that should not be required, also the logs show that pppd was actually started by the script. The LCP error indicate the PPP session failed to negotiate correctly, I strongly suspect an APN (or username/password) problem.

I tested with the wiki instructions and found they worked, but after inserting a SIM I got an ERROR 13, which indicates a SIM error. I then rebooted the unit and executed the /etc/init.d/gprs start script again and this time it started without problem.

Dec 10 12:17:51 (none) daemon.notice pppd[12192]: pppd 2.4.5 started by root, uid 0
Dec 10 12:17:52 (none) local2.info chat[12199]: send (\dAT+CGDCONT=1,“IP”,“internet.mvno.mobi”^M)
Dec 10 12:17:53 (none) local2.info chat[12199]: expect (OK)
Dec 10 12:17:53 (none) local2.info chat[12199]: ^M
Dec 10 12:17:53 (none) local2.info chat[12199]: OK
Dec 10 12:17:53 (none) local2.info chat[12199]: – got it
Dec 10 12:17:53 (none) local2.info chat[12199]: send (ATDT99**1#^M)
Dec 10 12:17:53 (none) local2.info chat[12199]: expect (CONNECT)
Dec 10 12:17:53 (none) local2.info chat[12199]: ^M
Dec 10 12:17:53 (none) local2.info chat[12199]: ^M
Dec 10 12:17:53 (none) local2.info chat[12199]: +CME ERROR: 13^M
Dec 10 12:17:56 (none) local2.info chat[12199]: alarm
Dec 10 12:17:56 (none) local2.info chat[12199]: Failed

@Arjan It is a modem connection error. Wrong APN settings and such give more detailed errors. Running pppd without simcard actually produces the exact error @Chris.K describes.

# pppd

Dec 10 11:48:36 (none) daemon.notice pppd[23206]: pppd 2.4.5 started by root, uid 0
Dec 10 11:48:36 (none) daemon.info pppd[23206]: Using interface ppp0
Dec 10 11:48:36 (none) daemon.notice pppd[23206]: Connect: ppp0 <--> /dev/pts/2
Dec 10 11:49:06 (none) daemon.warn pppd[23206]: LCP: timeout sending Config-Requests
Dec 10 11:49:06 (none) daemon.notice pppd[23206]: Connection terminated.
Dec 10 11:49:06 (none) daemon.notice pppd[23206]: Modem hangup
Dec 10 11:49:06 (none) daemon.info pppd[23206]: Exit.

The command that Kerlink actualy use in their software:

# pppd /dev/gsm_ppp 115200

Dec 10 11:49:15 (none) daemon.notice pppd[23213]: pppd 2.4.5 started by root, uid 0
Dec 10 11:49:15 (none) daemon.info pppd[23213]: Using interface ppp0
Dec 10 11:49:15 (none) daemon.notice pppd[23213]: Connect: ppp0 <--> /dev/gsm_ppp
Dec 10 11:49:45 (none) daemon.warn pppd[23213]: LCP: timeout sending Config-Requests
Dec 10 11:49:45 (none) daemon.notice pppd[23213]: Connection terminated.
Dec 10 11:49:46 (none) daemon.notice pppd[23213]: Modem hangup
Dec 10 11:49:46 (none) daemon.info pppd[23213]: Exit.

For a SIM error I would expect a ‘CME ERROR: 13’.

The Kerlink Getting Started was my contribution to making a manual about setting up the Kerlink Gateway. If it contains faults, please correct them or supply the correct configuration or software source to use.
As for the status update, it is correct that it does not send any status updates, it was one of my questions on how to check the correct working of the gateway when no node is available to test the connection.

Yes it is a nice manual! Thanks for that :+1:
It explains a lot, never saw that there is different software in the manual.

Alright, the good news is that I’ve made some progress, (turns out the SIM card wasn’t properly inserted at first, my bad :smile: ) I now get a ppp0 interface and it is being given an IP address by my network operator.
The bad news is that I still do not get an internet connection through the gateway.
I checked /usr/sbin/iptables -nL and found that it was empty (aside from Chain INPUT/FORWARD/OUTPUT etc), not a good sign.
Checking the logs I found: daemon.warn pppd[2051]: Could not determine remote IP address: defaulting to 10.64.64.64

So it appears that the routing is not functioning properly, or not activated at all.

Great this error is solved. :thumbsup:
Not getting a ip-adress probably is because of wrong APN settings.

No, I get an IP address from my network operator, but the P-t-P address goes to the default.
The 3G modem itself has an internet connection, but the gateway cannot route packets through it.

Did you set ppp0 as the preferred interface? Imho it defaults to eth0.

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??)