Universal Serial device

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Karsten Schulz

Universal Serial device

Post by Karsten Schulz » Sun Dec 06, 2015 7:41 am

Hello togheter,

my Atiny85 send via Vusb sample (using atmel2015 & USBasp) an Descriptor to host PC.
there bring my part into a Hid Class.

With my self maked *inf file i can bring em into the "Univerasl Serial device" class, and
give em an unique DeviceGUID (without the uid the part stay unaccessable)

My Question is how i must form out my device descriptor to become atomatical an "Universal Serial device"
I have Change PID and VID , with original Voti PID/VID the part jumps alone into this class, but stay unaccessable
how Long i dont install my handmaked *.inf with unique DeviceGUID

I can open the device with my hjandmaked *inf install (or automatic update with DevCon) fine.

I wich i dont Need some other Software and the part go alone into this class.

Oening wit CreateFile succs if the DeviceGUID is set via Inf only :(

Here the descriptor sampe to come as HID Input

Code: Select all

PROGMEM const char usbHidReportDescriptor[22] = {    // 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, 0xff, 0x00,              //   LOGICAL_MAXIMUM (255)
    0x75, 0x08,                    //   REPORT_SIZE (8)
    0x95, 0x01,                    //   REPORT_COUNT (1)
    0x09, 0x00,                    //   USAGE (Undefined)
    0xb2, 0x02, 0x01,              //   FEATURE (Data,Var,Abs,Buf)
    0xc0                           // END_COLLECTION

This pack of data Comes from Arduino, i cant overlay that with the Structure from USB Spec

Code: Select all

typedef struct {   
unsigned char bLength;                // Size of this Descriptor in Bytes   
unsigned char bDescriptorType;        // Descriptor Type (=1)   
unsigned int  bcdUSB;                 // USB Spec Release Number in BCD   
unsigned char bDeviceClass;           // Device Class Code   
unsigned char bDeviceSubClass;        // Device Subclass Code   
unsigned char bDeviceProtocol;        // Device Protocol Code   
unsigned char bMaxPacketSize0;        // Maximum Packet Size for EP0   
unsigned int  idVendor;               // Vendor ID   
unsigned int  idProduct;              // Product ID   
unsigned int  bcdDevice;              // Device Release Number in BCD   
unsigned char iManufacturer;          // Index of String Desc for Manufacturer   
unsigned char iProduct;               // Index of String Desc for Product   
unsigned char iSerialNumber;          // Index of String Desc for SerNo   
unsigned char bNumConfigurations;     // Number of possible Configurations
} device_descriptor;         

Equal what ever the descriptor send to host, when i later install my Inf , the device jump always
to the "Universal Serial device" class, that is what i will do with a own descriptor:

Code: Select all

; KeyMan.inf
; Copyright (c) 1998-2015 KarstenSchulz

DeviceName = "KeyMan"
VendorName = "KarstenSchulz"
DeviceID   = "VID_16C1&PID_15DF" //my self maked pid/vid
DeviceGUID = "{EEBE3F79-3A2A-4304-9791-EBF0E998E93F}" //tha essential DeviceGUID without i cant never open the part

Signature   = "$Windows NT$
ClassGuid   = {88bae032-5a81-49f0-bc3d-a4ff138216d6}
Provider    = "KarstenSchulz"
DriverVer   = 30/11/2015,

Addreg = WinUSBDeviceClassReg

%VendorName% = KarstenSchulz_WinUSB,NTx86,NTamd64,NTia64

%DeviceName% = USB_Install, USB\%DeviceID%

%DeviceName% = USB_Install, USB\%DeviceID%

%DeviceName% = USB_Install, USB\%DeviceID%

Include = winusb.inf
Needs   = WINUSB.NT

Include    = winusb.inf
AddService = WinUSB,0x00000002,WinUSB_ServiceInstall

DisplayName   = "WinUSB - Kernel Driver 0/11/2015"
ServiceType   = 1
StartType     = 3
ErrorControl  = 1
ServiceBinary = %12%\WinUSB.sys

KmdfService = WINUSB, WinUsb_Install

AddReg = AddDeviceInterfaceGUID


Thanks for any help how i can become an descriptor example or any Information about it,

Best regards
Karsten Schulz from Berlin

Post Reply