Project

General

Profile

sendNow hangs for a long time, probably because canSend is not returning TRUE

Added by jon_bondy over 5 years ago

I have been using this software (both the libraries and my custom code) for a few years. All of a sudden, I am seeing long (2-5 second) hangs when calling sendNow. For all I know, this has been going on for a while, and I did not notice it.

I looked at the library code, and it looks as if you will only get one result of TRUE from canSend, after which it switches to Idle mode and it will always return FALSE. Perhaps (probably!) I am misunderstanding the code.

I put a recvDone just before the sendNow, but that did not help. I do a recvNow each time through the main loop. What is the maximum time between calls to recvNow before problems might occur?

Any hints on how to figure out why sendNow is hanging, and how to get it to work reliably? At the point in the code where this is happening, neither receives nor transmissions are occurring.

Jon


Replies (4)

RE: sendNow hangs for a long time, probably because canSend is not returning TRUE - Added by JohnO over 5 years ago

Are you using the latest Master branch on git?
What radio hardware are you working with?

sendNow hangs for a long time, probably because canSend is not returning TRUE - Added by martynj over 5 years ago

The canSend() does a listen on the channel to check if it is occupied by another transmission.
Perhaps something has changed in your environment. I suggest you have a look at activity in and around the default channel with NRfMon

You can shift to a clearer channel if that turns out to be the issue.

RE: sendNow hangs for a long time, probably because canSend is not returning TRUE - Added by jon_bondy over 5 years ago

I just grabbed the latest library. No change in behavior.

JeeNode SMD

RE: sendNow hangs for a long time, probably because canSend is not returning TRUE - Added by jon_bondy over 5 years ago

NrtMon says “no hw id” and disconnects. Are there any useful instructions, or a manual?

    (1-4/4)