Anyone using php_serial.class.php with USB serial port?

jim cinetron-uEvt2TsIf2EsA/PxXw9srA at public.gmane.org
Thu Apr 3 20:03:21 UTC 2008


> > Below is the file I'm using to try to get it to work. Attached is the
> > class file. 
> > 
> > <?php
> > include "php_serial.class.php"; 
> > 
> > 
> > {
> > // Let's start the class
> > $serial = new phpSerial;
> > 
> > // First we must specify the device. This works on both linux and
> > windows (if
> > // your linux serial device is /dev/ttyS0 for COM1, etc)
> > $serial->deviceSet("/dev/USB0");
> 
> Should that be /dev/ttyUSB0 perhaps?  I have never seen a system name it
> /dev/USB0.
Sorry yes I had tried /dev/ttyUSB0 . I should have sent that version.  
> 
> > $serial->confBaudRate(9600); //Baud rate: 9600
> > $serial->confParity("none");  //Parity (this is the "N" in "8-N-1")
> > $serial->confCharacterLength(8); //Character length (this is the "8" in
> > "8-N-1")
> > $serial->confStopBits(1);  //Stop bits (this is the "1" in "8-N-1")
> > 
> > // Then we need to open it
> > $serial->deviceOpen();
> > 
> > // To write into
> > $serial->sendMessage("Hello !"); 
> > 
> >  
> > 
> > }
> > 
> > 
> > ?>
> > 
> 
> I see no other issue that would explain the problem.
Thanks so much for looking.
I've tried contacting the author and I'll see if he has any thoughts on
what may be wrong.

Jim

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list