Mohd Sirhan Shahrani Bin Mt. Salleh - 2007-09-19 07:10:56
I managed to sent data to credit card terminal using your serial class.
However I still couldn't retrieve data that was sent by the credit card terminal to the system.
The class will replied nothing. Hopefully u can give me some guide to solve this problem.
This is my code :
$serial = new php_serial;
Matt Switlik - 2008-04-01 01:00:49 - In reply to message 1 from Mohd Sirhan Shahrani Bin Mt. Salleh
I'm having a similar problem with my IO board.
I can send but not receive data.
the board accepts commands like "l01" or "l00" which turns LED Zero On or Off respectively. to read the first analog input the command is "a0" and the board spits back a hex value of the input. I have a resistor with a value of "03FF" on the input now. I know this because I can use minicom in linux to send the "a0" command and minicom receives "03FF".
I had to force the _exec function to always return(0) because of unreliable process termination codes due to a known issue in php http://us2.php.net/manual/en/function.proc-close.php
here's the code:
$serial = new phpSerial;
// these are the same settings as in the terminal I used to test the io board
$serial->confBaudRate(19200); //Baud rate: 19200
$serial->confParity("none"); //Parity (this is the "N" in "8-N-1")
$serial->confCharacterLength(8); //Character length
$serial->confStopBits(1); //Stop bits (this is the "1" in "8-N-1")
MOURIER - 2009-01-03 10:22:53 - In reply to message 1 from Mohd Sirhan Shahrani Bin Mt. Salleh
First happy new year and best wishes to you and your family (in India?).
I try to use php_serial_class with linux and I am unable to make the soft running. All the example I found seems running but when I check with stty they don't change the speed or anything else. I try with several linux: mandrake, mandriva, centos4.7, centos5.2 thats quite the same. Is there something to do before writing or reading the port? Is it necessary that something is connected to the port for testing? Is it necessary to make 777 chmod to the port or something else? I ask you because Remy email does not answer.