Vendor ID, Product ID

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
rabbi_jaccob
Posts: 2
Joined: Wed Apr 13, 2011 9:53 am

Vendor ID, Product ID

Post by rabbi_jaccob » Wed Apr 13, 2011 10:03 am

Good mornig everybody.

I need some help on VID/PID stuff.
I make a project using both interrupt and transaction with endpoint 0 by using libusb-win32 on my computer.

I use this usb config.h :

Code: Select all

/* -------------------------- Device Description --------------------------- */

#define  USB_CFG_VENDOR_ID       0xc0, 0x16 /* = 0x16c0 = 5824 = voti.nl */
/* USB vendor ID for the device, low byte first. If you have registered your
 * own Vendor ID, define it here. Otherwise you may use one of obdev's free
 * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
 * *** IMPORTANT NOTE ***
 * This template uses obdev's shared VID/PID pair for Vendor Class devices
 * with libusb: 0x16c0/0x5dc.  Use this VID/PID pair ONLY if you understand
 * the implications!
 */
#define  USB_CFG_DEVICE_ID       0xdc, 0x05 /* = 0x05dc = 1500 */
/* This is the ID of the product, low byte first. It is interpreted in the
 * scope of the vendor ID. If you have registered your own VID with usb.org
 * or if you have licensed a PID from somebody else, define it here. Otherwise
 * you may use one of obdev's free shared VID/PID pairs. See the file
 * USB-IDs-for-free.txt for details!
 * *** IMPORTANT NOTE ***
 * This template uses obdev's shared VID/PID pair for Vendor Class devices
 * with libusb: 0x16c0/0x5dc.  Use this VID/PID pair ONLY if you understand
 * the implications!
 */
#define USB_CFG_DEVICE_VERSION  0x00, 0x01
/* Version number of the device: Minor number first, then major number.
 */
#define USB_CFG_VENDOR_NAME     'w', 'w', 'w', '.', 'f', 'i', 's', 'c', 'h', 'l', '.', 'd', 'e'
#define USB_CFG_VENDOR_NAME_LEN 13
/* These two values define the vendor name returned by the USB device. The name
 * must be given as a list of characters under single quotes. The characters
 * are interpreted as Unicode (UTF-16) entities.
 * If you don't want a vendor name string, undefine these macros.
 * ALWAYS define a vendor name containing your Internet domain name if you use
 * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
 * details.
 */
#define USB_CFG_DEVICE_NAME     'T', 'e', 'l', 'u', 's', 'b'
#define USB_CFG_DEVICE_NAME_LEN 6
/* Same as above for the device name. If you don't want a device name, undefine
 * the macros. See the file USB-IDs-for-free.txt before you assign a name if
 * you use a shared VID/PID.
 */
/*#define USB_CFG_SERIAL_NUMBER   'N', 'o', 'n', 'e' */
/*#define USB_CFG_SERIAL_NUMBER_LEN   0 */
/* Same as above for the serial number. If you don't want a serial number,
 * undefine the macros.
 * It may be useful to provide the serial number through other means than at
 * compile time. See the section about descriptor properties below for how
 * to fine tune control over USB descriptors such as the string descriptor
 * for the serial number.
 */
#define USB_CFG_DEVICE_CLASS        0xff    /* set to 0 if deferred to interface */
#define USB_CFG_DEVICE_SUBCLASS     0
/* See USB specification if you want to conform to an existing device class.
 * Class 0xff is "vendor specific".
 */
#define USB_CFG_INTERFACE_CLASS     3   /* define class here if not at device level */
#define USB_CFG_INTERFACE_SUBCLASS  0
#define USB_CFG_INTERFACE_PROTOCOL  0
/* See USB specification if you want to conform to an existing device class or
 * protocol. The following classes must be set at interface level:
 * HID class is 3, no subclass and protocol required (but may be useful!)
 * CDC class is 2, use subclass 2 and protocol 1 for ACM
 */
 #define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH    22
/* Define this to the length of the HID report descriptor, if you implement
 * an HID device. Otherwise don't define it or define it to 0.
 * If you use this define, you must add a PROGMEM character array named
 * "usbHidReportDescriptor" to your code which contains the report descriptor.
 * Don't forget to keep the array and this define in sync!
 */


I program the atmega8 with USBasp using also V-USB. The problem is the both project share the same VID/PID pair but not the same device name.
Windows automatically identifies my project as USBasp.
How to change this? I have to change the PID value?
If i use an identification in my program by vendor and product name to communicate, is the program make the différence between the both device?

Thank you.

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

Re: Vendor ID, Product ID

Post by maxi » Fri Apr 15, 2011 10:47 pm

rabbi_jaccob wrote:Windows automatically identifies my project as USBasp.
How to change this? I have to change the PID value?

You edit usbconfig.h and then re-compile.

Code: Select all

#define  USB_CFG_DEVICE_ID       0xdc, 0x05 /* = 0x05dc = 1500 */

rabbi_jaccob wrote:If i use an identification in my program by vendor and product name to communicate, is the program make the différence between the both device?

As far as I am aware it is only Windows that identifies a device by VID & PID alone.

rabbi_jaccob
Posts: 2
Joined: Wed Apr 13, 2011 9:53 am

Re: Vendor ID, Product ID

Post by rabbi_jaccob » Sat Apr 16, 2011 3:27 pm

Thanks a lot fot your help

aryalan
Posts: 1
Joined: Mon Sep 26, 2011 11:00 am

Re: Vendor ID, Product ID

Post by aryalan » Mon Sep 26, 2011 11:01 am

Thanks, that does seem to be a more complete list/database, though still lacks most of my actual product ids and I couldn't find any way to actually get the vendor and product list other than pulling it off the website each time (is there a way?) 24hr-printer-cartridges.com

I've seen a couple of sites selling product ids only for around $50 (presumably unofficial but still unique) and letting you use their vendor ids as long as your device uses some chip from them in it. For enterprises the cost of getting the vendor and product ids is pretty much nothing though. What is $4000 a year to logitech for a vendor id :P

Post Reply