Is there a function to wait for a software ack after a send.
I know i can do it in the receive function but i wondering if i can do it with wait function like so:
bool success = wait(300, C_INTERNAL, I_ACK);
The "payoff" is that you know if you need to resend value or not.
I would only use it for important values, like when you turn on/off a light or something. Asking for ack on sensor values doesn't give much benefit.
@Anduril said:
ok, what is the behavior if there is no ACK coming back? Trying again for several times before discarding the message? How long is the timeout?
We are discussing this topic in http://forum.mysensors.org/topic/2189/serial-api-noack-when-sending-with-ack-failed as well.
Currently MySensors never resends any messages. You have to program it into your serial application by yourself. It would have to wait for an ACK message and send again, if it didn't come back within time.
In the linked thread we are hoping to find a way for implementing this on the hardware of the gateway.
@mfalkvidd said in Return value of bool send(MyMessage &msg, const bool ack = false);:
@bilbolodz just to check: are you sure there are no repeaters or other gateways within range?
I've to check more thoroughly but rather not.
ok, thanks. As I understand this will only affect battery powered node when changing the batteries (or rebooting the node in some other way). Without MY_TRANSPORT_WAIT_READY_MS the gateway must be up and running and in the range of the node, if not the node may drain the batery quickly.