Quantcast
Channel: The Things Network - Latest posts
Viewing all articles
Browse latest Browse all 116854

Trying to understand basic packet forwarder on Kerlink Gateway

$
0
0

Not quite... The contents of the txpk message are very different as well; it's not only some different name. Also, none of the examples in the documentation uses double opening and closing brackets; your {{...}} is not valid JSON, so did you try with just {...} instead?

And like I wrote, I think that tx is used for communication between the application server and the Kerlink network server (where Kerlink's "tx":{...} resembles "app":{...} in the Semtech documentation?), and txpk between network server and gateway.

As you're using the packet forwarder to talk to the gateway directly, txpk seems to be what's needed. And for the data field unless the forwarder does some magic that indeed needs you to encrypt the payload, and add the proper LoRaWAN MAC and frame headers (which, among other things, include the message type, the node's DevAdr and the LoRaWAN port) and Message Integrity Code, and Base64 encode the result.

Assuming Semtech's app is quite similar to the tx that the Kerlink folks gave you, the Semtech documentation shows:

The examples are indented for readability. The JSON objects shall be transmitted neither spaces nor non-printing characters.

[...]

8.3.4 AS to NS

{
  "app":
  {
    "moteeui":"fa789f000000",
    "seqno":34,
    "token":56,
    "userdata":
    {
      "dir":"dn", 
      "seqno":34, 
      "port":10, 
      "payload":"C3m2"
    }
  }
}

...versus:

8.3.5 NS to Gateway

{
  "txpk":
  {
    "tmst":21016645000, 
    "freq":869.525000,
    "rfch":0,
    "powe":14,
    "modu":"LORA", 
    "datr":"SF9BW125", 
    "codr":"4/5",
    "ipol":true,
    "size":12, 
    "data":"QAAAAEggzc1wgJ8E"
  } 
}

And finally: looking in the code again, I'm sure you need to send the above to downstream port 1700, given the settings shown in your question. But I wonder if you can use the same port for both upstream and downstream like you have configured; the defaults in the code are 1780 and 1782, so unless documented otherwise why not stick to that.


Viewing all articles
Browse latest Browse all 116854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>