Xmodem

XMODEM

This is a fairly complete implementation of the XModem protocol that supports XModem-Checksum, XModem-CRC, and XModem-1K. Send and Receive have been tested on HyperTerminal and TeraTerm, and the code has been written to be compatible with as many terminal emulator programs as possible. Various public properties have been exposed to allow the user to specify custom timeouts, retry limits, packet sizes, etc. Extensive comments and usage examples throughout.

An XModem entry currently exists on the Wiki. Unlike the earlier entry, this version was written from the ground up and is not a port of existing VB code. This was also written to adhere as closely as possible to Chuck Forsberg’s documentation, but also incorporates some later de-facto additions like file transfer cancellation and other common features.

Compatible with NETMF 4.2 but may be adapted for NETMF 4.1 with namespace changes. May also be modified for full .NET implementation on a PC, but you will need to modify array concatenation and CRC code to be based on full .NET instead of NETMF and GHI libraries.

Primary references:
http://www.textfiles.com/programming/ymodem.txt
http://wiki.synchro.net/ref:xmodem

2 Likes

Well done. I have use for this

Role-reversal feels strange. It’s usually you helping me out! :slight_smile:

I found and squashed a bug, so I had to modify the code. Because the new forum still doesn’t support code revisions, I deleted the old Codeshare and re-uploaded it. FYI.