Open battosai30 opened 7 years ago
How did you measure the tx timeout? Do you have an example Sketch that shows the issue? In my tests here, the timeout with nobody transmitting is always the set timeout.
It's not hard to measure, it's really obvious if I set it to 1000 ms, I clearly see that it's not a second if it doesn't simply hang. The code is the EasyLink RX example
I just reproduced myLink.receive(&rxPacket);
blocking if no TX node is active. Looking into it.
We figured it out. This was a misinterpretation of the rxTimeout member of rxPacket. The rxTimeout is actually expressed in RAT (Radio Ticks) vs milli seconds.
Replace:
rxPacket.rxTimeout = 1000;
with
rxPacket.rxTimeout = EasyLink_ms_To_RadioTime(1000);
And you should see a 1000 ms timeout.
Robert
Ok I will test it in a couple of hours.
I saw this potential problem but I thought that the tick to ms conversion was done in the library.
It should have been but was not. I will fix it and convert from ms to RAT for txTimeout in the library. I will also add an optional parameter so that setting the .txTimeout is optional but then add an optional parameter with the rxTimeout in ms.
I confirm it's okay
Hi,
Using the Rx example, I observed that the specified rx timeout is not respected and it seems to be random.
Any idea ?
Regards