microsoft / NCM-Driver-for-Windows

The Windows NCM drivers (host-side and function-side) are the NetAdapterCx based NIC drivers that implements Network Control Model (CDC NCM) specification defined by USB-IF
MIT License
73 stars 26 forks source link

Question: How to use UsbNcmSample driver on Windows 11 #15

Open vvavrychuk opened 1 year ago

vvavrychuk commented 1 year ago

I have compiled https://github.com/microsoft/NCM-Driver-for-Windows on Windows 11 and obtained

    Directory: ...\NCM-Driver-for-Windows\x64\Debug\host

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        12/16/2022   6:40 PM        9595278 DmfKFramework.lib
-a----        12/16/2022   6:44 PM       19085096 DmfKModules.Library.lib
-a----        12/16/2022   6:44 PM           2468 usbncmfnsample.cat
-a----        12/17/2022   9:47 AM           5382 UsbNcmSample.inf
-a----        12/16/2022   6:44 PM         299176 UsbNcmSample.sys

In UsbNcmSample.inf, I have uncommented line to install for any NCM-compatible device:

[Standard.NTamd64]
%UsbNcm.DeviceDesc%=UsbNcm_Device,USB\MS_COMP_WINNCM

; Uncomment to install for any NCM-compatible device:
; Prot_00 => No encapsulated commands / responses (ref NCM10 4.2)
%UsbNcm.DeviceDesc%=UsbNcm_Device, USB\Class_02&SubClass_0d&Prot_00

I install driver using

> pnputil /add-driver UsbNcmSample.inf /install /reboot
Microsoft PnP Utility

Adding driver package:  UsbNcmSample.inf
Driver package added successfully.
Published Name:         oem4.inf
Driver package installed on device: USB\VID_1D6B&PID_0104&MI_00\3&1eed6d04&0&0000

Total driver packages:  1
Added driver packages:  1

Problem is that still, standard UsbNcm driver supplied with Windows 11 is used.

DsoTsin commented 10 months ago

You need to sign the driver with formal cert.

optlee commented 6 months ago

try to set the device type of device descriptor as 00 00