<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Serial IO in PHP using the DIO extension</title>
	<atom:link href="http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/</link>
	<description>The life and times of a jet setting software engineer!</description>
	<lastBuildDate>Wed, 06 Feb 2013 12:45:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: DrSeMSeM</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-4196</link>
		<dc:creator>DrSeMSeM</dc:creator>
		<pubDate>Sat, 24 Sep 2011 21:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-4196</guid>
		<description>Hiii

thanks for your code looking interested and direct using AT commands

will i have a problem with this line

$f = fopen(&quot;dio.serial:///dev/tty.ZTEUSBATPort_&quot;, &quot;r+&quot;, false, $c);

i change this part 
&quot;dio.serial:///dev/tty.ZTEUSBATPort_&quot;
to be
&quot;dio.serial:COM25.ZTEUSBATPort_&quot;
as my USB connected to COM25

and i got this error

Warning: fopen(dio.serial:COM25.ZTEUSBATPort_) [function.fopen]: failed to open stream: No such file or directory in C:\xampp\htdocs\sms\1\test.php on line 50

so please tell me what is the suitable code to replace
i&#039;m using XAMPP apache server on windows 7
my USB Modem Huawei K3565

thanks for your help :)</description>
		<content:encoded><![CDATA[<p>Hiii</p>
<p>thanks for your code looking interested and direct using AT commands</p>
<p>will i have a problem with this line</p>
<p>$f = fopen(&#8220;dio.serial:///dev/tty.ZTEUSBATPort_&#8221;, &#8220;r+&#8221;, false, $c);</p>
<p>i change this part<br />
&#8220;dio.serial:///dev/tty.ZTEUSBATPort_&#8221;<br />
to be<br />
&#8220;dio.serial:COM25.ZTEUSBATPort_&#8221;<br />
as my USB connected to COM25</p>
<p>and i got this error</p>
<p>Warning: fopen(dio.serial:COM25.ZTEUSBATPort_) [function.fopen]: failed to open stream: No such file or directory in C:\xampp\htdocs\sms\1\test.php on line 50</p>
<p>so please tell me what is the suitable code to replace<br />
i&#8217;m using XAMPP apache server on windows 7<br />
my USB Modem Huawei K3565</p>
<p>thanks for your help <img src='http://www.cyberspice.org.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naresh</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-4178</link>
		<dc:creator>naresh</dc:creator>
		<pubDate>Thu, 08 Sep 2011 11:45:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-4178</guid>
		<description> OK &lt; AT+CMGS=&quot;9851129982&quot;  ERROR 
why is this error??can uhelp me.Fatal error: Maximum execution time of 60 seconds exceeded in D:\xampp\htdocs\sms\gonzalo123-gam-sms-cb3cce4\SMS1.PHP on line 21</description>
		<content:encoded><![CDATA[<p>OK &lt; AT+CMGS=&quot;9851129982&quot;  ERROR<br />
why is this error??can uhelp me.Fatal error: Maximum execution time of 60 seconds exceeded in D:\xampp\htdocs\sms\gonzalo123-gam-sms-cb3cce4\SMS1.PHP on line 21</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krisno W Utomo</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-4176</link>
		<dc:creator>Krisno W Utomo</dc:creator>
		<pubDate>Sat, 03 Sep 2011 07:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-4176</guid>
		<description>i have compiled dll (0.0.4RC4) with PHP 5.3.x source and it works fine. you can download it at http://www.4shared.com/file/Fp7b4-2I/php_dio.html.</description>
		<content:encoded><![CDATA[<p>i have compiled dll (0.0.4RC4) with PHP 5.3.x source and it works fine. you can download it at <a href="http://www.4shared.com/file/Fp7b4-2I/php_dio.html" rel="nofollow">http://www.4shared.com/file/Fp7b4-2I/php_dio.html</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manish</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-3991</link>
		<dc:creator>manish</dc:creator>
		<pubDate>Wed, 15 Jun 2011 08:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-3991</guid>
		<description>Hi All,
I am trying to open a com port8/port10  using fopen() of PHP but i am getting an error &quot;Warning: fopen(COM8:) [function.fopen]: failed to open stream&quot; .
can you please tell what is wrong in my code, 

$fp = fopen (&quot;COM8:&quot;, &quot;w+&quot;);	
    if (!$fp) {
		echo &#039;not open&#039;;
      }
	  else{
	  echo &#039;port is open for write&#039;;
		$string .= &#039;C30C10178C10100C103110606C103081000C10100C10101C100&#039;;       
        fputs ($fp, $string );
		echo $string;
        fclose ($fp);
	  }
	  $fp = fopen (&quot;COM8:&quot;, &quot;r+&quot;);
	  if (!$fp) {
		echo &#039;not open for read&#039;;
      }
	  else{		
		echo &#039; port is open for read&#039;;
        $buffer = fread($fp, 128 );
		 echo $buffer;
        fclose ($fp);			
	  }</description>
		<content:encoded><![CDATA[<p>Hi All,<br />
I am trying to open a com port8/port10  using fopen() of PHP but i am getting an error &#8220;Warning: fopen(COM8:) [function.fopen]: failed to open stream&#8221; .<br />
can you please tell what is wrong in my code, </p>
<p>$fp = fopen (&#8220;COM8:&#8221;, &#8220;w+&#8221;);<br />
    if (!$fp) {<br />
		echo &#8216;not open&#8217;;<br />
      }<br />
	  else{<br />
	  echo &#8216;port is open for write&#8217;;<br />
		$string .= &#8216;C30C10178C10100C103110606C103081000C10100C10101C100&#8242;;<br />
        fputs ($fp, $string );<br />
		echo $string;<br />
        fclose ($fp);<br />
	  }<br />
	  $fp = fopen (&#8220;COM8:&#8221;, &#8220;r+&#8221;);<br />
	  if (!$fp) {<br />
		echo &#8216;not open for read&#8217;;<br />
      }<br />
	  else{<br />
		echo &#8216; port is open for read&#8217;;<br />
        $buffer = fread($fp, 128 );<br />
		 echo $buffer;<br />
        fclose ($fp);<br />
	  }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-2521</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Fri, 10 Dec 2010 07:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-2521</guid>
		<description>I think I solved the issue above - modem expects &quot;\r\r&quot; instead of &quot;\r\n&quot; after AT+CMGS command. Works fine now!</description>
		<content:encoded><![CDATA[<p>I think I solved the issue above &#8211; modem expects &#8220;\r\r&#8221; instead of &#8220;\r\n&#8221; after AT+CMGS command. Works fine now!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-2509</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Thu, 09 Dec 2010 16:06:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-2509</guid>
		<description>Hi!

I&#039;m trying to use DIO to send SMS using a GSM modem - this is what your test script outputs:

 AT+CMGF=1
&gt; OK
&lt; AT+CMGS=&quot;+49160xyz&quot;
 AT+CMGS=&quot;+49160xyz&quot;
&gt; ERROR
&gt; Hello world!
^C

Using minicom and issuing the AT-commands manually works as expected.

I&#039;m using ubuntu x64, php 5.3.3 and DIO 0.0.4RC4 (beta) from PECL repositories.</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I&#8217;m trying to use DIO to send SMS using a GSM modem &#8211; this is what your test script outputs:</p>
<p> AT+CMGF=1<br />
&gt; OK<br />
&lt; AT+CMGS=&quot;+49160xyz&quot;<br />
 AT+CMGS=&#8221;+49160xyz&#8221;<br />
&gt; ERROR<br />
&gt; Hello world!<br />
^C</p>
<p>Using minicom and issuing the AT-commands manually works as expected.</p>
<p>I&#8217;m using ubuntu x64, php 5.3.3 and DIO 0.0.4RC4 (beta) from PECL repositories.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcel</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-871</link>
		<dc:creator>Marcel</dc:creator>
		<pubDate>Thu, 03 Jun 2010 11:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-871</guid>
		<description>XAMMP 1.7.3 (WinXP)
PHP 5.3.1 MSVC6 (Visual C++ 6.0) 
PHP EXTENSION BUILD: API20090626,TS,VC6 

Trying to install via PEAR, which fails and tells me to install via PECL.

C:\xampp\php&gt;pear install dio
No releases available for package &quot;pear.php.net/dio&quot; - package pecl/dio can be installed with &quot;pecl install dio&quot;
install failed

Trying PECL install and fails as well:

C:\xampp\php&gt;pecl install dio
WARNING: channel &quot;pecl.php.net&quot; has updated its protocols, use &quot;pecl channel-update pecl.php.net&quot; to update
downloading dio-0.0.4RC4.tgz ...
Starting to download dio-0.0.4RC4.tgz (18,334 bytes)
......done: 18,334 bytes
12 source files, building
WARNING: php_bin \xampp\php\php.exe appears to have a suffix \php.exe, but config variable php_suffix does not match
ERROR: The DSP dio.dsp does not exist.

Tried all php_dio.dll that I could find, but all failed.

Any idea how I can get DIO to work? Is there anybody with a compiled DLL that does work?</description>
		<content:encoded><![CDATA[<p>XAMMP 1.7.3 (WinXP)<br />
PHP 5.3.1 MSVC6 (Visual C++ 6.0)<br />
PHP EXTENSION BUILD: API20090626,TS,VC6 </p>
<p>Trying to install via PEAR, which fails and tells me to install via PECL.</p>
<p>C:\xampp\php&gt;pear install dio<br />
No releases available for package &#8220;pear.php.net/dio&#8221; &#8211; package pecl/dio can be installed with &#8220;pecl install dio&#8221;<br />
install failed</p>
<p>Trying PECL install and fails as well:</p>
<p>C:\xampp\php&gt;pecl install dio<br />
WARNING: channel &#8220;pecl.php.net&#8221; has updated its protocols, use &#8220;pecl channel-update pecl.php.net&#8221; to update<br />
downloading dio-0.0.4RC4.tgz &#8230;<br />
Starting to download dio-0.0.4RC4.tgz (18,334 bytes)<br />
&#8230;&#8230;done: 18,334 bytes<br />
12 source files, building<br />
WARNING: php_bin \xampp\php\php.exe appears to have a suffix \php.exe, but config variable php_suffix does not match<br />
ERROR: The DSP dio.dsp does not exist.</p>
<p>Tried all php_dio.dll that I could find, but all failed.</p>
<p>Any idea how I can get DIO to work? Is there anybody with a compiled DLL that does work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: siddesh</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-539</link>
		<dc:creator>siddesh</dc:creator>
		<pubDate>Thu, 11 Mar 2010 08:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-539</guid>
		<description>hi

  i wanted to get the video stream from digital webcam attached to the usb port.
i have the activXcomport but it not full version. so i m decided to use the dio_open but i m get error by this method.............

  please help me regarding this .....
  thank you in advance......</description>
		<content:encoded><![CDATA[<p>hi</p>
<p>  i wanted to get the video stream from digital webcam attached to the usb port.<br />
i have the activXcomport but it not full version. so i m decided to use the dio_open but i m get error by this method&#8230;&#8230;&#8230;&#8230;.</p>
<p>  please help me regarding this &#8230;..<br />
  thank you in advance&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cyberspice</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-522</link>
		<dc:creator>cyberspice</dc:creator>
		<pubDate>Mon, 01 Mar 2010 13:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-522</guid>
		<description>Hi Cliff,  I think the code snippet you pasted has gotten truncated. 

However if you are using DIO 0.0.4 I think this may be because I changed the default behaviour (which I shouldn&#039;t have had so I will fix it).  You need to provide &#039;is_canonical&#039; =&gt; 0 in your array of serial port settings.  Character 4, i.e. ctrl-D, is end of file in canonical mode and so no further data will be received.  You need to disable canonical mode in the settings.

Melanie</description>
		<content:encoded><![CDATA[<p>Hi Cliff,  I think the code snippet you pasted has gotten truncated. </p>
<p>However if you are using DIO 0.0.4 I think this may be because I changed the default behaviour (which I shouldn&#8217;t have had so I will fix it).  You need to provide &#8216;is_canonical&#8217; =&gt; 0 in your array of serial port settings.  Character 4, i.e. ctrl-D, is end of file in canonical mode and so no further data will be received.  You need to disable canonical mode in the settings.</p>
<p>Melanie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cliff Lan</title>
		<link>http://www.cyberspice.org.uk/blog/2010/02/15/serial-io-in-php-using-the-dio-extension/comment-page-1/#comment-518</link>
		<dc:creator>Cliff Lan</dc:creator>
		<pubDate>Sun, 28 Feb 2010 17:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberspice.org.uk/blog/?p=429#comment-518</guid>
		<description>Dear Sir,

can you advise me why I can not read byte 0x04 ? when this byte arrives, the reading stopped. I was really puzzled.

Cliff

 19200,
  &#039;bits&#039; =&gt; 8,
  &#039;stop&#039;  =&gt; 1,
  &#039;parity&#039; =&gt; 0
)); 

$cnt=0;
$f = null;
while (1) {


  //if($f == null)$f = fopen(&#039;t&#039;.time(),&quot;w&quot;);

  $data = dio_read($fd,1);
print $data;
if(ord(substr($data,0,1)) == 0x04)
{
print &quot;EOT received\n&quot;;
dio_write($fd,chr(1).chr(2).chr(3).chr(4));
}

} 

dio_close($fd);
?&gt;</description>
		<content:encoded><![CDATA[<p>Dear Sir,</p>
<p>can you advise me why I can not read byte 0&#215;04 ? when this byte arrives, the reading stopped. I was really puzzled.</p>
<p>Cliff</p>
<p> 19200,<br />
  &#8216;bits&#8217; =&gt; 8,<br />
  &#8216;stop&#8217;  =&gt; 1,<br />
  &#8216;parity&#8217; =&gt; 0<br />
)); </p>
<p>$cnt=0;<br />
$f = null;<br />
while (1) {</p>
<p>  //if($f == null)$f = fopen(&#8216;t&#8217;.time(),&#8221;w&#8221;);</p>
<p>  $data = dio_read($fd,1);<br />
print $data;<br />
if(ord(substr($data,0,1)) == 0&#215;04)<br />
{<br />
print &#8220;EOT received\n&#8221;;<br />
dio_write($fd,chr(1).chr(2).chr(3).chr(4));<br />
}</p>
<p>} </p>
<p>dio_close($fd);<br />
?&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
