public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Kerin Millar <kerframil@fastmail.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Writing to tty01 (serial port) in simple straight forward way...?!?
Date: Sun, 12 Oct 2014 16:42:22 +0100	[thread overview]
Message-ID: <543AA15E.6090805@fastmail.co.uk> (raw)
In-Reply-To: <20141012120802.GA4800@solfire>

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


  reply	other threads:[~2014-10-12 15:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-12 12:08 [gentoo-user] Writing to tty01 (serial port) in simple straight forward way...?!? meino.cramer
2014-10-12 15:42 ` Kerin Millar [this message]
2014-10-12 22:22   ` Paul Colquhoun
2014-10-13  1:36     ` Francisco Ares
2014-10-13  9:06       ` Neil Bothwick
2014-10-13  9:08         ` Christian Groessler
2014-10-13 13:32           ` thegeezer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=543AA15E.6090805@fastmail.co.uk \
    --to=kerframil@fastmail.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox