Open GoogleCodeExporter opened 9 years ago
Hi dude did you ever manage to fix this? Having the exact same issue.
Original comment by jerome.d...@gmail.com
on 20 Aug 2013 at 4:24
function rs232init($com,$bautrate)
{
`mode $com: BAUD=$bautrate PARITY=N data=8 stop=1 xon=off`;
}
function send($comport,$char)
{
$fp = fopen ("$comport", "w+");
if (!$fp)
{
echo "not open for read";
}
else {
fputs ($fp, $char);
fclose ($fp);
}
}
function read($comport2,$sek)
{
$buffer = "";
$fp2 = fopen ("$comport2", "r+");
if (!$fp2)
{
echo "port is open for read";
}
else
{
sleep($sek);
$buffer .= fgets($fp2, 4096);
}
return $buffer;
fclose ($fp2);
}
rs232init("com2","9600");
send("com2","3");
$a = read("com2","2");
echo $a;
Original comment by fares.ab...@gmail.com
on 2 Aug 2014 at 9:29
Original issue reported on code.google.com by
jeanmarc...@gmail.com
on 6 Nov 2012 at 8:36