XMODEM file transfer

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I'm trying to send a file using the xmodem standard. When all file data has
been sent I then pad the final xmodem packet with ^Z characters (0x1A). My
difficulty is that, using various terminal programs, these ^Z characters
become part of the file received.

0.020,1.962000,0.039240,0.000785,203.000000
0.040,3.924000,0.117720,0.003139,203.000000
0.060,9.810000,0.313920,0.009418,203.000000
.
.
.
2.480,0.000000,-2.177820,-1.784243,203.000000
2.500,0.000000,-2.177820,-1.827799,203.000000


Can anyone please tell me what I have to do to have the receiver ignore
these padding characters?

Regards,
Murray.
_____________________________________
Murray R.Van Luyn
snipped-for-privacy@cs.curtin.edu.au



Re: XMODEM file transfer
The ^Z character was an old DOS standard for text files to indicate the end of
file. I don't think it's really recognized by other systems. Trying to figure
out where the actual end of file should be is usually done by either using a
protocol more modern thatn plain XMODEM or by putting a data format on top of
XMODEM like having the first packet contain things about the file itself like
the size or name.


Re: XMODEM file transfer
Quoted text here. Click to load it
...

You don't.  Xmodem transmits in units of 128 bytes.  Under CP/M
and MsDos text files treat 0x1a as EOF markers.  What the final
file processing does is up to you.

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.
Re: XMODEM file transfer
Thanks Gary and Chuck.

It appears that the XMODEM standard is fixed to 128 (or 1024) byte long
packets, and with no facility for transmission of file name or length. I'm
stuck with the trailing ^Z characters in the last packet.

It seems that the terminal programs that I examined append trailing space
characters instead of ^Z. I hadn't noticed this until you pointed out the
fact that the receiver makes no distinction between data and terminating
characters in the final packet. I think I'll use the same trailing spaces
strategy.

A better choice might have been YMODEM. That is unless anyone can suggest
something more appropriate for 5KiB, CSV file, data logger downloads?

Regards,
Murray.
_____________________________________
Murray R.Van Luyn
  snipped-for-privacy@cs.curtin.edu.au



Re: XMODEM file transfer
Quoted text here. Click to load it

YModem is batch XModem, not a lot more efficient. (XModem is ~78%
efficient, by the way). If you can squeeze an implementation, why not
use ZModem? It's more efficient.

Re: XMODEM file transfer

Quoted text here. Click to load it

Another choice is Industrial ZMODEM(Tm).  As the name inplies,
Industrial ZMODEM is carefully tuned for embedded applications
which have memory and functional constraints.

http://www.omen.com/ind.html

--
Chuck Forsberg     snipped-for-privacy@omen.com   www.omen.com   503-614-0430
Developer of Industrial ZMODEM(Tm) for Embedded Applications
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline