Posted by arturo.valencia on 10/13/01 11:28
An easy solution is to write a program Z which reads a parameter from
the command line and sends the parameter to the serial port. Then you
just have to use a "system()" call to use Z from your scripts in PHP.
If you have to send a lot of information, you can save the information
in a temp file in your scripts in PHP , and then you call your Z
program to make the transfer from the file to the serial port.
If you are working on unix is easier as you can configure your serial
port with "setserial" and the talk directly to the /dev/tty (using for
example echo hello > /dev/ttyS0 or cp myfile > /dev/ttyS0 ) with System
calls.
regards
Arturo Valencia Milian
Navigation:
[Reply to this message]
|