none
How to load USB Composite Device RRS feed

  • Question

  • Hi,

    I have USB composite device with two interfaces.

    1. Thermal Printer (vendor specific)

    2. HID Keyboard

    How do i load my USB composite device on windows CE 6.0.

    Thanks in advance.

    Abraham Lincoln G

     

    Wednesday, March 23, 2011 12:41 PM

Answers

  • the link I posted in my first answer (http://msdn.microsoft.com/en-us/library/ee484468(v=WinEmbedded.60).aspx) explains that you have to add the appropriate registry entries for both the interfaces of the device.

    This may work

    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\3\Hid_Class]
      "DLL"="USBHID.DLL"
    
    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\255\Sparsh_Writer]
      "DLL"="SPARSH_WRITER_SYS.DLL"
       
    [HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\Sparsh_Writer]
      "DLL"="SPARSH_WRITER_SYS.DLL"
      "Prefix"="SWU"
    
    

     


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com

    Tuesday, March 29, 2011 1:52 PM
  •  I have tried below registry entries suggested by Luca Calligaris  

    problem got  resolved.

    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\3\Hid_Class]
     "DLL"="USBHID.DLL"
    
    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\255\Sparsh_Writer]
     "DLL"="SPARSH_WRITER_SYS.DLL"
      
    [HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\Sparsh_Writer]
     "DLL"="SPARSH_WRITER_SYS.DLL"
     "Prefix"="SWU"
    
    

    I am able to load Vendorspecific device as well as HID keyboard.

    Thanks for your great support.

     

    Regards,

    Abraham Lincoln G 

     


    • Marked as answer by Abaham Lincoln Wednesday, March 30, 2011 8:15 AM
    Wednesday, March 30, 2011 8:15 AM

All replies

  • If the USB composite device is something you connect to the Windows CE device you need to include the appropriate registry entries for the 2 interfaces (see http://msdn.microsoft.com/en-us/library/ee484468(v=WinEmbedded.60).aspx) and include the drivers DLL's in the image

    If the USB composite device is the Windows CE device you need to include the appropriate registry entries for the 2 interfaces (see http://msdn.microsoft.com/en-us/library/ee486076.aspx) and include the drivers DLL's in the image

     


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Wednesday, March 23, 2011 1:11 PM
  • Also see this blog

    http://www.e-consystems.com/blog/loading-usb-composite-functional-device-on-windows-ce-usb-composite-function-driver/


    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Wednesday, March 23, 2011 1:58 PM
  • Hi Vinoth,luca Caligaris,

    Thanks for your replay.

     I have gone throw the links provided by you and created registry entries as per that.

    I have a USB Composite device with following Device Descriptor.

    [Port4]  :  USB Composite Device

             ---===>Device Information<===---

    English product name: "ARMS Thermal Printer"

    ConnectionStatus:                 

    Current Config Value:              0x01  -> Device Bus Speed: Full

    Device Address:                    0x03

    Open Pipes:                           4

              ===>Endpoint Descriptor<===

    bLength:                           0x07

    bDescriptorType:                   0x05

    bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1

    bmAttributes:                      0x02  -> Bulk Transfer Type

    wMaxPacketSize:                  0x0040 = 0x40 bytes

    bInterval:                         0x00

              ===>Endpoint Descriptor<===

    bLength:                           0x07

    bDescriptorType:                   0x05

    bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2

    bmAttributes:                      0x02  -> Bulk Transfer Type

    wMaxPacketSize:                  0x0040 = 0x40 bytes

    bInterval:                         0x00

              ===>Endpoint Descriptor<===

    bLength:                           0x07

    bDescriptorType:                   0x05

    bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3

    bmAttributes:                      0x03  -> Interrupt Transfer Type

    wMaxPacketSize:                  0x0040 = 0x40 bytes

    bInterval:                         0x10

              ===>Endpoint Descriptor<===

    bLength:                           0x07

    bDescriptorType:                   0x05

    bEndpointAddress:                  0x87  -> Direction: IN - EndpointID: 7

    bmAttributes:                      0x03  -> Interrupt Transfer Type

    wMaxPacketSize:                  0x0008 = 0x08 bytes

    bInterval:                         0x0A

              ===>Device Descriptor<===

    bLength:                           0x12

    bDescriptorType:                   0x01

    bcdUSB:                          0x0200

    bDeviceClass:                      0x00  -> This is an Interface Class Defined Device

    bDeviceSubClass:                   0x00

    bDeviceProtocol:                   0x00

    bMaxPacketSize0:                   0x08 = (8) Bytes

    idVendor:                        0x05D0 = Vendor ID not listed with USB.org as of 03-19-2008

    idProduct:                       0x000D

    bcdDevice:                       0x0000

    iManufacturer:                     0x01

         English (United States)  "GEHC"

    iProduct:                          0x02

         English (United States)  "ARMS Thermal Printer"

    iSerialNumber:                     0x00

    bNumConfigurations:                0x01

              ===>Configuration Descriptor<===

    bLength:                           0x09

    bDescriptorType:                   0x02

    wTotalLength:                    0x0040  -> Validated

    bNumInterfaces:                    0x02

    bConfigurationValue:               0x01

    iConfiguration:                    0x00

    bmAttributes:                      0xE0  -> Bus Powered

    MaxPower:                          0xFA = 500 mA

              ===>Interface Descriptor<===

    bLength:                           0x09

    bDescriptorType:                   0x04

    bInterfaceNumber:                  0x00

    bAlternateSetting:                 0x00

    bNumEndpoints:                     0x03

    bInterfaceClass:                   0xFF  -> Vendor Specific Device

    bInterfaceSubClass:                0x00

    *!*CAUTION:    This appears to be an invalid bInterfaceSubClass

    bInterfaceProtocol:                0x00

    iInterface:                        0x00

    *!*CAUTION:  0xFF is a prerelease Class ID

              ===>Endpoint Descriptor<===

    bLength:                           0x07

    bDescriptorType:                   0x05

    bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1

    bmAttributes:                      0x02  -> Bulk Transfer Type

    wMaxPacketSize:                  0x0040 = 0x40 bytes

    bInterval:                         0x00

              ===>Endpoint Descriptor<===

    bLength:                           0x07

    bDescriptorType:                   0x05

    bEndpointAddress:                  0x82  -> Direction: IN - EndpointID: 2

    bmAttributes:                      0x02  -> Bulk Transfer Type

    wMaxPacketSize:                  0x0040 = 0x40 bytes

    bInterval:                         0x00

              ===>Endpoint Descriptor<===

    bLength:                           0x07

    bDescriptorType:                   0x05

    bEndpointAddress:                  0x83  -> Direction: IN - EndpointID: 3

    bmAttributes:                      0x03  -> Interrupt Transfer Type

    wMaxPacketSize:                  0x0040 = 0x40 bytes

    bInterval:                         0x10

              ===>Interface Descriptor<===

    bLength:                           0x09

    bDescriptorType:                   0x04

    bInterfaceNumber:                  0x01

    bAlternateSetting:                 0x00

    bNumEndpoints:                     0x01

    bInterfaceClass:                   0x03  -> HID Interface Class

    bInterfaceSubClass:                0x01

    bInterfaceProtocol:                0x01

    CAUTION:  This may be an invalid bInterfaceProtocol

    iInterface:                        0x00

              ===>HID Descriptor<===

    bLength:                           0x09

    bDescriptorType:                   0x21

    bcdHID:                          0x0111

    bCountryCode:                      0x00

    bNumDescriptors:                   0x01

    bDescriptorType:                   0x22

    wDescriptorLength:               0x003F

              ===>Endpoint Descriptor<===

    bLength:                           0x07

    bDescriptorType:                   0x05

    bEndpointAddress:                  0x87  -> Direction: IN - EndpointID: 7

    bmAttributes:                      0x03  -> Interrupt Transfer Type

    wMaxPacketSize:                  0x0008 = 0x08 bytes

    bInterval:                         0x0A

     

    I have made following registry settings .

     

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\CompositeFN]

          "Attributes"=multi_sz:"0x80"

          "bcdDevice" =dword:0

          "DefaultPrefix"="CompositeFn_"

          "ManufacturerString"="Composite USB"

          "MaxPacketSize"=dword:40

          "PowerConsumption"=multi_sz:"0x00"

          "ProductString"="CompositDriver"

          "SerialString"="0x22"

          "ProductID"=dword:000D

          "VendorID"=dword:05D0

          "DefaultString"="PSOC Composite Driver"

         

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\HID_Class]

          "CompositeFn_Configurations"=multi_sz:"0×00"

          "CompositeFn_DefaultClient"=dword:1

          "CompositeFn_DefaultString"="Generic HID Keybord"

          "CompositeFn_FunctionDescription"="HID Keybord"

          "CompositeFn_FunctionClass"=dword:03

          "CompositeFn_FunctionProtocol"=dword:01

          "CompositeFn_FunctionSubclass"=dword:01

          "CompositeFN_DisableIAD"=dword:0

          "CompositeFn_Disable"=dword:0

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Thermal_Printer_Class]

          "CompositeFn_DefaultString"="Thermal Printer"

          "CompositeFn_FunctionClass"=dword:FF

          "CompositeFn_FunctionDescription"="Sparsh Thermal Printer"

          "CompositeFn_FunctionProtocol"=dword:ff

          "CompositeFn_FunctionSubclass"=dword:00

          "CompositeFN_DisableIAD"=dword:1

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\CompositeFN]

       "ClientDriverList"=multi_sz:"HID_Class","Thermal_Printer_Class"

     

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]

       "DefaultClientDriver"="CompositeFN"

     

    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\Default\SWU]

       "DLL"="SPARSH_WRITER_SYS.DLL"

       "Prefix"="SWU"

     

    [HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\SWU]

       "DLL"="SPARSH_WRITER_SYS.DLL"

       "Prefix"="SWU"

     

    Windows CE 6.0 loading only SPARSH_WRITER_SYS driver which is vendor specific.

     

    But not loading HID Keyboard.

     

     

    Kindly Help me to reslove this issue.

     

    Thanks,

     Abraham Lincoln G

     

     


    Thursday, March 24, 2011 3:27 PM
  • Try with the following settngs for HID


    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\HID_Class]
    "CompositeFn_Configurations"=multi_sz:"0x00"
    "CompositeFn_DefaultClient"=dword:0
    "CompositeFn_DefaultString"="Generic HID Keybord"
    "CompositeFn_FunctionClass"=dword:03
    "CompositeFn_FunctionDescription"="HID Keybord"
    "CompositeFn_FunctionProtocol"=dword:ff
    "CompositeFn_FunctionSubclass"=dword:00
    "CompositeFN_DisableIAD"=dword:1
    "CompositeFn_Disable"=dword:0

    Why you have enabled the IAD? Is your HID is having Interface associate descriptor? if not then change CompositeFN_DisableIAD = dword:1


    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Friday, March 25, 2011 1:33 PM
  • Hi Vinodh,

     

    Thanks for your support.

     

    I have tried above option. Windows CE loading composite device as vendor specific driver.

     

    In order to narrow down issue, I have done following experiments.

     

    Test Case - A:  To test USB composite device configuration.

     

    Test Procedure A1: I have connected my USB composite device to a laptop, which is running with windows XP.

     

    Observation:  Device recognized as composite device, loaded HID keyboard driver (keyboard functionalities are working) and asking device driver for vendor specific device.

     

    Test Procedure A2: I have connected my USB composite device to Windows CE 6.0, (With out any registry entries for composite device)

     

    Observation:  loaded HID keyboard driver (keyboard functionalities are working) and did not asking device driver for vendor specific device.

     

     

    Test Case B: To Verify Registry entries made for Composite device.

     

    Test Procedure B1: I have mode Registry as above post.

    Observation:   Windows CE loading my vendor specific driver and not loading HID device.

     

    Test Procedure B2: I have removed vendor specific registry entries.

     

    Observation:   Windows CE was loading device as HID device and did not ask for new driver.

     

    Test Case C: to Test USB Composite device with Standard class Devices & Vendor specific devices

     

    Test Procedure C1: Created USB Composite device with following interfaces

    1.      Interface 0 as HID keyboard class

    2.      Interface 1 as HID mouse class.

    Observations: Windows CE 6.0 is loading Keyboard and Mouse and working fine.

     

     

     

    Test Procedure C2: Created USB Composite device with following interfaces

    1.      Interface 0 as HID keyboard class

    2.      Interface 1 as HID mouse class

    3.      Interface 2 as vendor Specific class

     

    Observations: Windows CE 6.0 is loading Keyboard and Mouse and working fine but not asking for driver for vendor specific interface.

     

     

     

    I have following quires.

     

    Why windows CE 6.0 loading Composite device as HID by default?

     

    How do load HID and Vendor specific driver same time?

     

     

    Thanks in advance.

     

    Regards,

     

    Abraham Lincoln G 

    Monday, March 28, 2011 6:39 AM
  • Hi All,

    Any Inputs .......

    Thanks and Regards,

    Abraham Lincoln G

    Tuesday, March 29, 2011 6:20 AM
  • Hi,

    I have USB composite device with two interfaces.

    1. Thermal Printer (vendor specific)

    2. HID Keyboard

    How do i load my USB composite device on windows CE 6.0.

    Thanks in advance.

    Abraham Lincoln G

     

    Does windows CE 6.0 support above USB composite device ?

    Abraham Lincoln G


    Tuesday, March 29, 2011 9:01 AM
  • Abraham:

    I am confused, possibly by Vinoth.   Are you saying that you have some device that has a printer and keyboard that you plug into the USB host on your Windows CE device, or are you saying that your Windows CE device exposes itself to a PC as a printer and keyboard?

    In the case of a device that plugs into your Windows CE device, the fact that it is a composite device is irrelevant.   You will need a printer driver for that vendor specific printer and the HID driver.

    In the case of your Windows CE device, keep working with Vinoth.


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

    Eurotech Inc.
    www.Eurotech.com
    Tuesday, March 29, 2011 12:45 PM
    Moderator
  • Bruce Eitman

    I have some device that has a printer and keyboard that I plug into the USB host on my Windows CE device.

    I have driver for vendor specific printer.

    I want to know how can i load my printer driver as well as HID driver ?

    I want to know is this possible ?

    Abraham Lincoln G

    Tuesday, March 29, 2011 1:22 PM
  • Opps !!!. I misunderstood your question.

    if your device is a USB Composite device and you want to connect on windows CE USB Host, then you have to configure host side registry settings. Luca and me are talking about functional client driver.

    Again there is no composite class driver currently available with windows ce 6.0 USB host side. see the following folder

    \WINCE600\PUBLIC\COMMON\OAK\DRIVERS\USB\CLASS

    it doesn't contain any USB composite host class driver. Either you have check with some third party or you have to develop a composite class driver for USB Host


    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Tuesday, March 29, 2011 1:35 PM
  • Again, the fact that it is composite is irrelevant.  That simply means that there is a virtual or physical hub and two devices attached to it.   Each will be seperately enumerated by the USB host on the Windows CE device.

    So yes it is possible.   Have you tried it, and what happens when you try it?


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

    Eurotech Inc.
    www.Eurotech.com
    Tuesday, March 29, 2011 1:44 PM
    Moderator
  • Thanks Vindoth &  Bruce Eitman.

    Is there any samples available in windows CE 6.0 for composite class driver for USB Host?

    Abraham Lincoln G

     

    Tuesday, March 29, 2011 1:48 PM
  • the link I posted in my first answer (http://msdn.microsoft.com/en-us/library/ee484468(v=WinEmbedded.60).aspx) explains that you have to add the appropriate registry entries for both the interfaces of the device.

    This may work

    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\3\Hid_Class]
      "DLL"="USBHID.DLL"
    
    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\255\Sparsh_Writer]
      "DLL"="SPARSH_WRITER_SYS.DLL"
       
    [HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\Sparsh_Writer]
      "DLL"="SPARSH_WRITER_SYS.DLL"
      "Prefix"="SWU"
    
    

     


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com

    Tuesday, March 29, 2011 1:52 PM
  •  I have tried below registry entries suggested by Luca Calligaris  

    problem got  resolved.

    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\3\Hid_Class]
     "DLL"="USBHID.DLL"
    
    [HKEY_LOCAL_MACHINE\Drivers\USB\LoadClients\1488_13\Default\255\Sparsh_Writer]
     "DLL"="SPARSH_WRITER_SYS.DLL"
      
    [HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\Sparsh_Writer]
     "DLL"="SPARSH_WRITER_SYS.DLL"
     "Prefix"="SWU"
    
    

    I am able to load Vendorspecific device as well as HID keyboard.

    Thanks for your great support.

     

    Regards,

    Abraham Lincoln G 

     


    • Marked as answer by Abaham Lincoln Wednesday, March 30, 2011 8:15 AM
    Wednesday, March 30, 2011 8:15 AM