Hi @kersing, @arjanvanb,
I post the answer that I’ve got finally from Kerlink Support. They have also failed into the attempt of connecting to TTN over GSM.
Hello Mr Forte,
I installed the “the thing network” packet forwarder. When using GSM, I received multiple join procedures from the mote and no data packets. The join procedure isn’t successful.
Do you receive multiple join procedure?
When using Ethernet, it works perfectly and I can reboot my mote as many time as I want without any problem (no need to reboot the station).
It seems like there is a problem with your packet forwarder.
In my opinion, a too high ping with the server might be the problem. Also, there may be a bad synchronization between the server and the station. When receiving a packet from the server the packet forwarder display something like that:
INFO: [down] a packet will be sent on timestamp value 123126684
Displaying the current timestamp may be a good start to see if there is a problem.
As you are not using official Kerlink packet forwarder I cannot help you more. To begin with, we usually recommend our client to use our packet forwarder with the Semtech server but their server is not working with OTAA right now.
Your json files are OK. There are two front-ends able to handle radio frequencies. The “tx_enable: true” field defines which front-end will send packets. The defined frequencies (868.1 MHz / 868.3 MHz / 868.5 MHz) that are configured into radio 1 are only used to receive packets.
There is a point I cannot check myself. The json files describes the radio calibration parameters: Did you check them with the following instruction?
wiki:calibration [Wirnet™ Station]
Also, make sure your station is at least 5 meters away from your motes. I doubt it will solve your problems but it is recommended.
I dug deeper into the problem and there are few considerations I would like to share with you:
- As far as I understood, after the uplink transmission the end-node will open an RX1 slot at the same frequency used for the uplink, and a second receive window (RX2) at a fixed frequency that should be set according the one used by TTN server. On my own Kerlink Gateway there are two radio front-ends able to handle the set of Lora frequency, one only used to receive packets from end-node, and the second one to transmit packets from the server to Lora side. In my case, I am using the 3 standard channels from Lora specification (868.1/868.3/868.5) to send uplink packets: these same frequency cannot send data packets back according to the way are configured into Kerlink Gateway, so I guess that I will never receive downlink within RX1 slot. Therefore, I should focus on the only RX2 slot. TTN uses f=869.525 MHz (SF9BW125), but this frequency is not set into none of the two radio front-ends (see TTN Github). In addition, the “ttn-abp.ino” arduino sketch provided along with LMIC library clearly states:
// TTN defines an additional channel at 869.525Mhz using SF9 for class B
// devices' ping slots. LMIC does not have an easy way to define set this
// frequency and support for class B is spotty and untested, so this
// frequency is not configured here.
As result, above all said, I will never get downlink packets in RX2 window as well. Taking a step back, I would like to post once again a log that I simply got running a very basic ABP arduino sketch.
/* ABP activated device. Downlink packet sent to endnode 1 sec after "Hello World!" uplink.
However, LMIC.dataLen=0 on Arduino side meaning no downlink packet has been received. */
10:19:53.487901 IP 2.43.193.163.33372 > 52.169.76.203.1700: UDP, length 247
0x0000: 4500 0113 067b 4000 4011 ee1c 022b c1a3 E....{@.@....+..
0x0010: 34a9 4ccb 825c 06a4 00ff 832b 0135 c100 4.L..\.....+.5..
0x0020: 0000 024b 0803 0571 7b22 7278 706b 223a ...K...q{"rxpk":
0x0030: 5b7b 2274 6d73 7422 3a31 3433 3539 3937 [{"tmst":1435997
0x0040: 3637 352c 2274 696d 6522 3a22 3230 3137 675,"time":"2017
0x0050: 2d30 312d 3237 5430 393a 3139 3a35 332e -01-27T09:19:53.
0x0060: 3438 3733 3032 5a22 2c22 6368 616e 223a 487302Z","chan":
0x0070: 322c 2272 6663 6822 3a31 2c22 6672 6571 2,"rfch":1,"freq
0x0080: 223a 3836 382e 3530 3030 3030 2c22 7374 ":868.500000,"st
0x0090: 6174 223a 312c 226d 6f64 7522 3a22 4c4f at":1,"modu":"LO
0x00a0: 5241 222c 2264 6174 7222 3a22 5346 3742 RA","datr":"SF7B
0x00b0: 5731 3235 222c 2263 6f64 7222 3a22 342f W125","codr":"4/
0x00c0: 3522 2c22 6c73 6e72 223a 372e 322c 2272 5","lsnr":7.2,"r
0x00d0: 7373 6922 3a2d 3333 2c22 7369 7a65 223a ssi":-33,"size":
0x00e0: 3236 2c22 6461 7461 223a 2251 4830 6141 26,"data":"QH0aA
0x00f0: 5361 4142 5141 424e 7863 3963 5a54 4d79 SaABQABNxc9cZTMy
0x0100: 6a36 4342 4676 5571 6679 5938 5a6b 3d22 j6CBFvUqfyY8Zk="
0x0110: 7d5d 7d }]}
10:19:54.295617 IP 52.169.76.203.1700 > 2.43.193.163.33372: UDP, length 4
0x0000: 4500 0020 2dc5 4000 2c11 dbc5 34a9 4ccb E...-.@.,...4.L.
0x0010: 022b c1a3 06a4 825c 000c 6f5c 0135 c101 .+.....\..o\.5..
10:19:54.936678 IP 52.169.76.203.1700 > 2.43.193.163.44112: UDP, length 174
0x0000: 4500 00ca 2e13 4000 2c11 dacd 34a9 4ccb E.....@.,...4.L.
0x0010: 022b c1a3 06a4 ac50 00b6 ac81 0100 0003 .+.....P........
0x0020: 7b22 7478 706b 223a 7b22 696d 6d65 223a {"txpk":{"imme":
0x0030: 6661 6c73 652c 2274 6d73 7422 3a31 3433 false,"tmst":143
0x0040: 3639 3937 3637 352c 2266 7265 7122 3a38 6997675,"freq":8
0x0050: 3638 2e35 2c22 7266 6368 223a 302c 2270 68.5,"rfch":0,"p
0x0060: 6f77 6522 3a31 342c 226d 6f64 7522 3a22 owe":14,"modu":"
0x0070: 4c4f 5241 222c 2264 6174 7222 3a22 5346 LORA","datr":"SF
0x0080: 3742 5731 3235 222c 2263 6f64 7222 3a22 7BW125","codr":"
0x0090: 342f 3522 2c22 6970 6f6c 223a 7472 7565 4/5","ipol":true
0x00a0: 2c22 7369 7a65 223a 3134 2c22 6461 7461 ,"size":14,"data
0x00b0: 223a 2259 4830 6141 5359 4141 5141 426b ":"YH0aASYAAQABk
0x00c0: 5a74 4a6d 7634 3d22 7d7d ZtJmv4="}}
As you can see the downlink packet was sent back on Lora side on the 868.5 MHz frequency, which belong to “radio 1” Kerlink front-end, for which the “tx_enable” is set to FALSE. Now the questions I keep asking to myself are:
- Has the gateway sent this packet anyway?
- Has the gateway discarded this packet since it cannot use that frequency for transmission?
- Is the node supposed to say (in its uplink packet) which frequency the server must use for eventually sent downlink packets?
- Is the node really listening on 869.525 MHz with the current LMIC library implementation? (@matthijs)
Sorry if I was too long, despite that I think that sharing such experiences is of great value for anyone who, just like me, is eager to gain truly knowledge and understanding on Lora.
Of course, as always, I look forward to get your considerations.
Thanks again, wish you good day!