How to copy data from serial port to a file (data logging) ?

How to copy data from serial port to a file (data logging) ?

Post by Simon Hobs » Wed, 01 Nov 1995 04:00:00



We are just having a new phone system installed which has a call recording
data output. I'd like to capture this data and store it in a file (or
files) for later analysis - any suggestions on  the easiest way of doing it
?

Could I for example put an entry in inittab to start up a process to 'cat
/dev/ttynn >> /datafile' with a respawn option - how reliable would that be
? If I made it a shell script, could I get cron to kill it periodically and
have it create one file per day ? Or am I completely up the wrong tree ?

TIA, Simon

 
 
 

How to copy data from serial port to a file (data logging) ?

Post by John Prideau » Thu, 02 Nov 1995 04:00:00



> We are just having a new phone system installed which has a call recording
> data output. I'd like to capture this data and store it in a file (or
> files) for later analysis - any suggestions on  the easiest way of doing it
> ?

> Could I for example put an entry in inittab to start up a process to 'cat
> /dev/ttynn >> /datafile' with a respawn option - how reliable would that be
> ? If I made it a shell script, could I get cron to kill it periodically and
> have it create one file per day ? Or am I completely up the wrong tree ?

We start up our cat statement in one of our rc scripts.  Then every night, we kill
off the current process, move out the old file, and start up a new process once
again.  Works fine.  The only issue is making sure that some process has the tty
open so that you maintain the line settings (or your script could reset them every
time it starts back up).

John Prideaux


 
 
 

How to copy data from serial port to a file (data logging) ?

Post by Roberto Zi » Fri, 03 Nov 1995 04:00:00



says...

Quote:

>We are just having a new phone system installed which has a call
recording
>data output. I'd like to capture this data and store it in a file (or
>files) for later analysis - any suggestions on  the easiest way of doing
it
>?

>Could I for example put an entry in inittab to start up a process to 'cat
>/dev/ttynn >> /datafile' with a respawn option - how reliable would that
be
>? If I made it a shell script, could I get cron to kill it periodically
and
>have it create one file per day ? Or am I completely up the wrong tree ?

>TIA, Simon

Have you tried with the tee(C) command ?

--
---------------------------------------------------------------------

Strhold Sistemi EDP
Reggio Emilia      ITALY
---------------------------------------------------------------------
Acca', nisciuno e' fess !
                              (TOM - the red cat, Silvester's friend)
---------------------------------------------------------------------

 
 
 

How to copy data from serial port to a file (data logging) ?

Post by D. Chris Daniel » Wed, 08 Nov 1995 04:00:00



>We are just having a new phone system installed which has a call recording
>data output. I'd like to capture this data and store it in a file (or
>files) for later analysis - any suggestions on  the easiest way of doing it
>?

>Could I for example put an entry in inittab to start up a process to 'cat
>/dev/ttynn >> /datafile' with a respawn option - how reliable would that be
>? If I made it a shell script, could I get cron to kill it periodically and
>have it create one file per day ? Or am I completely up the wrong tree ?

We just did this for a client.  We used a script that creates a new file
each month with the phone logs.  I'll dig up the script for you.

        **chris

-------------------------------------------------------------------------
D. Chris Daniels                        SCO ACE

DLP Technologies, Inc.                  http://www.dlpco.com

 
 
 

How to copy data from serial port to a file (data logging) ?

Post by Dirk Ha » Wed, 13 Dec 1995 04:00:00



>We are just having a new phone system installed which has a call recording
>data output. I'd like to capture this data and store it in a file (or
>files) for later analysis - any suggestions on  the easiest way of doing it
>?
>Could I for example put an entry in inittab to start up a process to 'cat
>/dev/ttynn >> /datafile' with a respawn option - how reliable would that be
>? If I made it a shell script, could I get cron to kill it periodically and
>have it create one file per day ? Or am I completely up the wrong tree ?
>TIA, Simon

I did the same thing with a ATT Merlin phone system. I put a script in
<the same  directory as userdef, rc2.d/8 ?> that copies a data file
("phonelog"), if it exists, to phonelog.old, then cats everything that
presents itself at the port to phonelog. It seems to me that the port
had to be set to 1200 baud, so I had to set up stty for that port as
well.

If I had it to do over again I would set up the name of the log file
to be dependent on the date and time in case the system is rebooted
and the data in phonelog.old is lost, ie phonelog.jjjhhmm.

 
 
 

1. serial port data acquisition without data loss?

Hi,

A group in my lab wants to write a data acquisition program running under
Linux with a Tk/Tcl interface. The data will be coming in the serial port
at 19.2 kbps, and we need to ensure that there won't be any data lost,
no matter what else the user is doing. Can this be done under Linux? If so,
how? Is it already taken care of with hardware interrupts for the serial port,
so that it is read out before its 16 byte buffer starts being overwritten?
Does the process need to have its priority put at an especially high level?

Thanks very much. Sorry if these are stupid questions.

Jim



2. reboot resulted in 93%cpu for Sys...

3. Data Logging from Serial port.

4. RH 6.0 on a toshiba laptop

5. Logging data from the serial port

6. running as root

7. data data data

8. Fun with RedHat 7.1

9. Capturing data from serial port > file

10. Copy data files file AIX to PC.

11. copying data from one file into some other file with VI

12. Writing data from Kernel to a data file in user space