none
Composite USB driver/registry settings RRS feed

  • Question

  • I guess I'm having a hard time figuring this out, basically all I want to do is set up 1 device on windows CE 6.0 to have two types of connections to a pc through 1 usb port. We basically want activesync support for development and our own protocal for other things. And the default won't be the active sync version, a dev will do something to enable but we havn't really decided. I want to make them click their heels together and wish for activesync but I don't think i can write an app for that... maybe with kinect, if we support it of course.

    Any way, here is my actual questions, I don't really fully understand how the registry entries work, the way I have it set up is with the two normal entries that you would use to get activesync and the other one, but having the defualtclientdriver set to compositefn, all of which are in usb/functiondrivers/

    the other question, and I know this is just me being horribly inexperienced, is how I'd write an app to switch between the two? I'm not really sure where to start looking and I'm hoping its not too complex.

    Thursday, December 16, 2010 9:59 PM

Answers

All replies

  • Actually adding Composite driver will allow your two USB functions to function simutaneously without having to switch between the two.
     
    If you don't want Two USB functions to operate simultaneously you can remove the composite USB function driver form the OS.
    Add the registry settings for both of your USB functions,then check out the following blog to switch between the two USB clients.
     
     
     
    Hope this helps.
    • Marked as answer by Kevin Chaves Friday, December 17, 2010 5:38 PM
    Friday, December 17, 2010 6:51 AM
  • I guess I'm having a hard time figuring this out, basically all I want to do is set up 1 device on windows CE 6.0 to have two types of connections to a pc through 1 usb port. We basically want activesync support for development and our own protocal for other things. And the default won't be the active sync version, a dev will do something to enable but we havn't really decided. I want to make them click their heels together and wish for activesync but I don't think i can write an app for that... maybe with kinect, if we support it of course.

    Any way, here is my actual questions, I don't really fully understand how the registry entries work, the way I have it set up is with the two normal entries that you would use to get activesync and the other one, but having the defualtclientdriver set to compositefn, all of which are in usb/functiondrivers/

    have you gone through the following msdn link.

    http://msdn.microsoft.com/en-us/library/ee483018.aspx

    Also i have pasted the sample registry settings i have used in one of my projects. This is for a composite device that support mass storage and active sync.


    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
       "Dll"="usbmsfn.dll"
       "InterfaceSubClass"=dword:06
       "InterfaceProtocol"=dword:50
       "DeviceName"="DSK1:"
       "FriendlyName"="Mass Storage"
       "idVendor"=dword:1C61
       "Manufacturer"="fill required name"
       "idProduct"=dword:1000
       "Product"=" Mass Storage"
       "bcdDevice"=dword:0

    [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:1000
    "VendorID"=dword:1C61
    "DefaultString"="e-con Composite Driver"

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Serial_Class]

    "CompositeFn_DefaultString"=" ActiveSync"
    "CompositeFn_FunctionClass"=dword:0a
    "CompositeFn_FunctionDescription"="USB ActiveSync"
    "CompositeFn_FunctionProtocol"=dword:ff
    "CompositeFn_FunctionSubclass"=dword:00
    ;"CompositeFN_DisableIAD"=dword:1

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]

    "CompositeFn_DefaultString"="ASI DataMyte Mass Storage"
    "CompositeFn_FunctionClass"=dword:08
    "CompositeFn_FunctionDescription"="USB MassStorage"
    "CompositeFn_FunctionProtocol"=dword:ff
    "CompositeFn_FunctionSubclass"=dword:00


    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\CompositeFN]
       "ClientDriverList"=multi_sz:"Serial_Class","Mass_Storage_Class"


    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
       "DefaultClientDriver"="CompositeFN"

    Also see this blog, it may give some lights to you.

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

    the other question, and I know this is just me being horribly inexperienced, is how I'd write an app to switch between the two? I'm not really sure where to start looking and I'm hoping its not too complex.

    Apart using composite driver, Prabu has already explained another way to you.



    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Friday, December 17, 2010 1:06 PM
  • Thank you, I did set the registry up the simlar to the way you had it, but apparently i won't need to since I just have to use what the guy before you posted =D
    Friday, December 17, 2010 5:38 PM
  • Hi Vinoth,

    One question. When I print the Descriptor for Serial Class InterfaceClass, Subclass and protocol are showing a value of 0xFF and for MSD Class InterfaceClass, InterfaceSubClass and InterfaceProtocol are showing a value of 08, 06 and 50.

    But, in the registry settings what ever you are using are different. Are you using some other protocol?

    I am using the client drivers from Public and I haven't changed Vendor Id or Product Id.

    My requirement is to have Serial Class and RNDIS as part of composite function. Windows not able to find the drivers for them. But I had observed that individually RNDIS, Serial works fine.

    Below is the registry configuration I am using for Serial and MSD.

    IF

    SYSGEN_USBFN_COMPOSITE

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]

    "DefaultClientDriver"=-

    ; erase previous default

     

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]

    "DefaultClientDriver"="CompositeFN"

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\CompositeFN]

    "ClientDriverList"=multi_sz:"Mass_Storage_Class", "Serial_Class"

    ; "ClientDriverList"=multi_sz:"Mass_Storage_Class", "RNDIS","Serial_Class"

    [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"="Composite Driver"

    "SerialString"="0x22"

    ; "ProductID"=dword:

    ; "VendorID"=dword:045E

    "DefaultString"="Microsoft"

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Serial_Class]

    "CompositeFn_DefaultString"="ActiveSync"

    "CompositeFn_FunctionClass"=dword:ff

    "CompositeFn_FunctionDescription"="USB ActiveSync"

    "CompositeFn_FunctionProtocol"=dword:ff

    "CompositeFn_FunctionSubclass"=dword:ff

    "CompositeFn_Disable"=dword:0

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]

    "CompositeFn_DefaultString"="Mass Storage"

    "CompositeFn_FunctionClass"=dword:08

    "CompositeFn_FunctionDescription"="USB MassStorage"

    "CompositeFn_FunctionProtocol"=dword:50

    "CompositeFn_FunctionSubclass"=dword:06

    "CompositeFn_Disable"=dword:0

     

     

    ENDIF

    ;SYSGEN_USBFN_COMPOSITE

    Regards,

    GSR



    • Edited by GSRid Thursday, August 4, 2011 1:17 PM Added Registry
    Thursday, August 4, 2011 10:50 AM
  • Hi Vinoth,

    One clarification. Do we need to modify wceusbsh.inf because the wceusbsh.sys on Windows Host Machine is loaded based on the VID and PID present in Device Descriptor. I see that you have changed the Product Id and Vendor Id for Composite Fn which is reported to the Host machine when USB Composite device is connected to it using USB Device Descriptor.

    Can you please clarify.

    Regards,

    GSR

    Friday, August 5, 2011 9:42 AM
  • yes. you have to modify the wceusbsh.inf file to add your  VID and PID
    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Monday, August 8, 2011 8:15 AM
  • Hi Vinoth,

    Thank You for reply and confirmation.

    Has anyone got a working setup with the following combination RNDIS + Serial (With USB Function)?

    Regards,

    GSR

    Tuesday, August 9, 2011 5:16 AM