Thank you @cstratton for your support. I did look at the gateway (which is RACK7249) logs to get the timings as you suggested.
This is the join request packet
{
"freq": 507300000,
"mode": "timerstamped",
"utmms": 1648604658810,
"tmst": 627361436,
"rfch": 0,
"powe": 14,
"prea": 8,
"ncrc": false,
"modu": "LORA",
"datr": "SF12BW125",
"codr": "4/5",
"ipol": true,
"size": 33,
"data": "IPh6HSELA9xbqgKLiIKFb6UnJC1cMyH5JFaGeDsVGgmD"
}{
"MHDR": {
"MType": "Join Accept",
"RFU": 0,
"Major": 0
},
"JoinAccept": "F87A1D210B03DC5BAA028B8882856FA527242D5C3321F9245686783B",
"MIC": "151A0983"
}
This is the join accept packet
{
"freq": 507300000,
"mode": "timerstamped",
"utmms": 1648604658810,
"tmst": 627361436,
"rfch": 0,
"powe": 14,
"prea": 8,
"ncrc": false,
"modu": "LORA",
"datr": "SF12BW125",
"codr": "4/5",
"ipol": true,
"size": 33,
"data": "IPh6HSELA9xbqgKLiIKFb6UnJC1cMyH5JFaGeDsVGgmD"
}
{
"MHDR": {
"MType": "Join Accept",
"RFU": 0,
"Major": 0
},
"JoinAccept": "F87A1D210B03DC5BAA028B8882856FA527242D5C3321F9245686783B",
"MIC": "151A0983"
}
timestamps: join request 1648604658601, join accept 1648604658810. Difference 209 ms.
This is the uplink packet
{
"freq": 486900000,
"chan": 7,
"tmst": 1635184628,
"utmms": 1648605671392,
"rfch": 0,
"stat": 1,
"rssi": -94,
"size": 18,
"modu": "LORA",
"datr": "SF7BW125",
"codr": "4/5",
"lsnr": 7,
"data": "gDYtpgWACwAIJFJ43zt+rPCn"
}
{
"MHDR": {
"MType": "Confirmed Data Up",
"RFU": 0,
"Major": 0
},
"MACPayload": {
"FHDR": {
"DevAddr": "05A62D36",
"FCtrl": {
"ADR": true,
"ADRACKReq": false,
"ClassB": false,
"ACK": false,
"FOptsLen": 0
},
"FCnt": 11
},
"FPort": 8,
"FRMPayload": "08 24 52 78 DF "
},
"MIC": "7EACF0A7"
}
This is the downlink packet
{
"freq": 507300000,
"mode": "timerstamped",
"utmms": 1648605671676,
"tmst": 1637184628,
"rfch": 0,
"powe": 14,
"prea": 8,
"ncrc": false,
"modu": "LORA",
"datr": "SF7BW125",
"codr": "4/5",
"ipol": true,
"size": 12,
"data": "YDYtpgWgCQBNaDcr"
}
{
"MHDR": {
"MType": "Unconfirmed Data Down",
"RFU": 0,
"Major": 0
},
"MACPayload": {
"FHDR": {
"DevAddr": "05A62D36",
"FCtrl": {
"ADR": true,
"RFU": 0,
"FPending": false,
"ACK": true,
"FOptsLen": 0
},
"FCnt": 9
}
},
"MIC": "4D68372B"
}
Timestamps: uplink 1648605671392, downlink 1648605671676, difference is 284 ms
So, the round trip between gateway and server is < 300ms
Datarate was SF7BW125, which gives 5470 b/s. Total data length of uplink and downlink 40 bytes.
Time on air would be < 10ms
The total round trim between this particular device and server is < 310 ms
It seems that default RX1_delay of 1 second is enough.
But I have 500 devices in the field in different conditions sending frequently and sometimes DR is 0 or 1. Some downlink packets are get enqueued in device TX queue but never sent. Application just keeps adding downlinks to queue. To solve this problem, i was going to try increase RX_delay. I don’t know, if it will help but anyway, I am not able to do it.