LowPowerLab Forum

Hardware support => Moteino => Topic started by: doublec4 on April 15, 2018, 12:32:45 PM

Title: After sending a message, how long before I can receive a message? [SOLVED]
Post by: doublec4 on April 15, 2018, 12:32:45 PM
Hi guys,

I am having a bit of an issue with my node receiving a message very shortly after it has just sent one.

For example, my node is a two button remote control. When a button is pressed it sends a command to the receiver. The receiver takes that command, stores it in memory, and responds back to the remote right away after sending back the ack. The response is just a two byte code telling the remote the pump status on/off/error and how long the remote can sleep before expecting another response back.

However, what I find is happening is that the first message back to the remote is never received. No ack is sent back to the receiver. A few seconds later when the pump is done running and it's time to send the second message back to the remote, this one is successful.

Is there some minimum time to wait after sending a message that you can reliably receive a message?

Thanks!
Title: Re: After sending a message, how long before I can receive a message? [SOLVED]
Post by: doublec4 on April 15, 2018, 09:30:59 PM
I figured out what my problem was. I guess I was under the impression that the RFM69 module would receive a message while the uC was asleep (but the radio awake). Then I could poll the radio when the uC wakes up, but it seems that the controller has to be awake for the radio to get the message. Anyways, disregard this!
Title: Re: After sending a message, how long before I can receive a message? [SOLVED]
Post by: perky on April 15, 2018, 09:57:25 PM
I think it's because AutoRxRestartOn is set, meaning it will automatically restart the receiver after the interpacket delay. If you turn that bit off it might assert PayloadReady but not restart the receiver until the firmware tells it to. I think it could hold the received packet in the FIFO until the firmware wakes up (but usually that's done with PayloadReady anyway).
Mark.