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

Change retryWaitTime (in sendWithRetry) from uint8_t to uint16_t #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Steinarr134
Copy link

I have a node that is busy with i2c communication so it won't respond to
radio communication right away.

The application isn't time sensitive so I don't mind waiting a second
for it to respond but wasn't able to increase the wait time above 255

I have a node that is busy with i2c communication so it won't respond to
radio communication right away.

The application isn't time sensitive so I don't mind waiting a second
for it to respond but wasn't able to increase the wait time above 255
@LowPowerLab
Copy link
Owner

IMHO a retry of more than 50ms is not really justified because a transmission will never take more than that (except in special situations at very low baud rate). This would also increase RAM usage for all compilations.
For very long ACK waits I suggest sending the packet with send() in the sketch, then waiting for a packet and check if it's an ACK. Even so in my opinion the radio has highest priority, and to put a very long hold on the radio because of a slow i2c sensor is probably not a great idea in general. I always take care of radio comms first then deal with other priorities, maybe that's a better place to optimize rather than increase the wait time up to 65 seconds, it seems not optimal.

@Steinarr134
Copy link
Author

Alright, I hadn't considered that it would increase the RAM usage, I don't have the knowledge or experience on that front.

I figured the library should rather support a broader spectrum of situations, ideal or not, but it's your call and I won't be offended either way.

@LowPowerLab
Copy link
Owner

Really just looking into the best interest of keeping the library lean and compact. The sendWithRetry() delay is only there to accommodate relatively short and immediate ACKs/replies. For special cases I suggest overriding the class and function locally with a variant that accepts the unsigned int, then if that's not compiled it won't penalize the RAM.

@philfifi
Copy link

philfifi commented Oct 2, 2017

Long time to ACK might be caused by the senACK method waiting for canSend(), waiting for low noise level. You might want to check this option : #84

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

Successfully merging this pull request may close these issues.

3 participants