Answer the question
In order to leave comments, you need to log in
Is there a console utility for writing to the com port?
We need a small console utility to send a line to the com port. Maybe someone knows?
I have the following task: I
have a computer with windows and a com-port
is connected to a scoreboard (large pixel screen)
I need to run this program from PHP using exec() and write a line to the com-port.
It is not possible to work directly with the COM port from PHP.
Answer the question
In order to leave comments, you need to log in
php.net/manual/en/class.dotnet.php
https://msdn.microsoft.com/en-us/library/system.io...
$serial = new DOTNET('system', 'System.IO.Ports.SerialPort');
$serial->PortName = 'COM3';
$serial->Open();
$serial->Write('string');
$serial->Close();
everything worked fine for me: I opened com1 through fopen and wrote and read as much as necessary
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question