<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/1898" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-11-20T01:44:13+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/1898</id>

		<entry>
		<author><name><![CDATA[Alloc]]></name></author>
		<updated>2008-11-20T01:44:13+02:00</updated>

		<published>2008-11-20T01:44:13+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6720#p6720</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6720#p6720"/>
		<title type="html"><![CDATA[AVR-USB hangs when using usbSetInterrupt(0, 0)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6720#p6720"><![CDATA[
Okay, thanks =)<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=851">Alloc</a> — Thu Nov 20, 2008 1:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-11-19T22:29:28+02:00</updated>

		<published>2008-11-19T22:29:28+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6719#p6719</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6719#p6719"/>
		<title type="html"><![CDATA[AVR-USB hangs when using usbSetInterrupt(0, 0)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6719#p6719"><![CDATA[
OK, you're right. My comment about passing zero length messages is wrong, this is explicitly handled in the driver.<br /><br />However, a zero sized message may not be handled correctly by the host. This is actually a bug in the RemoteSensor example. You should send at least one dummy byte.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Wed Nov 19, 2008 10:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alloc]]></name></author>
		<updated>2008-11-19T22:15:06+02:00</updated>

		<published>2008-11-19T22:15:06+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6718#p6718</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6718#p6718"/>
		<title type="html"><![CDATA[AVR-USB hangs when using usbSetInterrupt(0, 0)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6718#p6718"><![CDATA[
Hi christian,<br /><br />thanks for the reply. Thought I could use it with zero bytes since it's used that way in the RemoteSensor example.<br />So is there any way to set the usb-interrupt without any data? Or do I have to use a dummy byte?<br /><br />Regards,<br />Chris<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=851">Alloc</a> — Wed Nov 19, 2008 10:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-11-19T22:07:26+02:00</updated>

		<published>2008-11-19T22:07:26+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6716#p6716</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6716#p6716"/>
		<title type="html"><![CDATA[AVR-USB hangs when using usbSetInterrupt(0, 0)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6716#p6716"><![CDATA[
usbSetInterrupt() requires a pointer as the first argument and a byte count (greater than zero!) as the second. Anything else may result in corruption of the internal data structures.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Wed Nov 19, 2008 10:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alloc]]></name></author>
		<updated>2008-11-15T04:18:02+02:00</updated>

		<published>2008-11-15T04:18:02+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6672#p6672</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6672#p6672"/>
		<title type="html"><![CDATA[AVR-USB hangs when using usbSetInterrupt(0, 0)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1898&amp;p=6672#p6672"><![CDATA[
Hi,<br /><br />I wrote a little fw which indicates whether the host should read data by setting it's interrupt1-in-flag. When I call the usbSetInterrupt-method by eg<br /><div class="codebox"><p>Code: </p><pre><code>usbSetInterrupt&#40;&amp;LED_PORT, 1&#41;;</code></pre></div> it works fine. If I (at the same codeline) call it by<br /><div class="codebox"><p>Code: </p><pre><code>usbSetInterrupt&#40;0, 0&#41;;</code></pre></div>libUsb also returns from<br /><div class="codebox"><p>Code: </p><pre><code>usb_interrupt_read&#40;handle, USB.REQ_TYPE_DIR_DEVICE_TO_HOST | 1, buffer, buffer.length, 24*60*60*1000&#41;;</code></pre></div>but the control transfer directly following it<br /><div class="codebox"><p>Code: </p><pre><code>usb_control_msg&#40;handle, USB.REQ_TYPE_DIR_DEVICE_TO_HOST |  USB.REQ_TYPE_TYPE_VENDOR | USB.REQ_TYPE_RECIP_DEVICE, 1, 0, 0, buffer, buffer.length, 5000&#41;;</code></pre></div>does endlessly return<br /><div class="codebox"><p>Code: </p><pre><code>error sending control message: Protocol error</code></pre></div>and usb_interrupt_read doesn't block anymore.<br /><br /><a href="http://svn.chrilly.net/uc-tech/USB-SPI/main.c" class="postlink">AVR-source</a> and <a href="http://svn.chrilly.net/java/TestLibUsb/src/USBThread.java" class="postlink">accessing Java-source</a> attached.<br /><br />Regards,<br />Chris<br /><br />/Edit:<br />To clarify two things ... When I use <br /><div class="codebox"><p>Code: </p><pre><code>usbSetInterrupt&#40;0, 0&#41;;</code></pre></div> while the device isn't opened the function getString in Main.java fails to get the requested information of AVR-USB.<br />AVR-USB hanging does not mean that the whole uC hangs ... It's just AVR-USB not responding to requests.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=851">Alloc</a> — Sat Nov 15, 2008 4:18 am</p><hr />
]]></content>
	</entry>
	</feed>
