Académique Documents
Professionnel Documents
Culture Documents
-1-
Figures Figure 1 Zero-CD State Machine....................................................................................................... 13 Figure 2 First-time Installation Flow Diagram .................................................................................. 14 Figure 3 Normal Usage Flow Diagram.............................................................................................. 15 Figure 4 Flashback Flow Diagram..................................................................................................... 16 Figure 5 - Going into ForceUMS Flow Diagram.................................................................................. 17 Figure 6 - Going out of ForceUMS Flow Diagram............................................................................... 18 Figure 7 Preferred Switch Method Flow Diagram............................................................................. 20
-2-
2 Revision History
Date 2007-06-12 2007-06-12 2007-06-18 Name Peter Sheeren Peter Sheeren Peter Sheeren Description Created. First draft. Updated according to the meeting of 2007-06-14. Added issues. Added state machine, based on picture by Jan Heylen. Added requirements for the USB descriptors of the three USB devices. Separated the rules for the USB devices as a bulleted list. Removed issue GtFlashSwitch. Added section interoperability. Added section installing and updating, with flow diagram preferred switch method. Renamed INQUIRY DATA to INQUIRY. This is the official SCSI command name. Relaxed the allowable values of the dCBWTag field in the CBW for the REZERO UNIT SCSI command. Relaxed the allowable values for the bcdUSB field in the USB device descriptors. Removed section Requirements. Removed section Work Required. Added section Features. Added section References. Added tables and figures to section Table Of Contents. Final v1.0. ForceUMS state added.
2007-06-21
Peter Sheeren
2007-07-02
Peter Sheeren
2007-07-06
Peter Sheeren
2008-09-25
Jurgen Schrijvers
-3-
3 References
1. Universal Serial Bus Specification Revision 2.0 April 27, 2000 2000 Compaq Computer Corporation, Hewlett-Packard Company, Intel Corporation, Lucent Technologies Inc, Microsoft Corporation, NEC Corporation, Koninklijke Philips Electronics N.V. http://www.usb.org/ 2. Universal Serial Bus Mass Storage Class Bulk-Only Transport September 31, 1999 1998-1999 USB Implementers Forum http://www.usb.org/
-4-
4 Introduction
This document describes a new Zero-CD concept for use with USB-based Option 3G devices. The new concept primarily focuses on Windows systems. It may be deployed on other operating systems as well. The Zero-CD concept applies to the USB function of the device only. For Option data-cards with an embedded USB host controller, the Zero-CD concept applies to the USB function connected to this controller.
-5-
5 Zero-CD Concept
5.1 Terminology
In the scope of the next sections, we use the following terminology:
Say Device UMS UMS device 3G device UMS driver 3G drivers 3G driver set 3G bus driver Clean system Installed system UMS USB ID 3G USB ID Meaning The Option device with Zero-CD support. USB mass storage. The Option device acting as a USB mass storage device. The Option device acting as a 3G device. The driver for a USB mass storage device, usually system-supplied. The driver set for the 3G device. These drivers are Option-supplied. The USB bus driver of the 3G driver set. This driver is loaded as the USB function driver on the USB device. A system in which the device hasnt run setup from the CD-ROM yet. A system in which the device has run setup from the CD-ROM successfully. Options generic USB ID for USB mass storage. Option product unique USB ID.
Table 1 Terminology
5.2 Features
The following is a list of features of the Zero-CD concept: Works on Windows 2000, Windows XP 32-bit, Windows XP 64-bit, Windows Vista 32-bit, and Windows Vista 64-bit. The device can be installable on multiple Windows systems. System stability and known behavior when the device switches from mass storage to 3G functionality. The switch during installation doesnt result in user-interactivity. Once the device is installed on a Windows system, it can be installed and used on another operating system. Once the device is installed on the system, it can be instructed to enumerate as a CD-ROM again in order to support auto-run of the CD-ROM image. This can be done in 2 ways : through Flashback and ForceUMS. The Zero-CD concept works on systems with limited user rights.
-6-
-7-
-8-
USB device Driver loaded Field DEVICE descriptor bLength bDescriptorType bcdUSB bDeviceClass bDeviceSubClass bDeviceProtocol bMaxPacketSize0 idVendor idProduct bcdDevice iManufacturer iProduct iSerialNumber bNumConfigurations CONFIGURATION descriptor bLength bDescriptorType wTotalLength bNumInterfaces bConfigurationValue iConfiguration bmAttributes bMaxPower INTERFACE descriptor #0 bLength bDescriptorType bInterfaceNumber bAlternateSetting bNumEndpoints bInterfaceClass bInterfaceSubClass bInterfaceProtocol iInterface STRING descriptors Index iManufacturer (if non-zero) Index iProduct (if non-zero) Index iSerialNumber (if non-zero) Index iConfiguration (if non-zero)
UMS device UMS USB ID UMS driver 12h 01h 0110h 0200h
UMS device 3G USB ID 3G UMS driver driver 12h 01h 0110h 0200h 00h 00h 00h
3G device 3G USB ID 3G driver 12h 01h 0110h 0200h FFh FFh FFh 40h
Notes White fields that are filled in with numerical values either mandated by the USB specification, or Options current settings. White fields left empty have dont influence the enumeration process. Indicator <string> means a UNICODE string stored in a USB string descriptor. The value of the bcdUSB field is discussed in section 9.6.1 of the Universal Serial Bus specification (see reference 1).
-9-
GtFlashSwitch isnt able to detect this vendor string; hence it wont switch the UMS device to the 3G device (see section 5.9.1).
Note: The xx markers represent the dCBWTag field. The value of this can be freely chosen. There is no need to implement the bulk-only transport mechanism as specified in the USB Mass Storage specification. The UMS device will accept the CBW right away and perform the switch to the 3G device.
- 10 -
This is not a permanent setting. The switch to UMS device with UMS USB ID only happens when this AT command is sent.
- 11 -
5.6 Mechanism
The next sections specify the various states and transitions of the Zero-CD mechanism. In the following subsections, the actual value of the 3G USB ID is specified as 0AF0h/<3G>. The <3G> value differs for the various Option products with Zero-CD support.
The USB device reports the 3G USB ID. The device exposes the UMS interface. The system loads the Microsoft UMS driver.
The USB device reports the 3G USB ID. The device exposes the UMS interface. The system loads the Option 3G bus driver and Option UMS driver.
The USB device reports the 3G USB ID. The device exposes the UMS interface. The system loads the Option 3G bus driver.
The USB device reports the 3G USB ID. The device exposes the USB 3G interface. The system loads the Option 3G bus driver.
The USB device reports the UMS USB ID. The device exposes the UMS interface. The system loads the Microsoft UMS driver.
- 12 -
The application sends the REZERO UNIT SCSI command. The UMS device re-plugs itself as 3G device.
Flashback: the application sends the AT_OMSIDSW command. The device re-plugs itself as UMS device. The system loads the UMS driver for the device and runs setup off the CD-ROM if auto-run is present.
ForceUMS flag is set : The 3G bus driver loads the Option UMS driver for the device and runs setup off the CD-ROM if auto-run is present.
USB ID: 0AF0h/<3G> Device: UMS Driver: 3G USB ID: 0AF0h/<3G> Device: UMS Driver: 3G The system loads the 3G bus driver for the UMS device. The user plugs the device in an installed system The system picks up CD-ROM auto-run and starts setup. The setup program installs software and updates the 3G USB ID to the 3G driver set. The system removed the UMS driver and loads the 3G bus driver. USB ID: 0AF0h/<3G> Device: UMS Driver: UMS (Microsoft)
* ForceUMS flag state : Registry key HKLM\SYSTEM\CCS\ Services\GTUHSBUS\ZeroCDForceUMS set to 0 or not existing : ForceUMS flag is not set set to 1 : ForceUMS flag is set
The system installs the Microsoft UMS driver and detects the CD-ROM in the UMS device.
- 13 -
The device is being installed for the first time on a clean system. The device is shipped with the 3G USB ID for the mass storage part.
Plug in device
USB ID: 0AF0h/<3G> Device: Mass Storage
When the user plugs in the device, it will report itself as a USB mass storage CD-ROM with 3G USB ID.
Driver loaded
Driver: Mass Storage
Windows installs the USB mass storage driver and creates a CD-ROM drive letter in the system. The driver letter is visible in the explorer.
Autorun App
Installs software Updates 3G USB ID to 3G driver set
Windows executes the auto-run setup application located on the CDROM. The setup application installs user-mode software. Then it updates the UMS driver to the 3G driver set.
Driver loaded
Driver: 3G
During the driver update, the UMS driver is unloaded and the 3G bus driver is loaded instead. See section Error! Reference source not found. for more information.
3G driver
Detects mass storage Switches USB device
The USB 3G bus driver detects the device exposes a USB mass storage interface. The driver sends the REZERO UNIT SCSI command to the device. The driver doesnt create any PDOs; rather it waits for the removal of the USB mass storage device. The USB mass storage device receives the REZERO UNIT SCSI command. It unplugs itself from the USB port so the 3G bus driver can go away. Then the device re-plugs itself as 3G device using the 3G USB ID. The system loads the 3G bus driver again. This time, the bus driver detects the device exposes a 3G interface, so it creates the PDOs. The device is now ready to use as a 3G device.
Device replugs
USB ID: 0AF0h/<3G> Device: 3G
Driver loaded
Driver: 3G
- 14 -
The user plugs in the device in an already installed system. This is normal usage of the 3G device.
The device exposes its USB interface as a UMS device. With 3G USB ID.
Since the setup has installed the 3G drivers for the 3G USB ID, the system will load the 3G bus driver.
Check ForceUMS flag HKLM\SYSTEM\CCS\ Services\GTUHSBUS\ ZeroCDForceUMS is set to 0 or does not exist
The USB 3G bus driver checks the ForceUMS flag state through the Registry key KLM\SYSTEM\CCS\ Services\GTUHSBUS\ZeroCDForceUMS. The key is set to 0 or does not exist, so theForceUMS flag is not set.
The driver sends the REZERO UNIT SCSI command to the device. The driver doesnt create any PDOs; rather it waits for the removal of the UMS device.
The UMS device receives the REZERO UNIT SCSI command. It unplugs itself from the USB port so the 3G bus driver can go away. Then the device re-plugs itself as 3G device using the 3G USB ID.
The system loads the 3G bus driver again. This time, the bus driver detects the device exposes a 3G interface, so it creates the PDOs. The device is now ready to use as a 3G device.
- 15 -
5.6.5 Flashback
Flashback System: Installed Device: 3G USB ID
When software writes a new CD-ROM image to the device, it needs to force the system to auto-run the new CD-ROM image on the device. This is called Flashback.
Device plugged in
USB ID: Device: 0AF0h/<3G> 3G
Driver loaded
Driver: 3G
Suppose the device is operational as a 3G device. The 3G driver set is loaded and all ports are available.
Flashback App
Sends AT_OMSIDSW
The software sends the AT_OMSIDSW command to re-plug the device as USB mass storage device with UMS USB ID.
Device replugs
USB ID: Device: 0AF0h/1000h Mass Stora ge
The device reports itself as a USB mass storage CD-ROM with UMS USB ID.
- 16 -
5.6.6 ForceUMS
An application sets the ForceUMS flag by setting the Registry key HKLM\SYSTEM\CCS\Services\ GTUHSBUS\ZeroCDForceUMS to 1.
The user (re)plugs in the device in order trigger the ForceUMS state check.
The device exposes its USB interface as a UMS device with 3G USB ID and the Option 3G bus driver gets loaded.
The Option 3G bus driver checks the ForceUMS flag state through the Registry key HKLM\SYSTEM\CCS\ Services\GTUHSBUS\ZeroCDForceUMS. The key is set to 1, so the ForceUMS flag is set.
The 3G bus driver and UMS driver from Option are loaded. The device appears as a CD-ROM.
- 17 -
The drivers are installed on the system. The Option 3G bus driver and Option UMS driver are installed and the device appears as a CDROM. An application clears the ForceUMS flag by setting the Registry key HKLM\SYSTEM\CCS\Services\ GTUHSBUS\ZeroCDForceUMS to 0.
The user (re)plugs in the device or the Option 3G bus driver gets reloaded in order trigger the ForceUMS state check.
The device exposes its USB interface as a UMS device with 3G USB ID and the Option 3G bus driver gets loaded.
The Option 3G bus driver checks the ForceUMS flag state through the Registry key HKLM\SYSTEM\CCS\ Services\GTUHSBUS\ZeroCDForceUMS. The key is set to 0, so the ForceUMS flag is not set.
The Option sends the REZERO UNIT SCSI command to the device. The driver doesnt create any PDOs; rather it waits for the removal of the UMS device.
The UMS device receives the REZERO UNIT SCSI command. It unplugs itself from the USB port so the 3G bus driver can go away. Then the device re-plugs itself as 3G device using the 3G USB ID.
The system loads the 3G bus driver again. This time, the bus driver detects the device exposes a 3G interface, so it creates the PDOs. The device is now ready to use as a 3G device.
- 18 -
4. In order to let the Option 3G bus driver check the ForceUMS flag, the following scenarios exist : - The device is (re)plugged into an installed system. - The Option 3G bus driver gets reloaded when the device is in the ForceUMS state.
- 19 -
Update the UMS driver to the 3G driver by calling the function UpdateDriverForPlugAndPlayDevices().
No
Check whether the UMS device is still present. If its gone, then the switch has taken place.
No
Check whether the UMS device is still present. If its gone, then the switch has taken place.
Send the REZERO UNIT SCSI command. The UMS device will switch to the 3G device.
Done
- 20 -
Stability: When the 3G bus driver switches the device from mass storage to 3G, the bus driver is surprise-removed and reloaded. Doing so is stable on all supported Windows platforms. Windows 2000: When the device is switched from CD-ROM to 3G, the system doesnt show a pop-up window. Thats because the 3G bus driver marks itself as safe for surprise-removal; hence the system doesnt complain when the device re-plugs itself. The switch from USB mass storage to 3G happens very quickly. The switch-time takes about half a second to two seconds, depending on the Windows version.
5.10.2
Cons
The Zero-CD concept is not entirely product-based; it may not work for multiple Option products that support Zero-CD. That is because the 3G driver set is installed when you plug in the first Option product. The 3G driver set supports many USB product IDs. When you plug in a second
- 21 -
5.11 Issues
5.11.1 Pop-up Message On Windows 2000
When the device is the UMS device with UMS USB ID, the controlling application (updater, installer, ) sends the REZERO UNIT SCSI command in order to switch back to 3G device. At this point, the UMS driver is surprise-removed and Windows 2000 will show a pop-up message. This happens because the usbstor.sys driver clears the safe-removal flag in its capabilities. Possible solutions: The controlling application kills the pop-up message. This may be language-dependent.
5.11.2
When a user plugs the 3G device in a system with an old 3G driver set installed that matches the devices 3G USB ID, the installed 3G bus driver wont send the REZERO UNIT SCSI command. It rather will fail the initialization so the properties window in the device manager will show error code 10. Possible solutions: Deliver a driver updater to affected users.
- 22 -