On Tuesday 10 Jun 2003 12:52 pm, Toralf Lund wrote:
> > On Tuesday 10 Jun 2003 10:36 am, Toralf Lund wrote:
> > > I'm trying to transfer an ASCII file ("S-record" format) across a
> > serial link from a Red Hat system to an IPC board. If I do
> > >   cat <file> > /dev/ttyS0
> > > (with connection at first serial port) it seems like the transfer gets
> > > stuck after the 1st line. If I echo the file one line at a time with a
> > > small delay between the lines, however, the transfer is successful.
> >
> > E.g.
> >
> > >   cat <file> | while read line ; do echo $line >  /dev/ttyS0;
> >
> > usleep
> >
> > > 10000; done
> > > works just fine. Can anyone explain this? Is there any way I can set
> > > "stty" parameters or similar so that the direct cat would work? I've
> > > experimented a bit with the "newline" and "delay" settings, but it
> >
> > didn't
> >
> > > help a lot...
> >
> > Hi,
> >
> > It sounds like a flow control problem to me.
> >
> > Does the IPC board have any limitations that you're not taking into
> > account?
>
> Probably, I just can't think of what they are...
>
> > How did you set up the serial line parameters (speed, bits etc)?
>
> 9600 baud, cs8, one stop bit.

What parameters did you pass to stty?

>
> I'm assuming these settings are correct as I'm fairly sure the fist line
> is received correctly.
>
> > Did you turn on RTS/CTS or Xon/Xoff flow control?
>
> I've tried enabling each of these, but I'm not sure I got the config right.

To use RTSCTS use (from memory) 

-ixon crtscts

To use Xon/Xoff use 

ixon ixoff -crtscts

>
> Hmmm. I just changed another parameter on the board, and I will now get a
> "break" instead of hang after the first line.
>
> > Have you tried using a proper comms program to send the file, such as
> > kermit
> > or minicom?
>
> Not possible, as the apps are not available on the receiving end.
> (Although I have considered porting kermit.)

I didn't mean so that you could use  the kermit transfer protocol, but purely 
so you could use it's built in serial port config options.  I used a similar 
setup to upload/download config and logging data at one point.

>
> > Gary
> > --
> > Gary Stainburn
> >
> > This email does not contain private or confidential material as it
> > may be snooped on by interested government parties for unknown
> > and undisclosed purposes - Regulation of Investigatory Powers Act, 2000

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to