Re: [opensuse] howto - Read Data from Serial Port?



David C. Rankin wrote:
Banning someone out of personal spite is uncalled for fascism wrote:
David C. Rankin wrote:
Listmates,

A linux question. I have a phone system that will output call logs through an rs-232 cable. I would like to write a script that will read the data from the serial port and input it into a mysql table.

cat /dev/ttyS_ | data_storing_program


Thanks Theo, and Mr. fascism,

I will look at the python interface and definitely see if I can make the cat script work.

Another question, If I write a small script and "sleep" for 30 seconds or so during the loop to cut down on racing the loop, will that have any unintended consequences I should look out for?

Only if the pipe fills up REALLY quickly.

If I remember correctly, it can hold a few kilobytes.

The size of the pipe can be determined this way:

$ echo "`ulimit -p` 512 * p" | dc

For most serial communications, you won't have to worry about
the pipe overflowing, because serial ports are slow in
comparison to processor speed.

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: Looking for file transfer tool with XMODEM on Linux
    ... >A bash script consisting of ... The "init string" is just the only three AT commands I could ... You *must* totally initialize the serial port. ...
    (comp.os.linux.misc)
  • Re: beginner Qs about COM/.NET (context = exposing a pre-existing app to scripting)
    ... >> c) what is the proper behavior for the COM server to take if a script ... > you don't need a mutex at all. ... I think I have to use MTA; while program A is using the serial port, ...
    (microsoft.public.vc.atl)
  • Re: Help with cron on Suse 10
    ... > OK, the script is running, thanks for the suggestions. ... > reads a temperature sensor on the serial port and logs the data to a ... > when scheduled from cron it can't access the serial port - it fails to ... > chmod 777 the serial port it still fails. ...
    (alt.os.linux.suse)
  • Serial port (Windows XP)
    ... I'm comparing Tcl's behaviour under Linux and Windows - and I've encountered ... A script, which is using a serial port, is unable to retake control over it ... set commMode "9600,e,7,1" ...
    (comp.lang.tcl)
  • Re: [opensuse] howto - Read Data from Serial Port?
    ... A linux question. ... I would like to write a script that will read the data from the serial port and input it into a mysql table. ... Another question, If I write a small script and "sleep" for 30 seconds or so during the loop to cut down on racing the loop, will that have any unintended consequences I should look out for? ... I'm pretty sure that I/O blocking will prevent the sort ...
    (SuSE)