Author Topic: alternative drivers to buggy Windows usbser.sys?  (Read 15245 times)

Tony Naggs

  • Member
  • ***
  • Posts: 5
alternative drivers to buggy Windows usbser.sys?
« on: August 06, 2015, 11:28:05 am »
Windows usbser.sys is annoyingly buggy, notably:
1. it does not generate device arrival / removal notifications identifying the device that arrived/disconnected,
2. if a device is removed & returns (eg due to a firmware update, or reboot) whilst the handle is open then the application has to close the handle, and the device disconnected & reconnected all over again.

This is a pain with a development board I'm using, and more difficult to explain to the board users that it is a Windows bug that means they must close Putty/Hyperterminal/etc.. and reboot the board before reopening their terminal program.

Are there any standard, or recommended alternate sourcers for drivers for USB CDC devices?

(I remember there several suppliers of common drivers in earlier Windows 9x & NT times, but I'm out of touch with the Windows driver scene. Also I don't object in principle to writing a driver from scratch this is for an open source hardware project where I'm not paid, and I have other features I'd prefer to spend my donated time on.)

Tony Naggs

  • Member
  • ***
  • Posts: 5
Re: alternative drivers to buggy Windows usbser.sys?
« Reply #1 on: August 07, 2015, 11:40:28 am »
It seems Windows 10 has a new version of usbser.sys (ref https://msdn.microsoft.com/en-gb/library/windows/hardware/dn707976%28v=vs.85%29.aspx), has anyone tested this yet to see if it is less buggy?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: alternative drivers to buggy Windows usbser.sys?
« Reply #2 on: August 07, 2015, 12:06:19 pm »
After firmware update or reboot, the device should emulate detach and reattach (by controlling the pullup on D+ or D- for example). Physical or emulated detach and reattach will always require the host to open a new handle.

If the firmware update or reboot doesn't emulate detach and reattach, the host has no way of knowing that the device has changed.

Tony Naggs

  • Member
  • ***
  • Posts: 5
Re: alternative drivers to buggy Windows usbser.sys?
« Reply #3 on: August 07, 2015, 06:57:36 pm »
Hi Jan

(BTW I've collected a small stack of your books over the years.)


I'm happy that the detach & reattach is fine: Windows chimes and I get a DBT_DEVNODES_CHANGED notification for both removal and arrival.
(We're using standard Microchip USB libraries, and detach & reattach also works fine for my friends using Linux & Mac.)


I'm far from being the first person to complain that usbser.sys does not produce DBT_DEVICEARRIVAL, DBT_DEVICEREMOVECOMPLETE notifications, and does not recover from detach & reattach. See for example:
https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/390690
http://www.keil.com/forum/21481/
https://www.youtube.com/watch?v=DRmvUsa2xuU

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: alternative drivers to buggy Windows usbser.sys?
« Reply #4 on: August 07, 2015, 09:45:54 pm »