[comp.unix.wizards] tty-problem

mcnitt@buster.cps.msu.edu (Kevin L McNitt) (05/14/91)

 
 Hi,

 I have a problem that I hope someone out there can help me with,

 I am trying to capture thru a serial port a block of 1024 characters
 sent from another computer, the other computer does no handshaking of
any kind, it Sends 1024 char. and waits for an 0x006 (ack) then it sends 1024
 more characters.


 The system I am using is pretty much a standard system 5 r3v6 
 currently: tying to use the \dev\tty thru open  with read & write 
 set termio.c_lflag to 0
 then read (input,buffer location,1024-number already read)

 Problem: This works sometimes for 1 or 2 blocks of 1024 better if pri.
 is raised maybe 3 or 4  blocks. We seem to be droping a character
 along the way.

 When we do the read the driver usally only has 4 characters available on
 average, so we aren't falling behind the buffer size of 256 for the driver.

 Is there a better way to read from a seriel port ? 
   any sugestions would be greatly appreciated !

	Kevin McNitt or Curtis Regentin
e-mail	mcnitt@msumsf.bch.msu.edu  or roo@itr1.bch.msu.edu

	Mass Spec Facility
        Michigan State University
	rm 11 Biochemistry
	East Lansing, Mi 48824

masood@parc.xerox.com (Taha Masood) (05/14/91)

Hello ,
I am writing communication software using the serial port ttyb on a sun 4/110.
I am really having a hard time trying to make my software interrupt driven; i.e
whenever a message is available at the port an interrupt is generated which 
informs the program of the presence of data on the port.I have had success 
trying to make my timers in the program interrupt driven since a signal is 
generated each time the timer expires.No such signal seems to be generated when
data is present at the port.
I would really appreciate if somebody could give me valuable hints about
 writing such an interrupt driven software.


Thanks

Taha Masood

e-mail: masood.wbst311@xerox.com