Article View: comp.bugs.sys5
Article #1156High speed serial I/O under system load
From: Jerry A Abramson
Date: Wed, 17 Jul 1991 17:43
Date: Wed, 17 Jul 1991 17:43
82 lines
3216 bytes
3216 bytes
Hi,
I am relatively new to UNIX serial I/O at the application level. I am
currently porting a fairly involved UNIX (Apollo SYSV based) product (Many
processes, SYSV IPC w/ message queues). I am having some problems
doing serial Input/Output using the read(2) and write(2) system calls.
System
------
Open Desktop 1.0.1 and Open Desktop 1.1.1
i386 with 25Mhz
20 MB RAM
Standard COM1: and COM2:
- Using the non-flow control devices tty1a and tty2a
- XON and XOFF not used
Ethernet (wd8013E)
Super VGA (Tecmar VGA/AD)
Adaptec SCSI and 300MB Hard Drive
The system is communicating at 9600 baud with a fast hardware device. I have
heard rumors that ODT may have problems with 9600 baud modems. If this
is true, a reply from SCO would be appreciated.
Symptom(s)
----------
write(2) is not returning a -1 but is also not sending all of the data
I ask it to. The next call to write(2) never succeeds in sending data
(verified with data line monitor).
Possible Causes
---------------
- Serial overflow (Docs. indicate I/O can be lost, is hanging also
a symptom).
- Multiple writers to same COM: port.
- SCO Serial driver bug
- Some sort of flow control is being used even though it is disabled.
Code in question
----------------
alarm(30);
if ( (rc = write(fd, &buf->pad[VTK_PAD_SIZE-1], size)) != size)
{
/* log the error and return */
if (rc == -1) {
fprintf(stderr,"\n\rvtko: Write Failure\n\r");
perror("vtko");
} else { <-------- rc == 0, errno == 0
fprintf(stderr,
"\n\rvtko: Tried to write %d bytes, only sent %d bytes\n",
size, rc);
} /* else */
alarm(0);
uel_log(vtk_my_name, VTK_COM_WRITE_FAIL, ZERO, params);
return;
} /* if */
alarm(0);
Any possible help and/or suggestions and/or authoritative answers from SCO
would be appreciated.
Reply via net, fax, and/or phone.
Jerold A. Abramson
Software Engineer
Voicetek Corp.
@ addr: jaa@world
! addr: ...!uunet!world
FAX: 1 (508) 250-9378
Voice: 1 (508) 250-7957
Technical Details
Message-ID:
<1991Jul17.174348.24529@world.std.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!spool.mu.edu!think.com!snorkelwacker.mit.edu!world!jaaReferences:
<wd.678549611@distel>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,dcdeb9f09654f086 X-Google-Attributes: gidf8c9b,public X-Google-Thread: 1048e3,dcdeb9f09654f086 X-Google-Attributes: gid1048e3,public X-Google-Thread: 10650a,dcdeb9f09654f086 X-Google-Attributes: gid10650a,public X-Google-Thread: 134180,ddc7ffeb02f47231,start X-Google-Attributes: gid134180,public X-Google-Thread: f7cee,dcdeb9f09654f086 X-Google-Attributes: gidf7cee,public X-Google-ArrivalTime: 1991-07-17 22:01:57 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!spool.mu.edu!think.com!snorkelwacker.mit.edu!world!jaa From: jaa@world.std.com (Jerry A Abramson) Newsgroups: comp.bugs.sys5,comp.unix.internals,comp.unix.questions,comp.unix.sysv386,biz.sco.opendesktop Subject: High speed serial I/O under system load Summary: /dev/tty Keywords: SVR3, i386, tty, flow control Message-ID: <1991Jul17.174348.24529@world.std.com> Date: 17 Jul 91 17:43:48 GMT References: <wd.678549611@distel> Organization: The World @ Software Tool & Die Lines: 82