Gentoo Archives: gentoo-user

From: Kerin Millar <kerframil@×××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Writing to tty01 (serial port) in simple straight forward way...?!?
Date: Sun, 12 Oct 2014 15:42:35
Message-Id: 543AA15E.6090805@fastmail.co.uk
In Reply to: [gentoo-user] Writing to tty01 (serial port) in simple straight forward way...?!? by meino.cramer@gmx.de
1 On 12/10/2014 13:08, meino.cramer@×××.de wrote:
2 > Hi,
3 >
4 > I want to send commands to ttyO1 (serial port on an embedded system).
5 > The commands are one line each and terminated with CRL/LF (aka "DOS").
6 >
7 > Since this will be done from a batch script, it should be possible
8 > via commandline tools and non-interactively. The serial port is
9 > already setup up the right way.
10 >
11 > I tried
12 >
13 > echo -n"blablabal\x0a\x0d"
14
15 Firstly, this command is missing the -e switch. Secondly, the order of
16 the control characters is wrong. I would suggest the use of printf as it
17 has fewer pitfalls.
18
19 # printf '%s\r\n' "command"
20
21 --Kerin

Replies

Subject Author
Re: [gentoo-user] Writing to tty01 (serial port) in simple straight forward way...?!? Paul Colquhoun <paulcol@×××××××××××××××××.au>