Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Serial Communication Woes (grrrrr)

1 view
Skip to first unread message

Pokeroo

unread,
Aug 18, 1999, 3:00:00 AM8/18/99
to
Hello All,

I've been trying to receive serial data on my Solid Impact from a device
using a simplified RS-232 protocol (RD, TD & SG pins only). I am using some
routines that have served me well before, but are not working in this case -
I'm stumped. The serial device is sending single characters that represent
key presses on a piece of external hardware. Here's what I have found thus
far:

1. In looking at the 'serial' man page, it was obvious that the appropriate
"/dev/ttyX#" file identifier was predicated by the RS-232 pin interface
required. Evidently while using only TD, RD & SG "/dev/ttyf#" and
"/dev/ttym#" are inappropriate. So I've been attempting to use "/dev/ttyd#"
(which has always worked in the past - when I've been communicating with
other serial devices) without any luck. I'm just not receiving anything!?
I'm certain that the device works in that I have checked the output on an
oscilloscope and am receiving the correct characters when I connect the
device to a simple terminal program running on a PC.

2. To make things more frustrating, I tried the same thing on our ONYX2
using "dev/ttyc#" and it works! I find this most frustrating for two
reasons: 1) our Impacts do not support the "/dev/ttyc" setup and 2) from
what I read on the 'Serial' man page, there does not seem to be any
difference between the "ttyd" and "ttyc" interface! That is both require
only TD, RD & SG to function.

Has anyone had a similar experience? Any suggestions?

We're running IRIX 6.2 on our Impacts and IRIX 6.5 on the ONYX2.

All help appreciated!

Thanks,

Murray.

P.S. FROM MEMORY the S/W approach that I am using is quite simple:

To open the serial port:
open(_fd, "/dev/ttyd2", O_RDWR|O_NBLOCK|O_NDELAY);

To read:
read(_fd, input, MAX_RECV_SIZE);

Yadda, yadda, yadda...

P.P.S This is my first posting to this group. If there is a more
appropriate group for these types of requests please let me know.

Murray G. Gamble (gam...@kan.marconi.ca)
Human Factors Engineering - Aerospace
Marconi Canada
Kanata, Ontario, CANADA

Mike O'Connor

unread,
Aug 19, 1999, 3:00:00 AM8/19/99
to
In article <CLmu3.9195$H6.13...@news1.rdc1.on.wave.home.com>,
Pokeroo <pok...@poker.com> wrote:
:I've been trying to receive serial data on my Solid Impact from a device

:using a simplified RS-232 protocol (RD, TD & SG pins only). I am using some
:routines that have served me well before, but are not working in this case -
:I'm stumped. The serial device is sending single characters that represent
:key presses on a piece of external hardware. Here's what I have found thus
:far:
:
:1. In looking at the 'serial' man page, it was obvious that the appropriate
:"/dev/ttyX#" file identifier was predicated by the RS-232 pin interface
:required. Evidently while using only TD, RD & SG "/dev/ttyf#" and
:"/dev/ttym#" are inappropriate. So I've been attempting to use "/dev/ttyd#"
:(which has always worked in the past - when I've been communicating with
:other serial devices) without any luck. I'm just not receiving anything!?
:I'm certain that the device works in that I have checked the output on an
:oscilloscope and am receiving the correct characters when I connect the
:device to a simple terminal program running on a PC.
:
:2. To make things more frustrating, I tried the same thing on our ONYX2
:using "dev/ttyc#" and it works! I find this most frustrating for two
:reasons: 1) our Impacts do not support the "/dev/ttyc" setup and 2) from
:what I read on the 'Serial' man page, there does not seem to be any
:difference between the "ttyd" and "ttyc" interface! That is both require
:only TD, RD & SG to function.

"man cserialio" should give you some idea of where ttyc# devices differ.

:Has anyone had a similar experience? Any suggestions?

It might be worthwhile to do a par trace and see where things might
differ when opening ttyc* on the Onyx2 vs. the Indigo2.

--
Michael J. O'Connor | WWW: http://dojo.mi.org/~mjo/ | Email: m...@dojo.mi.org
InterNIC WHOIS: MJO | (has my PGP & Geek Code info) | Phone: +1 248-848-4481


Richard Masoner

unread,
Aug 23, 1999, 3:00:00 AM8/23/99
to
[Posted and mailed]

In article <CLmu3.9195$H6.13...@news1.rdc1.on.wave.home.com>,
"Pokeroo" <pok...@poker.com> writes:

> Evidently while using only TD, RD & SG "/dev/ttyf#" and
> "/dev/ttym#" are inappropriate.

There are ways around that, but for your apparent purposes ttyd* is
appropriate.

> So I've been attempting to use "/dev/ttyd#"
> (which has always worked in the past - when I've been communicating with
> other serial devices) without any luck. I'm just not receiving anything!?

Does some other process have the serial port open? Try "fuser
/dev/ttyd*". Or just try "cat /dev/ttymX" and see if you just block,
or if you get an EBUSY.

> P.P.S This is my first posting to this group. If there is a more
> appropriate group for these types of requests please let me know.

Totally appropriate.

--
Richard Masoner <rich...@bif.dgii.com> Digi International

Richard Masoner

unread,
Aug 23, 1999, 3:00:00 AM8/23/99
to
In article <9908191229...@dojo.mi.org>,

Mike O'Connor <m...@dojo.mi.org> writes:
> In article <CLmu3.9195$H6.13...@news1.rdc1.on.wave.home.com>,
> Pokeroo <pok...@poker.com> wrote:

>:2) from


>:what I read on the 'Serial' man page, there does not seem to be any
>:difference between the "ttyd" and "ttyc" interface! That is both require
>:only TD, RD & SG to function.
>
> "man cserialio" should give you some idea of where ttyc# devices differ.

The "ttyc" interface provides a raw interface to the serial driver.
There's no intervening line discipline layer getting in the way, but
you also don't get the POSIX API.

You could probably get something similar on tty[dmf] ports with
"ioctl(fd,I_POP,NULL)", but then again, you'll also break every program
you have since transparent ioctl support would probably go away. I
doubt stty_ld is the problem anyway.

--
Richard Masoner <rich...@dgii.com> Digi International

0 new messages