Jump to content

Insert data from com port


fran

Recommended Posts

My code is telling me that the port is open but isn't reading $buffer.  No errors are reporting.

 

 
error_reporting(E_ALL);
 
$fp = fopen('COM1', 'r+');
if(!fp){
 echo "Port not accessible";
} else {
echo "Port COM1  opened.";
}
$output = "mode COM1: BAUD=1200 PARITY=Even data=7 stop=1 Xon=off";
$buffer = fgets($fp);
echo "Read: $buffer";
 

 

Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/279079-insert-data-from-com-port/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.