Difference between revisions of "USB Stack"

From ReactOS Wiki
Jump to: navigation, search
(Status: Add note for janderwald's recent HID work)
(janderwald's status report)
Line 17: Line 17:
  
 
== Status ==
 
== Status ==
* '''2010-01-08''' - [[Michael Martin]] has started re-implementation. The plan is to start with the EHCI controller and then work up the stack. Drivers will be developed against Windows 2000 and Windows XP for starting off. Progress can be found [http://cia.vc/stats/author/mjmartin here].
+
=== USB Core Status ===
* '''2011-12-23''' - [[Johannes Anderwald]] has begun development of the HID drivers that will allow the use of USB mice. Development is tested against Windows XP in VirtualBox and progress can be tracked [http://cia.vc/stats/author/janderwald here].
+
* There are 2 USB specifications for the USB 1.1 standard. Devices which are used in this standard are mice, keyboards, etc.
 +
** OHCI (Open Host Controller Interface Standard) - All transfers types are implemented (bulk, iso, control, interrupt)
 +
** UHCI (Universal Host Controller Interface Standard) - Totaly missing. Though it should be do-able to use ohci driver as a base and use [http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/busses/usb/uhci.cpp Haiku driver]
 +
* EHCI (Enhanced Host Controller Interface) - Implemented transfer types: bulk & control. Interrupt & Isochronous transfers are not implemented. Due to the missing transfer types, devices who utilize those transfer types will not be available.
 +
* USBHUB - driver for managing port and hubs - Implementation state is unknown - michel martin has more information on that
  
== Outdated information ==
+
=== USB Mass Storage Support Status ===
See [http://www.reactos.org/wiki/index.php?title=USB_Stack&oldid=24303#Historical_.28outdated.29_information here].
+
USB Mass Storage is implemented in usbstor driver and is fully working. Tested in WinXP + USBEHCI + USBSTOR. Mass storage support requires bulk and control transfers, which are implemented in USBEHCI.
 +
 
 +
=== HID Status ===
 +
The HID framework is built on 5 drivers
 +
 
 +
* HIDUSB - this is the interface driver for the USB bus. Currently supported devices are mice. Basic keyboard support should also work currently.
 +
* HIDCLASS - this is the class driver for HIDUSB and others. Functionality for mice & keyboard is implemented, though support for sending output reports is not implemented.
 +
* MOUHID - mouse function driver for usb hid standard - Fully implemented and working.
 +
* KBDHID - keyboard function driver for the hid standard - 90% implemented, needs KbdHid_InsertScanCodes implemented for keyboard scan code dispatching to kbdclass and led status indicator support (which requires sending output reports).
 +
* HIDPARSE - driver for parsing report descriptors - functionality implemented for mice, keyboard support needs HidParser_TranslateUsage fully implemented for modifier state (caps lock, num lock, scroll lock).
 +
 
 +
=== What works and not ===
 +
* Mouse support has been tested in WinXP with ReactOS USBOHCI + HIDUSB + HIDCLASS + MOUHID + HIDPARSE and is working. The USB + HID stack does not work in ReactOS at the moment, appears to be a problem with win32k, which only opens the first mice (\\Device\\PointerClass0) [...]
 +
* Basic Keyboard support need a 2/3 functions but probably suffer from the same bugs which affect HID mice support.
 +
* USB Mass storage support - Needs mountmgr / partmgr driver implemented. Will also need mountvol and other missing PnP stuff.
  
 
== See Also ==
 
== See Also ==
Line 30: Line 48:
 
* [http://xenbits.xensource.com/ext/win-pvdrivers.hg XEN PV Usb Drivers]
 
* [http://xenbits.xensource.com/ext/win-pvdrivers.hg XEN PV Usb Drivers]
 
* [http://msdn.microsoft.com/en-us/library/ff537858.aspx Roadmap for Developing USB Drivers]
 
* [http://msdn.microsoft.com/en-us/library/ff537858.aspx Roadmap for Developing USB Drivers]
* Windows Driver Kit (Driver Development Kit).
+
* Windows Driver Kit (Driver Development Kit)
* various books and sites on the WDM model, to be expanded later.
 
 
* [http://www.microsoft.com/whdc/archive/usb2support.mspx?pf=true USB Driver Stack for Windows XP and later]
 
* [http://www.microsoft.com/whdc/archive/usb2support.mspx?pf=true USB Driver Stack for Windows XP and later]
 
* [http://msdn.microsoft.com/en-us/library/ff539301.aspx USB Device Stack for Windows XP and later]
 
* [http://msdn.microsoft.com/en-us/library/ff539301.aspx USB Device Stack for Windows XP and later]
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Revision as of 14:55, 8 January 2012

The USB stack is the component which provides the communication between USB devices and their respective drivers and applications. It consists of multiple files, each with a distinct function. The USB stack in ReactOS is currently extremely limited. This page documents the development of the new USB stack. Development work on a USB 3 stack is not planned at this time.

Overview

The goal is to develop a USB stack which:

  • is USB 1.1 - 2.0 compliant
  • uses WDM (NT 5) API
  • is compatible with all USB devices and drivers (which adhere to the standard)

The entire stack will be fully documented and the implementation progress detailed on this page.

Goals

  • Primary Goal: USB HID (human input devices) and storage functionality working (Alpha).
  • Secondary Goal: Audio and other support added.
  • Beyond: testing and debugging.

Due to the complexity and size, no release dates will be provided as of now.

Status

USB Core Status

  • There are 2 USB specifications for the USB 1.1 standard. Devices which are used in this standard are mice, keyboards, etc.
    • OHCI (Open Host Controller Interface Standard) - All transfers types are implemented (bulk, iso, control, interrupt)
    • UHCI (Universal Host Controller Interface Standard) - Totaly missing. Though it should be do-able to use ohci driver as a base and use Haiku driver
  • EHCI (Enhanced Host Controller Interface) - Implemented transfer types: bulk & control. Interrupt & Isochronous transfers are not implemented. Due to the missing transfer types, devices who utilize those transfer types will not be available.
  • USBHUB - driver for managing port and hubs - Implementation state is unknown - michel martin has more information on that

USB Mass Storage Support Status

USB Mass Storage is implemented in usbstor driver and is fully working. Tested in WinXP + USBEHCI + USBSTOR. Mass storage support requires bulk and control transfers, which are implemented in USBEHCI.

HID Status

The HID framework is built on 5 drivers

  • HIDUSB - this is the interface driver for the USB bus. Currently supported devices are mice. Basic keyboard support should also work currently.
  • HIDCLASS - this is the class driver for HIDUSB and others. Functionality for mice & keyboard is implemented, though support for sending output reports is not implemented.
  • MOUHID - mouse function driver for usb hid standard - Fully implemented and working.
  • KBDHID - keyboard function driver for the hid standard - 90% implemented, needs KbdHid_InsertScanCodes implemented for keyboard scan code dispatching to kbdclass and led status indicator support (which requires sending output reports).
  • HIDPARSE - driver for parsing report descriptors - functionality implemented for mice, keyboard support needs HidParser_TranslateUsage fully implemented for modifier state (caps lock, num lock, scroll lock).

What works and not

  • Mouse support has been tested in WinXP with ReactOS USBOHCI + HIDUSB + HIDCLASS + MOUHID + HIDPARSE and is working. The USB + HID stack does not work in ReactOS at the moment, appears to be a problem with win32k, which only opens the first mice (\\Device\\PointerClass0) [...]
  • Basic Keyboard support need a 2/3 functions but probably suffer from the same bugs which affect HID mice support.
  • USB Mass storage support - Needs mountmgr / partmgr driver implemented. Will also need mountvol and other missing PnP stuff.

See Also

USB Stack Template

References