xmodem on unixpc

Lenny Tropiano lenny at icus.islp.ny.us
Wed Mar 1 14:13:00 AEST 1989


In article <157 at zebra.UUCP> vern at zebra.UUCP (Vernon C. Hoxie) writes:
|>
|>	I'm having some trouble getting 'xmodem' as distributed on the
|>net, to receive files from ms-dos machines using ProComm.  They can
...
Since I don't use Xmodem 3.6 that was distributed by Emmet,  I cannot
answer your question on what problems you are actually having with
it.  For xmodem transfers, why not use what you already have on the
UNIX pc?  That's the program that the Asynchronous Terminal Emulator uses,
that's umodem.  

$ umodem

UMODEM Version 2.8a
UNIX-Based Remote File Transfer Facility

Usage:  
umodem -[rb!rt!sb!st][q][l][m][d][y][7] filename


rb <-- Receive Binary
rt <-- Receive Text
sb <-- Send Binary
st <-- Send Text
q  <-- Quiet mode
l  <-- (ell) Turn on LOG File Entries
m  <-- Allow file overwiting on receive
d  <-- Delete umodem.log File before starting
y  <-- Display file status (size) information only
7  <-- Enable 7-bit transfer mask

It basically handles all the necessary options you should need.

...
|>	if (ioctl(0,TCGETA,&ttystemp) < 0)	/* get tty structure */
|>                  ^
|>That zero is supposed to be a file descriptor but there is no open()
|>etc. performed that returns a 'fildes'.  If I assume that since they are
|>logged in on a port that that port will be their 'stdin'.  Does 'stdin'
|>always equal 'fildes = 0'?
|>
|>	Looking elsewhere in the code, I find that all the 'read()'s
|>use 'fildes = 0' and the 'write()'s use 'fildes = 1'.
|>
...
Yes, file descriptor 0 is standard input, 1 is standard output, and
2 is standard error. 

|>	How do I use this from my terminal?  There is no way to tell it
|>which port I want to use! (ph0, ph1, tty000, etc).  In this case, it
|>assuredly should have other 'fildes's wouldn't it?
|>
I don't see any reason on why you couldn't redirect the standard input
from some other terminal.

$ xmodem [options] < /dev/somedevice

Although from my experience, you would normally be letting the user
who wanted to send or receive start the xmodem process from their
terminal, and not doing it for them.

-Lenny
-- 
Lenny Tropiano             ICUS Software Systems         [w] +1 (516) 582-5525
lenny at icus.islp.ny.us      Telex; 154232428 ICUS         [h] +1 (516) 968-8576
{talcott,decuac,boulder,hombre,pacbell,sbcs}!icus!lenny  attmail!icus!lenny
        ICUS Software Systems -- PO Box 1; Islip Terrace, NY  11752



More information about the Comp.sys.att mailing list