none
Configure WinCE6.0 BSP to act as an USB MSD device RRS feed

  • Question

  • We have a WinCE6.0 based device in the market. I am changing the USB functional class to "Mass_Storage_Class" from "Serial_Class".

    After the build, when I tested it didn't work (In PC: Device Descriptor Failed)

    This is the log from the terminal window:

    UsbFnMdd!UFN_Init: PDD has 9 endpoints
    UsbFnMdd!UFN_Init: PDD supports speeds 0x3
    UsbFnMdd!UFN_Init: --
    UsbFnMdd!UFN_Open: ++
    UsbFnMdd!UFN_Open: --
    UsbFnMdd!UFN_IOControl: ++
    SC2450UsbFn!UfnPdd_IOControl: ++
    SC2450UsbFn!UfnPdd_IOControl: --
    UsbFnMdd!CUfnBus::GetDefaultClientName: Using default client key named "DefaultClientDriver"
    UsbFnMdd!CUfnBus::CreateChild: Using client driver key "\Drivers\USB\FunctionDrivers\Mass_Storage_Class"
    DeviceFolder::LoadDevice!Loading driver from device key \Drivers\USB\FunctionDrivers\Mass_Storage_Class
    DEVICE!RegReadActivationValues RegQuery[NOTIFY] HandleSystemEvent 7 /ADD UFN1:
    ValueEx(\Drivers\USB\FunctionDrivers\Mass_Storage_Class\Prefix) returned 2
    DEVICE!RegReadActivationValues RegQueryValueEx(\Drivers\USB\FunctionDrivers\Mass_Storage_Class\BusPrefix) returned 2
    UsbFnMdd!UFN_Open: ++
    UsbFnMdd!UFN_Open: --
    UsbFnMdd!UFN_IOControl: ++
    UsbFnMdd!UFN_IOControl: --
    UsbFnMdd!UFN_Close: ++
    UsbFnMdd!UFN_Close: --
    DEVICE!LaunchDevice: Init() failed for device 0xd2d16570
    DEVICE!I_ActivateDeviceEx: couldn't activate: prefix <nil>, index -1, dll usbmsfn.dll, context 0xd261d064
    DeviceFolder::LoadDevice(\Drivers\USB\FunctionDrivers\Mass_Storage_Class) last 131 TicksUsbFnMdd!CUfnBus::ActivateChild: ActivateChild failed.
    UsbFnMdd!CUfnBus::CleanUpAfterClient: ++
    UsbFnMdd!CUfnBus::CleanUpAfterClient: --
    UsbFnMdd!CUfnBus::PostInit: ActivateChild failed.
    UsbFnMdd!UFN_IOControl: --
    UsbFnMdd!UFN_Close: ++
    UsbFnMdd!UFN_Close: --

    =============================================

    I have very limited knowledge in WinCE. This device was developed by another team.

    I took the existing BSP, changed the default class to MSD and configured the registry for that.

    So now I am struck. Any help would be appreciated. Thanks.

    Saravanan

    Wednesday, March 4, 2020 10:08 AM

All replies

  • We have a WinCE6.0 based device in the market. I am changing the USB functional class to "Mass_Storage_Class" from "Serial_Class".

    After the build, when I tested it didn't work (In PC: Device Descriptor Failed)

    This is the log from the terminal window:

    UsbFnMdd!UFN_Init: PDD has 9 endpoints
    UsbFnMdd!UFN_Init: PDD supports speeds 0x3
    UsbFnMdd!UFN_Init: --
    UsbFnMdd!UFN_Open: ++
    UsbFnMdd!UFN_Open: --
    UsbFnMdd!UFN_IOControl: ++
    SC2450UsbFn!UfnPdd_IOControl: ++
    SC2450UsbFn!UfnPdd_IOControl: --
    UsbFnMdd!CUfnBus::GetDefaultClientName: Using default client key named "DefaultClientDriver"
    UsbFnMdd!CUfnBus::CreateChild: Using client driver key "\Drivers\USB\FunctionDrivers\Mass_Storage_Class"
    DeviceFolder::LoadDevice!Loading driver from device key \Drivers\USB\FunctionDrivers\Mass_Storage_Class
    DEVICE!RegReadActivationValues RegQuery[NOTIFY] HandleSystemEvent 7 /ADD UFN1:
    ValueEx(\Drivers\USB\FunctionDrivers\Mass_Storage_Class\Prefix) returned 2
    DEVICE!RegReadActivationValues RegQueryValueEx(\Drivers\USB\FunctionDrivers\Mass_Storage_Class\BusPrefix) returned 2
    UsbFnMdd!UFN_Open: ++
    UsbFnMdd!UFN_Open: --
    UsbFnMdd!UFN_IOControl: ++
    UsbFnMdd!UFN_IOControl: --
    UsbFnMdd!UFN_Close: ++
    UsbFnMdd!UFN_Close: --
    DEVICE!LaunchDevice: Init() failed for device 0xd2d16570
    DEVICE!I_ActivateDeviceEx: couldn't activate: prefix <nil>, index -1, dll usbmsfn.dll, context 0xd261d064
    DeviceFolder::LoadDevice(\Drivers\USB\FunctionDrivers\Mass_Storage_Class) last 131 TicksUsbFnMdd!CUfnBus::ActivateChild: ActivateChild failed.
    UsbFnMdd!CUfnBus::CleanUpAfterClient: ++
    UsbFnMdd!CUfnBus::CleanUpAfterClient: --
    UsbFnMdd!CUfnBus::PostInit: ActivateChild failed.
    UsbFnMdd!UFN_IOControl: --
    UsbFnMdd!UFN_Close: ++
    UsbFnMdd!UFN_Close: --

    =============================================

    I have very limited knowledge in WinCE. This device was developed by another team.

    I took the existing BSP, changed the default class to MSD and configured the registry for that.

    So now I am struck. Any help would be appreciated. Thanks.

    Saravanan

    We are developing the next version of the device in a new platform. But we have quite number of customers who are using the device already in the market. So far they were using WMDC+Active Sync to communicate with the PC.

    As there is no more support for WMDC in Windows10, we need to provide them an alternative way to connect with the PC. From the structure of the BSP from our vendor, it looked like Registry changes alone would be enough to act as MSD device.

    I am worried, would this require changes in the device drivers. 

    Wednesday, March 4, 2020 10:23 AM
  • What do you have in the following registry keys:

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]


    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]


    Bruce Eitman
    Senior Enginer
    Bruce.Eitman AT Synopsys DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for
    Synopsys

    Wednesday, March 4, 2020 1:46 PM
    Moderator
  • [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
    "DefaultClientDriver"="Mass_Storage_Class"

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
    "Dll"="usbmsfn.dll"
    "InterfaceSubClass"=dword:06
    "InterfaceProtocol"=dword:50
    "DeviceName"="DSK4:"
    "FriendlyName"="Mass Storage"
    "idVendor"=dword:045E
    "Manufacturer"="StartUp"
    "idProduct"=dword:FFFF
    "Product"="Instrument"
    "bcdDevice"=dword:0
    "Removable"=dword:0

    DeviceFolder::LoadDevice(Drivers\BuiltIn\IrCOMM) last 17 TicksDEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\SC2450USBFN\BusPrefix) returned 2
    UsbFnMdd!DllEntry: Attach
    UsbFnMdd!UFN_Init: ++
    SC2450UsbFn!UfnPdd_Init: ++
    USB MSF Function Class Enabled : Mass_Storage_Class
    SC2450UsbFn!MapRegisterSet: ++
    SC2450UsbFn!MapRegisterSet: --
    SC2450UsbFn!ResetDevice: ++
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!DisableEndpointInterrupt: ++
    SC2450UsbFn!DisableEndpointInterrupt: --
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!DisableEndpointInterrupt: ++
    SC2450UsbFn!DisableEndpointInterrupt: --
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!DisableEndpointInterrupt: ++
    SC2450UsbFn!DisableEndpointInterrupt: --
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!DisableEndpointInterrupt: ++
    SC2450UsbFn!DisableEndpointInterrupt: --
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!DisableEndpointInterrupt: ++
    SC2450UsbFn!DisableEndpointInterrupt: --
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!DisableEndpointInterrupt: ++
    SC2450UsbFn!DisableEndpointInterrupt: --
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!DisableEndpointInterrupt: ++
    SC2450UsbFn!DisableEndpointInterrupt: --
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetEndpoint: ++
    SC2450UsbFn!DisableEndpointInterrupt: ++
    SC2450UsbFn!DisableEndpointInterrupt: --
    SC2450UsbFn!ResetEndpoint: --
    SC2450UsbFn!ResetDevice: --
    SC2450UsbFn!UfnPdd_Init: --
    UsbFnMdd!UFN_Init: PDD has 9 endpoints
    UsbFnMdd!UFN_Init: PDD supports speeds 0x3
    UsbFnMdd!UFN_Init: --
    UsbFnMdd!UFN_Open: ++
    UsbFnMdd!UFN_Open: --
    UsbFnMdd!UFN_IOControl: ++
    SC2450UsbFn!UfnPdd_IOControl: ++
    SC2450UsbFn!UfnPdd_IOControl: --
    UsbFnMdd!CUfnBus::GetDefaultClientName: Using default client key named "DefaultClientDriver"
    UsbFnMdd!CUfnBus::CreateChild: Using client driver key "\Drivers\USB\FunctionDrivers\Mass_Storage_Class"
    DeviceFolder::LoadDevice!Loading driver from device key \Drivers\USB\FunctionDrivers\Mass_Storage_Class
    DEVICE!RegReadActivationValues RegQueryValueEx(\Drivers\USB\FunctionDrivers\Mass_Storage_Class\Prefix[NOTIFY] HandleSystemEvent 7 /ADD UFN1:
    ) returned 2
    DEVICE!RegReadActivationValues RegQueryValueEx(\Drivers\USB\FunctionDrivers\Mass_Storage_Class\BusPrefix) returned 2
    UsbFnMdd!UFN_Open: ++
    UsbFnMdd!UFN_Open: --
    UsbFnMdd!UFN_IOControl: ++
    UsbFnMdd!UFN_IOControl: --
    UsbFnMdd!UFN_Close: ++
    UsbFnMdd!UFN_Close: --
    DEVICE!LaunchDevice: Init() failed for device 0xd2d16b10
    DEVICE!I_ActivateDeviceEx: couldn't activate: prefix <nil>, index -1, dll usbmsfn.dll, context 0xd261d064
    DeviceFolder::LoadDevice(\Drivers\USB\FunctionDrivers\Mass_Storage_Class) last 132 TicksUsbFnMdd!CUfnBus::ActivateChild: ActivateChild failed.
    UsbFnMdd!CUfnBus::CleanUpAfterClient: ++
    UsbFnMdd!CUfnBus::CleanUpAfterClient: --
    UsbFnMdd!CUfnBus::PostInit: ActivateChild failed.
    UsbFnMdd!UFN_IOControl: --
    UsbFnMdd!UFN_Close: ++
    UsbFnMdd!UFN_Close: --
    DeviceFolder::LoadDevice(Drivers\BuiltIn\SC2450USBFN) last 452 TicksFILESYS: SignalStarted loop = 1


    • Edited by Saravanan2416 Thursday, March 5, 2020 8:00 AM More Logs
    Thursday, March 5, 2020 2:14 AM
  • [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
    "DefaultClientDriver"="Mass_Storage_Class"

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
    "Dll"="usbmsfn.dll"
    "InterfaceSubClass"=dword:06
    "InterfaceProtocol"=dword:50
    "DeviceName"="DSK4:"
    "FriendlyName"="Mass Storage"
    "idVendor"=dword:045E
    "Manufacturer"="StartUp"
    "idProduct"=dword:FFFF
    "Product"="Instrument"
    "bcdDevice"=dword:0
    "Removable"=dword:0

    Thanks Bruce for responding.


    Thursday, March 5, 2020 2:15 AM
  • From the logs,

    Line No 50 UFN_IOControl++

    Line No 61 UFN_IOControl++

    Line No 62 UFN_IOControl --

    Line No 71 UFN_IOControl --

    I doubt this section. Some BSP issues?

    Thursday, March 5, 2020 8:04 AM
  • The registry looks ok to me.

    The UFN_IOControl is just showing that a function is getting called and returns.  Not necessarily bad.

    Otherwise, it looks like someone needs to do some debugging.  Anything else that we can provide would be guesses, and I don't have any.


    Bruce Eitman
    Senior Enginer
    Bruce.Eitman AT Synopsys DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for
    Synopsys

    Friday, March 6, 2020 1:52 PM
    Moderator