mar0x / midi_router

USB to MIDI adapter with routing features
3 stars 0 forks source link

Windows 8.1 and earlier does not load serial port driver #1

Closed iflyhigh closed 2 months ago

iflyhigh commented 1 year ago

Windows 8.1 and earlier does not load USB serial port driver by default. Thus the 'MIDI Router' device is seen in erred state in Device Manager and no serial device appear although the device works fine. This happens because for these Windows versions one needs to explicitly specify that generic usbser.sys driver should be loaded for VID and PID of device. This behaviour is explained in detail at https://stackoverflow.com/questions/41541655/custom-usb-vid-pid-make-windows-7-8-automatically-choose-usbser-sys-driver

Solution: provide INF file. I've used sligtly modified a-star.inf mentioned above but to avoid installation warnings it needs to be signed by inf2cat tool that I do not have.

[Strings]
DriverPackageDisplayName="MVR-Electronics Serial Port Driver for Windows 8.1 and earlier"
ManufacturerName="MVR-Electronics"
ServiceName="USB RS-232 Emulation Driver"
mvr.Bootloader.Name="MIDI Router x7 Rack"

[DefaultInstall]
CopyINF=midi-router-x7r.inf

[Version]
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Signature="$Windows NT$"
Provider=%ManufacturerName%
DriverVer=01/01/2023,1.0.0.0
DriverPackageDisplayName=%DriverPackageDisplayName%

[Manufacturer]
%ManufacturerName%=DeviceList, NTamd64

[DestinationDirs]
FakeModemCopyFileSection=12
DefaultDestDir=12

[DeviceList]
%mvr.Bootloader.Name%=DriverInstall, USB\VID_16C0&PID_05E4
%mvr.Bootloader.Name%=DriverInstall, USB\VID_16C0&PID_05E4&MI_00

[DeviceList.NTamd64]
%mvr.Bootloader.Name%=DriverInstall, USB\VID_16C0&PID_05E4
%mvr.Bootloader.Name%=DriverInstall, USB\VID_16C0&PID_05E4&MI_00

[DriverInstall]
include=mdmcpq.inf,usb.inf
CopyFiles = FakeModemCopyFileSection
AddReg=DriverAddReg

[DriverAddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

[DriverInstall.Services]
include=mdmcpq.inf
AddService=usbser, 0x00000002, DriverService

[DriverService]
DisplayName=%ServiceName%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys
LoadOrderGroup=Base
mar0x commented 1 year ago

Hello, I'm not sure we need to support the OS which is no longer supported by vendor (https://support.microsoft.com/en-us/windows/windows-8-1-support-ended-on-january-10-2023-3cfd4cde-f611-496a-8057-923fba401e93)