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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2009-10-08T13:23:36+02:00</updated>

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

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-10-08T13:23:36+02:00</updated>

		<published>2009-10-08T13:23:36+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11287#p11287</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11287#p11287"/>
		<title type="html"><![CDATA[Re: Error while &quot;Select Configuration&quot;]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11287#p11287"><![CDATA[
I don't know how the fix works and I'm not an expert for descriptors either...<br /><br />I would guess that it has something to do with the bulk endpoints.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu Oct 08, 2009 1:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kai.n]]></name></author>
		<updated>2009-10-08T12:00:31+02:00</updated>

		<published>2009-10-08T12:00:31+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11285#p11285</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11285#p11285"/>
		<title type="html"><![CDATA[Re: Error while &quot;Select Configuration&quot;]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11285#p11285"><![CDATA[
so, i checked it. transfers are all ok, the logs are the same on both sides...<br /><br />yeah i know, but <a href="http://recursion.jp/avrcdc/driver.html" class="postlink">here</a> is a fix for that problem...<br /><br />but it crashs before that...so we messed the descriptor up?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2742">Kai.n</a> — Thu Oct 08, 2009 12:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-10-08T10:19:20+02:00</updated>

		<published>2009-10-08T10:19:20+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11282#p11282</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11282#p11282"/>
		<title type="html"><![CDATA[Re: Error while &quot;Select Configuration&quot;]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11282#p11282"><![CDATA[
I have not looked in to your descriptors in detail, but I read the comment that you use CDC. You DO know that Vista does not support CDC for low speed devices any more? The spec does not allow bulk endpoints for low speed USB and since Vista Windows enforces this limitation.<br /><br />It may work in a virtual machine because the USB stuff is bridged. The bridging may convert low speed to full speed, but that's a wild guess.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Thu Oct 08, 2009 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kai.n]]></name></author>
		<updated>2009-10-08T01:59:03+02:00</updated>

		<published>2009-10-08T01:59:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11279#p11279</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11279#p11279"/>
		<title type="html"><![CDATA[Re: Error while &quot;Select Configuration&quot;]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11279#p11279"><![CDATA[
hey!<br /><br />thanks for your answer <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><br />i have nearly given up, but we'll hopefully get it working <img class="smilies" src="./../../../images/smilies/icon_smile.gif" alt=":)" title="Smile" /><br /><br />nope, i didn't, i'll try that out, but i checked the pc-log against the descriptor contents in the sourcecode, it looked fine...<br />but I'll check that.<br /><br />interrupt latency...no idea, but as it works on xp, why shouldn't it under vista/seven?<br />has microsoft lowered support for low-speed devices in the new os's?<br /><br />what's strange to me is that i can run the device (at least some parts) on a Seven inside a VM on a Seven host while it doesn't work on the host.<br />Any idea why that's possible?<br /><br />as we only have modified an existing device, i post you the changed descriptor parts...maybe you can find anything <img class="smilies" src="./../../../images/smilies/icon_smile.gif" alt=":)" title="Smile" /><br /><div class="codebox"><p>Code: </p><pre><code><br />&#91;config Descriptor&#93;<br />    /* IAD descriptor */<br />/* to merge the 2 CDC-Devices together as it's a composite device */<br />    8,<br />    11,       // bDescriptorType = 11<br />       0x00,               // bFirstInterface<br />       0x02,               // bInterfaceCount<br />       0x02,               // bFunctionClass (Communication Class)<br />       0x02,               // bFunctionSubClass (Abstract Control Model)<br />       0x01,               // bFunctionProcotol (V.25ter, Common AT commands)<br />       0x00,                // iInterface<br /><br />&#91;CDC - Interface Descriptor with one Endpoint&#93;<br />&#91;CDC Data Interface Descriptor with 2 Endpoints&#93;<br /><br />&#91;Another costum-device interface descriptor &#93;<br /></code></pre></div><br />here's the complete config descriptor...<br /><div class="codebox"><p>Code: </p><pre><code>static PROGMEM char configDescrCDC&#91;&#93; = {   /* USB configuration descriptor */<br />    9,          /* sizeof(usbDescrConfig): length of descriptor in bytes */<br />    USBDESCR_CONFIG,    /* descriptor type */<br />    84,<br />    0,          /* total length of data returned (including inlined descriptors) */<br />    3,          /* number of interfaces in this configuration */<br />    1,          /* index of this configuration */<br />    0,          /* configuration name string index */<br />#if USB_CFG_IS_SELF_POWERED<br />    USBATTR_SELFPOWER,  /* attributes */<br />#else<br />    USBATTR_BUSPOWER,   /* attributes */<br />#endif<br />    USB_CFG_MAX_BUS_POWER/2,            /* max USB current in 2mA units */<br /><br />    /* IAD descriptor */<br />    8,<br />    11,       // bDescriptorType = 11<br />       0x00,               // bFirstInterface<br />       0x02,               // bInterfaceCount<br />       0x02,               // bFunctionClass (Communication Class)<br />       0x02,               // bFunctionSubClass (Abstract Control Model)<br />       0x01,               // bFunctionProcotol (V.25ter, Common AT commands)<br />       0x00,                // iInterface<br /><br />    /* Test */<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 />    USB_CFG_HAVE_INTRIN_ENDPOINT,   /* 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 />    /* CDC Class-Specific descriptor */<br />    5,           /* sizeof(usbDescrCDC_HeaderFn): length of descriptor in bytes */<br />    0x24,        /* descriptor type */<br />    0,           /* header functional descriptor */<br />    0x10, 0x01,<br /><br />    4,           /* sizeof(usbDescrCDC_AcmFn): length of descriptor in bytes */<br />    0x24,        /* descriptor type */<br />    2,           /* abstract control management functional descriptor */<br />    0x02,        /* SET_LINE_CODING,    GET_LINE_CODING, SET_CONTROL_LINE_STATE    */<br /><br />    5,           /* sizeof(usbDescrCDC_UnionFn): length of descriptor in bytes */<br />    0x24,        /* descriptor type */<br />    6,           /* union functional descriptor */<br />    0,           /* CDC_COMM_INTF_ID */<br />    1,           /* CDC_DATA_INTF_ID */<br /><br />    5,           /* sizeof(usbDescrCDC_CallMgtFn): length of descriptor in bytes */<br />    0x24,        /* descriptor type */<br />    1,           /* call management functional descriptor */<br />    3,           /* allow management on data interface, handles call management by itself */<br />    1,           /* CDC_DATA_INTF_ID */<br /><br />    /* Endpoint Descriptor */<br />    7,           /* sizeof(usbDescrEndpoint) */<br />    USBDESCR_ENDPOINT,  /* descriptor type = endpoint */<br />    0x83,        /* IN endpoint number 3 */<br />    0x03,        /* attrib: Interrupt endpoint */<br />    8, 0,        /* maximum packet size */<br />    USB_CFG_INTR_POLL_INTERVAL,        /* in ms */<br /><br />    /* Interface Descriptor  */<br />    9,           /* sizeof(usbDescrInterface): length of descriptor in bytes */<br />    USBDESCR_INTERFACE,           /* descriptor type */<br />    1,           /* index of this interface */<br />    0,           /* alternate setting for this interface */<br />    2,           /* endpoints excl 0: number of endpoint descriptors to follow */<br />    0x0A,        /* Data Interface Class Codes */<br />    0,<br />    0,           /* Data Interface Class Protocol Codes */<br />    0,           /* string index for interface */<br /><br />    /* Endpoint Descriptor */<br />    7,           /* sizeof(usbDescrEndpoint) */<br />    USBDESCR_ENDPOINT,  /* descriptor type = endpoint */<br />    0x01,        /* OUT endpoint number 1 */<br />    0x02,        /* attrib: Bulk endpoint */<br />    HW_CDC_BULK_OUT_SIZE, 0,        /* maximum packet size */<br />    0,           /* in ms */<br /><br />    /* Endpoint Descriptor */<br />    7,           /* sizeof(usbDescrEndpoint) */<br />    USBDESCR_ENDPOINT,  /* descriptor type = endpoint */<br />    0x81,        /* IN endpoint number 1 */<br />    0x02,        /* attrib: Bulk endpoint */<br />    HW_CDC_BULK_IN_SIZE, 0,        /* maximum packet size */<br />    0,           /* in ms */<br /><br />    /* usbasp descriptor */<br />   9,                  /* sizeof () usbasp descriptor */<br />   USBDESCR_INTERFACE,      /* descriptor Type */<br />   2,                  /* index for this interface */<br />   0,                  /* alternate Setting for this interface */<br />   0,                  /* number of endpoint descriptros to follow */<br />   0,                  /* interface class */<br />   0,                  /* interface subclass */<br />   0,                  /* interface protocol */<br />   0,                  /* string index for interface */<br /><br />};<br /></code></pre></div><br /><br />here's the device descriptor, we changed the device class/subclass as we're using the IAD.<br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM char usbDescriptorDevice&#91;&#93; = {    /* USB device descriptor */<br />    18,         /* sizeof(usbDescriptorDevice): length of descriptor in bytes */<br />    USBDESCR_DEVICE,        /* descriptor type */<br />    0x10, 0x01,             /* USB version supported */<br />    0xEF,                /* USB_CFG_DEVICE_CLASS */<br />    0x02,                /* USB_CFG_DEVICE_SUBCLASS */<br />    1,                      /* protocol */<br />    8,                      /* max packet size */<br />    /* the following two casts affect the first byte of the constant only, but<br />     * that's sufficient to avoid a warning with the default values.<br />     */<br />    (char)USB_CFG_VENDOR_ID,/* 2 bytes */<br />    (char)USB_CFG_DEVICE_ID,/* 2 bytes */<br />    USB_CFG_DEVICE_VERSION, /* 2 bytes */<br />    USB_CFG_DESCR_PROPS_STRING_VENDOR != 0 ? 1 : 0,         /* manufacturer string index */<br />    USB_CFG_DESCR_PROPS_STRING_PRODUCT != 0 ? 2 : 0,        /* product string index */<br />    USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER != 0 ? 3 : 0,  /* serial number string index */<br />    1,          /* number of configurations */<br />};</code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2742">Kai.n</a> — Thu Oct 08, 2009 1:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-10-04T11:55:04+02:00</updated>

		<published>2009-10-04T11:55:04+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11194#p11194</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11194#p11194"/>
		<title type="html"><![CDATA[Re: Error while &quot;Select Configuration&quot;]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11194#p11194"><![CDATA[
Did you try to run V-USB in debug mode and connect a terminal to the serial debug output (19200 bps)? This way you can check whether the same data arrives at V-USB which was sent by the OS and vice versa. If there is a discrepancy, something is broken in the low level stuff (e.g. data loss due to interrupt latency, a hardware issue or a bug in V-USB). Otherwise it may be an issue with descriptor contents.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Sun Oct 04, 2009 11:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kai.n]]></name></author>
		<updated>2009-09-25T22:32:38+02:00</updated>

		<published>2009-09-25T22:32:38+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11109#p11109</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11109#p11109"/>
		<title type="html"><![CDATA[Error while &quot;Select Configuration&quot;]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3304&amp;p=11109#p11109"><![CDATA[
Hey!<br /><br />I've got the next problem.<br />What we wanted to do works now - thanks christian, you helped us a lot <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><br /><br />we're now trying to get our device working with other os but under windows vista / seven the device doesn't even initialize correct.<br /><br />during the inits, the descriptors are exchanged between host and device, after that the configuration should get selected - but it allways fail with an error code 0x80000300 (invalid parameter).<br /><br />here's a log from a debugging tool:<br /><br /><div class="codebox"><p>Code: </p><pre><code>000026: Control Transfer (UP), 25.09.2009 22:07:20.728 +0.005. Status: 0x00000000<br />Pipe Handle: 0x2ba3060<br /><br /> 09 02 54 00 03 01 00 80 32 08 0B 00 02 02 02 01   ..T....2.......<br /> 00 09 04 00 00 01 02 02 01 00 05 24 00 10 01 04   ...........$....<br /> 24 02 02 05 24 06 00 01 05 24 01 03 01 07 05 83   $...$....$.....<br /> 03 08 00 FF 09 04 01 00 02 0A 00 00 00 07 05 01   ...ÿ............<br /> 02 08 00 00 07 05 81 02 08 00 00 09 04 02 00 00   ...............<br /> 00 00 00 00                                       ....<br />Setup Packet<br />000027: Select Configuration (DOWN), 25.09.2009 22:07:20.728 +0.0<br />Configuration Index: 1<br /><br />000029: Select Configuration (UP), 25.09.2009 22:07:21.463 +0.0. Status: 0x80000300<br />Configuration Index: 1<br />Configuration Handle: 0x0<br /><br />000030: PnP Event: Device Disconnected (UP), 25.09.2009 22:07:23.022 +1.559<br />The USB device has just been removed from the system, all drivers unloaded.<br /><br /></code></pre></div><br /><br />The descriptors are correct - i checked them manually. On XP x64 and xp x32 it's ok - Status 0x00000000 and the configuration handle is something else.<br />it works inside a vmware on every system.<br /><br />does someone knows anything about that?<br />would be beautifull when the device would work on other systems than an XP 32 bit <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><br /><br />Thanks,<br />kai<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2742">Kai.n</a> — Fri Sep 25, 2009 10:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
