how to write a class driver for windows IOT core device ?

Hello team,

subject : how to write a class driver for **windows IOT core device ** to receive calls from application and pass it to ufx01000.sys?

we are new to windows driver development, Your support could help us to make it work, how to develop a CDC class driver (CDC-ACM) for “Windows IOT core device” which receive calls from application and pass it to ufx01000.sys.

Currently we are following this link :https://docs.microsoft.com/en-us/windows/iot-core/learn-about-hardware/usb-support

Note : We are checking CDC class driver for Windows IOT core devices not for Host.

Thanks and regards,

Hemanth kumar velooru.

1 Like

You are allowed to edit your posts and comments for up to one hour. There is a “settings” icon that includes Edit and Delete options. After an hour, you just have to post a follow-up comment.

Applications don’t make “requests” of function controllers (that is, USB devices). Function controller drivers live in a world upside down from normal Windows drivers, in that the requests come from the bottom (that is, the bus).

Like all Windows drivers, however, you can create a “control device” or a raw PDO, or some similar device that an application can open and send ioctls. The interface would be entirely up to you.

1 Like

Tim Robert,
I too facing a similar issue,
where I need to call IOCTL calls from user mode application to UFX01000.sys driver which is running as FDO of UFXSynopsys.sys. As I gone through following link https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/user-mode-services-ufx
The IOCTL calls must be sent through GenericUsbFn.sys which is function class driver. However I have no much information or documentation on how to create InterfaceGUID of the interface to get the symbolic link to communicate from user mode application and not sure how to bring the GenericUsbFn.sys into running state.

Like all Windows drivers, however, you can create a “control device” or a raw PDO, or some similar device that an application can open and send ioctls. The interface would be entirely up to you.<

Can you please give me some detailed information on how to create “Control device” or PDO.?
In this can GenericUsbFn.sys should run as a child PDO of UFX01000.sys am I correct?

I really appreciate your response.

Regards
Lokesh

1 Like

I’m sooooo confused.

GenericUsbFn is provided by MSFT. You write an app to talk to it, as described in the doc page you pointed to. The instructions there seem pretty clear.

Help me understand what it is you need to do, so we can all help you better.

Peter

As Peter asked, what is it that you are trying to do? What’s the overall picture you are imagining? I get that you’re building a USB device. And you said above you’re building a CDC ACM device, which means you’re doing a simulated serial port. That means that someone, somewhere, has to respond to data coming in, and has to queue up data to go out. That, presumably, would be the job of your application talking to GenericUsbFn.sys. That shouldn’t need any driver work at all.

What is going to be sent over that interface? Are you collecting some sensor data to be transmitted? What will the device be?

Hello Tim Robert & Peter Sorry if I had confused you. I try to elaborate more to make it clear. Actually as per the above link, to communicate with GenericUsbFn.sys, the very first step is ** 1. On startup, the service listens for the device interface arrival of the interface. The device interface GUID is the InterfaceGUID value that is declared in the registry under the OEM-defined subkey of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\USBFN\Interfaces. There are two common methods for listening to device arrival: Trigger start the service. For more information, see Service Trigger Events. Register for device interface arrival. For more information, see the CM_Register_Notification function.** At this point I am trying to understand when will I get the interface arrival notification. **Who will trigger it, is it ufx01000.sys? Or is it ufxSynopsys.sys? Or is there any other driver has taken part in this who will really trigger device arrival notification.?** In my case Pci.sys, ufxSynopsys.sys and ufx01000.sys are in running state. And I am try to connect Usb cable between IOT device and Host PC. However at the Usermode application I am not getting any notification. Is there anyway I can confirm the interface get created? As per the following link **https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-registry-settings-for-a-function-controller-driver#usbfninterfaces-registry-key\*\* I have set all the registry values in the USBFN registry. Also created InterfaceGUID manually. Is it the correct way to create interfaceGuid? Or else will it get created automatically based on device arrival? And also if I need to trigger device arrival notification manually, how can do that? May be I need to cheat the application as the the device arrived for testing purposes only. (**I only intended to learn which driver in the USB driver stack will create interfaces and trigger notifications on device arrival**). I am only talking @Usb device side drivers. Thank you very much for your time and responses Regards Lokesh

I received a comment on this via email that is no longer present; I assume it must have been deleted.

I want to caution that the word “interface” is overloaded here. They use the USB definition of interface (meaning “a collection of endpoints with a common purpose”) and the PnP definition of interface (a “device interface”, which is a GUID that drivers can advertise and applications can search for).

Also note that “device arrival” is a strange concept here, because it is unrelated to plugging/unplugging. The device must already exist and be operational before cable gets inserted, otherwise it can respond to enumeration requests from the host system.

Hello Tim,
Yes I really got confused.
The thing I wanted to achieve is, I am trying to enable USB device functionality on my Tiny Windows IoT Core board. When I connect it to other HOST PC it should be recognised as a COM PORT device. And I need to send some sensor data(Text) over it.

Here the only thing I wanted to achieve is to build communication between User application and GenericUsbFn.sys.
So to do that I need an InterfaceGUID to be available @user Application which gets the symbolic link of the GenericUsbFn.sys etc…

I have set all the Configurations which I expected to do by the driver by using the following link “https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-registry-settings-for-a-function-controller-driver
However I am not seeing GenericUsbFn.sys in running state at all even after UFX01000.sys started running along with UFXSynopsys.sys.

Kindly let me know what are all the conditions should be satisfied to bring the GenericUsbFn.sys into running state and what would be the InterfaceGUID to be used to communicate with it from USER APPLICATION.

More details:
OS: Windows 10 IoT Core (ver-10.0.17763.253)

I respect all your answers. Thank you
Regards
Lokesh

Do you know how to open the device by using the GUID? You use CM_Get_Device_Interface_List to get the file name you need to pass to CreateFile. Can you open your file?

I have to be honest. It’s likely that there is no one on this list who has used the APIs you’re using. The people here are focused on the other end, writing drivers for host systems that are consuming devices, not creating them. Personally, I cannot even remotely imagine using Windows to create a USB device. That just seems like a total impedance mismatch.

Hello Tim,
You are absolutely right.
Every one talking about Host side drivers and accessing the USB Devices from host. Instead no one talking more about device side driver development and related issues. I have very limited documentation on this regard.
The following link will explain more about what I am trying to achieve. And your help is more welcomed.
An Overview on USB Support and Dual Role for Windows 10 IoT Core - Windows IoT | Microsoft Learn.

From the above image the yellow highlighted gap I need to fill. I need to communicate from an
USER APP–>GenericUsbFn–>UFX01000–>FunctionController Driver.

@Tim_Roberts said:
Do you know how to open the device by using the GUID? You use CM_Get_Device_Interface_List to get the file name you need to pass to CreateFile. Can you open your file?

Yes Tim from the User application I am calling CM_Get_Device_Interface_List, though I am not sure what is the InterfaceGUID to be used to call the above API. Importantly I am not able to bring the GenericUsbFn.sys into running state which should to be created as a child PDO by UFX01000.sys.

Hoping the best support
Regards
Lokesh

though I am not sure what is the InterfaceGUID to be used to call the above API.

It is the InterfaceGUID value that you wrote in your subkey of CurrentControlSet\Control\USBFN\Interfaces. This is specific to your device, so you have to create the new GUID. This the “THE” key for connecting with the driver. When GenericUsbFn comes up, it will register that GUID as an interface, and CM_Get_Device_Interface_List searches through the list of registered interfaces.

1 Like

Hello Tim

Thank you for the response.
I have thried by setting following set of configuration values in the registry as per this link https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-registry-settings-for-a-function-controller-driver.
Can you please let me know if I am missing anything.?

**HKLM\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration **
/v InterfaceList /t REG_MULTI_SZ /d GENERICUSBFN\0MTP /f
/v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /
/v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

**HKLMSystem\CurrentControlSet\Control\USBFN **
/v CurrentConfiguration /t REG_SZ /d MyConfiguration /f

**HKLM\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN **
/v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
/v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f
/v InterfaceNumber /t REG_DWORD /d 40 /f

**HKLM\System\ControlSet001\Control\USBFN **
/v IncludeDefaultCfg /t REG_DWORD /d 1 /f

HKLM\System\ControlSet001\Control\USBFN\default
/v bcdDevice /t REG_DWORD /d 0401 /f
/v bDeviceClass /t REG_DWORD /d 02 /f
/v bDeviceProtocol /t REG_DWORD /d 00 /f
/v bDeviceSubClass /t REG_DWORD /d 00 /f
/v idProduct /t REG_DWORD /d 0525 /f
/v idVendor /t REG_DWORD /d 0xA4A7 /f
/v iManufacturer /t REG_DWORD /d 01 /f
/v iSerialNumber /t REG_DWORD /d 00 /f
/v ManufacturerString /t REG_SZ /d “Minds Pvt Ltd” /f
/v ProductString /t REG_SZ /d “Datacolor” /f
/v bNumConfigurations /t REG_DWORD /d 03 /f

HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default
/v bmAttributes /t REG_DWORD /d 0xC0 /f
/v bMaxPower /t REG_DWORD /d 01 /f

HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceList
/t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
/v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
/v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

Thank you & Regards
Lokesh

Hello Tim
I have set following configurations in the registries as per the link An Overview on USB Support and Dual Role for Windows 10 IoT Core - Windows IoT | Microsoft Learn.
Though I am not sure where to set the endpoint configurations in the registry.

**HKLM\System\ControlSet001\Control\USBFN\default **
BcdDevice=0x1
bDeviceClass=0x0
bDeviceProtocol=0x0
bDeviceSubClass= 0x0
idProduct= 0xc0c0
idVendor=0x045e
iManufacturer=1
iSerialNumber=3
ManufacturerString=OEMname
ProductString=“Windows IOT”
SerialNumberString=0x123

//Self powered
**HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default **
bmAttributes = 0xC0
bMaxPower = 0x1
InterfaceList = “GENERICUSBFN”
InterfaceDescriptor 0x09040100020A000006
InterfaceGUIDE= “{B7E6B162-1130-4CE1-80FC-B1369717147E}”

However still I am not seeing the Interface and GenericUsbFn.sys not in running state. I have also attached logs I am getting from UFX01000.sys for your reference. I will be very happy if it gives some clue.

I responded in your other thread.

1 Like

Thank you Tim

Hello Tim
I have set the InterfaceGUID in the registry CurrentControlSet\Control\USBFN\Interfaces and also other configurations required by the USBFN. Still I am not able to get the InterfaceGUID by using CM_Get_Device_Interface_List from the Application.
Can you please help me with what are the minimum configurations to be set by the USBFN to bring the GenericUsbFn into running state.

@Tim_Roberts said:

When GenericUsbFn comes up, it will register that GUID as an interface, and CM_Get_Device_Interface_List searches through the list of registered interfaces.<<
I am not seeing GenericUsbFn coming up and registering the interface. That is where the real problem exists. I am not sure what additional things I need to perform to bring the GenericUsbFn into running state.

Hello Tim
I have tried following set of configuration values in the registry as per this link https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-registry-settings-for-a-function-controller-driver.
Please let me know if I am missing anything.!

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d GENERICUSBFN\0MTP /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceNumber /t REG_DWORD /d 40 /f

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v MSOSCompatIdDescriptor /t REG_BINARY /d 2800000000010400010000000000000000014D545000000000000000000000000000000000000000 /f
REG ADD HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN /v CurrentConfiguration /t REG_SZ /d MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN /v IncludeDefaultCfg /t REG_DWORD /d 1 /f

REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bcdDevice /t REG_DWORD /d 0401 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceClass /t REG_DWORD /d 02 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceProtocol /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceSubClass /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v idProduct /t REG_DWORD /d 0525 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v idVendor /t REG_DWORD /d 0xA4A7 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v iManufacturer /t REG_DWORD /d 01 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v iSerialNumber /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v ManufacturerString /t REG_SZ /d “Happiest Minds Pvt Ltd” /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v ProductString /t REG_SZ /d “Datacolor” /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bNumConfigurations /t REG_DWORD /d 03 /f

REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v bmAttributes /t REG_DWORD /d 0xC0 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v bMaxPower /t REG_DWORD /d 01 /f

REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

Thank you & Regards
Lokesh

Hello Tim

Thank you for the response.
I have tried by setting the interface values, the following set of configuration values in the registry as per this link https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-registry-settings-for-a-function-controller-driver.
Can you please let me know if I am missing anything.?

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d GENERICUSBFN\0MTP /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceNumber /t REG_DWORD /d 40 /f

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v MSOSCompatIdDescriptor /t REG_BINARY /d 2800000000010400010000000000000000014D545000000000000000000000000000000000000000 /f
REG ADD HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN /v CurrentConfiguration /t REG_SZ /d MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN /v IncludeDefaultCfg /t REG_DWORD /d 1 /f

REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bcdDevice /t REG_DWORD /d 0401 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceClass /t REG_DWORD /d 02 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceProtocol /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceSubClass /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v idProduct /t REG_DWORD /d 0525 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v idVendor /t REG_DWORD /d 0xA4A7 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v iManufacturer /t REG_DWORD /d 01 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v iSerialNumber /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v ManufacturerString /t REG_SZ /d “Happiest Minds Pvt Ltd” /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v ProductString /t REG_SZ /d “Datacolor” /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bNumConfigurations /t REG_DWORD /d 03 /f

REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v bmAttributes /t REG_DWORD /d 0xC0 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v bMaxPower /t REG_DWORD /d 01 /f

REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

Thank you & Regards
Lokesh

Hello Tim

Thank you for the response.
I have thried by setting following set of configuration values in the registry as per this link https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-registry-settings-for-a-function-controller-driver.
Can you please let me know if I am missing anything.?

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d GENERICUSBFN\0MTP /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceNumber /t REG_DWORD /d 40 /f

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v MSOSCompatIdDescriptor /t REG_BINARY /d 2800000000010400010000000000000000014D545000000000000000000000000000000000000000 /f
REG ADD HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN /v CurrentConfiguration /t REG_SZ /d MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN /v IncludeDefaultCfg /t REG_DWORD /d 1 /f

REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bcdDevice /t REG_DWORD /d 0401 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceClass /t REG_DWORD /d 02 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceProtocol /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceSubClass /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v idProduct /t REG_DWORD /d 0525 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v idVendor /t REG_DWORD /d 0xA4A7 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v iManufacturer /t REG_DWORD /d 01 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v iSerialNumber /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v ManufacturerString /t REG_SZ /d “Happiest Minds Pvt Ltd” /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v ProductString /t REG_SZ /d “Datacolor” /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bNumConfigurations /t REG_DWORD /d 03 /f

REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v bmAttributes /t REG_DWORD /d 0xC0 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v bMaxPower /t REG_DWORD /d 01 /f

REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

Thank you & Regards
Lokesh

Hello Tim

Thank you for the response.
I have thried by setting following set of configuration values in the registry as per this link https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-registry-settings-for-a-function-controller-driver.
Can you please let me know if I am missing anything.?

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d GENERICUSBFN\0MTP /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Interfaces\GENERICUSBFN /v InterfaceNumber /t REG_DWORD /d 40 /f

REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v MSOSCompatIdDescriptor /t REG_BINARY /d 2800000000010400010000000000000000014D545000000000000000000000000000000000000000 /f
REG ADD HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\USBFN\Configurations\MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN\Configurations\MyConfiguration /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN /v CurrentConfiguration /t REG_SZ /d MyConfiguration /f
REG ADD HKEY_LOCAL_MACHINE\System\ControlSet001\Control\USBFN /v IncludeDefaultCfg /t REG_DWORD /d 1 /f

REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bcdDevice /t REG_DWORD /d 0401 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceClass /t REG_DWORD /d 02 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceProtocol /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bDeviceSubClass /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v idProduct /t REG_DWORD /d 0525 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v idVendor /t REG_DWORD /d 0xA4A7 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v iManufacturer /t REG_DWORD /d 01 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v iSerialNumber /t REG_DWORD /d 00 /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v ManufacturerString /t REG_SZ /d “Happiest Minds Pvt Ltd” /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v ProductString /t REG_SZ /d “Datacolor” /f
REG ADD HKLM\System\ControlSet001\Control\USBFN\default /v bNumConfigurations /t REG_DWORD /d 03 /f

REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v bmAttributes /t REG_DWORD /d 0xC0 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v bMaxPower /t REG_DWORD /d 01 /f

REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceList /t REG_MULTI_SZ /d “GENERICUSBFN\0MTP” /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceDescriptor /t REG_BINARY /d 09040100020A000006 /f
REG ADD HKLM\System\CurrentControlSet\Control\USBFN\Configurations\Default /v InterfaceGUID /t REG_SZ /d “{B7E6B162-1130-4CE1-80FC-B1369717147E}” /f

Thank you & Regards
Lokesh