none
How to set VID and PID for USB-OTG? RRS feed

  • Question

  • Hi,

    I am new to WINCE programming and Thank you very much for any reply.

    I am not able to set VID and PID for USB-OTG driver.

    We are using WINCE600. I have added USB-OTG BSP and changed VID ,PID in platform.reg file.

     

    Regards,

    Shiva

    Wednesday, September 15, 2010 2:38 PM

All replies

  • I don't have any USB-OTG experience, but when someone says that they changed the registry via platform.reg and the change doesn't appear to have been used, I always suspect one of the following:

    1. You changed the wrong copy of platform.reg.  This should be in your platform folder \platform\<yourplatform>\files.  That's the one you changed?

    2. To get that change actually built into the OS, you have to build the OS.  Check the copy of reginit.ini that the build system placed in your flat release folder and see if your changes are there.  This should be a composite file containing all of the registry settings for your device, including platform.reg.

    3. If the flat release folder has the updated settings, the most-likely problem is that you have some form of persistent registry on your target device and you are still using the last-saved registry, not the changed one in your last nk.bin/nk.nb0.  If that's the case, the Remote Registry Editor should show the old registry values on your device.  Do whatever you do on your system to use the default registry in the OS image, not the saved registry.

    Paul T.

    • Marked as answer by Shiva Manda Thursday, September 16, 2010 9:39 AM
    • Unmarked as answer by Shiva Manda Thursday, September 16, 2010 9:39 AM
    Wednesday, September 15, 2010 2:47 PM
  • I also do not have experience with it, but we can give you some directions.

    Could you clarify the following points ?

    - Do you have a main device and you would like to add support to a new USB-OTG device ?

    - Or would you like to add an add-on card or similar to have USB-OTG interface in your main device ?

    - Could you list your registry modification ?

    With a debug image you can see if your VID/PID matches with your device.

    Wednesday, September 15, 2010 9:30 PM
  • Hi,

    Thank you very much for your reply.

    We are having a main device and want to add support to a USB-OTG functionalities. For this we added USB-OTG drivers(Selected USB high speed OTG device). Added USB function as "USB Function Clients-Mass Storage".

    We changed VID and PID in platform.reg.

    Please find the below registry settings.


    ;------------------------------------------------------------------------------
    ; Fix usb mass storage Modules
    ;
    ; @CESYSGEN IF CE_MODULES_USBMSFN
    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
       "idVendor"=- ;
       "idVendor"=dword:07B3
       "Manufacturer"=- ;
       "Manufacturer"="XXXXX"
       "idProduct"=- ;
    "idProduct"=dword:0101
       "Product"=- ;
       "Product"="Mass Storage Device"
       "SerialNumber"="0802270905553"
       "DeviceName"=- ;
       "DeviceName"="DANA Disk Drive"
    ;   "DeviceName"="SDMEMORY CARD"
    ;   "DeviceName"="MMC CARD"
    ;   "DeviceName"="USB HARD DISK"
    ;   "DeviceName"="NAND FLASH"
    ; Can Specify one of the mediums above, otherwise will use pre-coded priority to select one
    ; @CESYSGEN ENDIF CE_MODULES_USBMSFN
    ;------------------------------------------------------------------------------

    These modified values are reflected in to the output reginit.ini file.

    Please let me know If you want any further details.Please give me any solution for this.

     

    Thanks & regards,

    Shiva

     

     

     

    Thursday, September 16, 2010 9:57 AM
  • Hi Shiva,

    When you connect your OTG Device to the Host PC can you see a new Mass Stoarge Device mounted ?

    I have verified for my device whether VID and PID are changed or not as given below.

    • When I connect My USB OTG to Host PC with a Standard-A to Mini-B cable then the OTG will function in Device Mode.
    • Host PC sees a new drive, as Default Function Driver is Mass Storage Class.
    • Now open Device Manager in Host PC.
    • Expand the USB Serial Bus Controllers.
    • Under USB Serial Bus Controllers I can see my new USB Mass Storage Device.
    • Right click on it, and select Properties from the menu.
    • Which again opens USB Mass Storage Device Properties window.
    • Go to details tab. Here I can see my VID and PID.

    If your device is not exporting as Mass Storage itself may be you have to make sure that registry settings are proper and USB Function Controller is working.

    Thank You & Regards,

    GSR

    Thursday, September 16, 2010 12:59 PM
  • That changes the VID/PID for the mass storage driver, but have you confirmed that the mass storage driver is the default client driver?


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Thursday, September 16, 2010 1:05 PM
    Moderator
  • Build a debug image and check the messages of Vendor/Product for USB and PCI, then you will see which devices are recognized by the OS.

    This way, you will know if your device is beeing recognized and if your VID/PID match with the ones you have.

     

    Thursday, September 16, 2010 1:49 PM
  • The hardware supports USB-OTG, right?  As I'm reading your message, it almost sounds like you think that OTG is something that is only a software function...

    Paul T.

    Thursday, September 16, 2010 3:27 PM