Kerlink iFemtocell - connect to TTN?

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>
2 Likes

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.

1 Like

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

Hi! I got one Wirenet iFemtoCell。As“ Then you need to modify the /user/spf/etc/global_conf.json file”,I do n’t understand the gateway system, how do I use SSH to modify the /user/spf/etc/global_conf.json file.Can you tell me in detail 。Thanks!

Then you need to modify the /user/spf/etc/global_conf.json file

“gateway_conf”: {
“gateway_ID”: “7276FF00390300A0”,
“server_address”: “router.eu.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”: true
}

Hi @cpaumelle @Eelviny @kersing @Tord @disk91
I have problems connecting iFemtoCell-evolution” gateway to TTN, I did Keros 4.3.3: (CPF) configuration as it is written in Kerlink website, and my firmware version is Keros 4.3.3. (Starting v4.3.0, packet forwarder is included in the firmware)
I would appreciate if someone could advise me regarding these questions:

1) as there is no /user/spf/bin/execute_spf.sh file used in this version, which file I should open to edit the IPTable by replacing all “-A” (append) options by a “-I” (insert) for Keros 4.3.3 to connect TTN?

2) For the future usage and connecting it to ChirpStack, if after changing this rule to -I , I do a factory reset and upgrade with liveburner IPK, will these changes I made revert back to the default?

Please do not duplicate / cross post the same question across topics otherwise you split volunteers time over two threads.

Have you looked at the TTN documentation regarding gateways? Check Gateways | The Things Stack for LoRaWAN , there are two entries for Kerlink on that page.

sorry, I created that new topic and then think maybe the tips in this topic also would be helpful regarding my problem and add my questions about the tips to reply of that topic too. sorry for doing that.
because I could not find /user/spf/bin/execute_spf.sh file, I asked kerlink support regarding that and he said:
It corresponds to SPF (Semtech Packet Forwarder) and this solution is no longer used by Kerlink on your product
He said:
No firewall modifications to be made
No modification of the toml file to be made
but he did not give any clue to fix the problem of “not connected” to TTN, and I donot know how to fix that.
Thank you very much

FW 4.3.3

[/etc/lorafwd.toml]

[ gateway ]
id = 0xxxxxxxxxxxxxxxx
[ filter ]
[ database ]
[ gwmp ]
node = “eu1.cloud.thethings.network”
service.uplink = 1700
service.downlink = 1700

[/etc/default/lorafwd]

DISABLE_LORAFWD=“no”
CONFIGURATION_FILE="/etc/lorafwd.toml"
EXTRA_ARGS="-vv"

[/etc/default/lorad]

DISABLE_LORAD=“no”
EXTRA_ARGS="-vv"
CONFIGURATION_FILE="/etc/lorad/fevo/global_conf.json"
FPGA_FIRMWARE_FILE="/usr/share/lorad/fpga_v61.bin"

command line

klk_apps_config --activate-cpf --lns-server eu1.cloud.thethings.network --lns-dport 1700 --lns-uport 1700

1 Like

Thank you @miraculix
I did all steps as you mentioned, and as I am using TTN Version 2, I did it with this command line:

klk_apps_config --activate-cpf --lns-server router.eu.thethings.network --lns-dport 1700 --lns-uport 1700

but the gateway status is not connected.