<?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/1432" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-05-08T12:34:54+02:00</updated>

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

		<entry>
		<author><name><![CDATA[phil]]></name></author>
		<updated>2008-05-08T12:34:54+02:00</updated>

		<published>2008-05-08T12:34:54+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5276#p5276</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5276#p5276"/>
		<title type="html"><![CDATA[Can't send data to device]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5276#p5276"><![CDATA[
<img class="smilies" src="./../../../images/smilies/icon_idea.gif" alt=":idea:" title="Idea" /> <br /><br />I got to work right. Thank you so much!<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1079">phil</a> — Thu May 08, 2008 12:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2008-05-08T10:55:18+02:00</updated>

		<published>2008-05-08T10:55:18+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5271#p5271</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5271#p5271"/>
		<title type="html"><![CDATA[Can't send data to device]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5271#p5271"><![CDATA[
In usbFunctionSetup(), you receive the setup command, not the data sent to the device. You must implement usbFunctionWrite() to receive the data part. See the Automator example for how this is done in a HID compliant way.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu May 08, 2008 10:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2008-05-07T18:00:21+02:00</updated>

		<published>2008-05-07T18:00:21+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5264#p5264</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5264#p5264"/>
		<title type="html"><![CDATA[Can't send data to device]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1432&amp;p=5264#p5264"><![CDATA[
Hi,<br /><br />I'm stuck at receiving data using the AVR-USB.<br />My HID is simulating a gamepad with ATMega16 @ 12Mhz.<br /><br />My Code:<br /><div class="codebox"><p>Code: </p><pre><code>int test1=0;<br />int test2,test3;<br /><br />uchar usbFunctionSetup&#40;uchar data&#91;8&#93;&#41; <br />&#123;<br />static uchar replyBuf&#91;2&#93;;<br /><br /> usbMsgPtr = replyBuf;<br /> test1++;<br /> test2 = data&#91;0&#93;;<br /> test3 = data&#91;1&#93;;<br /><br /> return 0;<br />&#125;<br /><br />&#91;...&#93;<br /><br />usbPoll&#40;&#41;;<br />if&#40;usbInterruptIsReady&#40;&#41;&#41;&#123;<br /> reportBuffer&#91;0&#93;=test1;<br /> reportBuffer&#91;1&#93;=test2;<br /> reportBuffer&#91;2&#93;=test3;<br /> usbSetInterrupt&#40;reportBuffer,3&#41;;<br />&#125;<br /></code></pre></div><br /><br />So, you see, a very basic program. I just want to send something to my µC, and the device should return it.<br />For testing I'm using the SimpleHIDWrite Programm from the HidPage (as LibUsb32 causes some trouble with Windows Vista).<br /><br />My Problem:<br />It doesn't matter, what I send to the device. &quot;data&quot; will always be &quot;21 09 00 02 00 00 02 00&quot;. So test2==21, test3 ==09. test1 increments everytime I send some bytes.<br /><br />What am I doing wrong <br /> <img class="smilies" src="./../../../images/smilies/icon_confused.gif" alt=":?" title="Confused" /> <br /><br />Thanks for your help!<p>Statistics: Posted by Guest — Wed May 07, 2008 6:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
