• AVR Freaks

USB and Windows Drivers

Author
kirkmans
New Member
  • Total Posts : 27
  • Reward points : 0
  • Joined: 2006/07/13 18:55:50
  • Location: 0
  • Status: offline
2011/03/02 08:01:03 (permalink)
0

USB and Windows Drivers

I've got a USB PIC project with a unique VID / PID.  It uses driver mchpusb.sys.
Now I'm trying to do a take-off of the Low Pin Count HID Keyboard, and use my same VID / PID.  Instead of loading the HID drivers, such as hidclass.sys or hidusb.sys, the PC wants to use mchpusb.sys, which of course doesn't work for a HID device.
Is there a way to change something (and keep my same VID / PID) so the PC recognizes it as a HID device?  If so, what needs to change?
I don't want to add and remove drivers on the PC every time I switch devices.
#1

5 Replies Related Threads

    stefanopod
    Super Member
    • Total Posts : 1285
    • Reward points : 0
    • Joined: 2007/06/25 02:33:59
    • Location: Bologna,Italy
    • Status: offline
    Re:USB and Windows Drivers 2011/03/02 09:19:14 (permalink)
    0
    and use my same VID / PID

    Could we know the reasons of such a peculiar idea?

    provando e riprovando
    #2
    kirkmans
    New Member
    • Total Posts : 27
    • Reward points : 0
    • Joined: 2006/07/13 18:55:50
    • Location: 0
    • Status: offline
    Re:USB and Windows Drivers 2011/03/02 09:33:18 (permalink)
    0
    VID and PID are either purchased or assigned for low volume usage by companies like Microchip.  Not sure how willing they are to give 2 PIDs out to the same person.   Is having two products with the same VID / PID just wrong?  Is there another field to differentiate?

    Just found the answer online:  The PC uses the VID/PID combination to find the drivers (if any) that are to be used for the USB device. For this to work, the VID/PID combination must be unique, in the sense that each USB device with the same VID/PID will use the same driver. So, whenever you need a specific driver for your USB product, you will need a unique VID/PID for that product.
    post edited by kirkmans - 2011/03/02 10:35:21
    #3
    stefanopod
    Super Member
    • Total Posts : 1285
    • Reward points : 0
    • Joined: 2007/06/25 02:33:59
    • Location: Bologna,Italy
    • Status: offline
    Re:USB and Windows Drivers 2011/03/02 12:25:20 (permalink)
    0
    You should search the forum about the way Michrochip releases VID/PIDs.
    I don't remember people too worried about the problem.

    provando e riprovando
    #4
    yts
    Super Member
    • Total Posts : 590
    • Reward points : 0
    • Joined: 2005/09/06 17:45:30
    • Status: offline
    Re:USB and Windows Drivers 2011/03/06 21:07:26 (permalink)
    0
    When you connect a new USB devise to PC (personal computer), PC searches and installs the appropriate devise driver (mchpusb.sys etc). It would take time for searching and installing the driver for new devise. As PC stores the information (identified by VID/PID) on the driver in its registry-keys etc. at the first connection, you can connect the devise without installing the driver newly after the second connection. You know that the connection-time becomes shorter after the second connection.

    If the usage of the same VID/PID were accepted both for mchpusb.sys and hidclass.sys (etc.) in the USB protocol, PC would have to install the appropriated devise driver “every time”. It would be a waste of time. I suppose that this is one of reasons why one VID/PID cannot be used for different devise “drivers” (not devises).

    I think that VID is assigned to Microchip and that PIDs are determined by Microchip for its products. We do not have any right to change Microchip’s VID/PID at all. However if you enjoy “personally” USB connections, you can use any combination of VID and PID.

    Only for the personal usage:
    If you would like to use the VID/PID (which you used for mchpusb.sys) for hidclass.sys, please erase “the registry-key and devise driver " (used for mchpusb.sys) stored in PC.Once you install the HID drive, you cannot use the same VID/PID for mchpusb.sys, though. You should determine for which you use one VID/PID, mchpusb.sys or hidclass.sys.
     
    #5
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    Re:USB and Windows Drivers 2011/03/07 02:25:50 (permalink)
    0
    You can use usbdeview to remove the old VID/PID so that Windows can forget about that combination.
    http://www.nirsoft.net/utils/usb_devices_view.html

      USB_Links and libusb
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5