This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Read an string from serial port
- From: "Andy Dyer" <adyer at righthandtech dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 30 Dec 2003 12:30:49 -0600
- Subject: RE: [ECOS] Read an string from serial port
> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Michael
> Anburaj
> Sent: Tuesday, December 30, 2003 12:09 PM
> To: ca06332@salleURL.edu; ecos-discuss@sources.redhat.com
> Subject: RE: [ECOS] Read an string from serial port
>
>
> This may be due to difference in BAUD rate.
>
> I don't know how you set the BAUD rate when using 'echo'
> command (May be it
> defaults to a known value, which may be different from what eCOS uses
> (38400)).
>
> Use 'minicom' on linux, where you can specify the serial port
> parameters
> (like BAUD) & match things on both ends.
If it is baud rate, you can use the 'stty' command to change
serial port parameters on a particular tty from the shell.
stty works on the port connected to stdin, something like this:
stty speed 38400 cs8 -parenb -cstopb < /dev/ttyS01
should set 8/N/1. There are a lot of other options dealing
with how input and output gets processed, see the info and
man pages for more.
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss