-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Documentation] Partial Invoke Responses are very unclear in Specification #33815
Comments
Yes that is correct. It is something provided by Interaction Model layer to let the Application layer know that the server has not sent a response to that invoke interaction at the time that the server has indicated that the Invoke interaction is completed. |
@tehampson to get emails about this thread with how my email filters are set up |
Thank you for verifying my assumptions. I think it could help to redce the confusion a bit whe the spec contains an additional sentence about it. One side question for "multiple invokes": Whats a good "max number" if there is not natural limit because of RAM or such? Ok there is a natural maximum for UDP based messages, like 57 invokes as max ... but with TCP it could be more, right? In fact it is a uint16, but I think it makes no sense to allow 65k invokes ;-) |
Do you have a recommendation on what to change/add? If you don't that is fine, it's just that I helped fix some part of the spec here so sometime I may be to close and may think that certain aspects are already.
yeah with UDP I found the max to tap out at around 57 command in the packet. But as you said TCP support is coming along. Without knowing what exactly you are trying to optimize for it is hard to provide a recommendation. Also depends on server or client? Server - whatever the constraint server device want to support up to the max of uint16 (IIRC). This is essentially an optional feature if the device doesn't want to support it at all they can just say MAX_PATHS_PER_INVOKE and nothing should ever send a batch command to it. Client - depends on the constrains of the client device. If it is a fairly sizable device why not support whatever a theoretical max server code support 65k? Who know what the future hold and if there is a very large bridge device that may be on an industrial scale. |
Will think about textual ideas and provide here tomorrow. For the Max-Invoke-Paths: I completely agree with you, because in fact I miss a bit the real world use cases for it. In fact it is about the "default max invoke paths" for matter.js as a framework (that can be overridden by the developer if needed) ... so my feeling is to go with something like 10 untell someine has good reasonsn for more - or stay at 1 :-) And sure the controller/Client need to check how to send stuff and depending what the server allows it need to do multiple messages or send one. Thank you for your feedback" |
@tehampson one question because of the 57 invokes max per UDP message. I yesterday tried to check that and with 57 simple toggle invokes with commandRef I end up with encoded invoke request message of 981 byte. That’s far away from 1280-48-26-12-4=1190. (1280 - headers see connectedhomeip/src/system/SystemConfig.h Line 327 in 2d97cda
|
Interesting observation, I haven't looked at a packet to see how it got filled up, maybe we are leaving some space unused. I have only used SDK to fill up a packet as much as a I could before failure. Something that might be worth while to investigate. I wonder if we are similarly under filling other packets like a Read |
I also just discovered that matter.js only fills till 1024 byte payload (so except headers and such) ... whyever ;-) and while fixing this I came around that. So question is now if I am missing anything regarding max size ;-) I am off next days. But that's my next topic to check when back Monday. |
I know that there is supposed to be some space reserved in the various headers essentially for future use, but your measurement is close to 200 bytes so it is worth looking into. I am also off tomorrow so let's pick this up next week. |
For completeness: my calculations base on connectedhomeip/src/system/SystemConfig.h Line 327 in 2d97cda
More interesting I more miss the 16 byte MIC to be added as bytes on the above link. So yes seems I miss some code places that does that chunking size calculation. |
For ideas on multi invioke descriptions lets chat hopefully in slack somewhen next. For the size: So here my calculation for max size that in theory should be like in chip, but I do not really 100% overlook the code tbh:
And I end up with 1178 bytes then for max message "payload" - sure all calculated without any "message extensions" or "secured extensions". With this I get 69 "invokes without any parameter" into one Message ... ending at 1168 bytes :-) In matter.js we also had a max message size defined as of 1024 bytes till now and this value was from our "early times" before Matter 1.0 got published ... so was reverse engineered. I did one test now with matter.js: I just increased the limit to the said above instead of 1024 bytes, added some logging and started a device commissioned with Apple Home. With this the initial subscription priming was also chunked at a higher level and was working ... so at least apple was ok with it
So it all stayed below the max 1232 bytes UDP max and actual matter overhead was 34 bytes in reality ... so 16 byte MIC and 18 byte headers ... seems ok ... No idea which reserves should be planned in given the fact that we have no extensions in use |
Summary of chat on Slack:
I will do a spec text writeup after I am back from vacation on June 2nd |
Documentation issues
On one hand the specification define in .8.2.3. Incoming Invoke Request Action - Invoke Execution
On the other hand 8.8.3.3. Incoming Invoke Response Action
is written that only one of such response should be received, especially also because
In fact that would mean that as soon as the first partial Respone is received the "above layer" already got NO_COMMAND_RESPONSE for any data not in that first response.
With the information written in "10.7.10.2. MoreChunkedMessages" one can assume that the above logic should happen as soon as the "last message" 8the one with moreChunkedMessages=false" was arrived. Is this the right assumption and interpretation?
Platform
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: