Xref: utzoo comp.sys.att:5687 unix-pc.general:2355 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!boulder!pikes!udenva!isis!scicom!zebra!vern From: vern@zebra.UUCP (Vernon C. Hoxie) Newsgroups: comp.sys.att,unix-pc.general Subject: xmodem on unixpc Keywords: ioctl, stdin, fildes Message-ID: <157@zebra.UUCP> Date: 27 Feb 89 00:52:48 GMT Organization: Alpha Science Computer Networks, Denver, Colo. Lines: 39 I'm having some trouble getting 'xmodem' as distributed on the net, to receive files from ms-dos machines using ProComm. They can transfer down from me but get fatal stops when trying to send files to my machine. This is 'xmodem 3.6' by Steve Grandi with a unix-pc patch by Emmet Grey. When reviewing the xmodem.log, I find that the file is received here but the program doesn't seem to recognize it. One of the curious entries in the log is that it is receiving at 1200 baud when the sender is operating at 300. Looking into the code I find that the message is generated as the result of the following entry: 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'. 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? If 'stdin' = 'fildes'0, then why doesn't the 'struct termio' have the correct value? This should be set during loggin even if they are not 'unices'. After all, the OBM did adjust to the proper setting or else they couldn't have communicated at all. Are there other patches or how have others using this code got it to work? By the way, another person tried to use this from a different machine and also using ProComm, but at 1200 baud and he couldn't send in files either. -- Vernon C. Hoxie {ncar,nbires,boulder,isis}!scicom!zebra!vern 3975 W. 29th Ave. voice: 303-477-1780 Denver, Colo., 80212 uucp: 303-455-2670