project168 Posted March 26, 2011 Share Posted March 26, 2011 Hello guys, I am new to PHP programming. I am trying to figure out how to use PHP language to transmit/write characters to a USB port device at 9600 baud rate 8-N-1. Basically I just need the PHP coding to allow me to send stuff to the USB device but I have no idea how I can interface this. I did some researching but most were for RS-232 COM Port. I can't find the proper one for USB. If someone can help me out, that would be awesome. Thank you! Quote Link to comment Share on other sites More sharing options...
mattal999 Posted March 26, 2011 Share Posted March 26, 2011 Well, after a quick search on Google, I found this class that apparently lets you write data to a serial port. It's well documented, but here's what settings I think you'll require: require("php_serial.class.php"); $serial = new phpSerial(); $serial->deviceSet("COM1"); $serial->confBaudRate(9600); $serial->confParity("none"); $serial->confCharacterLength(; $serial->confStopBits(1); $serial->confFlowControl("none"); $serial->deviceOpen(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.