Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rx timeout not respected #4

Open
battosai30 opened this issue Nov 14, 2016 · 7 comments
Open

Rx timeout not respected #4

battosai30 opened this issue Nov 14, 2016 · 7 comments

Comments

@battosai30
Copy link

Hi,

Using the Rx example, I observed that the specified rx timeout is not respected and it seems to be random.

Any idea ?

Regards

@robertinant
Copy link
Member

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.

@battosai30
Copy link
Author

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

@robertinant
Copy link
Member

I just reproduced myLink.receive(&rxPacket); blocking if no TX node is active. Looking into it.

@robertinant
Copy link
Member

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

@battosai30
Copy link
Author

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.

@robertinant
Copy link
Member

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.

@battosai30
Copy link
Author

I confirm it's okay

robertinant added a commit that referenced this issue Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants