<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[James's Programming Page — Questions about HID Sharp]]></title>
		<link>https://swforum.seekye.com/topic/10066/</link>
		<atom:link href="https://swforum.seekye.com/feed/rss/topic/10066/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Questions about HID Sharp.]]></description>
		<lastBuildDate>Sat, 20 Apr 2013 11:07:25 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Questions about HID Sharp]]></title>
			<link>https://swforum.seekye.com/post/12904/#p12904</link>
			<description><![CDATA[<p>OK. Thanks for the bug report though. It&#039;s been fixed.</p>]]></description>
			<author><![CDATA[null@example.com (Zer)]]></author>
			<pubDate>Sat, 20 Apr 2013 11:07:25 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/12904/#p12904</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions about HID Sharp]]></title>
			<link>https://swforum.seekye.com/post/12903/#p12903</link>
			<description><![CDATA[<p>Using Windows.</p><p>Device sends data sporadically. It is an adapter that allows a PC to communicate on a communication bus. Device will only send data when there is traffic on the bus, or in response to me sending data (send confirmation and such).</p><p>Sad to say I was forced to swap our your library for another. Kept getting application crashing exceptions that seemed to be related to the failed reads.</p>]]></description>
			<author><![CDATA[null@example.com (h2oboi89)]]></author>
			<pubDate>Thu, 11 Apr 2013 14:32:57 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/12903/#p12903</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions about HID Sharp]]></title>
			<link>https://swforum.seekye.com/post/12902/#p12902</link>
			<description><![CDATA[<p>Hmm, actually, reviewing the Windows timeout code, it throws but doesn&#039;t get rid of the read request.</p><p>So, if data *does* come in later, it&#039;ll get eaten by a read that doesn&#039;t correspond to anything you can get to...<br />If your device sends continuously based on (say) sensor data, this isn&#039;t a big deal as the same data will come in the next packet. However if the rate of timeouts became on average greater than the rate of data, reads would accumulate as you describe.</p><p>I&#039;ll try out a fix later today.</p>]]></description>
			<author><![CDATA[null@example.com (Zer)]]></author>
			<pubDate>Thu, 11 Apr 2013 10:18:47 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/12902/#p12902</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions about HID Sharp]]></title>
			<link>https://swforum.seekye.com/post/12901/#p12901</link>
			<description><![CDATA[<p>Hmm... If you are calling HidSharp asynchronously, it might be best to disable timeouts -- HidSharp supports Timeout.Infinite (-1). That&#039;ll cause you to stop getting TimeoutExceptions. The class sets default read and write timeouts of 3 seconds on the assumption that most folks are doing blocking reads/writes.</p><p>As far as unreliability goes, may I ask what platform you are using? It wouldn&#039;t be MacOS by any chance? MacOS provides no way to do timeouts on writes, so while HidSharp will throw a TimeoutException there to let you get back to your code, it still can&#039;t cancel the underlying write which pretty much has to take its sweet time. Reads should be fine however... if not, there&#039;s a bug to fix. :-)</p>]]></description>
			<author><![CDATA[null@example.com (Zer)]]></author>
			<pubDate>Thu, 11 Apr 2013 09:55:48 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/12901/#p12901</guid>
		</item>
		<item>
			<title><![CDATA[Questions about HID Sharp]]></title>
			<link>https://swforum.seekye.com/post/12900/#p12900</link>
			<description><![CDATA[<p>I am attempting to write a Library around Zer&#039;s HidSharp code to talk to a USB device for a project I am working on.</p><p>My question is:</p><p>What is the proper way to setup the HIDStream to allow for asynchronous communication from both ends (PC or USB device can send a message @ any time).</p><p>Right now I have back to back stream.BeginReads that will continuously poll the stream for data and then use stream.BeginWrite to send data when I receive it from my application.</p><p>What I have noticed is that after about 5 failed reads (long period of no messages) the HIDStream becomes unreliable and I stop receiving any data packets.</p><p>My current solution is to simply restart the HIDStream after 5 failed reads, but I was hoping for a more elegant solution.</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (h2oboi89)]]></author>
			<pubDate>Thu, 04 Apr 2013 22:57:40 +0000</pubDate>
			<guid>https://swforum.seekye.com/post/12900/#p12900</guid>
		</item>
	</channel>
</rss>
