Communicating with Serial Port

I am using system running on red hat linux 4.
I had connected health measuring machine to the serial port and configured it
[root@localhost ~]stty -F /dev/ttyS0 9600 -parenb cs8 -cstopb
this machine requires a command to be passed to it for giving output. I am unable to pass command hexa format(0x68) to the machine.
So when i used cat not getting any output from the port. Please help me on this.
[root@localhost ~]cat /dev/ttyS0 > /opt/srldata.txt
[ctrl-c]
i had tried to pass command using echo
[root@localhost ~]echo "0x68" > /dev/ttyS0
but dont know how to get the output.
I need to collect values from the port and display it on web page using PHP on Linux. Please any Linux/Unix Gurus help me to sort this out.

Thanks in advance

Try using something like minicom to communicate with the device over the serial connection. I believe that RHEL4 has a minicom RPM on the OS media.

Cheers,
ZB

my system has minicom 2 version. I had openend minicom and configured it to 9600 8N1 and restarted it. but it is showing offline. Pls hlp. How can i call this minicom from PHP code.

I had tried in several ways but could not make this work. pls help.

From what I have read about minicom, it is a terminal emulation program.
So if you want to connect to another Linux/Unix system via a serial port then you can do that.
The setup that you have (I presume) requires that you communicate with a device over a serial port that does does not have a keyboard.
You will have to write (presumably in C) a device handler, that sends hex 68 to the machine, and then listens on the port for the response.
Usually equipment like this is sold with API software, or has a website that you can use to download software, to solve the problem that you are having.