USBIF Complaince Tool - Can anyone get it to work?

36 views
Skip to first unread message

abcmi...@gmail.com

unread,
Aug 21, 2008, 8:33:36 AM8/21/08
to MyUSB Support
Hi guys,

For the next release, I want to run all the (applicable) demos through
the USB-IF compliance testing tool called USBCV (http://www.usb.org/
developers/tools/) to ensure that they are as complaint to the
standard as possible - I know I'm bound to have messed up or forgotten
some aspects of each class standard. However, I can't get it to work
on either my XP SP2 or Vista PCs - running the tests just causes it to
give an error that it can't find any devices to test.

Is anyone here able to get it to run on the MyUSB demos successfully?
If so, I'd be eternally grateful if he/she would consent to testing
out the demos through both the Chapter 9 and the class-specific test
and send me each report so I can fix up the demo and library code.

- Dean

RJ

unread,
Aug 22, 2008, 2:55:21 PM8/22/08
to MyUSB Support
Dean,

It doesn't work for me either. I get "Test suite failed" or "Test
suite aborted unexpectedly" no matter which test I try to run.
When I look at the html report the error line says "Could not select
Test Stack" Any of this sound familiar?
I am running XP SP2
Roy

abcmi...@gmail.com

unread,
Aug 24, 2008, 10:30:22 AM8/24/08
to MyUSB Support
I get "Test suite failed", and errors about "No device found". There
must be someone who has managed to get the darn thing running -
anyone? I'd really like to ensure that the demos are all compliant in
the next release.

Tested on Vista 32 and XP SP3 here.

- Dean

Akito Nozaki

unread,
Aug 26, 2008, 1:06:32 PM8/26/08
to myusb-sup...@googlegroups.com
The Test tool is running fine for me under XP. I could never get this
to work under Vista... maybe you need to install it in compatibility
mode. Atleast that's what I had to do when I installed libusb on
vista.

Oh and I can only find devices that are attached to a external hub...
Even on a freshly installed xp I could never find devices that were
directly plugged into the onboard usb port. Also if the usb device is
having problem enumerating on the system, you won't be able to find
the device in the test (Showing up as "unknown device" in device
manager).

I use a program called USBTrace to debug on windows... seems to be the
only one that can do enumeration debugging. It was kind of expensive
but was definitely cheaper then the hardware solution. Anybody have
other good debugging tool they want to share?

Akito

abcmi...@gmail.com

unread,
Aug 27, 2008, 12:44:51 AM8/27/08
to MyUSB Support
I'll have another go tonight perhaps, but Iast time it just refused to
do anything -- it would come up with a "no devices found" error even
with a normal mouse plugged into a USB2.0 hub.

Since it it apparently working for you, would you mind testing out
some of the demos and reporting back with any errors it finds, so I
can get all the demos compliant for the next release?

- Dean

On Aug 27, 3:06 am, "Akito Nozaki" <akito.noz...@gmail.com> wrote:
> The Test tool is running fine for me under XP. I could never get this
> to work under Vista... maybe you need to install it in compatibility
> mode. Atleast that's what I had to do when I installed libusb on
> vista.
>
> Oh and I can only find devices that are attached to a external hub...
> Even on a freshly installed xp I could never find devices that were
> directly plugged into the onboard usb port. Also if the usb device is
> having problem enumerating on the system, you won't be able to find
> the device in the test (Showing up as "unknown device" in device
> manager).
>
> I use a program called USBTrace to debug on windows... seems to be the
> only one that can do enumeration debugging. It was kind of expensive
> but was definitely cheaper then the hardware solution. Anybody have
> other good debugging tool they want to share?
>
> Akito
>

Akito Nozaki

unread,
Aug 27, 2008, 5:15:14 PM8/27/08
to myusb-sup...@googlegroups.com
I'll run through the test with few of your demo. I'll post back with
the results.

Akito

andigit

unread,
Aug 27, 2008, 5:58:28 PM8/27/08
to MyUSB Support
Ok, so first order of thing is to get Chapter 9 Tests to pass...

Here is the chapter 9 test on the Keyboard demo...
http://www.tanoshi.net/myusb/chapter9test.html

Hid test passed cleanly... if you want the out put I can get that as
well.

I've been looking at the doc to see why the enumeration test fails...
from what I can see the UADD space is 6 bits, which allows for
enumeration up to address 63. So does this mean you can't pass the
chapter 9 test with atmel chip? On the linux box when you reach
address 64 the atmel chip just stops enumerating. On windows its even
more confusing when this happens... you don't even know why the device
isn't enumerating.

Akito

On Aug 27, 2:15 pm, "Akito Nozaki" <akito.noz...@gmail.com> wrote:
> I'll run through the test with few of your demo. I'll post back with
> the results.
>
> Akito
>

andigit

unread,
Aug 27, 2008, 6:17:18 PM8/27/08
to MyUSB Support
Oops my bad the 63 would make it 6bits... I looked in your code and
your masking the data with 0x3F... I changed it to 0x7F and it was all
good.

Need to brush up on my binary math skill.

Akito


On Aug 27, 2:58 pm, andigit <akito.noz...@gmail.com> wrote:
> Ok, so first order of thing is to get Chapter 9 Tests to pass...
>
> Here is the chapter 9 test on the Keyboard demo...http://www.tanoshi.net/myusb/chapter9test.html

abcmi...@gmail.com

unread,
Aug 27, 2008, 8:22:43 PM8/27/08
to MyUSB Support
Fixed in the next release. This is already fantastic, as I can see
problems here that I never would have found otherwise.

For the missing "GetStatus" request, in DevChapter9.c change:

case REQ_GetStatus:
if (((bmRequestType & (CONTROL_REQTYPE_DIRECTION |
CONTROL_REQTYPE_TYPE)) ==
(REQDIR_HOSTTODEVICE |
REQTYPE_STANDARD)) &&
((bmRequestType & CONTROL_REQTYPE_RECIPIENT) != REQREC_OTHER))
{
USB_Device_GetStatus(bmRequestType);
RequestHandled = true;
}

to:

case REQ_GetStatus:
if (((bmRequestType & (CONTROL_REQTYPE_DIRECTION |
CONTROL_REQTYPE_TYPE)) ==
(REQDIR_DEVICETOHOST |
REQTYPE_STANDARD)) &&
((bmRequestType & CONTROL_REQTYPE_RECIPIENT) != REQREC_OTHER))
{
USB_Device_GetStatus(bmRequestType);
RequestHandled = true;
}

And that test should now pass - the data direction mask was
REQDIR_HOSTTODEVICE instead of REQDIR_DEVICETOHOST. That must have
been incorrect since I first coded it!

Still working on the rest.

- Dean

abcmi...@gmail.com

unread,
Aug 27, 2008, 8:50:17 PM8/27/08
to MyUSB Support
Ok Akito,

Could you re-test with the latest code please?

http://www.fourwalledcubicle.com/files/temp/MyUSB%20INTERNAL%2028%20AUG.zip

If the HID demos pass, would you mind running it through the other
class demos for any other class-specific tests the program has, such
as Mass Storage tests?

- Dean

Akito Nozaki

unread,
Aug 27, 2008, 9:49:15 PM8/27/08
to myusb-sup...@googlegroups.com
No problem I'll run it soon as I get to a computer that has all my
stuff. Glad your getting bunch of bugs worked out.

Akito

Akito Nozaki

unread,
Aug 28, 2008, 12:41:33 PM8/28/08
to myusb-sup...@googlegroups.com
Chapter 9 test is starting to look good. One more error.

MSC test looks like it has a long way to go. I've ran the compliance
test and the test stops working after CaseThreeTest. The device seems
to stop enumerating. I had to unplug it from the computer to make it
come back. This seems to happens every single time.

While I was typing this up I decided to connect my JTAG on the device
and grab a stack trace. Here is what I get.
Program received signal SIGINT, Interrupt.
VirtualMemory_WriteBlocks (BlockAddress=<value optimized out>, TotalBlocks=1)
at DataflashManager.c:85
85 while (!(Endpoint_ReadWriteAllowed()));
(gdb) bt
#0 VirtualMemory_WriteBlocks (BlockAddress=<value optimized out>,
TotalBlocks=1) at DataflashManager.c:85
#1 0x00000502 in SCSI_Command_ReadWrite_10 (IsDataRead=false) at SCSI.c:306
#2 0x00000008 in __vectors ()

Test result:
http://www.tanoshi.net/myusb/MassStorage/

Akito

RJ

unread,
Aug 28, 2008, 11:58:35 PM8/28/08
to MyUSB Support
Dean,

I emailed support at usb.org and got the following response
"
Please see the following for information.
http://compliance.usb.org/index.asp?UpdateFile=USBCV
<http://compliance.usb.org/index.asp?
UpdateFile=USBCV&Format=Standard#33>
&Format=Standard#33

Regards,
Mark Paxson
USB-IF Compliance Administrator
Tech...@usb.org
"
I won't be able to check this update for a couple of days, but wanted
to pass along the info.

Roy


On Aug 21, 8:33 am, abcminiu...@gmail.com wrote:

abcmi...@gmail.com

unread,
Aug 29, 2008, 2:11:13 AM8/29/08
to MyUSB Support
Fixed the chapter 9 error - Endpoint Enabled != Endpoint Halted. I've
also fixed two other (related) issues, where the stack returned fixed
flags for Remote Wakeup Enabled and Self Power Enabled in response to
a GetStatus request, which is a no-no. Next version contains a global
flag for each (RW/UP is read-only, SPwr is user-controllable).

Akito: Thanks for the Mass Storage details - I had a feeling there
would be a few bugs since I only coded for valid data for the most
part and ignored the "thirteen cases" describing the correct handling
of wonky host requests.

RJ: My PC could switch the stack correctly, it just couldn't find any
devices. I'll keep trying.

- Dean

On Aug 28, 8:58 pm, RJ <rjust...@bluemarble.net> wrote:
> Dean,
>
> I emailed support at usb.org and got the following response
> "
> Please see the following for information.http://compliance.usb.org/index.asp?UpdateFile=USBCV
> <http://compliance.usb.org/index.asp?
> UpdateFile=USBCV&Format=Standard#33>
> &Format=Standard#33
>
> Regards,
> Mark Paxson
> USB-IF Compliance Administrator
> TechAd...@usb.org

abcmi...@gmail.com

unread,
Sep 14, 2008, 4:14:13 AM9/14/08
to MyUSB Support
Hi Akito,

Could you try out the Mass Storage demo again using the latest WIP
code from the files area (WIP 080914) please? I've implemented proper
Mass Storage reset handling, which should give more accurate results
for the tests. Previously, the actual MS reset was not performed
(although the device responded as such) and so any subsequent tests
after a reset failed as the device was still expecting more data while
the host expected it to be in its reset state. Now that I've added in
the new stream callback APIs, the tests should now accurately show
where the implementation is lacking as the reset command should
properly re-prime the device for the next command.

- Dean

Akito Nozaki

unread,
Sep 14, 2008, 2:53:10 PM9/14/08
to myusb-sup...@googlegroups.com
Sure thing. Ill upload the result next time I get to the computer with the test stuff on it.

Akito


Hi Akito,

- Dean


[The entire original message is not included]

andigit

unread,
Sep 15, 2008, 1:20:55 PM9/15/08
to MyUSB Support
Test seems to act exactly the same. I'll try to get a stack trace soon
as I can get around to it.

http://www.tanoshi.net/myusb/MassStorage/msc_test_2008-09-15_09-53-44.html

Akito

abcmi...@gmail.com

unread,
Sep 23, 2008, 8:57:56 AM9/23/08
to MyUSB Support
Looks like one of the tests is failing which is causing it to bail out
on everything else. Also looks like the tests aren't reported in
order.

I've changed over the code so that in the 080923 WIP I've just
uploaded the block read/write is driven by the stream API rather than
raw endpoint manipulation, so it should no longer have problems
aborting via a Mass Storage Reset command when it is issued under any
circumstances. If you still get errors, could you try repeating the
failed tests one-at-a-time (only the failed tests) so that any
problems in one test don't cascade down and affect the others? I
notice that one of the tests failed because the configuration
descriptor could not be read, indicating an earlier test broke that
test.

It would be much easier if the darn program worked on any of the
machines in my house!

- Dean

On Sep 16, 3:20 am, andigit <akito.noz...@gmail.com> wrote:
> Test seems to act exactly the same. I'll try to get a stack trace soon
> as I can get around to it.
>
> http://www.tanoshi.net/myusb/MassStorage/msc_test_2008-09-15_09-53-44...

Akito Nozaki

unread,
Sep 23, 2008, 10:47:53 AM9/23/08
to myusb-sup...@googlegroups.com
Sure thing I'll run the test and see what I get.

I don't know what is wrong with there program but I do have trouble
starting it up sometime as well.

Akito

Reply all
Reply to author
Forward
0 new messages