Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
January 12, 2007, 11:22 pm
rate this thread
I need to collect and send data from a rs232 device- it is a simple
I need to be able to collect actual temperature ,store the result in
database (mysql) and show it in browser in realtime (or with max 10 sec
Is there any function/script or smth that could help do that without
external software - I don't want to write a small program in e.g. C
and then collect it from database. Although it is also an option , but
i would like to do it in php.
Re: Collect data from serial port - rs232 to browser
It might have been useful to tell us what platform you are running on.
On a Linux/*nix box its certainly no problem to write a daemon in PHP (but
writing something which isolates itself from the foreground process can be
a bit tricky - but there are wrapper programs that will do that). AFAIK you
also won't be able to call the ioctls to set the serial port behaviour
directly from a stock PHP - but most *nix have tools for this (on Linux use
Updating the stuff in real time on a browser is a bit more tricky. You could
set the page to automatically refresh every 10 seconds, or just update a
div using AJAX.
- Martin Mandl - m2m tech support
January 13, 2007, 10:16 am