🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.misc
2 messages
2 total messages Started by Paul S. Sears Wed, 06 Jan 1993 16:39
Reading data from serial ports
#4729
Author: Paul S. Sears
Date: Wed, 06 Jan 1993 16:39
18 lines
1246 bytes
Is there a way to read data in from the serial ports?  We have tried  
something to the effect of

cat /dev/ttya | od -c

but we are not getting any results.  We need to grab all data comming in  
via either serial port and the data is 8-bit (binary, thus the need to  
pipe to od).  Can anyone tell me what we are doing wrong? Which of the  
ttys would be best to use (ttya, ttyda, ttydfa, ttydfa)?

--
Paul S. Sears                *  sears@uh.edu (NeXT Mail OK)
The University of Houston    *  suggestions@tree.egr.uh.edu (NeXT
Engineering Computing Center *  comments, complaints, questions)
NeXT System Administration   *  DoD#1967 '83 NightHawk 650SC 
          >>> SSI Diving Certification #755020059 <<<
"Programming is like sex: One mistake and you support it a lifetime."
Re: Reading data from serial ports
#4926
Author: andrew
Date: Sun, 10 Jan 1993 21:46
27 lines
1502 bytes
In article <1if20rINNfjn@menudo.uh.edu> sears@uh.edu writes:
>
>Is there a way to read data in from the serial ports?  We have tried  
>something to the effect of
>
>cat /dev/ttya | od -c
>
>but we are not getting any results.  We need to grab all data comming in  
>via either serial port and the data is 8-bit (binary, thus the need to  
>pipe to od).  Can anyone tell me what we are doing wrong? Which of the  
>ttys would be best to use (ttya, ttyda, ttydfa, ttydfa)?

The best way would probably be to get one of the serial port objects.
To read the data from the port you basically send a readData: message
to the object and pass it a buffer...

BenaTong has an object called SerialSolutions.  I think it's $50, and
it looks easy to use (I have only seen the API - I have not used it).
It's probably worth checking it out.


andrew
-- 
andrew@cubetech.com      | "We cannot dwell in the time that is to come,
Andrew Loewenstern       |  lest we lose our now for a phantom of our
Cube Technologies, Inc.  |  own design." - Erendis
0000000701B61D1ADF0DFC9C16185CEA055200000007EB4A9FEB1922065D471A89E905B5
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads