Schedule Downlink in Class A for ABP mode

Hi brocaar, hope your doing good. I Was trying schedule downlink. I get the 200 response stating that the item has been added to the queue. But However the downlink value is not getting reflected in the Gateway logs neither is the queue getting empty. As of now the gateway says the jit queue is empty. Also i need a little more clarity on a point, When i give up an uplink from the gateway to LoRa server we receive an immediate json_down packet at gateway side. What does that json_down state?. Find the logs attached below.

JSON up:

{"rxpk":[{"tmst":151362660,"chan":3,"rfch":0,"freq":867.100000,"stat":1,"modu":"LORA","datr":"SF12BW125","codr":"4/5","lsnr":8.0,"rssi":-28,"size":22,"data":"QJLZ6gaAAAACMiOBAVtpcNpJLuHe5g=="}]}

INFO: [up] PUSH_ACK received in 9 ms
INFO: [down] PULL_RESP received - token[0:0]

JSON down:

{"txpk":{"imme":false,"tmst":152362660,"freq":867.1,"rfch":0,"powe":14,"modu":"LORA","datr":"SF12BW125","codr":"4/5","ipol":true,"size":14,"data":"oJLZ6gYAAAACiRa1ZFc="}}

Gateway-Side

##### 2017-09-18 07:36:00 GMT #####
### [UPSTREAM] ###
# RF packets received by concentrator: 3
# CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
# RF packets forwarded: 3 (66 bytes)
# PUSH_DATA datagrams sent: 4 (731 bytes)
# PUSH_DATA acknowledged: 100.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 3 (100.00% acknowledged)
# PULL_RESP(onse) datagrams received: 3 (522 bytes)
# RF packets sent to concentrator: 3 (42 bytes)
# TX errors: 0
# TX rejected (collision packet): 0.00% (req:13, rej:0)
# TX rejected (collision beacon): 0.00% (req:13, rej:0)
# TX rejected (too late): 0.00% (req:13, rej:0)
# TX rejected (too early): 0.00% (req:13, rej:0)
# BEACON queued: 0
# BEACON sent so far: 0
# BEACON rejected: 0
### [JIT] ###
src/jitqueue.c:511:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# GPS sync is disabled
##### END #####

Can you tell me

But However the downlink value is not getting reflected in the Gateway logs neither is the queue getting empty.

How did you validate that the downlink oJLZ6gYAAAACiRa1ZFc= frame (transmitted by the gateway) is not containing the payload from the queue? Was the queue item of type confirmed: true?

Yes the queue item did get confirmed(i.e it is set to true).

As long the frame is not acknowledged by the node (in the next uplink), the frame stays in the current implementation in the queue, so that it can be re-transmitted during a next downlink.

Okay. One more thing, on the gateway log how many json downs will be expected if i schedule a downlink??

Only one at the moment a receive window occurs.

Hey broccar. We are still stuck in this last step. According to the REST api we have to add this to the body.
{
“confirmed”: true,
“data”: “string”,
“devEUI”: “string”,
“fPort”: 2, //we have set out fport as 2
“reference”: “string”// Why is reference used ???
}
What does reference signify here??

So that when scheduling a confirmed downlink, the ACK contains the reference of the frame acknowledged. Please see the documentation: https://docs.loraserver.io/lora-app-server/integrate/data/

For sending Do i have to use mosquiito topic (application/[applicationID]/node/[devEUI]/tx) or The REST API endpoint(i.e https:///api/nodes/DevEUI/queue).??. I am Dazed and confused now .:stuck_out_tongue:

No need to be confused, you can do both :wink: They do exactly the same thing.