[olug] capturing data from serial port
Trent Melcher
tmelcher at trilogytel.com
Thu Oct 9 18:07:39 UTC 2003
Here is an example of someone capturing data from the serial port, dont
know if its an SMDI stream though.
Trent
http://www.seanadams.com/pge/
-----Original Message-----
From: olug-bounces at olug.org [mailto:olug-bounces at olug.org]On Behalf Of
Ryan O'Rourke
Sent: Thursday, October 09, 2003 11:12 AM
To: Omaha Linux User Group
Subject: Re: [olug] capturing data from serial port
> On Thu, 2003-10-09 at 10:16, Ryan O'Rourke wrote:
> > I'm trying to capture some phone data from a serial port and write it in
> > a delimited format to a file to later be inserted into a MySQL database.
> > How would I go about capturing that data?
On Thu, 2003-10-09 at 10:50, Nick Walter wrote:
[snip...]
> I'd recommend writing something simple to open the serial
> port and read the data, parse/delimit it, and write it out to file. I
> personally would do it in C, but that's what I'm good with. I'm sure
> other people could tell you how to do it in perl or python or java.
> Heck, if the parsing is simple you can just "cat /dev/ttyS?" and take
> care of the parsing in a shell script.
I did come across a Perl script that seems to do what I want for the
time being after a couple variable modifications:
http://www.aplawrence.com/Unix/logger.html
We tried the 'cat /dev/ttyS?' route on a SCO box, but it would time out
every so often. Besides, we're ditching all SCO since The Debacle and
want a more graceful solution on Linux.
> P.S. Is this an SMDI stream of data? This sounds exactly like a
> project I did a few years back.
Well, I don't know much about telephony, but I do know it is an SMDI
stream simply because that's what is labeled on the cable :-)
Thank you for your suggestions and pointing me in the right direction!
-- Ryan
_______________________________________________
OLUG mailing list
OLUG at olug.org
http://lists.olug.org/mailman/listinfo/olug
More information about the OLUG
mailing list