File transfer via XMODEM / YMODEM (and RS-232 or Telnet)

(only available for certain terminals ! )

Contents

  1. Introduction

  2. Filetransfer without MKT's programming tool

  3. Special file types (recognized by the programmable terminals)

  4. X/YModem over TCP/IP (Ethernet)

  5. X/YModem over CAN (without CANopen)

  6. X/YModem over CANopen (object 0x5112)

Introduction

Most terminals with RS-232 interface had a simple XMODEM (1k) / YMODEM server built inside.

Thus standard software like Microsoft HyperTerminal (tm) can be used to load certain files from the PC into the terminal, without the need to use MKT's programming tool at all. However, using the programming tool's integrated file transfer client may be easier for you. The steps below are only required if you want to upload something into the terminal without MKT's programming tool.

Note
For all 'newer' devices with built-in Ethernet adapter (like MKT-View II, MKT-View III, and many other devices by MKT), we strongly recommend to use the embedded web server to upload files into, and download files from the programmable device. Recent windows versions don't contain the 'Hyperterminal' utility anymore, thus there is no standalone program which supports the YMODEM protocol. Using your favourite web browser to access the device will be much more convenient.

File transfer without MKT's programming tool

We cannot go into details here (yet), but the following principle can be used to upload the display application (and possibly a few other file types):

  1. Enter the display terminal's system menu (if necessary, via remote control) .

  2. Select the item "Other Transfers".."XMODEM / YMODEM via RS-232" (for example).

  3. Look at the terminal's display, it will show the communication port and the current baudrate.

  4. On a windows PC, click 'Start'..'Programs' ("Alle Programme") .. 'Utilities' (? - "Zubehör") ..
    'Communication' ( ? - "Kommunikation") ... 'HyperTerminal' .
    Or, if you know things like PuTTY, you will certainly do better without HyperTerminal .

  5. Whatever terminal program / YMODEM client you use, configure the port (RS-232 or whatever) as required.

  6. In the terminal program, a long row of 'CCCCCCCCCC' characters will creep up now.
    This is the YMODEM server's way of saying 'I'm open for business, and want to use CRC (cyclic redundancy check).

  7. If you can see a few 'C's, start sending the file using the YMODEM protocol.
    With Hyperterminal on a German PC : "Übertragung".."Datei senden".."Protokoll: Ymodem" .. "Durchsuchen"..."Senden" .

  8. Wait until the file transfer is complete

  9. Send the next file if necessary, otherwise the XMODEM / YMODEM server will time out and switch back into remote control mode, or command line mode.

  10. Reboot the display terminal when finished, or wait for 30 seconds without sending anything (the terminal will quit transfer mode automatically then).

Special file types (recognized by the programmable terminals)

A few special file types (three-character file extensions) are recognized by the terminal's built-in XMODEM / YMODEM handler.
These are ("including but not limited to") :

See also: Pseudo-directories in the programmable terminals .


Appendix

XModem and YModem were designed to work over a serial connection (RS-232), typically a using a telephone modem.
In some of MKT's programmable display terminals, the same protocol can be 'tunnelled' through other transport protocols, or other transport media.

In 2010-03-11 (when this section was written) the details were not completely known, and some adaptions were still 'under development'.
If you seriously consider to use this protocol in your own programs, ask the software development engineer (Wolfgang Büscher) at MKT for up-to-date details.

Proprietary extensions to the XModem / YModem protocol

To retrieve a directory listing from the remote device, it was necessary to add a few proprietary extensions to XMODEM / YMODEM. These extensions MAY render the protocol incompatible with 'pure' YModem clients ! Instead of XMODEM blocks (with 128 or 1024 bytes netto size), these extensions use plain ASCII strings terminated with carriage return (chr #13) and new line (chr #10). Here is an incomplete list of commands which can be sent from the file transfer client to the file server:

connect xmodem
connect ymodem
Connects the file server, and resets it to the default state.
xmodem rx <filename>
ymodem rx <filename>
Command for the server to receive a file with the specified name (file will be transferred from client to server).
xmodem tx <filename>
ymodem tx <filename>
Command for the server to send a file with the specified name (file will be transferred from server to client).
list       or
list *.*
Lists all files
list *.wav
or only those files with a certain extension, etc .
delete *.*
Deletes all files (!)
delete *.wav
Deletes all files with the extension 'wav' (for example)

The response will be a single text line (ending with CR+NL, like the command); or (for the directory listing) a sequence of lines each terminated with CR+NL. The end of the directory listing (and similar future commands) is indicated by the string "Ready." + CR + NL. If CANopen is used as the transfer medium (see below), repeatedly poll object 0x5112 through an SDO read request until you reached the end of the list.

XModem / YModem over TCP/IP

To Be Specified ..

XModem / YModem over CAN (without CANopen)

In devices without CANopen, the same pair of CAN identifiers (one for RX, one for TX) normally used to load the display application into the terminal can also be used for the XMODEM file transfer. However the XMODEM file server in the terminal must be 'informed' that the CAN bus shall be used as the XMODEM transport medium, which requires an additional 'tickler sequence' of CAN messages. This avoids unintentional activation of the file server. Details are not specified yet.

XModem / YModem over CANopen

In devices with CANopen, it's illegal to "reserve" special CAN identifiers. For that reason, the XMODEM (or YMODEM) file transfer uses a special object (index 0x5112) which is embedded in the device's CANopen object dictionary. Basically, the X/YModem blocks or other commands can be sent to the file server by writing them into this object (in blocks of 1024 bytes plus some overhead), or read from the file server by periodically polling this object (via SDO read request). In CANopen geek speak, this is a 'Segmented Domain Transfer' via SDO, thus object 0x5112 has the data type 0x0F = "Domain". In certain states, where the XMODEM file sender would expect to receive an acknowledge character over the serial port, a successful SDO-read-access replaces this acknowledge (this eleminates the need to write the ACK character into object 0x5112 after each 128- or 1024-block read from object 0x5112). If you need to know more details about how to upload or download files via CANopen object 0x5112, get in touch with the software developer (ask for Wolfgang Buescher).
Note: Object 0x5112 is not PDO-mappable . It can only be accessed via SDO .

See also:
File Transfer Utility , Overview , Remote Control , System Menu .