mdot and AEP reply lag or offset

Home Forums mDot/xDot mdot and AEP reply lag or offset

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14787
    Paul Chilton
    Participant

    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

    #14788
    Paul Chilton
    Participant

    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.

    #14791
    Jason Reiss
    Keymaster
    #14793
    Paul Chilton
    Participant

    Thanks for the reply, how do I call the MQTT clear from an AEP NodeRED application?

    #14794
    Paul Chilton
    Participant

    Ah, I see, send a message out to MQTT! I’ll give that a try…

    #14796
    Paul Chilton
    Participant

    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!

    • This reply was modified 7 years, 7 months ago by Paul Chilton.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.