Kerlink iFemtocell - connect to TTN?


(Hugo) #21

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


(Tord) #22

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


(Tord) #23

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


(Hugo) #24

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


(Elvin Luff) #25

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.


(Elvin Luff) #26

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!


(Elvin Luff) #27

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>

(Smart Booking) #28

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.


(Cpaumelle) #29

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.