Open-Agriculture / AgIsoStack-plus-plus

AgIsoStack++ is the completely free open-source C++ ISOBUS library for everyone
https://agisostack.com/
MIT License
168 stars 40 forks source link

[ETP Rx]: ECTS requested packets exceeds message size #418

Closed ad3154 closed 5 months ago

ad3154 commented 5 months ago

Describe the bug When receiving ETP sessions, we can sometimes incorrectly issue a clear to send to the source control function with an incorrectly limited packet count, specifically on the final group of packets.

I have specifically seen a situation where we were receiving a session of 2291 bytes, and when the final group of packets was to be sent, we cleared the sender for 16 packets when only 8 were needed, causing them to abort the transfer with the ISO11783-3 error code ECTS requested packets exceeds message size

We should limit the CTS to be only as many frames as are required to complete the session in this case.

Supporting Documentation

image

can_extended_transport_protocol.cpp line 818 image

Environment (please complete the following information):