Windows Read Serial Support [php_serial.class.php ]

来源:互联网 发布:766冒险岛数据库没有了 编辑:程序博客网 时间:2024/06/13 14:45

 

http://code.google.com/p/php-serial/issues/detail?id=1

 

Issue 1:

Windows Read Serial Support  3 people starred this issue and may be notified of changes.Back to list
Status: NewOwner: ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by david.ro...@gmail.com, Dec 30, 2009
Hi,I have got windows to read from my serial port using the following code inplace of the 'not implemented' comment:------elseif ($this->_os === "windows"){        $content = "";if ($count > 0){$content = fread($this->_dHandle, $count);}return $content;}-----System: Vista 32bit with a Prolific USB to serial adapter cable.I hope that it is of some help.Cheers,David
Comment 1 by THEREDR...@gmail.com, Jan 6, 2011
does this code really work ?please confirm sir...if yes i would take up my final year project related to web controlled arduino please reply sir...
Comment 2 by david.ro...@gmail.com, Jan 8, 2011
Why would I make a post saying it works if it didn't? give it a test for your hardware it will take all of 20 mins.As an added bonus I have attached my working version of the class.Have Fun!
php_serial.class.php
13.7 KB   View   Download
Comment 3 by gongqing...@gmail.com, May 27, 2011
It looks very good!I send the message to MCU.It's all right!
Comment 4 by honzapr...@gmail.com, May 31, 2011
Yes, it is working for me... :-)
Comment 5 by mustangc...@gmail.com, Nov 17, 2011
What version of pf PHP is this working on? Will it work running Apache, PHP5.2 on Windows 7 64Bit?  It works fine to write to the com port but I am still unable to read the comp port. 
Comment 6 by david.ro...@gmail.com, Nov 19, 2011
PHP Version 5.3.1 (XAMPP package)Be worth checking php doco for issues using 'fread' and 64-bit, since the change uses it to read the data.
Comment 7 by sokmeng....@gmail.com, Mar 15, 2012
so it mean that if i use XAMPP package then i can read the data from COM port in my windows? please give me some advices, and thank in advance.
Comment 8 by david.ro...@gmail.com, Mar 15, 2012
It means if your php/apache is running with sufficient privelege to access your windows com ports then you should be able to read from it.
Comment 9 by vandenbe...@gmail.com, Apr 1, 2012
For me, write does work, read doesn't unfortunately. Even with the suggested change in code..
Comment 10 by cilok.e...@gmail.com, Jun 18, 2012
hai all,, I need Help..I was try php_serial.class.phpcode$serial->sendMessage('Hallo');why I cannot get reply with code$result=$serial->readPort();print $result;regard newbie
  Sign in to add a comment
原创粉丝点击