crucifyer / phpserial
serial port access class
Fund package maintenance!
crucifyer
xenosi.de/sponsors.html
This package is auto-updated.
Last update: 2025-03-29 00:44:00 UTC
README
serial port access class
$ php composer.phar require "crucifyer/phpserial" "dev-main"
$xserial = new \Xeno\Net\Serial(); $xserial->setLog('serial.log', \Xeno\Net\Serial::LOG_ALL); $xserial->setEcho(true); $xserial->writeLn('AT'); $xserial->readLn(); $xserial->readLn(); /* W: AT R: AT R: OK */ // listen while(true) { $line = $xserial->readLn(false, 10); if($line == '') { sleep(5); continue; } echo $line; } exit;