Concatenate packet to send single USB URB transfer - #19
Conversation
Concatenate header, data and crc so it is sent in a single URB. Some embedded applications using USB CDC may expect the whole packet in a single USB single USB Bluk transfer.
|
In the theory of "file streams" this should not really fix anything, but if it helps you, there's no reason we can't have this change. I approve |
|
I actually had to use Wireshark and compare with what sx was doing. When the parts are sent separately the three USB packets can be seen. If all are sent in one single call, a single USB packet is sent. In my case, this makes xmodem work with Silicon Labs EFM32 (ARM) USB bootloader. It may be useful to others too. |
|
I'll task myself to merge, version bump, add to changes file, and publish to pypi within a day or so. |
|
This is ready for release, we're just waiting the package maintainer to run the pypi command or delegate access, best wishes! |
|
Thanks for the PR, version 0.4.3 has been released to PyPi. |
|
Thank you guys! |
I attempted to use xmodem to upload firmware to a microcontroller. The CDC USB device programmed into the microcontroller expects the whole data packet (header+data+CRC) to be into a single URB (USB packet) so it did not work as it was. It was easily solved by forming a single packet concatenating the three strings. Note that the buggy implementation is actually that of the microcontroller.
It should not affect non-USB transmissions.