public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-user] Writing to tty01 (serial port) in simple straight forward way...?!?
  @ 2014-10-12 15:42 99% ` Kerin Millar
  0 siblings, 0 replies; 1+ results
From: Kerin Millar @ 2014-10-12 15:42 UTC (permalink / raw
  To: gentoo-user

On 12/10/2014 13:08, meino.cramer@gmx.de wrote:
> Hi,
>
> I want to send commands to ttyO1 (serial port on an embedded system).
> The commands are one line each and terminated with CRL/LF (aka "DOS").
>
> Since this will be done from a batch script, it should be possible
> via commandline tools and non-interactively. The serial port is
> already setup up the right way.
>
> I tried
>
> echo -n"blablabal\x0a\x0d"

Firstly, this command is missing the -e switch. Secondly, the order of 
the control characters is wrong. I would suggest the use of printf as it 
has fewer pitfalls.

# printf '%s\r\n' "command"

--Kerin


^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-10-12 12:08     [gentoo-user] Writing to tty01 (serial port) in simple straight forward way...?!? meino.cramer
2014-10-12 15:42 99% ` Kerin Millar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox