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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-08-23T23:07:33+02:00</updated>

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

		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-08-23T23:07:33+02:00</updated>

		<published>2010-08-23T23:07:33+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15662#p15662</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15662#p15662"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15662#p15662"><![CDATA[
Going to put this thread at rest as its complete and will continue posting on the other thread.<br /><!-- l --><a class="postlink-local" href="http://forums.obdev.at/viewtopic.php?f=8&amp;t=4776">viewtopic.php?f=8&amp;t=4776</a><!-- l --><br />I'll no more when I get the controller app running.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Mon Aug 23, 2010 11:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IvIePhisto]]></name></author>
		<updated>2010-08-23T22:03:51+02:00</updated>

		<published>2010-08-23T22:03:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15660#p15660</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15660#p15660"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15660#p15660"><![CDATA[
<blockquote><div><cite>ulao wrote:</cite>Got  all analogs on the xbox in windows,  but not XBOX its self. Not sure what to try next I was hoping this would do it.</div></blockquote>As I wrote in the other thread I got this some time ago. This is working if the max packet sizes conforms to the standard by being 8 and the report is splitted into packets of 8 as explained next:<br /><blockquote><div><cite>ulao wrote:</cite>So about the code. what does this do <br /><br />if(currentCount &gt; 8 )   currentCount = 8;<br />^^( dont we want 32 here ? )^^<br /><br />why keep it at 8 when greater the 8?</div></blockquote>The max packet size limits the maximum data to be transferred in one interrupt transfer request, to send reports greater than 8 it has to be splitted into packets of a maximum size of 8, this works perfectly at least for HID devices on Windows and V-USB XBox controllers with XBCD. Another important thing to note is that in V-USB the report buffer size is 8. I tried modifying it to make it bigger. As I understand it with usbSetIntterupt[3] a buffer is filled and the appropiate interrupt in request buffer is filled as well as it's length set. In one of the next usbPoll calls this data is sent to the host and the buffer set to be sent. What we would have to do is make the buffer bigger (quite easy) AND change the assembler part of V-USB to send packets bigger than 8 (contradicting the standard, but might be working anyways, at least on XBox). I couldn't nail the point down where the interrupt in data is sent, maybe christian could help there.<br /><blockquote><div><cite>ulao wrote:</cite>I think the trick is to get the right  maximum packet size for the Xbox. <br />8 seems to do nothing<br />0x20 seems to allow some buttons to work but mainly random.</div></blockquote>Not random in my opinion. I think the XBox does count each packet as the whole report, as the bits set for the analogue axes triggers the functions situated in the beginning of the report (dpad, main buttons).<br /><blockquote><div><cite>ulao wrote:</cite>Windows wants 0x81 8bytes-&gt;8bytes-&gt;8bytes-&gt; etc...</div></blockquote>For me it works for endpoint no 2 with XBCD, too. But as I see it you defined endpoint 1 as a HID endpoint?<br /><blockquote><div><cite>ulao wrote:</cite>Xbox wants 0x82 32bytes-&gt;32bytes-&gt;32bytes-&gt; etc...</div></blockquote>Yeah, I think so too, no way around.<br /><blockquote><div><cite>ulao wrote:</cite>I wish there was a way yo get v-usb to report 2.0 USB when its not ans set the device descriptor to max of 40. but we can not.</div></blockquote>Actually it's not USB 2.0 but being a Full (or High) Speed Device, which is defined by pull-down resistors on the data lines. But there the too small buffer comes into play again.<br /><blockquote><div><cite>ulao wrote:</cite>Hmm, I seem to have gotten windwos to accept 32 byte max packets ans I see the same issue with windows now.  <br />I can not get your code to work with a max size of 32 bytes instead of 8.</div></blockquote>Yeah, Windows (7) is detecting a erroneous device for me, if the max packet size is greater than 8.<br /><br />By the way, I let my MCU count the calls to the following code (the idea coming from UPCB), it is called exactly once:<br /><div class="codebox"><p>Code: </p><pre><code>       if((rq-&gt;bmRequestType &amp; USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS) {    // class request<br />         if(rq-&gt;bRequest == USBRQ_HID_GET_REPORT) {<br />            // is called only once in my setup<br /><br />            usbMsgPtr = data.array;<br />            //eeprom_write_word((void*)E2END-1, ++debugCount); // DEBUG<br /><br />            return 20;<br />         }<br />      }</code></pre></div><br />And did you see this (I'm pretty sure about the comments without question marks, first number in comment is the value from UPCB):<br /><div class="codebox"><p>Code: </p><pre><code>   // Vendor Request data<br />   data.array&#91;20&#93; = 16; // 16 - must be greater than 7, length of this report?<br />   data.array&#91;21&#93; = 66; // 66 - needed, USB interface subclass?<br />   data.array&#91;22&#93; = 0;  //  0 - needed, USB interface protocol?<br />   data.array&#91;23&#93; = 1;  //  1 - must be greater than 0, number of interfaces?<br />   data.array&#91;24&#93; = 1;  //  1 - needed, configuration index?<br />   data.array&#91;25&#93; = 2;  //  2 - must be greater than 0, number of endpoints?<br />   data.array&#91;26&#93; = 8;  // 20 - must be less or equal than max packet size for in endpoint, in max packet size?<br />   data.array&#91;27&#93; = 6;  //  6 - must be less or equal than max packet size for out endpoint, out max packet size?</code></pre></div>It is sent here:<div class="codebox"><p>Code: </p><pre><code>      if ((rq-&gt; bmRequestType &amp; USBRQ_TYPE_MASK) == USBRQ_TYPE_VENDOR) {<br />         if(rq-&gt;bRequest == 0x06) {<br />            /*<br />            receivedData == { 0xc1, 0x06, 0x00, 0x42, 0x00, 0x00, 0x10, 0x00 }<br />            means (guesses):<br />            -bmRequestType:<br />             +direction: device to host<br />             +type:      vendor<br />             +recipient: interface<br />            -request: 0x06<br />            -wValue:  0, 0x42<br />            -wIndex:  0, 0<br />            -wLength: 16<br />            */<br />            usbMsgPtr = &amp;data.array&#91;20&#93;;<br /><br />            return 16;<br />         }<br />      }</code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4253">IvIePhisto</a> — Mon Aug 23, 2010 10:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-08-22T22:23:58+02:00</updated>

		<published>2010-08-22T22:23:58+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15651#p15651</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15651#p15651"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15651#p15651"><![CDATA[
sorry didnt see your post, I made a lot of edits,, anyways I got it to work. it was a bad version of the code. See my previous post. Now that I have it working let me see if I can nail this down.<br /><br />------<br />Got  all analogs on the xbox in windows,  but not XBOX its self. Not sure what to try next I was hoping this would do it. So about the code. what does this do <br /><br />if(currentCount &gt; 8 )   currentCount = 8;<br />^^( dont we want 32 here ? )^^<br /><br />why keep it at 8 when greater the 8?<br /><br />------<br />I think the trick is to get the right  maximum packet size for the Xbox. <br />8 seems to do nothing<br />0x20 seems to allow some buttons to work but mainly random.<br />According to what I know the XBOX wants 0x20 for the packet size but we can not set the device descriptor to anything but 8. So my idea was to send 8 packets 4 times ( totaling in the 32 max size ) Then send another. <br /><br />Something like this ( this does not work )<br /> sendDataUSB3(&amp;XreportBuffer + 0, 4);<br /> sendDataUSB3(&amp;XreportBuffer + 4, 4);<br /> sendDataUSB3(&amp;XreportBuffer + 8, 4);<br /> sendDataUSB3(&amp;XreportBuffer + 12, 4);<br /> sendDataUSB3(&amp;XreportBuffer + 16, 4);<br />Just sending it all at once is not good enough.  sendDataUSB3(XreportBuffer ,20); unless your code is sending in chucks of 32, but I tried playing with that as well with no luck. <br /><br />Windows wants 0x81 8bytes-&gt;8bytes-&gt;8bytes-&gt; etc...<br />Xbox wants 0x82 32bytes-&gt;32bytes-&gt;32bytes-&gt; etc...<br /><br />Or at least that is how I understand it. <br /><br /><br /> I wish there was a way yo get v-usb to report 2.0 USB when its not ans set the device descriptor to max of 40. but we can not.<br /><br />----<br />Ok this is going to be really hard without knowing whats going on. I found a test controller ISO that I an run on the XBOX ( but now I need to mod it ) This way I can see what bytes are messed up and what not.<br /><br />----<br />Hmm, I seem to have gotten windwos to accept 32 byte max packets ans I see the same issue with windows now.  <br />I can not get your code to work with a max size of 32 bytes instead of 8.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Sun Aug 22, 2010 10:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IvIePhisto]]></name></author>
		<updated>2010-08-22T22:08:03+02:00</updated>

		<published>2010-08-22T22:08:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15650#p15650</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15650#p15650"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15650#p15650"><![CDATA[
<blockquote><div><cite>ulao wrote:</cite><blockquote class="uncited"><div>This is my configuration descriptor:</div></blockquote> I see you have a default, 1 end in and 1 end out. Maybe I'm counting this wrong. <br />So you have:<br /><br />0 - default<br />1 - in end<br />2 - out end<br /> and you set your USB_CFG_EP3_NUMBER to 2 which means 1 if you count from 0.</div></blockquote>No, in my XBox configuration descriptor I have the default control endpoint (in and out, without declaration) and the endpoint 2 as in and out. The endpoint one I'm only using in PS3 and MAME working mode.<br /><blockquote><div><cite>ulao wrote:</cite>in my cause I have :<br />0 - default<br />1 - out end<br />2 - in end<br /><br />So maybe I need to set my USB_CFG_EP3_NUMBER to 3.</div></blockquote>No, as I see it you have the default endpoint, one endpoint 1 in, one endpoint 2 out and one endpoint 2 in. Just for clarification, &quot;in&quot; means device-to-host and vice versa for &quot;out&quot; and you can define an endpoint to be in as well as out.<br /><blockquote><div><cite>ulao wrote:</cite><div class="codebox"><p>Code: </p><pre><code>#if USB_CFG_HAVE_INTRIN_ENDPOINT3<br />    7,          // sizeof(usbDescrEndpoint)<br />    5,  // descriptor type = endpoint<br />    0x82,       // bulk IN endpoint number 1<br />    0x03,       // attrib: Interrupt endpoint<br />    32, 0,       // maximum packet size<br />    0x04,<br />#endif</code></pre></div></div></blockquote>Didn't spot that earlier, you should change the<div class="codebox"><p>Code: </p><pre><code>    32, 0,       // maximum packet size</code></pre></div>to<div class="codebox"><p>Code: </p><pre><code>    8, 0,       // maximum packet size</code></pre></div>, then it should work with setInterrupt3 on Windows at least.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4253">IvIePhisto</a> — Sun Aug 22, 2010 10:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-08-22T22:24:29+02:00 </updated>

		<published>2010-08-22T21:08:18+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15649#p15649</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15649#p15649"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15649#p15649"><![CDATA[
<blockquote class="uncited"><div>I think this is wrong, as you got an additional output endpoint, so you got to add 7.</div></blockquote> Correct you are, I messed that up, but still no data.<br /><br /><blockquote class="uncited"><div>But you supplied the 20 as packet size? With maximum packet size I meant the value in the descriptor (both in device descriptor and endpoint definitions).</div></blockquote> Well what I meant is a tried it a few ways. The packet size in the device des, has to be 8, it will not work larger then that with v-usb. But IMO that is ok, I still think it will work. <br /><blockquote class="uncited"><div>is your device recognized or does the OS detect errors?</div></blockquote> Yeah it recognizes fine just does not send out data.<br /><br />I tried to set my config up like yours and still dont see data coming out. Still working with it....Based on what I see your code just uses the first in end point for the bulk data. You set EP3 to point to EP1 with a 82 ( bulk ) and it worked? I have * Release 2009-08-22, you have Release 2008-05-13, maybe that is why. I just tried the latest and that got it.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Sun Aug 22, 2010 9:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IvIePhisto]]></name></author>
		<updated>2010-08-22T17:34:33+02:00</updated>

		<published>2010-08-22T17:34:33+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15647#p15647</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15647#p15647"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15647#p15647"><![CDATA[
<blockquote><div><cite>ulao wrote:</cite><div class="codebox"><p>Code: </p><pre><code>    18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT3 + 9, 0,<br />                /* total length of data returned (including inlined descriptors) */</code></pre></div></div></blockquote>I think this is wrong, as you got an additional output endpoint, so you got to add 7.<br /><blockquote><div><cite>ulao wrote:</cite>I also tried using sendDataUSB3 on the PC with  maximum packet size of 8 ( as you said 8 is needed for the PC ) and it two does not work.</div></blockquote><br />But you supplied the 20 as packet size? With maximum packet size I meant the value in the descriptor (both in device descriptor and endpoint definitions).<br /><blockquote><div><cite>ulao wrote:</cite>I tried setting the end3 to<br /><div class="codebox"><p>Code: </p><pre><code>#if USB_CFG_HAVE_INTRIN_ENDPOINT3<br />    7,          // sizeof(usbDescrEndpoint) <br />    5,  // descriptor type = endpoint <br />    0x81,       // bulk IN endpoint number 1 <br />    0x03,       // attrib: Interrupt endpoint <br />    8, 0,       // maximum packet size <br />    0x04, <br /> #endif<br /></code></pre></div> - and did a usblyzer cap, and nothing sends. </div></blockquote><br />This shouldn't work if you use usbSetInterrupt3.<br /><blockquote><div><cite>ulao wrote:</cite>also, I see you use a USB_CFG_INTR_POLL_INTERVAL pf 1, is that not a bit fast?</div></blockquote><br />We are running with 12 Mhz, so there should be 12000 clock cycles between the polls and we're only reading out pin registers, setting some bits and doing some conditionals - it should be OK, but I've got to admit I never did timing calculations. We never experienced any problems.<br /><blockquote><div><cite>ulao wrote:</cite>MackTruman, I'm not sure what exactly you are referring to? Is that directed to me or IvIePhisto . What wont work? The  usbSetInterrupt3 function? Who's Code, USB-V ?</div></blockquote><br />I think he's a spam bot <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><br /><br />I rechecked if this ENDPOINT3 as 2 using sendDataUSB3 is really working for me on PC as I said, and it really does. This is the current status of the <a href="http://svn.combo-convention.de/listing.php?repname=dualstrike&amp;path=%2FFirmware%2FTrunk%2Fusb%2F&amp;rev=310&amp;sc=1" class="postlink">SVN repository</a>, feel free to browse it. This is my configuration descriptor:<br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM const unsigned char usbDescriptorConfigurationXBox&#91;&#93; = {<br />    9,                      // sizeof(usbDescriptorConfiguration): length of descriptor in bytes <br />    USBDESCR_CONFIG,             // descriptor type <br />    32, 0,                  // total length of data returned (including inlined descriptors) <br />    1,                      // number of interfaces in this configuration <br />    1,                      // index of this configuration <br />    0,                      // configuration name string index<br /><br />   0x80,                   //attributes:Default<br />   125,                  //power consumption * 2mA<br />   /*<br />    (char)USBATTR_BUSPOWER,    // attributes <br />    USB_CFG_MAX_BUS_POWER/2,   // max USB current in 2mA units <br />   */<br />// interface descriptor follows inline: <br />    9,                       // sizeof(usbDescrInterface): length of descriptor in bytes <br />    USBDESCR_INTERFACE,         // descriptor type <br />    0,                      // index of this interface <br />    0,                     // alternate setting for this interface <br />    2,                      // endpoints excl 0: number of endpoint descriptors to follow  | ORIGINALLY: 2<br />    0x58,                  // USB interface class: Unknown <br />    0x42,                  // USB interface subclass <br />    0,                     // USB interface protocol <br />    0,                      // string index for interface <br />    7,                      // sizeof(usbDescrEndpoint): length of descriptor in bytes <br />    USBDESCR_ENDPOINT,         // descriptor type = endpoint <br />    0x82,                  // IN endpoint number 2<br />    //0x00,                  // attrib: Control endpoint <br />    //0x01,                  // attrib: Isochronous endpoint <br />    //0x02,                  // attrib: Bulk endpoint <br />    0x03,                  // attrib: Interrupt endpoint <br />    32, 0,                  // maximum packet size, originally 32<br />    4,                      // interrupt poll interval in ms <br />    7,                      // sizeof(usbDescrEndpoint): length of descriptor in bytes <br />    USBDESCR_ENDPOINT,         // descriptor type = endpoint <br />    0x02,                  // OUT endpoint number 2<br />    0x03,                  // attrib: Interrupt endpoint <br />    8, 0,                  // maximum packet size, originally 32<br />    4                      // interrupt poll interval in ms<br />};</code></pre></div><br />Edit: is your device recognized or does the OS detect errors?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4253">IvIePhisto</a> — Sun Aug 22, 2010 5:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-08-21T19:41:27+02:00</updated>

		<published>2010-08-21T19:41:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15633#p15633</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15633#p15633"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15633#p15633"><![CDATA[
I took a stab at it, plan to do a bit more when I get a chance. So far I do not see any data coming out of sendDataUSB3. Just so that you see what I'm working with here is my config.<br /><br />Let me know if you spot anything wrong.<br /><div class="codebox"><p>Code: </p><pre><code>uchar my_usbDescriptorConfiguration&#91;&#93; = {    /* USB configuration descriptor */<br />     9,          /* sizeof(usbDescriptorConfiguration): length of descriptor in bytes */<br />    USBDESCR_CONFIG,    /* descriptor type */<br />    18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT3 + 9, 0,<br />                /* total length of data returned (including inlined descriptors) */<br />    1,          /* number of interfaces in this configuration */<br />    1,          /* index of this configuration */<br />    0,          /* configuration name string index */<br />    USB_CFG_IS_SELF_POWERED,  /* attributes */<br /><br />    USB_CFG_MAX_BUS_POWER/2,            /* max USB current in 2mA units */<br />/* interface descriptor follows inline: */<br />    9,          /* sizeof(usbDescrInterface): length of descriptor in bytes */<br />    USBDESCR_INTERFACE, /* descriptor type */<br />    0,          /* index of this interface */<br />    0,          /* alternate setting for this interface */<br />    USB_CFG_HAVE_INTRIN_ENDPOINT + USB_CFG_HAVE_INTRIN_ENDPOINT3,   /* endpoints excl 0: number of endpoint descriptors to follow */<br />    USB_CFG_INTERFACE_CLASS,<br />    USB_CFG_INTERFACE_SUBCLASS,<br />    USB_CFG_INTERFACE_PROTOCOL,<br />    0,          /* string index for interface */<br /><br /><br />    9,          /* sizeof(usbDescrHID): length of descriptor in bytes */<br />    USBDESCR_HID,   /* descriptor type: HID */<br />    0x10, 0x01, /* BCD representation of HID version */<br />    0x00,       /* target country code */<br />    0x01,       /* number of HID Report (or other HID class) Descriptor infos to follow */<br />    0x22,       /* descriptor type: report */<br />    USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH, 0,  /* total length of report descriptor *///<br />//#endif<br /><br /><br />#if USB_CFG_HAVE_INTRIN_ENDPOINT    /* endpoint descriptor for endpoint 1 */<br />    7,          /* sizeof(usbDescrEndpoint) */<br />    USBDESCR_ENDPOINT,  /* descriptor type = endpoint */<br />    0x81,       /* IN endpoint number 1 */<br />   //0x82,       // bulk IN endpoint number 1 <br />    0x03,       /* attrib: Interrupt endpoint */<br />   //8, 0,       /* maximum packet size */ // &#91;needed for pc mode &#93;<br />    32, 0,       /* maximum packet size */ //  &#91;needed for xbox mode &#93;<br />    0x04, /* in ms */<br /><br />//the output.<br />    7,          /* sizeof(usbDescrEndpoint) */<br />    5,  /* descriptor type = endpoint */<br />    0x02,      /* out endpoint number 2 */<br />    0x03,       /* attrib: Interrupt endpoint */<br />    8, 0,       /* maximum packet size */<br />    0x04, /* in ms */<br /><br />#endif<br /><br /><br /><br />#if USB_CFG_HAVE_INTRIN_ENDPOINT3<br />    7,          // sizeof(usbDescrEndpoint) <br />    5,  // descriptor type = endpoint <br />    0x82,       // bulk IN endpoint number 1 <br />    0x03,       // attrib: Interrupt endpoint <br />    32, 0,       // maximum packet size <br />    0x04, <br /> #endif</code></pre></div><br /><br />Here are a few defines. <br />#define USB_CFG_HAVE_INTRIN_ENDPOINT    1<br />#define USB_CFG_EP3_NUMBER 2<br />#define USB_CFG_HAVE_INTRIN_ENDPOINT3   1<br /><br />I also tried using sendDataUSB3 on the PC with  maximum packet size of 8 ( as you said 8 is needed for the PC ) and it two does not work.<br /><br />I tried setting the end3 to<br /><div class="codebox"><p>Code: </p><pre><code>#if USB_CFG_HAVE_INTRIN_ENDPOINT3<br />    7,          // sizeof(usbDescrEndpoint) <br />    5,  // descriptor type = endpoint <br />    0x81,       // bulk IN endpoint number 1 <br />    0x03,       // attrib: Interrupt endpoint <br />    8, 0,       // maximum packet size <br />    0x04, <br /> #endif<br /></code></pre></div> - and did a usblyzer cap, and nothing sends. <br /><br />also, I see you use a USB_CFG_INTR_POLL_INTERVAL pf 1, is that not a bit fast?<br /><br /><br />MackTruman, I'm not sure what exactly you are referring to? Is that directed to me or IvIePhisto . What wont work? The  usbSetInterrupt3 function? Who's Code, USB-V ?<br /><br /><br />____update_____<br />After looking at usbLyzer some more I saw the out endpoint was in the way and the enpoint 3 was not showing up. So I tried<br /><div class="codebox"><p>Code: </p><pre><code>#if USB_CFG_HAVE_INTRIN_ENDPOINT    /* endpoint descriptor for endpoint 1 */<br />    7,          /* sizeof(usbDescrEndpoint) */<br />    USBDESCR_ENDPOINT,  /* descriptor type = endpoint */<br />    0x81,       /* IN endpoint number 1 */<br />   //0x82,       // bulk IN endpoint number 1 <br />    0x03,       /* attrib: Interrupt endpoint */<br />   8, 0,       /* maximum packet size */ // &#91;needed for pc mode &#93;<br />    //32, 0,       /* maximum packet size */ //  &#91;needed for xbox mode &#93;<br />    0x04, /* in ms */<br /><br />//the output.<br />/*<br />    7,          // sizeof(usbDescrEndpoint)<br />    5,  // descriptor type = endpoint<br />    0x02,      // out endpoint number 2 <br />    0x03,       // attrib: Interrupt endpoint <br />    8, 0,       // maximum packet size <br />    0x04, // in ms <br />*/<br />#endif<br /><br /><br /><br />#if USB_CFG_HAVE_INTRIN_ENDPOINT3<br />    7,          // sizeof(usbDescrEndpoint) <br />    5,  // descriptor type = endpoint <br />    0x81,       // bulk IN endpoint number 1 <br />    0x03,       // attrib: Interrupt endpoint <br />    8, 0,       // maximum packet size <br />    0x04, <br /> #endif</code></pre></div> Also with 82 on ep3, but still no luck.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Sat Aug 21, 2010 7:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IvIePhisto]]></name></author>
		<updated>2010-08-20T23:31:20+02:00</updated>

		<published>2010-08-20T23:31:20+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15628#p15628</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15628#p15628"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15628#p15628"><![CDATA[
I hope you get it working with this information. I know the UPCB and got the XBox vendor request from there, but the XBox won't accept the setup I described  <img class="smilies" src="./../../../images/smilies/icon_sad.gif" alt=":(" title="Sad" /> Looking forward to your answer in the other thread <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4253">IvIePhisto</a> — Fri Aug 20, 2010 11:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-08-20T20:30:40+02:00</updated>

		<published>2010-08-20T20:30:40+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15624#p15624</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15624#p15624"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15624#p15624"><![CDATA[
It is always nice to know my posts and code has helped others, even better when that person can give back a little <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /> thx, can wait to try it out will post my results when I get a chance to try it.<br /><br />FYI: That code snipit up there is not from my project its from a UPCB project. I just posted it as that is how he did it. So yeah the comments can be wrong. I just needed to make the usbSetInterrupt3 work, and it looks like you did it. OH also I did define that ENDPOINT  yes <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Fri Aug 20, 2010 8:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[IvIePhisto]]></name></author>
		<updated>2010-08-20T09:51:09+02:00</updated>

		<published>2010-08-20T09:51:09+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15612#p15612</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15612#p15612"/>
		<title type="html"><![CDATA[Re: usbSetInterrupt3, does it work?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4556&amp;p=15612#p15612"><![CDATA[
I got it working for the XBox mode of the Dual Strike project. See these files:<br /><ul><li><a href="http://svn.combo-convention.de/filedetails.php?repname=dualstrike&amp;path=%2FFirmware%2FTrunk%2Fusb%2Fusbdrv%2Fusbconfig.h" class="postlink">usbconfig.h</a></li><li><a href="http://svn.combo-convention.de/filedetails.php?repname=dualstrike&amp;path=%2FFirmware%2FTrunk%2Fusb%2Fdescriptors.c" class="postlink">descriptors.c</a>, see the XBox part.</li><li><a href="http://svn.combo-convention.de/filedetails.php?repname=dualstrike&amp;path=%2FFirmware%2FTrunk%2Fusb%2Fxbox.c" class="postlink">xbox.c</a>, the data is sent at the bottom with &quot;sendDataUSB3()&quot;.</li><li><a href="http://svn.combo-convention.de/filedetails.php?repname=dualstrike&amp;path=%2FFirmware%2FTrunk%2Fusb%2Fusb_controller.c" class="postlink">usb_controller.c</a>, here  &quot;sendDataUSB3()&quot; is declared. It just schedules chunks of 8 bytes (except possibly the last one) of the given data for sending with &quot;usbSetInterrupt3()&quot; until the whole data is processed and waits in between by polling with &quot;while(!usbInterruptIsReady3()) usbPoll();&quot;.</li></ul><br />I spotted a few things in your post:<br /><blockquote class="uncited"><div>0x82,       /* IN endpoint number 1 */</div></blockquote>The 0x82 means it's an in endpoint (high byte) with number 2, so the comment is wrong (but you maybe knew that <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" />).<br /><blockquote class="uncited"><div>32, 0,       /* maximum packet size */</div></blockquote>For me this doesn't work on a PC (Windows 7), supposedly because it contradicts the low-speediness, but a XBox keeps polling for data. If it is 8 it works on PC perfectly.<br /><blockquote class="uncited"><div>#define USB_CFG_EP3_NUMBER 1</div></blockquote>Should be 2, as this is the number configured.<br /><blockquote class="uncited"><div>#define USB_CFG_HAVE_INTRIN_ENDPOINT 1</div></blockquote>Do you have this defined? It has to or the code for the other endpoint is not used.<br /><br />And for your question:<br /><blockquote class="uncited"><div>Do I need to use usbFunctionSetup to grab the notification?</div></blockquote>I don't use it, so maybe it's not needed <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><br />EDIT: After looking a bit more into the code, I suppose it is <a href="http://en.wikipedia.org/wiki/USB_communications_device_class" class="postlink">CDC</a>-related.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4253">IvIePhisto</a> — Fri Aug 20, 2010 9:51 am</p><hr />
]]></content>
	</entry>
	</feed>
