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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-06-01T00:55:37+02:00</updated>

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

		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-06-01T00:55:37+02:00</updated>

		<published>2010-06-01T00:55:37+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4367&amp;p=14651#p14651</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4367&amp;p=14651#p14651"/>
		<title type="html"><![CDATA[help seding a report to host.]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4367&amp;p=14651#p14651"><![CDATA[
I need to send a report to my host in response to a get report.<br /><br /> In my usbFunctionSetup I have this.<br /><br /><div class="codebox"><p>Code: </p><pre><code>   if((rq-&gt;bmRequestType &amp; USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS)<br />   {    /* class request type */<br />      if(rq-&gt;bRequest == USBRQ_HID_GET_REPORT)<br />      { <br />         if (  rq-&gt;wValue.bytes&#91;1&#93; == 3 )//feature <br />         { <br />            if (  rq-&gt;wValue.bytes&#91;0&#93; == 2 ) <br />            {//PID Block Load Report<br />               reportBuffer&#91;0&#93;=2; //report id 2<br />               reportBuffer&#91;1&#93;=_FFB_effect_index;//effect index<br />               reportBuffer&#91;2&#93;=1;//1 =  success:2 = full: 3 = error<br />               reportBuffer&#91;3&#93;=255;<br />               reportBuffer&#91;4&#93;=255;<br />               return 5;//the size its looking for.<br />            } <br />            return USB_NO_MSG;<br />         }         <br />      }    <br />      else if (rq-&gt;bRequest == USBRQ_HID_SET_REPORT)<br />       {<br />         if (  rq-&gt;wValue.bytes&#91;1&#93; == 3 )//feature <br />         { <br />              if (  rq-&gt;wValue.bytes&#91;0&#93; == 1 ) {/* get data in usb write  */}//set effect  Report<br />            return USB_NO_MSG;<br />         } <br />       }<br />      else if(rq-&gt;bRequest == USBRQ_HID_GET_IDLE)<br />      {<br />            usbMsgPtr = &amp;idleRate;<br />            return 1;<br />       }<br />      else if(rq-&gt;bRequest == USBRQ_HID_SET_IDLE)<br />      {<br />            idleRate = rq-&gt;wValue.bytes&#91;1&#93;;<br />       }<br /><br />   }<br />    return 0;<br />}<br /></code></pre></div><br /><br /><br />The problem is that after I get and send this report I no longer see any bulk out transfers in my usbFunctionWrite. If I dont reply with the code above and just use return <strong class="text-strong">USB_NO_MSG I see my bulk transfers. Why would returning data, stop me from getting bulk transfers? usbLyzer indicates they are still being sent.<br /><br />update: </strong>Ok doing this is bad, it sends an input report 3 matching my feature report immediately after ( not too surprised ) .<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Tue Jun 01, 2010 12:55 am</p><hr />
]]></content>
	</entry>
	</feed>
