uCon HomePage

Script Command: XMODEM

XMODEM [-dnp:r:s:t:y] { send | send1k | recv | recvcrc } [xmodem-kickoff] {filename}

Start up a file transfer using the XMODEM protocol using one of four modes (outlined below).  


-d           enable delay-between-character (DBC) mode during transfer (refer to XMODEM dialog box).
-n           don't wait for prompt
-p {prompt}  override the default prompt
-r {tot}     specify the number of retries (default=10)
-s {size}    specify the size of the received file (this overrides the modulo-pktsize size that will otherwise be used)
-t {seconds} specify some number of seconds after which XMODEM will giveup waiting for the prompt (refer to SEND command)
-y           use single-file Ymodem protocol (only works with send and send1k)

4 different transfer modes:

Similar to the SEND command, the XMODEM command interacts with the target; hence, it is throttled by the target's prompt. As a result, the -n, -p & -t options in XMODEM serve the same purpose as they do in the SEND command.

The xmodem protocol must be started up on boths sides of the transfer; hence the use of the xmodem kickoff parameter.  This string is passed to the other end as the "protocol kickoff" command; thus starting up the protocol on the other side of the pipe prior to initiating the host side.  There may be cases where the protocol is already started on the other side, so the xmodem kickoff parameter may be omitted in those cases.

New as of Mar 2021:

If XMODEM is launched from a script, there will be no dialog box if there is an error.  The user interaction is only used when a script is not active.

The XMODEM command can fail for two slightly different reasons:  

  1. The xmodem transfer may just fail or timeout.  To check for this, the script should query the content of the XSTATE shell variable.  It will typically be set to either IDLE (it passed) or FAIL (something went wrong in the transfer.
  2. The xmodem transfer may complete, but if the timeout value used with -t is exceeded, then the script should query the SCR_TIMEOUT shell variable (refer to the  SEND command for details).