* What does the 0x0F char from serial port signify??
@ 2003-07-31 17:43 Joshua Colvin
2003-08-01 14:03 ` Theodore Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Colvin @ 2003-07-31 17:43 UTC (permalink / raw)
To: linux-serial
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.
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??
I'm using cfmakeraw to make the serial port raw. It does not talk to a
modem, but rather to a data
acquisition computer via RS-422. Any ideas?? Does RS-422 have anything
to do with this? I'm
slowly going crazy.
Thanks.
Josh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What does the 0x0F char from serial port signify??
2003-07-31 17:43 What does the 0x0F char from serial port signify?? Joshua Colvin
@ 2003-08-01 14:03 ` Theodore Ts'o
2003-08-01 17:59 ` Joshua Colvin
0 siblings, 1 reply; 3+ messages in thread
From: Theodore Ts'o @ 2003-08-01 14:03 UTC (permalink / raw)
To: Joshua Colvin; +Cc: linux-serial
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What does the 0x0F char from serial port signify??
2003-08-01 14:03 ` Theodore Ts'o
@ 2003-08-01 17:59 ` Joshua Colvin
0 siblings, 0 replies; 3+ messages in thread
From: Joshua Colvin @ 2003-08-01 17:59 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: linux-serial
Thanks Ted for the great explanation. I am able to confirm that it is
the device on
the other end, after much hair-pulling. It seems intentionally done,
perhaps to
persuade people to use their SW, rather than develop their own. Knowing
it is in
fact coming from their device and it's not a misconfiguration on my end
let's me
deal with the problem.
Thanks again for the help!
Josh
On Friday, August 1, 2003, at 10:03 AM, Theodore Ts'o wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-01 17:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-31 17:43 What does the 0x0F char from serial port signify?? Joshua Colvin
2003-08-01 14:03 ` Theodore Ts'o
2003-08-01 17:59 ` Joshua Colvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox