Data storage device with full access by all users

A peripheral device of a host computer includes a microcontroller and two virtual devices. The first virtual device passes, to the microcontroller, commands of a first command set from any user of the host computer and preferably also commands of a second command set from only privileged users of the host computer. The second virtual device passes, to the microcontroller, commands of the second set from any user of the host computer. In one physical implementation of the invention, the two virtual devices are implemented as separate physical devices, and the second device is connected to an interface to the host computer only if the user is not privileged. In another physical implementation of the invention, the two virtual devices are implemented in a common physical device, and a sector of a memory of the peripheral device is reserved for handling commands of the second set from non-privileged users.

FIELD AND BACKGROUND OF THE INVENTION

The present invention relates to a detachable storage device, and, more particularly, to a detachable USB storage device that can be accessed fully by a user of a host computer regardless of the user's access privileges.

A keychain storage device is a detachable module that provide a disk-like storage area on which a user of a host computer can save data, and a USB interface that enables the module to communicate with the host computer. The focus of the present invention is on the means and methods of communications between the storage device and the host computer.

Existing operating systems include support for Mass Storage Class (MSC) USB devices. These devices are meant to provide the user of the host computer with simple storage, much like a hard disk. Standard access to MSC devices can be performed using the host computer's operating system without the need for privileged operation (such as an administrator in Microsoft's Windows operating system). Any special operations not defined under the standard require the use of a private command interface, not available unless in administrator mode. Examples of such special commands include passing a password to a secure storage device and setting the USB device's clock.

For some types of peripheral media, the operating system automatically executes a predefined file stored on the medium when the operating system recognizes that the medium has been connected to the computer. For example, when a data CD is inserted into the CD drive of a Windows system, the operating system finds and executes a file on the CD called “autorun.inf”. With some operating systems, this feature is not available for simple removable storage devices, such as keychain storage devices.

These limitations of the operating system can be overcome by installing, in the host computer, a special device driver for the keychain storage device that allows any type of communications, and includes an automatic execution feature.

Such a device driver requires special development, and installation on all personal computers that the USB memory module is intended to be connected to. Because keychain storage devices are supposed to operate seamlessly on every computer the user works on, this is a major drawback. Furthermore, access of such a device driver also is limited by Windows to users with administrator privileges, for security. Administration privileges are usually not available to users. Even a manager who has administrator privileges in his/her own company is unlikely to be given such privileges in a venue outside that company such as an Internet café.

SUMMARY OF THE INVENTION

The present invention provides a method to enable driver-less operation of keychain storage devices with existing operating systems, while enabling automatic execution and private command interface.

A first object of the present invention is to overcome the need of the prior art for using administrator privileges for communicating with the keychain storage device in private commands.

A second object of the present invention is to provide a method for automatic execution of any user application, once the keychain storage device has been inserted into the host computer.

Therefore, according to the present invention there is provided a peripheral device, for use with a host computer, including: (a) a microcontroller for executing commands received from the host computer; (b) a first virtual device for passing to the microcontroller a first set of the commands received from any user of the host computer; and (c) a second virtual device for passing to the microcontroller a second set of the commands received from any user of the host computer.

In addition, according to the present invention, in a system including a host computer and a peripheral device operationally connected to the host computer, the peripheral device including a microcontroller, a memory having a plurality of sectors, and a first virtual device operative to pass to the microcontroller for execution a first set of commands if received from any user of the host computer and a second set of commands only if received from a privileged user of the host computer, there is provided a method for enabling any user of the host computer to have the commands of the second set executed by the microcontroller, including the steps of: (a) including, in the peripheral device, a second virtual device operative to pass to the microcontroller for execution the second set of commands if received from any user of the host computer; (b) operationally connecting the peripheral device to the host computer; (c) sending a command of the second set from the host computer to the peripheral device, by a user of the host computer; (d) if the user is a privileged user, sending the command of the second set to the microcontroller via the first virtual device; and (e) otherwise, sending the command of the second set to the microcontroller via the second virtual device.

There also is provided, according to the present invention, a peripheral device, for use with a host computer, including: (a) a microcontroller for executing commands received from the host computer; (b) a first virtual device for passing the commands from the host computer to the microcontroller; and (c) a second virtual device, separate from the first virtual device, that supports autorun when the host computer detects a presence of the second virtual device in the peripheral device.

A basic peripheral device of the present invention includes a microcontroller for executing commands received from a host computer, and two virtual devices. The first virtual device passes to the microcontroller commands of a first command set (e.g., data access commands if the peripheral device is a mass storage device) no matter what privilege level the user of the host computer has. Preferably, the first virtual device also passes to the microcontroller commands of a second command set (e.g., special commands if the peripheral device is a mass storage device) only if those commands are issued by a user who has special privileges, for example if the user is an administrator or a super-user. The second virtual device passes the commands of the second set to the microcontroller no matter what privilege level the user of the host computer has. Preferably, the second virtual device passes any command to the microcontroller from any user of the host computer. One way in which this is accomplished is by making the microcontroller operative to receive the command, from the second virtual device, formatted as a native command of the second virtual device and to re-interpret the native command as the intended command.

Preferably, the peripheral device also includes a third virtual device that supports autorun when an operational connection of the peripheral device to the host computer is initiated.

Preferably, the peripheral device also includes an interface such as a USB interface for effecting an operational connection of the peripheral device to the host computer. If the interface is a USB interface, then preferably the first virtual device is a USB mass storage interface.

Preferably, the interface effects a simultaneous operational connection of both virtual devices to the host computer, so that the host computer has the option of sending commands to the microcontroller via either virtual device without the interface having to reconfigure itself. For example, if the interface is a USB interface, this simultaneous availability of both virtual devices to the host computer is effected by making the two virtual devices operative to be enumerated together by the host computer. Alternatively, the interface effects an alternate operational connection of the virtual devices to the host computer: at any given time, the host computer can access the microcontroller via either the first virtual device or via the second virtual device but not via both. For example, if the interface is a USB interface, this alternate availability of the virtual devices to the host computer is effected by making the two virtual devices operative to be alternately enumerated by the host computer: either the first virtual device is enumerated, or the second virtual device is enumerated, but not both virtual devices together.

Most preferably, the first two virtual devices, and the third virtual device if present, are sub-interfaces of the interface.

In one preferred embodiment of the peripheral device of the present invention, the first and second virtual devices are implemented in separate respective first and second physical devices within the peripheral device. The peripheral device also includes an interface for effecting an operational connection of the peripheral device to the host computer, and preferably also a switch for reversibly operationally connecting the second physical device to the interface. If the interface is a USB interface then preferably the second physical device is a USB HID sub-interface of the interface. Most preferably, the HID device includes a mechanism, such as a plurality of virtual multi-level LEDs, for representing the commands of the second set to the microcontroller and a mechanism, such as a plurality of virtual user switches, for representing the results of the commands of the second set to the host computer, even if the commands of the second set are not, strictly speaking, among the commands that the HID device has been configured formally to receive from the host computer.

If the peripheral device also includes the third virtual device, then the third virtual device also is implemented in the first virtual device. If the interface is a USB interface then the first physical device preferably is a multi-LUN USB sub-interface of the overall interface.

In another preferred embodiment of the peripheral device of the present invention, the first and second physical devices are implemented in a common physical device. Preferably, the peripheral device also includes a memory that includes a plurality of sectors. The first command set includes write commands for writing data to respective designated sectors of the memory. To get the common physical device to pass commands of the second set to the microcontroller from non-privileged users, the users embed the commands as data in the write commands of the first set whose designated sector is a sector that is reserved for commands of the second set. The reserved sector may be reserved either statically or dynamically.

The peripheral device preferably includes an interface for effecting an operational connection of the peripheral device to the host computer. If the interface is a USB interface then preferably the common physical device is a multi-LUN USB sub-interface of the interface.

The method of the present invention is directed at more effective use of the combination of a host computer with a peripheral device that includes a microcontroller, a memory having a plurality of sectors, and a first virtual device. The first virtual device passes to the microcontroller, for execution, commands of a first command set no matter what privilege level the user of the host computer has. The first virtual device passes to the microcontroller, for execution, commands of a second command set only if those commands are issued by a user who has special privileges, for example if the user is an administrator or a super-user.

The basic method of the present invention enables any user to issue the commands of the second set and have those commands executed by the microprocessor of the peripheral device. The basic method of the present invention has four steps. In the first step, a second virtual device is included in the peripheral device. The second virtual device passes to the microcontroller, for execution, commands of the second command set no matter what privilege level the user of the host computer has. In the second step, the peripheral device is operationally connected to the host computer. In the third step, the user sends a command of the second command set to the peripheral device. In the fourth step, the command of the second command set is sent to the microcontroller for execution: by the first virtual device if the user has the appropriate special privileges, and otherwise by the second virtual device, whose activity is interpreted by the microcontroller as a command of the second set.

Preferably, the method of the present invention also includes the further initial step of including, in the peripheral device, a third virtual device that supports autorun when the peripheral device is operationally connected to the host computer in the second step. The autorun determines whether the user has special privileges and so does not need the second virtual device to pass the command of the second command set to the microprocessor.

In one preferred embodiment of the method of the present invention, the first and second virtual devices are implemented in separate respective first and second physical devices within the peripheral device. The method includes the further step of operationally connecting the second physical device to the host computer only if the user does not have the special privileges needed to send the command of the second set to the microprocessor via the first virtual device.

In another preferred embodiment of the present invention, the first and second virtual devices are implemented in a common physical device. The method includes the further step of configuring the common physical device to recognize commands of the first command set that have embedded within themselves commands of the second command set. The command of the second command set is sent to the peripheral device by embedding that command in a command of the first command set and sending that command of the first command set to the peripheral device. At the peripheral device, the common physical device extracts the command of the second command set from the command of the first command set. Preferably, the commands of the first command set, that are recognized by the common physical device as possibly having embedded within themselves commands of the second command set, are write commands for writing to a memory sector that is reserved for commands of the second set. The commands of the second set are embedded within the commands of the first set as data to be written to that reserved sector. The sector may be reserved either statically or dynamically.

Another basic peripheral device of the present invention includes a microcontroller for executing commands received from a host computer and two virtual devices. The first virtual device passes the commands to the microcontroller. The second virtual device is separate from the first virtual device and supports autorun when the host computer detects the presence of the second virtual device in the peripheral device.

Preferably, the peripheral device also includes an interface for effecting an operational connection of the peripheral device to the host computer, and the two virtual devices are sub-interfaces of the interface. More preferably, the interface is a USB interface. Most preferably, the first virtual device is a USB mass storage interface and the second virtual device is a USB CD sub-interface of the interface.

Preferably, the two virtual devices are implemented in a common physical device. Most preferably, the peripheral device also includes an interface for effecting an operational connection of the peripheral device to the host computer, and the common physical device is a multi-LUN USB sub-interface of the interface.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention is of a detachable storage device that can be accessed fully by any user of a host computer to which the storage device is attached. Specifically, the present invention can be used to allow a user who lacks administrator privileges to issue special commands to a Mass Storage Class USB device.

The principles and operation of a detachable storage device according to the present invention may be better understood with reference to the drawings and the accompanying description.

Referring now to the drawings,FIG. 1illustrates a prior art system related to the present invention, generally designated100. System100includes a personal computer (PC)110and a USB keychain storage device120, connectable for data exchanges through a USB connection141.

Keychain storage device120provides the user of PC110with the ability to store data in the device's non-volatile memory121and optionally with additional functions122, such as security functions, data compression or signal processing. Device120contains a micro controller123that manages functions122and memory121on one hand, and communications through a USB mass storage class (MSC) interface124on the other. The USB MSC interface124is defined by the USB standard for mass storage class devices. This definition allows any PC110to interface with the keychain storage device120via USB connection141, provided the PC110has a USB host interface113and that the operating system (OS)112of PC110contains support for USB MSC devices. If so, the user of PC110can use functions111of PC110in application programs to utilize the keychain storage device120, e.g. writing a file to device120, encrypting a file, reading a compressed file or recognizing a fingerprint stored on device120.

FIG. 2illustrates the command flow in USB keychain storage device120. USB MSC interface124includes a USB interface135comprised of a USB connector, cabling and a list of USB endpoints for communications, as defined by the USB standard. Keychain storage device120is identified by PC110as a USB mass storage client131. This client131can accept several command types: access commands132, private commands133and autorun134.

Access commands132are used to access data stored on keychain storage device120, much like a regular disk. Examples of such commands include “read disk sector”, “write disk sector” and “get disk size”.

Optional private commands133are used to implement any additional functions122that are not disk-like storage functions. These functions depend on the type of device120at hand. For example, a secure storage device120accepts private commands133to send a password, or switch between secure and non secure modes. A biometric key device120accepts private commands133to verify the user's fingerprint. A signal processing key device120accepts private commands133to encode and decode voice or video data.

Autorun134is an optional feature that allows automatic execution of an application on PC110when keychain storage device120is connected to PC110via USB connection141. If OS112recognizes autorun134for this class of device120, then when PC110recognizes the connection, PC110automatically reads certain data from keychain storage device120and executes the program described in this data. An example of such data is the file “autorun.inf” which describes which application should be executed on a data CD-ROM.

Operating systems112commonly limit the way mass storage class devices131can be accessed. For instance, in Windows, when the user of PC110does not have administrator privileges, s/he cannot send private commands133to USB mass storage client131.

Operating systems112commonly also limit the autorun134feature to specific device types. Most operating systems112, do not recognize an autorun feature in generic mass storage clients131.

To overcome these problems, prior art keychain storage devices120require the addition of another device driver to operating system112in order to use keychain storage device functions122such as private commands133and not just access commands132for managing memory121. This device driver has to be installed on every PC110that the keychain storage device120is connected to. If the device driver is not installed, only the simple storage121features of the keychain storage device120can be used. Of course this is a major drawback to the device driver solution. The present invention presents a different approach to solve this problem.

Reference is now made toFIG. 3, which illustrates a preferred embodiment150of the present invention. Compared to the prior art ofFIG. 2, the present invention as illustrated inFIG. 3is comprised of multiple virtual USB devices151,153and155used for the different types of commands discussed above: access commands132, optional private commands133and autorun134. The number of different devices used is specific to the application: other preferred embodiments of the present invention include only two such virtual devices, for example only virtual devices151and155as described below, or more than three such virtual devices.

Keychain storage device150includes, in addition to virtual USB devices151,153and155: a USB interface150, a microcontroller158, a nonvolatile memory159and built-in functions160. USB interface157is an interface for a compound USB device that includes devices151,153and155. USB virtual devices151,153and155are sub-interfaces of USB interface157. USB interface157communicates with PC110via USB communication link143. Device151is a USB mass storage client, similar to client131, that contains the data access interface of keychain storage device150. Functions111on the PC110using the disk-like storage features of the keychain storage device150reference this USB device151. Device153is a USB device that is used by the present invention for private commands154. This device153is a USB device of a type that is accessible from OS112even for non privileged users of PC110. Microcontroller158re-interprets the commands received by device153as private commands154. Device155is a USB device used to implement autorun feature156. This device155is a type of USB device for which OS112activates autorun feature156. An example of such a device is a USB CD device. Because virtual device155is separate from virtual device151, storage device150supports autorun even if OS112does not recognize an autorun feature in virtual device151. OS112recognizes both devices151and155in parallel and so is able to exploit all the functionality of both devices.

Micro controller158gathers the information from all the different USB virtual devices151,153and155and handles the received requests with memory159resource and with other built in functions160.

Keychain storage device150includes the three main features of the present invention—a disk-like data access152, a private command154interface accessible without any special privileges from the OS112and an autorun feature156.

FIGS. 4A and 4Billustrate two different physical implementations of keychain storage device150ofFIG. 3. Reference is now made toFIG. 4A, which schematically illustrates a physical implementation of USB keychain storage device150that uses the USB human interface device (HID) class to communicate private commands, and a USB CD device to perform the autorun feature. HID devices are always accessible even for non-administrators, because these devices are designed to interface with other devices, such as a keyboard, a mouse or a gamepad, that should always be accessible to any user, even to a user that lacks special privileges. The CD device driver in Windows includes an autorun feature. The idea behind this implementation is to implement the autorun feature of keychain storage device150using the CD autorun that is available from OS112, and to implement the non administrative mode private communications using the HID interface that is freely accessible for non privileged users.

Keychain storage device150ofFIG. 4Ais comprised of three separate USB virtual devices—a USB human interface device (HID)230, a USB CD device220and a USB storage device210. CD device220and storage device210both belong to the USB mass storage class definition and, in accordance with the USB standard, are grouped into a multi LUN storage device sub-interface201made up of CD device220and storage device210.

The interface for data access commands212in the implementation ofFIG. 4Ais via storage device210. The autorun221feature is available via CD device220. The private commands are available through two different interfaces, depending on the user's privileges on PC110.

In privileged (Administrator in Windows) mode, private commands are sent via USB storage device210using the USB storage device private command interface211which is available for privileged users. This USB storage class private command interface211is a method supplied by OS112to allow functions111to send any private data structures to disk-like devices. Keychain storage device150ofFIG. 4Auses this interface in the same way as prior art keychain storage devices120do.

In non privileged mode, the private commands are sent via USB HID interface230using the non privileged mode private command231. A switch202is used to enable HID device230only when needed by the user—i.e. when working in non privileged mode on PC110. Normally, a HID device, like a mass storage device, is configured to accept only a limited set of commands. Therefore, to use HID device230to communicate private commands231to keychain storage device150ofFIG. 4A, PC110formats private commands231in a form acceptable to HID device230, and microcontroller158interprets the commands received by HID device230accordingly as private commands231. For example, in one preferred embodiment of the present invention, HID device230is defined as containing a number of virtual multi-level LEDs (8 bits for each LED), and a number of virtual user switches. HID device230also is defined as responsive to a set of native commands for turning the LEDs on and off and for returning to PC110the settings of the user switches. The LEDs function as an information channel from PC110to pass private commands231simply by writing the data bytes of the command to the 8-bit LEDs. The switches function as a method for PC110to read back results from private command231. This is achieved because micro controller158can encode the bytes of the reply using those switches, much as private commands231themselves are encoded using the 8-bit LEDs. Note that this mechanism can be used for sending any command to keychain storage device150ofFIG. 4A. Because storage device210is available for sending data access commands to keychain storage device150ofFIG. 4A, the emphasis herein is on the use of HID device230for sending private commands to keychain storage device150ofFIG. 4A.

User functions111of PC110should signal keychain storage device150ofFIG. 4Athat the HID interface is needed when working in non-administrative mode. This can be done by sending commands to USB CD device220. For instance, sending a unique sequence of alternating eject and load commands to the USB CD device220closes switch202. Then PC110is asked to enumerate USB device150again. After the re-enumeration, HID device230is recognized by the system and any further private commands231are sent to keychain storage device150ofFIG. 4Avia HID interface230. Optionally, multi-LUN storage device sub-interface201does not respond to the re-enumeration, so that PC110now treats keychain storage device150as including only HID device230. Under this option, special private commands231to HID device230must be defined so that user functions111can command keychain storage device150to open switch202and re-activate sub-interface201for another re-enumeration.

Reference is now made toFIG. 4B, which illustrates an alternative physical implementation of keychain storage device150ofFIG. 3. The implementation ofFIG. 4Buses a single multi LUN USB storage device sub-interface201to provide all three features—storage data access152, private commands154and autorun156. Multi LUN storage device sub-interface201is comprised of a USB CD device220′ and a USB storage device210′.

In the implementation ofFIG. 4B, the autorun is implemented by using a virtual USB CD device220′ that implements autorun221. This is done in the same manner as described for the implementation ofFIG. 4A.

USB storage device210′ handles the data access commands212. USB storage device210′ also provides an interface211for privileged (administrator) users to communicate private commands. Again, this is done in the same manner as described for the implementation inFIG. 4A. Non-privileged users communicate private commands by packaging these commands inside data access commands212.

A data access command212has three parts: a destination address, a transaction type and data. The destination address is a disk sector address, made up of head, cylinder and sector addresses. The destination address uniquely identifies one sector on disk drives. This address is translated by micro controller158to an address in memory159. The transaction type is either a write operation, or a read operation, corresponding to data transfer from PC110to keychain storage device150or from keychain storage device150to PC110. The data part is the data transferred in the transaction. The data can be transferred either from PC110to keychain storage device150or from keychain storage device150to PC110, depending on the transaction type.

The non-administrative mode private commands213in the implementation ofFIG. 4Bare communicated via USB storage device210′ using data access commands212to specific disk sectors. Micro controller158receives the access request from the USB storage device210interface, and if the requested access is identified as belonging to a location (e.g. disk sector) specified as a private command location, the data part of the command is processed by micro controller158. Otherwise the access is treated as a normal data access212and the data are transferred to or from the storage159. To implement private commands from PC110to keychain storage device150ofFIG. 4B, write transactions are used. To read results back from keychain storage device150ofFIG. 4B, read operations are used by PC110.

A disk sector allocated for private command communications213in non administrative mode must be accessible to non privileged users on PC110. Non privileged users cannot perform direct access to disk sectors, but can only access the storage device150through the file system of the OS112. Hence the special communication sector used for private commands213must be mapped to a file on the file system inside the USB storage device210. This can be achieved in one of two ways.

The first way uses a statically reserved sector. When USB storage device210′ is formatted, a file in the device's file system is created that is stored in a known disk sector. Micro controller158parses all disk accesses212to look for access to that sector. When such access is detected by micro controller158, action is taken according to the transaction type. If the transaction is a write transaction, then the data in the transaction are parsed as a private command213. If the transaction is a read transaction then micro controller158returns the requested data in the data field of the data access212, thus replying to PC110with a private command213. Because the reserved sector belongs to a file, the reserved sector is marked as “used” in the file system, and OS112does not try to use that sector for any other file.

The second way uses a dynamically reserved sector. A certain sector is dynamically marked as accessible by data access commands212as a sector used for private commands213. When the transaction is finished the dynamically marked sector is freed. To create a private command channel213, functions111on PC110create a new file on USB storage device210′ and write certain initialization data to that file. Keychain storage device150ofFIG. 4Breceives this information via the data access commands212of USB storage device210′. Micro controller158parses the data in the commands, and finds the unique initialization data in the data field. Micro controller158then marks the dynamically reserved sector as a communication sector for private commands213. Any further access is parsed as a private command213, just as in the use of a statically reserved sector. Functions111of PC110can now access the reserved sector again by overwriting, with private command data, the special file that PC110created. To terminate the use of this file, a private command213notifying termination of communications is sent, and micro controller158stops monitoring access to the reserved sector.

FIGS. 5A and 5Bare flowcharts of typical operation of the implementation options illustrated inFIGS. 4A and 4B, respectively. Reference is now made toFIG. 5Athat presents the mode of operation of a keychain storage device150ofFIG. 4A. The procedure starts at step401in which keychain storage device150and PC110are separate. In step402keychain storage device150is attached to PC110and is identified as a multi LUN storage device201containing a USB CD device220and a USB storage device210. In step403the autorun application is executed from USB CD device220. On Windows platforms, that means reading the file “autorun.inf” from USB CD device220and executing the application listed in that file. In step404the automatically executed application (or any other function111) checks whether the user of PC110has administrator rights. In case the user doesn't have administrator rights, the flow turns to step405, in which the PC110application signals keychain storage device150to turn on HID interface230by closing switch202. After switch202has been closed, keychain storage device150logically disconnects itself from PC110and reconnects itself with HID device230active. PC110enumerates USB interface157and finds a USB HID device230and a multi LUN storage device201comprised of a USB CD device220and a USB storage device210. In step406HID interface230for private commands231is used to send some initialization private commands to keychain storage device150. For example, a private command would be used to send a password to a keychain storage device150that is password-protected. In step407functions111of PC110decide to send some commands to keychain storage device150. In step408functions111check if they should send a private command231or a data access command212to keychain storage device150. If a data access command212is required, the command is sent to USB storage device210in step410. If a private command231is required, the command is sent to HID device230in step409. After transmission of the command the flow returns to step407for any further commands needed. Going back to step404, if the user is an administrator on PC110the flow continues to step411in which a private command211is sent via the USB mass storage class private command interface211. In step412functions111on PC110decide to send some commands to keychain storage device150. In step413functions111check if they should send a private command211or a data access command212to keychain storage device150. If a data access command212is required, the command is sent to USB storage device210in step415. If a private command211is required, the command is send to USB storage device210in step414. After transmission of the command, the flow returns to step412for any further commands needed.

A bug in the Windows operating system presently prevents even a user having administrator privileges from sending both data access commands and private commands to a keychain storage device150with the physical implementation illustrated inFIG. 4A. Pending the fixing of this bug, even a user with administrator privileges must use the “NON-ADMIN” branch ofFIG. 5A. In a corresponding, less preferred embodiment of the present invention, USB storage device210lacks private command interface211and includes only data access command interface212. This bug also prevents PC110from enumerating both multi-LUN sub-interface201and HID sub-interface230together, so the option described above of inactivating multi-LUN sub-interface201while HID sub-interface230is active must be used.

Reference is now made toFIG. 5B. Only the differences fromFIG. 5Awill be described. In step404, if the user does not have administrative rights on PC110, the flow turns to step505. In step505the private command interface213is initialized. If the implementation contains a special file used for communicating private commands213, this file is opened in this stage. If the implementation contains a dynamic sector allocation for private commands213, the file for the sector is created and associated with private command interface213by writing the unique initialization sequence to the new file, and then rewinding the file pointer. In step506private commands are sent to command file interface213. The flow continues as inFIG. 5Auntil step408. If a private command is required, this command is sent in step509via the special file interface213.

As noted above, the scope of the present invention also includes a peripheral storage device with a virtual USB device such virtual USB device151for accepting data access commands (and also for accepting private commands from a privileged user) and a separate virtual USB device such as virtual USB device155for supporting autorun, but without a virtual USB device such as virtual USB device153for accepting private commands from any user. If USB HID device230and switch202are deleted fromFIG. 4A, thenFIG. 4Aillustrates a physical implementation of one such device.