"Device Cannot Start (Code 10)" error on non-standart HIDs

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
lamer5
Posts: 1
Joined: Mon Apr 05, 2010 8:35 pm

"Device Cannot Start (Code 10)" error on non-standart HIDs

Post by lamer5 » Mon Apr 05, 2010 8:50 pm

I am making a data-logger which has (only) to send a two-byte number to the host every second or so. When I do a simple solution with joystick-class device, with descriptor like this:

Code: Select all

PROGMEM char usbHidReportDescriptor[USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH] = { //USB report descriptor
0x05, 0x01,        // USAGE_PAGE (Generic Desktop)
0x09, 0x04,        // USAGE (Joystick)
0xa1, 0x01,        // COLLECTION (Application)
0x09, 0x36,        // USAGE (pot0)
0x15, 0x00,        // LOGICAL_MINIMUM (0)
0x26, 0x00, 0x04,  // LOGICAL_MAXIMUM (1024)
0x75, 0x10,        // REPORT_SIZE (16)
0x95, 0x01,        // REPORT_COUNT (1)
0x81, 0x02,        // INPUT (Data,Var,Abs)
0xc0                 // END_COLLECTION
};


the device is correctly recognised by Windows as a one-slider "joystick".

It is not quite good for precise laboratory devices to show themselves as joysticks, and it has nothing to do with them. I do not need to control games with it, but I need to plot the data in user-mode application. So I try to make a non-standart HID device, with this descriptor:

Code: Select all

PROGMEM char usbHidReportDescriptor[USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH] = { //USB report descriptor
0x06, 0x00, 0xff, // USAGE_PAGE (Generic Desktop)
0x09, 0x01,        // USAGE (Vendor Usage 1)
0xa1, 0x01,        // COLLECTION (Application)
0x15, 0x00,        // LOGICAL_MINIMUM (0)
0x26, 0x00, 0x04,  // LOGICAL_MAXIMUM (1024)
0x75, 0x10,        // REPORT_SIZE (16)
0x95, 0x01,        // REPORT_COUNT (1)
0x81, 0x02,        // INPUT (Data,Var,Abs)
0xc0                 // END_COLLECTION
};


The device is found by Windows and driver installation begins. As the USB Device Monitor software says, the device is found, the descriptor is parsed correctly, but immediately after parsing Windows unloads the driver. In Device Manager, the device is displayed with a '!' sign, meaning an error. The error code displayed in Properties is "Device Cannot Start (Code 10)".

I tried other Custom HID class devices from the supplied samples, and all they share this error. I tried some workarounds suggested elsewhere, such as changing VID/PID. changing device version and even removing all USB controller drivers and reinstalling them. Unfortunately, nothing worked.

Any suggestions?

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: "Device Cannot Start (Code 10)" error on non-standart HIDs

Post by maxi » Tue Apr 06, 2010 11:37 pm

Have you tried it using the hid-data example as a base?
Maybe this would be a good starting point: http://yveslebrac.blogspot.com/2008/10/cheapest-dual-trace-scope-in-galaxy.html

Post Reply