From: Theodore Ts'o <tytso@mit.edu>
To: Joshua Colvin <jcolvin@marisys.net>
Cc: linux-serial@vger.kernel.org
Subject: Re: What does the 0x0F char from serial port signify??
Date: Fri, 1 Aug 2003 10:03:04 -0400 [thread overview]
Message-ID: <20030801140304.GC24027@think> (raw)
In-Reply-To: <750102E9-C37E-11D7-BB0C-000A959AFBBA@marisys.net>
On Thu, Jul 31, 2003 at 01:43:12PM -0400, Joshua Colvin wrote:
>
> Hello all,
> I'm trying to setup a socket connection to a serial port under Linux.
> When talking to the device
> on the other end of the serial port I get an SI (shift in) character
> (hex value 0x0f, octal value 017)
> embedded in the response. So rather than get "RESPONSE" I get
> "RESP\017ONSE". It happens
> like clockwork, same place, every time. While it COULD be the device on
> the other end (it's 3rd
> party closed source proprietary), I seriously doubt it. I've been
> playing with the termios settings
> when configuring the serial port to no avail.
It's the device on the other end. The Serial driver doesn't insert
characters into input stream except under very well defined
circumstances (specifically PARMRK setting), and 017 isn't one of the
characters in volved.
> The closest I could find to the meaning of this character is an
> additional character set code and is
> controlled by IEXTEN or VDISCARD. However setting or clearing either of
> these has no effect. Does
> anyone have any insight as to what this??
^O is the default binding to the VDISCARD character, yes. What this
means is that if IEXTEN is set, whatever character c_cc[VDISCARD] is
set to is treated as a "flush command". The character is not passed
on to the user mode program, and any characters batched for output to
the tty are flushed.
If you set the tty device to raw mode, all special characters (^S, ^C,
^O, etc.) are ignored, and even if they weren't ignored, if the device
was sending them, you wouldn't be seeing them since the tty would be
treating those characters as special commands (to stop the flow out of
ouput, to send a SIGINT to the foreground process, to flush tty
output, etc.).
I'm afraid this is part of what your device is doing. If it's not
documented, complain to your vendor. If your vendor refuses to give
you documentation, refuse to do business with the vendor, and switch
to someone who will actually give you documentation for the hardware
that they are trying to sell to you....
- Ted
next prev parent reply other threads:[~2003-08-01 14:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-31 17:43 What does the 0x0F char from serial port signify?? Joshua Colvin
2003-08-01 14:03 ` Theodore Ts'o [this message]
2003-08-01 17:59 ` Joshua Colvin
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=20030801140304.GC24027@think \
--to=tytso@mit.edu \
--cc=jcolvin@marisys.net \
--cc=linux-serial@vger.kernel.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