Kerlink iFemtocell - connect to TTN?

@Tord, I have to check but I think that I am up to date, dans not connection issues

I also not able to connect to the router with the spf Klk15 …
On a second kerlink I installed firmware 3.3.3 that solved my LTE stick detection problem but the spf seems to not be compatible with TTN.
I’ve tried to downgrade the spf on version klk11 but the issue is the same. Potentially it comes from the firmware 3.3.3 ; I know they have changed firewall rules… Any idea, anyone solved that?
I assume it is related to this in the release note:

"Also, note that the firewall now has rejection rules at the end of the INPUT and OUTPUT chains, to properly disallow non-matching traffic. This implies that new rules ‘appended to the chain’ will never be matched; if you want to add new rules, either make sure to add them to a file in /etc/firewall.d/, or if you add them to your application, ‘prepend’ them to the chain by using “-I” (insert) instead of “-A” (append). "

and /user/spf/bin/execute_spf.sh is creating new iptables rules with -A
So I changed the -A by -I in this file and now it works…

1 Like

I confirm it works well by modifying the execute_spf.sh script, even with spf klk15

1 Like

Hello, I have the same issue.
Gateway is kerlink ifemtocell, using semtech packet forwarder (pre-installed) and TTN show as “no connected” in the console.
I have no joined any motes.

Hi Tord
where i can download this latest version of Packet Forward for ifemtocell
spf_3.1.0-klk15_4.1.3-klk7_klk_wifc.ipk
?

Thanks in advance.

Hugo

Hi Disk91, the line that be need to edited and change -A by -I is this line?
[ -n “${PORT}” ] && iptables -t filter -A OUTPUT \

This change is need for what version of spf ?

Thanks in advance.

Hugo

Hi guys
Here i am trying to setup a ifemtocell kerlink gateway to TTN.
I register the gateway, but get the No connected message.
I have not registered or joined motes at this point.

The “Gateway Key” is used for Semtech Packet Forward or must be ignored and only is used for TTN Packet Forward ?

Thanks in advance.

Hugo

I finally found the SPF here
http://wikikerlink.fr/wirnet-ifemtocell/doku.php?id=wirnet-ifemtocell:resources
in the kerlink WIKI

Installed sucessfully spf_3.1.0-klk15_4.1.3-klk7_klk_wifc.ipk
Installed sucessfully HAL libloragw-fpga_4.1.3-klk7_klk_wifc.ipk
Installad sucessfully Firmware V3.3.3 keros_3.3.3_klk-wifc.ipk

and reconfigure host to “brazil.thethings.network” with DNS configured properly in the /etc/network/lan.config file

But… Gateway continue being showed as “Not Connected” in the Gateway list of Console.

What can be wrong ? Ideas?

I have sniffed with wireshark and only see trafic to NTP server located at 168.96.251.226

No other trafic.

Regards

Hugo

@disk91. Thanks! The firewall change (-I) fixed the issue!

1 Like

Hi Hugo,

Did you register the gateway as a “legacy packet forwarder” with the gateway ID that you got in the local_conf.json file?

BR,

Tord

Hi Tord
Thanks by your reply.
Yes exactly I have registered as “legacy packet forwarder” with the gateway ID taken from local_conf.json

I have tried with several handlers, changing the host in global_conf.json
I have DNS correctly configured and resolving.
I make packet capture and the gateway does not try to contact the host.

but when i list running process, spf is running… so is very strange

root@klk-wifc-03003E:~ # ps ww | grep spf
1392 root 2740 S {execute_spf.sh} /bin/sh -e /user/spf/bin/execute_spf.sh
1394 root 2980 S /user/spf/bin/spf
1395 root 2968 S logger -p local1.notice -t spf
1398 root 2732 S grep spf

this is the global_conf.json

root@klk-wifc-03003E:~ # more /user/spf/etc/global_conf.json
{
“SX1301_conf”: {
“lorawan_public”: true,
“antenna_gain”: 0,
“clksrc”: 1,
“radio_0”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 902700000,
“tx_enable”: true,
“tx_notch_freq”: 129000,
“tx_freq_min”: 923300000,
“tx_freq_max”: 927500000
},
“radio_1”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 903400000,
“tx_enable”: false
},
“chan_multiSF_0”: { “enable”: true, “radio”: 0, “if”: -400000 },
“chan_multiSF_1”: { “enable”: true, “radio”: 0, “if”: -200000 },
“chan_multiSF_2”: { “enable”: true, “radio”: 0, “if”: 0 },
“chan_multiSF_3”: { “enable”: true, “radio”: 0, “if”: 200000 },
“chan_multiSF_4”: { “enable”: true, “radio”: 1, “if”: -300000 },
“chan_multiSF_5”: { “enable”: true, “radio”: 1, “if”: -100000 },
“chan_multiSF_6”: { “enable”: true, “radio”: 1, “if”: 100000 },
“chan_multiSF_7”: { “enable”: true, “radio”: 1, “if”: 300000 },
“chan_Lora_std”: {
“enable”: true,
“radio”: 0,
“if”: 300000,
“bandwidth”: 500000,
“spread_factor”: 8
},
“tx_lut_0”: {“dig_gain”: 0, “pa_gain”: 0, “mix_gain”: 8, “rf_power”: 0}
},
“gateway_conf”: {
“server_address”: “brazil.thethings.network”,
“serv_port_up”: 1700,
“serv_port_down”: 1700,
“keepalive_interval”: 10,
“stat_interval”: 30,
“push_timeout_ms”: 100,
“forward_crc_valid”: true,
“forward_crc_error”: false,
“forward_crc_disabled”: false,
“autoquit_threshold”: 3,
“gps_tty_path”: “/dev/nmea”
}
}
root@klk-wifc-03003E:~ # }

I m using AUSTRALIA 915 BAND.

Using OTAA with 2 RN2903 attached devices.

Can’ t join … denied

Any help will be appreciated.

Hugo

So, I have a perfectly functioning Kerlink iFemtocell. After installing the latest Semtech packet forwarder, here’s the steps that I took to make it work:

  1. Remove the symlinked file global_conf.json in /user/spf/etc/
  2. Run curl -O https://raw.githubusercontent.com/TheThingsNetwork/gateway-conf/master/EU-global_conf.json in the same folder to download the latest EU config from TTN. If you’re not in the EU, get the right file from the TTN Github Repo.
  3. Symlink this file with ln -s <new file> global_conf.json to install the new file as the main config.
  4. At the top of the gateways section of the config file, add a new property: gateway_ID. The value is the Device EUI string.
  5. Open /user/spf/bin/execute_spf.sh. This file must be modified to start correctly.
  6. Replace the sed command used in $PORT with 1700.
  7. Replace all -A iptables rules with -I, so the iptables rules are loaded first.

The reason why step 6 is needed is because the config file from TTN specifies the port twice, and the sed command reads it incorrectly. The easiest fix is just to hardcode port 1700 into the file.

I also went a step further and made the gateway re-download the config file on startup, as recommended by TTN in case they need to make changes to the config.

EDIT: Here’s a drop-in replacement for execute_spf.sh. Run curl -O https://gist.githubusercontent.com/Eelviny/656f1a7904bbc43a2669a4880dc0e948/raw/672d6ac024eba7d6818a5fee2e0831cbba7ea3d5/execute_spf.sh in /user/spf/bin/ to replace your existing file.

3 Likes

Also, another thing about the iFemtocell: File /user/spf/etc/local_conf.json is symlinked to a temporary file. This file is generated by the Kerlink on startup, and should not be modified/deleted, according to the Kerlink wiki.

Place any config changes in your global_conf.json!

1 Like

Here’s some info I pulled from a different Kerlink wiki to find your Kerlink’s DevEUI:

  • iBTS : 7276FF002E<last 6 characters of the CPU serial number>
  • Wirnet Station : 7276FF000<last 7 characters of the station barcode>
  • iFemtoCell : 7276FF0039<last 6 characters of the device board ID>
1 Like

I had the same problem with the iFemtocell and firmware version 3.3.3 -
no connection to the TTN. This problem did not occure with firmware 2.4.0 or 3.1.3.
Changing the /user/spf/bin/execute_spf.shfile did help. As the IpTables rules have been changed you need to replace the iptable -A option by a -I (i upercase).
Now the gateway is connected to the TTN. No other changes were necessary.

I’ve successfully connected a brand new iFemtocell to TTN running the current firmware as of June 18 (3.4.3_20180426155104). Thanks to the above posters. I will shortly post an updated step-by-step install guide as some of the issues people encountered on previous versions just seem to have gone away.

1 Like

Hi,

Sorry for revive the topic but I really need help to make my iFemtoCell works.

I installed the latest software and the latest spf from the kerlink documentation, I modify my global_conf.json (and I even try with this conf https://raw.githubusercontent.com/TheThingsNetwork/gateway-conf/master/EU-global_conf.json), for testing I allow ALL the requests in the firewall, but still nothing, my gateway won’t connect to the ttn.

Here is what I have in the spf.log :
Dec 20 09:10:40 klk-wifc-0303E3 local1.notice spf: ### [DOWNSTREAM] ###
Dec 20 09:10:40 klk-wifc-0303E3 local1.notice spf: # PULL_DATA sent: 6 (0.00% acknowledged, ping 0.00 ms)

What I am doing wrong ?

Thanks.

Hello, can someone share the file semtech packet forwarder ipk file?
The kerlink wiki asking for a user/pass, but I could not find any register button to create an account.

Thanks

You have to ask them by email (support@kerlink.fr), sending the serial number. For me is a silly thing, they could be more open on sw installation.

A post was split to a new topic: Creating custom channel plan