christiansandberg / canopen

CANopen for Python
http://canopen.readthedocs.io/
MIT License
437 stars 195 forks source link

Update number of unused bytes in last SDO segment #4

Closed jongo728 closed 7 years ago

jongo728 commented 7 years ago

When trying to perform a SDO segmented download to one of our devices the transfer fails when the data size is not a multiple of 7.

This is due to the client indicating the size of the complete transfer and the server verifying the total number of bytes received after receiving the last segment. When the last segment is received the server interprets n=0b000 as the segment containing 7 bytes of data and thus will fail the transfer due to a mismatch between received and expected.

christiansandberg commented 7 years ago

Thank you for the report. Should be a simple fix.