mdot and AEP reply lag or offset
- This topic has 5 replies, 2 voices, and was last updated 9 years ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
Tagged: mdot AEP reply replies
Hi,
I’ve got an mdot sending simple packets to an AEP conduit. The conduit is setup to simply echo the packet back to the node.
The mdot code is basically running this in a loop with a small delay:
if ((ret = _dot->send(txdata)) == mDot::MDOT_OK) {
logInfo("Successfully sent data to gateway");
rxData.clear();
if ((ret = _dot->recv(rxData)) != mDot::MDOT_OK) {
logError("Failed to receive: [%d][%s]", ret, mDot::getReturnCodeString(ret).c_str());
} else {
logInfo("Received data: %s", Text::bin2hexString(rxData).c_str());
}
}
What I’m seeing is a lag/offset in the echo’d replies. For testing I’m incrementing a number for each packet sent, and I obviously expect this same packet to come back in reply each time. What’s actually coming back is the reply from 3-10 iterations ago, the reply number is consistently lagging the sent.
It appears like messages are being queued to be sent back and stored waiting for the next incoming packet before they are being transmitted and then the newly received packets are getting added to the back of that queue.
Does anyone have any thoughts/comments that might help me get them in sync?
Thanks!
Paul
Appears to be maybe a duplicate of http://www.multitech.net/developer/forums/topic/lora-network-server-tx-queue-can-it-be-flushed/ that was never answered in full.
Thanks for the reply, how do I call the MQTT clear from an AEP NodeRED application?
Ah, I see, send a message out to MQTT! I’ll give that a try…
So, I’ve setup a function block being fed from the Lora packet received block:`msg.topic = “lora/” + msg.eui + “/clear”
return msg;`
and then pass this to an MQTT send block (broker 127.0.0.1:1883). Also branched off is the Lora TX block.
This seems to now be working, thanks!