<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>LeafLabs Garden &#187; Topic: A Possible Bug in SerialUSB.read() function</title>
		<link>http://forums.leaflabs.com/topic.php?id=657</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:19:42 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=657" rel="self" type="application/rss+xml" />

		<item>
			<title>crenn on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657&amp;page=2#post-3831</link>
			<pubDate>Sun, 06 Mar 2011 23:58:08 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">3831@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;That commit was to fix a different problem. Sadly not this one.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657&amp;page=2#post-3819</link>
			<pubDate>Fri, 04 Mar 2011 11:25:42 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">3819@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello-&#60;/p&#62;
&#60;p&#62;I am glad the &#60;code&#62;SerialUSB.read()&#60;/code&#62; bug I found in the current Maple IDE SNAPSHOT was confirmed.  I did not realize the bug report had been closed!&#60;/p&#62;
&#60;p&#62;Is the commit from two days ago the current solution to the problem?&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/libmaple/commit/3ba7196712a5bfe4fe1166b6c34d49c3d7254568&#34;&#62;https://github.com/leaflabs/libmaple/commit/3ba7196712a5bfe4fe1166b6c34d49c3d7254568&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I do not know which was posted first, mbolivar's comment about the reopening of the bug (in the previous post) or the edited code.&#60;/p&#62;
&#60;p&#62;I will not have a chance to test the new &#60;code&#62;wirish/usb_serial.cpp&#60;/code&#62; file until this weekend, but other users (who are using the current SNAPSHOT) might decide to use code which requires &#60;code&#62;SerialUSB.read()&#60;/code&#62; if they can get a quick verification that the code seems to work as expected.&#60;/p&#62;
&#60;p&#62;Are there any dependency issues involved or can I just copy the edited &#60;code&#62;wirish/usb_serial.cpp&#60;/code&#62; file and use it with the current IDE snapshot?&#60;/p&#62;
&#60;p&#62;Thanks for the help!&#60;/p&#62;
&#60;p&#62;Stephen from NYC&#60;/p&#62;
&#60;p&#62;Note: I do not think IDE 0.0.9 has the &#60;code&#62;SerialUSB.read()&#60;/code&#62; bug, but 0.0.9 still has a bug in SerialUSB.print().
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657&amp;page=2#post-3798</link>
			<pubDate>Tue, 01 Mar 2011 20:00:40 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3798@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;crenn,&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
The problem still exists in PuTTY, it's just masked. Because for PuTTY, as you type, it sends the characters as you type them. So it's only collecting a single character. However, if you paste text into the PuTTY window, it sends this text in very quick succession so that the code sees multiple bytes are available, which triggers the bug.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;that is a convincing explanation. consider the bug reopened.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657&amp;page=2#post-3762</link>
			<pubDate>Sun, 27 Feb 2011 08:20:27 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3762@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;cren - thanks for the explanation. I think I understand now !-)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3760</link>
			<pubDate>Sun, 27 Feb 2011 06:11:02 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">3760@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;mbolivar said:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;crenn,&#60;br /&#62;
Have you been successful avoiding the bad behavior using PuTTY?&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;The problem still exists in PuTTY, it's just masked. Because for PuTTY, as you type, it sends the characters as you type them. So it's only collecting a single character. However, if you paste text into the PuTTY window, it sends this text in very quick succession so that the code sees multiple bytes are available, which triggers the bug.&#60;/p&#62;
&#60;p&#62;gbulmer said:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;For the benefit of the non-PuTTY users, what is the bad behaviour, and how can it be avoided?&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;See the above posts for the description of the bad behaviour, and also how to avoid it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>snigelen on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3738</link>
			<pubDate>Fri, 25 Feb 2011 12:54:10 +0000</pubDate>
			<dc:creator>snigelen</dc:creator>
			<guid isPermaLink="false">3738@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Here's an example of the bad behviour&#60;br /&#62;
&#60;blockquote&#62;If you send &#34;ABC&#34; (without the quotes) using the serial monitor Maple IDE 0.0.9 correctly echos back &#34;ABC&#34;, but the snapshot echos &#34;AAA&#34;.&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I guess it can be avoided by not using the snapshot, or if you use it, don't use the built in serial console in the Maple IDE.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3737</link>
			<pubDate>Fri, 25 Feb 2011 12:31:23 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3737@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;mbolivar -&#60;br /&#62;
&#60;blockquote&#62;Have you been successful avoiding the bad behavior using PuTTY?&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;For the benefit of the non-PuTTY users, what is the bad behaviour, and how can it be avoided?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3734</link>
			<pubDate>Fri, 25 Feb 2011 05:34:50 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3734@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;crenn,&#60;/p&#62;
&#60;p&#62;Have you been successful avoiding the bad behavior using PuTTY?&#60;/p&#62;
&#60;p&#62;Also, I didn't mean to imply anything about you in particular; the workaround was posted for everyone's benefit :).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3731</link>
			<pubDate>Thu, 24 Feb 2011 18:19:20 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">3731@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It's fine, as I use PuTTY on a daily basis to connect back to my home network to grab files I've forgotten and also go on IRC with a single session. I've also used it when using different serial hardware and the bluetooth module.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3727</link>
			<pubDate>Thu, 24 Feb 2011 16:04:14 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3727@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;crenn,&#60;/p&#62;
&#60;p&#62;Sigh, you're right.  We should have checked.  In the meantime, here's a workaround using PuTTY:&#60;/p&#62;
&#60;p&#62;1) Download PuTTY: &#60;a href=&#34;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&#34; rel=&#34;nofollow&#34;&#62;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&#60;/a&#62;&#60;br /&#62;
2) Run putty.exe&#60;br /&#62;
3) There will be a radio menu titled &#34;Connection Type&#34;. Choose &#34;Serial&#34;, then pick the COM port corresponding to your Maple, and you should be all set.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3724</link>
			<pubDate>Thu, 24 Feb 2011 08:04:10 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">3724@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;The thing that interests me is the behaviour changed, when using the slightly different function, to what I would expect it to be. However, I'll go and check out this shortly and see what happens.&#60;/p&#62;
&#60;p&#62;Also, I strongly believe that Windows 7 (The only OS I've been using for this project, so far) has no longer got a serial monitor built-in. However, I do have 3rd party programs that I use (although usually only used with either different serial hardware or to complete a serial connection with a bluetooth module).
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3718</link>
			<pubDate>Wed, 23 Feb 2011 21:58:08 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3718@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;(And sorry for not being more clear about what to expect!)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3717</link>
			<pubDate>Wed, 23 Feb 2011 21:45:20 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3717@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi Stephen,&#60;/p&#62;
&#60;p&#62;Yes, as I mentioned when I posted the snapshot, there appears to be a regression in the IDE's built-in serial monitor:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=651&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=651&#60;/a&#62;&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
There've been some issues lately with the built-in serial monitor; if you get bad behavior, try using something like PuTTY, HyperTerminal, screen, or minicom. Working on fixing this as well.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;The behavior is the one you discovered:  If you try to echo back some bytes, you'll appear to get copies of the first byte you sent.&#60;/p&#62;
&#60;p&#62;We've tested it out on other terminal programs (e.g. screen, minicom) and everything works fine.  This behavior is not a problem with the SerialUSB implementation.  We're going to get this issue ironed out before the next release, but for now, since every OS comes with a serial monitor built-in, we recommend not using the IDE's serial monitor as a workaround. &#60;/p&#62;
&#60;p&#62;Thanks for the report!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3695</link>
			<pubDate>Mon, 21 Feb 2011 09:40:51 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">3695@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It was a problem with the code I posted above due to the code not working how I was expecting it to work.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "A Possible Bug in SerialUSB.read() function"</title>
			<link>http://forums.leaflabs.com/topic.php?id=657#post-3688</link>
			<pubDate>Sun, 20 Feb 2011 11:12:48 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3688@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I don't see any null character in your post&#60;/p&#62;
&#60;p&#62;try &#60;code&#62;&#38;#39;\O&#38;#39;&#60;/code&#62; (used the letter O, instead of 0, yes, rubbish, but better than nothing)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
