-
Notifications
You must be signed in to change notification settings - Fork 20
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
Sleepy Thread devices #249
Comments
Well, changing |
Wemo Stage and Eve Thermo are the sleepy HAP devices I'm testing with FWIW. |
As I said in ^, bumping ACK_TIMEOUT to 10 has got rid of thousands of "Received Type.ACK from but could not match it to a running exchange" warnings in my logs. Looking at https://github.com/chrysn/aiocoap/blob/419c88cb7bec693f3c33b188a8e394e6666983c5/aiocoap/messagemanager.py#L215, they were caused by original transmission and the retransmission sharing an entry in So I think even if its not the root cause for your user, its something we need to resolve as that error message is very common and comes up a lot in HA tickets. |
I need to read the Thread spec to see how much buffering is allowed for sleepy devices. Bumping the timeout for connections to sleepy Thread devices would probably be an OK fix. Handling re-transmit ACKs per the COAP protocol spec would also be a good fix. |
I think we want both - it seems daft (and wasteful) to retransmit when we know sleepy thread devices will "timeout" half the time. But equally if it's valid to ACK a retransmission and the original then aiocoap should be silently handling that. |
(But yes, I plucked 10s out of the air, we should use something closer to the spec - I thought it was 5s but haven't checked) |
This has been said in other tickets, but duping here. Latest aiocoap should no longer RST in violation of spec and makes re-transmit dupe ACK's less noisy in the logs. They do however still generate noise, so we need to handle the timeouts and make them longer than the sleep interval of the device. Sleepy devices I have do sleep for 5s, however it's set by a characteristic called "Sleep Interval". So we need to tune the retry interval per endpoint, respecting that char. |
chrysn/aiocoap#294 will let us avoid re-transmits during a sleepy devices sleep interval. We'll probably want a |
chrysn/aiocoap#175 (comment)
I think a forum user is hitting this
aiocoap
issue. Average ping RTT to the sleepy accessory is ~2600ms, over the 2.0aiocoap
ACK_TIMEOUT
.Note that the retransmit triggers something (the BR?) to entirely kill the connection, probably since the first is still outstanding.
I'll put together a PR for
aiocoap
with a knob we'll have to adjust the CoAP controller here.The text was updated successfully, but these errors were encountered: