USOO8850O82B2

(12) United States Patent (10) Patent No.: US 8,850,082 B2 Malamant et al. (45) Date of Patent: Sep. 30, 2014

(54) VIRTUAL USB COMPOUND DEVICE 7,577,776 B2 8/2009 Hsueh ENUMERATION 2007/0088967 A1* 4/2007 Fu et al...... T13,340 2009, 0217304 A1 8, 2009 Shih et al. (75) Inventors: Igor Malamant, San Diego, CA (US); 2010, 0138564 A1 6, 2010 Lee et al. Thomas E. Virgil, San Diego, CA (US) FOREIGN PATENT DOCUMENTS (73) Assignee: Incorporated, San JP 2002185548 A 6, 2002 Diego, CA (US) JP 2008146419 A 6, 2008 JP 2010 140269. A 6, 2010 (*) Notice: Subject to any disclaimer, the term of this WO 2009 125586 A1 10, 2009 patent is extended or adjusted under 35 OTHER PUBLICATIONS U.S.C. 154(b) by 355 days. DON: “Universal Serial Bus system architecture”, 2001, pp. 80-83, (21) Appl. No.: 13/214,305 Adison Wesley, XP002662720, ISBN: 0201309750. International Search Report and Written Opinion—PCT/US2011/ (22) Filed: Aug. 22, 2011 049750 ISA/EPO Nov. 15, 2011. (65) Prior Publication Data * cited by examiner US 2012/0054378A1 Mar. 1, 2012 Primary Examiner — Zachary K Huson Related U.S. Application Data (74) Attorney, Agent, or Firm — Nicholas J. Pauley; Peter (60) Provisional application No. 61/378,159, filed on Aug. Michael Kamarchik; Joseph Agusta 30, 2010. (57) ABSTRACT (51) Int. Cl. A system for implementing a virtual Universal Serial Bus G06F 3/00 (2006.01) (USB) compound device with a simulated hub enables a G06F5/00 (2006.01) single physical USB device, such as a USB peripheral device, G6F 3/42 (2006.01) to expose multiple stand-alone functions on the USB bus. (52) U.S. Cl. Logical functions on the single physical USB device can be CPC ...... G06F 13/4295 (2013.01) added and removed dynamically without re-enumerating the USPC ...... 710/19, 710/10; 710/41 entire device and without affecting the state of other func (58) Field of Classification Search tions. Logical functions can also be independently imple None mented on any of a number of processors in a system that has See application file for complete search history. access to the USB hardware. Each processor can enumerate as one or more USB devices via the virtual hub. Initialization (56) References Cited of logical functions can be performed via the virtual USB hub to maintain a charging current level from a USB host in a U.S. PATENT DOCUMENTS device having a discharged battery. 6,862,643 B2 3, 2005 Wu et al. 6,976,105 B1 12/2005 Wright 23 Claims, 6 Drawing Sheets

-602

NMERA's AS

WITHE LOW CURRENT 2. REQUEST HIGH CURRENT FR THE SEN iS USC&NA.

88: ARGE BA RY iSigE JRRENEER TEJSS 2.

Six SAS CANET3 JS3 CS

ER&ESEC N SEFENCNA WIAEwBA JB U.S. Patent Sep. 30, 2014 Sheet 1 of 6 US 8,850,082 B2

-{{}}

U.S. Patent Sep. 30, 2014 Sheet 2 of 6 US 8,850,082 B2

${}?

U.S. Patent Sep. 30, 2014 Sheet 3 of 6 US 8,850,082 B2

F.G. 3 U.S. Patent Sep. 30, 2014 Sheet 4 of 6 US 8,850,082 B2

(S)

A.

U.S. Patent Sep. 30, 2014 Sheet 5 of 6 US 8,850,082 B2

52 initialize JSE (toiler

Aliocate hub endpoint resources in USB citrier

USS Disconnect Connect and enlinerate using HUB descriptors

Corrected State

NEification firr; Electricai Eyests Port-directed Status Port-directed request from coininzini JSB controit; (ii (in Physical ISB the host for the hist virtual port events port connect (Get PortStatus {Set Fort Feature, (coinect/discopieci. disco flect, CitearPortfeature Fenote wakeup suspend/resultae)

Respond with virtual port Request JSB Serai Status Request JSB SaS contries it Change contrailer to (connected eluiate otification to entiaie discontected corresponding JSE (St Over CGFTesponding Suspended actici (i. the interrupt acticis of ai etc.) virtual port endpoint virtual ports 5 Sz.

F.G. 5 U.S. Patent Sep. 30, 2014 Sheet 6 of 6 US 8,850,082 B2

ENMERAE AS WRA USB 3. WTH LCW CRRENT

REQUEST HGH CJRRENT FOR THE SEC{N} USB FUNCONALTY

(CHARGE BAERY USNG E - G CJRRENT LEVE FROM HE USS HOST

SEN PORT STAJS CHANGE USB H{OS

ENUMERAE SECON } USB FUNCTONALTY WA E WRA - B

F.G. 6 US 8,850,082 B2 1. 2 VIRTUAL USB COMPOUND DEVICE and reconnection of all logical interfaces, which can tear ENUMERATION down active application sessions in an unexpected manner. Opening and closing USB circuitry to allow re-enumera CROSS REFERENCE TO RELATED tion of USB functionality may also be problematic, for APPLICATION example, in the process of charging a dead battery of a USB peripheral device. According to the USB specification, a USB The present application claims the benefit of U.S. Provi peripheral device may draw up to 100 mA from a USB host sional Patent Application No. 61/378,159 to MALAMANTet before the USB peripheral device enumerates and may al. filed Aug. 30, 2010. request up to 500 mA from the USB host after the USB 10 peripheral device enumerates. However, a USB peripheral device may have to draw more than 100 mA to load its FIELD operating system. To recover from a discharged battery, a USB device may enumerate to a USB host early in a boot Aspects of the present disclosure relate generally to Uni loading process. The initial enumeration may occur before versal Serial Bus (USB) devices and more particularly to 15 loading the USB peripheral operating system and may use enumeration of a virtual USB device. only up to 100 mA of current. To further conserve power during a boot process with a BACKGROUND discharged battery, a USB peripheral device may initially enumerate as a simpler USB peripheral device, such as a USB Universal Serial Bus (USB) hosts such as USB host per human interface device (HID) Class device, for example. Sonal computers (PC hosts) are designed to enable plug-and After the initial enumeration of the USB peripheral device is play operation of a number of USB peripheral devices. That complete, the USB peripheral device may request up to 500 is, the USB peripheral devices are automatically configured mA from the USB host. The additional current may be used to for communicating with the USB host when they are physi finish loading the USB peripheral's operating system. Once cally connected to a USB port of the USB host. USB hosts 25 the operating system is loaded, the USB peripheral device may be capable of handling up to 127 USB peripheral devices will generally re-enumerate to represent its actual function and may provide mechanisms for dynamically loading and alities to the USB host as specified by the operating system. unloading drivers for each device attached on a USB bus. A re-enumeration may be performed by opening and clos Unlike USB hosts, USB peripheral devices are generally ing USB circuitry to simulate a reconnection of the USB unable to dynamically load and unload drivers for various 30 device as described above. However, the USB specification USB functionalities. Rather, the USB peripheral devices enu would then mandate reducing the charging current from merate a predefined static set of functions to the USB host around 500 mA to a pre-enumeration level of less than 100 when they are physically connected to the USB host. The set mA. Therefore, opening and closing the USB circuitry to of static functions generally may not be extended in run-time. re-enumerate the USB device functionally can not be per Certain newer USB peripheral devices may be capable of 35 formed in a USB compliant manner until the battery is suffi multiple USB functionalities. However, such devices may ciently charged. only have a limited ability to configure desired functionalities Simulating disconnection/reconnection of a USB periph due to the inability of USB peripheral devices to dynamically eral device may also cause other undesirable side effects. For load and unload USB drivers for the functionalities. example, the naming of hardware ports in certain operating Certain composite USB devices may allow multiple USB 40 systems may be automatically updated when the operating functions to enumerate to a USB host on a single USB port. system recognizes a physical disconnection/reconnection of a USB specifications describe certain methods for designing USB device. This may cause errors in processes that are Such composite devices by allowing the devices to enumerate accessing renamed ports. with multiple functions on a single USB port. USB specifications define a method of packaging multiple FIG. 1 shows a USB descriptor hierarchy 100 that can 45 USB devices within a single compound device package with represent multiple logical functions within a device in accor an embedded USB hub. An example of a compound device dance with USB specifications. At least three stages of USB including an embedded USB hub is described with reference enumeration may occur when a USB device is plugged in to to FIG. 2. A root hub 202 may be connected directly to a USB a host. A device descriptor 102 represents a USB enumeration host 204 and a number of USB devices 206 may be connected for a device. A number of configuration descriptors 104 rep 50 to the USB host 204 via the root hub 202. A number of resent USB enumeration for various configurations of the additional devices 208 may be connected to the root hub 202 device. A number of interface descriptors 106 may each rep via a number of additional USB hubs 210. Certain compound resent a USB enumeration for a corresponding one of the devices may include a USB hub 210 having one or more USB functionalities. A number of endpoint descriptors 108 connected USB devices 208. enumerate assignments for data channels to a particular inter 55 Connecting a USB device to a USB host via one or more face. The endpoint descriptors 108 allow a particular func USB hubs may solve some of the problems associated with tionality to access specific data channels in order to transfer recharging a USB device described above. Because the USB data back and forth to the USB host, for example. hub is a comparatively simple device, it may enumerate dur Because the descriptor hierarchy 100 shown in FIG. 1 is ing an initial boot loading process without a re-enumeration static, additional interfaces generally may not be added to the 60 step. After its initial enumeration, the USB hub can increase hierarchy unless a physical disconnection and reconnection its current draw from the USB host from less than 100 mA to of the device occurs or is simulated. Certain USB devices about 500 mA and may keep drawing 500 mA until the allow reconfiguration of a descriptor hierarchy 100 by inter battery is charged. The current draw of up to 500 mA may be nally opening and closing USB circuitry connecting the USB maintained even as devices are added and removed from the device to the USB host to simulate disconnection and recon 65 configuration via the USB hub. nection of the USB device from/to the USB host. However, Even though devices such as USB hubs may enumerate this method is often susceptible to errors due to disconnection multiple functions on a single USB port, Such functions are US 8,850,082 B2 3 4 statically defined and may not be changed in run-time. More ond USB functionality of the USB peripheral device via the over, USB host operating systems may have multiple speci virtual hub using the high current draw. fications or limitations that may restrict the USB hosts inter Aspects of the present disclosure also provide an apparatus actions with such composite USB devices. Proprietary including means for enumerating a Universal Serial Bus drivers may be developed for composite devices with these (USB) peripheral device as a virtual hub using a low current operating system limitations in which dedicated product draw from a USB host and means for requesting a high identifies (IDS) may be assigned for each possible combina current draw from the USB host while the USB peripheral tion of logical functions, for example. device is being enumerated as the virtual hub. The apparatus Efforts to provide dynamically configurable USB func also includes means for sending a port status change notifi tionality on USB peripheral devices have included imple 10 cation to the USB host, and means for enumerating a second menting composite drivers in the primary processor of the USB functionality of the USB peripheral device via the vir USB peripheral device. However, such composite drivers tual hub using the high current draw. have been inherently limited because they manage all com Aspects of the present disclosure also provide a computer binations of possible USB functionalities and assign a sepa product for wireless communication in a wireless network. rated product ID for each combination. Some implementa 15 The computer product includes a computer-readable medium tions define a product ID for a super set of functions known at with program code stored thereon. The program code the time of system design and enumerate with a Subset of the includes code for enumerating a Universal Serial Bus (USB) functions based on the specific scenario. In either case, add peripheral device as a virtual hub using a low current draw ing a new USB functionality is complex and involves re from a USB host and means for requesting a high current enumeration of all functions. draw from the USB host while the USB peripheral device is Dedicated USB hub chips have been added to USB periph being enumerated as the virtual hub. The program code fur eral devices for compound device implementation. Com ther includes program code to send a port status change noti pound USB hub devices that have one or more downstream fication to the USB host. The program code also includes ports exposed in addition to certain embedded USB functions code for enumerating a second USB functionality of the USB are also available in the market. One example of such a 25 peripheral device via the virtual hub using the high current compound device is shown in FIG. 3. The device 300 shown draw. in FIG.3 is an example of a USB compound hub with SD card Aspects of the present disclosure also provide an apparatus slots 302 and an embedded card reader function. USB com for wireless communication including a memory and at least pound devices can handle multiple independent functions one processor coupled to the memory. The processor(s) is/are hosted on different processors. However, USB compound 30 configured to enumerate a Universal Serial Bus (USB) devices involve extra cost and extra power consumption on peripheral device as a virtual hub using a low current draw independent physical USB interfaces to each processor. In from a USB host and to request a high current draw from the addition, each processor attached to the embedded USB hub USB host while the USB peripheral device is being enumer chip still has the same limitations as those of a stand alone ated as the virtual hub. The processor(s) is/are also configured USB device. 35 to send a port status change notification to the USB host and On certain multi-processor systems with a single USB port, to enumerate a second USB functionality of the USB periph Such as a micro-B port or a micro-AB port, for example, each eral device via the virtual hub using the high current draw. processor may expose certain USB functionality to the USB Additional features and advantages of the disclosure will bus. The multiple USB functionalities have been exposed by be described below. It should be appreciated by those skilled hosting the corresponding USB drivers on a single primary 40 in the art that this disclosure may be readily utilized as a basis processor. This may be inefficient because, for example, other for modifying or designing other structures for carrying out processors in the multi-processor Systems, i.e., secondary the same purposes of the present disclosure. It should also be processors, may be subject to an increased burden of addi realized by those skilled in the art that such equivalent con tional processing to communicate with USB hardware via a structions do not depart from the teachings of the disclosure primary processor. 45 as set forth in the appended claims. The novel features, which are believed to be characteristic of the disclosure, both as to its SUMMARY organization and method of operation, together with further objects and advantages, will be better understood from the According to aspects of the present disclosure, virtual USB following description when considered in connection with hub functionality can be invoked to allow a second device 50 the accompanying figures. It is to be expressly understood, functionality enumeration to occur without reducing the however, that each of the figures is provided for the purpose of charging current level. Invoking the virtual USB hub func illustration and description only and is not intended as a tionality can be performed by devices with low battery power definition of the limits of the present disclosure. so they may continue to draw high level current from a host for rapid recharging while at the same time enumerating a 55 BRIEF DESCRIPTION OF THE DRAWINGS second device functionality. The device performs an initial enumeration at a low current level as a virtual hub, requests a For a more complete understanding of the present teach higher current level for charging and then may maintain the ings, reference is now made to the following description taken high current level while enumerating the second functionality in conjunction with the accompanying drawings. via the virtual hub. 60 FIG. 1 is a block diagram conceptually illustrating a Uni Aspects of the present disclosure provide a method includ versal Serial Bus (USB) descriptor hierarchy according to the ing enumerating a Universal Serial Bus (USB) peripheral PRIOR ART. device as a virtual hub using a low current draw from a USB FIG. 2 is a block diagram conceptually illustrating a Uni host and requesting a high current draw from the USB host versal Serial Bus (USB) compound device configuration while the USB peripheral device is being enumerated as the 65 according to the PRIOR ART. virtual hub. The method further includes sending a port status FIG. 3 is an illustration of a Universal Serial Bus (USB) change notification to the USB host and enumerating a sec compound device according to the PRIOR ART. US 8,850,082 B2 5 6 FIG. 4 is a block diagram conceptually illustrating a Virtual level for charging and then may maintain the high current Universal Serial Bus (USB) hub according to an aspect of the level while enumerating the second functionality via the vir present disclosure. tual hub. FIG. 5 is a block diagram illustrating a Virtual Universal According to an aspect of the disclosure, the virtual USB Serial Bus (USB) hub process according to an aspect of the functionality may be optionally invoked by a device in present disclosure. response to determining the device has a discharged battery or FIG. 6 is a block diagram illustrating a process for charging a battery charge level below a predetermined threshold. If the a discharged battery of a Universal Serial Bus (USB) periph battery is not discharged below a predetermined level, the eral device using a Virtual USB hub according to an aspect of device may perform its initial enumeration directly without the present disclosure. 10 invoking a virtual hub functionality to reduce the total enu meration time. DETAILED DESCRIPTION A virtual hub architecture according to an illustrative embodiment of the present disclosure is described with ref Aspects of the present disclosure provide a system and erence to FIG. 4. Building blocks of the architecture include: method of combining multiple logical Universal Serial Bus 15 USB Function “A” (1) and USB Function “B” (7) are (USB) functional entities within a single device. According to logical USB functional software entities, such as “USB aspects of the present disclosure, a USB peripheral device Mass Storage driver” or “Dial-up Networking driver, Such as a Smart phone, for example, may expose multiple for example. USB functions to a USB host to access various systems of the USB Protocol (2), (5), and (8) are instances of a software host. Examples of Such systems include: implementation of a generic USB protocol that includes Mass storage systems that provide direct access to embed procedures for device enumeration, preparing various ded storage devices; USB descriptors, and handling USB transfers over con Multi-media Transfer Protocol (MTP) systems that enable trol/bulk/interrupt/isochronous endpoints. transfer of media files, including media protected by USB Device Controller Driver (3) and (9) are instances of Digital Rights Management (DRM) from a USB host to 25 a device driver that provides access to the USB device a peripheral and vice versa; controller hardware for managing low level procedures, Tethered networking systems that provide cellular network Such as allocating endpoint hardware resources, han connectivity to a laptop host; dling USB interrupts, initiating data receive/transmit Debug systems that enable phone diagnostic commands, procedures, etc. logging, console, etc.; and 30 The USB Virtual Hub Controller Driver (6) extends the Video systems that stream video from an embedded broad USB Device Controller Driver (3) and (9); adding an cast TV receiver. initial initialization of the USB Device Controller (12) Aspects of the present disclosure provide a system for hardware and managing hub-specific functionality, Such implementing a virtual compound device with a simulated as handling connect/disconnect requests from the USB hub. The system enables a single physical USB device, such 35 Resources Manager (10). as a USB peripheral device, for example, to expose multiple The USB Resources Manager (10) is a hardware block that stand-alone functions on the USB bus. According to aspects manages allocation of hardware endpoint resources for of the present disclosure, logical functions on the single every virtual device. It is also responsible for notifying physical USB device can be added and removed dynamically the USB Virtual Hub Controller Driver (6) when virtual without having to re-enumerate the entire device and without 40 devices are enabled or disabled and this enables the affecting the state of other functions. Logical functions can virtual hub to simulate port connect/disconnect events to also be independently implemented on any of a number of the USB host. processors in the system that has access to the USB hardware. The Protocol Engine (11) handles USB hardware logic, Each processor can enumerate as one or more USB devices including endpoint management, packet transfers, and via the virtual hub. Initialization of logical functions can be 45 interfacing with the software drivers via interrupts and deferred until a processor and its operating system are initial registers. ized or until the logical function itself is initialized. The USB Device Controller (12) encapsulates USB digital According to aspects of the present disclosure, by using a hardware blocks, excluding USB physical layer hard virtual hub, a system can enumerate as a USB hub upon Wa. power-up time, reset time or boot time and immediately com 50 The USB PHY (13) encapsulates all USB physical layer mence charging. A second device function enumeration can hardware blocks. be deferred until later in the operation of the system. A virtual hub device according to aspects of the present A reduction of charging current during re-enumeration is disclosure logically combines downstream ports and their specified by USB standards. According to aspects of the connections to device functions in a single system package present disclosure, virtual USB hub functionality can be 55 without exposing external downstream facing USB ports. invoked to allow the second device functionality enumeration The USB hardware controller, according to aspects of the to occur without reducing the charging current level present disclosure, simulates hub behavior rather than includ requested as part of the device's initial enumeration. The ing actual hub hardware in the design. Each one of the logical second device function enumeration may not be possible with functions, e.g. USB Function “A” or USB Function “B” on a reduced current level from the host when the device has low 60 either of the primary processor 402 or secondary processor battery power. Invoking the virtual USB hub functionality 404 can connect to the USB hardware 406 directly and according to aspects of the present disclosure can be per request resources as if it were a stand alone device. For formed by devices with low battery power to draw high level example, USB Function 'A' could be a mass storage function current from a host for rapid recharging while at the same and USB Function “B” could be some diagnostic capability. time enumerating a device functionality that may draw a high 65 Each one of the USB functions appears to the USB host as if current level. The device performs an initial enumeration at a it were a stand alone device connected to the USB host via a low current level as a virtual hub, requests a higher current USB hub. US 8,850,082 B2 7 8 According to aspects of the present disclosure, the second disconnect event or a Suspend/resume event, for example. In ary processor 404 may be a modem processor, for example, block 518, the virtual hub may respond to the electrical events and the primary processor 402 may be an application proces by requesting the USB controller to emulate corresponding sor, for example. Blocks 4,5 and 6 are the components related actions on all virtual ports. After any of these actions, the to the virtual hub driver. The Virtual hub driver 4 may be a 5 device returns to the connected state (block 510). software component that handles all of the hub specific A process for charging a discharged battery of a USB requests coming from the USB host. peripheral device using virtual hub functionality according to In the discharged battery case described above, aspects of an aspect of the disclosure is described with reference to FIG. the present disclosure may enable a hub functionality Such 6. The process executes in response to standard protocol that it will seem to the USB host that a hub was enabled. Later, 10 the virtual USB device may enable the operating system and commands. In block 602 the USB host enumerates a USB may enumerate actual functionalities, such as a storage func peripheral device as a virtual hub using a low current draw tionality, for example. According to this example, enumera from the USB host. The virtual USB hub enumerates with low tion of the storage functionality would seem to the USB host current (<100 mA), but in block 604 during the process of as if someone just plugged in a storage device behind the hub 15 enumeration, the virtual USB hub requests high current (500 on one of the hub ports. mA) to be granted following the enumeration. This provides According to aspects of the present disclosure, when a enough power to load the secondary USB function and enu specific logical entity such as USB Function 'A' is ready to merate it behind the USB bus. In block 606 the process enumerate, commands are sent to the USB device controller includes charging a discharged battery of the USB peripheral 12 to allocate endpoint resources and to request a connection. device with at least a portion of the high current draw. In block When it requests to connect, the hardware 406 raises an 608, the peripheral device sends a port status change to the interrupt to the virtual hub driver 4. In response to the inter USB host. In block 610, the process includes enumerating a rupt, the virtual hub driver 4 signals the USB host that it has second USB functionality of the USB peripheral device via Something new connected on one of its ports. This replaces the virtual hub. The battery charging in block 606 can start the physical handling of connection events with a logical 25 immediately after the virtual USB hub is enumerated and handling of connection events using an enhanced version of before loading the secondary USB function in block 608. the USB hardware. Aspects of the present disclosure allow decentralized man According to aspects of the present disclosure, multiple agement of USB functions and allow a USB host to operate CPUs may operate as though they are interacting with the using simple USB drivers. New logical entities on a USB USB controller. For example, when multiple CPUs want to 30 peripheral device may be easily combined with previous con allocate resources, they can do so in the same manner as in figurations. previous designs. When multiple CPUs want to connect, they may write certain registers requesting a connection as they According to standard USB architectures, each USB usually would. The logic of the virtual hub is hidden from the peripheral device may be assigned a particular address. When multiple CPUs in the protocol engine 11. The USB Resources 35 a device is first physically connected to a USB port of a USB Manager 10 handles the allocation of end point resources. host, USB host Software sends a command to assign a port Some of the hub logic may be implemented in the Virtual Hub address to that device. Each USB peripheral device has gen Driver 4. erally been associated with a single device address. Aspects A process for providing virtual hub functionality according of the present disclosure simulate a hub which can have to an aspect of the disclosure is described with reference to 40 multiple USB devices attached to it. A USB controller is FIG. 5. The process starts with initializing the USB controller redesigned to handle multiple USB device addresses by add in block 502 and allocating the endpoints for the hub itself in ing an additional level of “device address' to transaction block 504. Then in block 506, the virtual hub goes into a routing, for example. disconnected state until a USB cable is connected to the A USB 2.0 bus is a broadcast bus in which each message device, for example. After the USB cable is connected, the 45 that a USB host sends on the USB bus includes a device hub devices are enumerated using the appropriate hub address. The messages are generally communicated to all of descriptors in block 508. The device then transitions into a the USB peripheral devices connected to the USB bus. The connected state in block 510. In response to a USB discon USB hardware of a connected USB peripheral device looks at nect, the devices returns to the disconnected state (block 506) the device address included with each broadcast command to In the connected State, specific actions are taken in 50 determine whether the command is associated with its own response to corresponding events. The virtual hub may device address. The USB device can then process commands receive a port-directed status request from the USB host, for addressed to itself and ignore others. According to the present example. In block512, the virtual hub may respond to the host disclosure, the USB device hardware controller may compare by reporting status of the various ports. This response may the device address of a message with multiple different inform the host whether a port is connected, disconnected or 55 addresses that are associated with different logical entities. A Suspended, for example. The virtual hub may receive a port USB resource manager coordinates First In First Out (FIFO) directed command from the host, to set port features or clear allocation requests from multiple logical drivers associated port features, for example. In block 514, the virtual hub may with the multiple logical entities. A USB hub driver generates respond to the request by requesting the USB controller to connect/disconnect/remote-wakeup notifications to the host emulate a corresponding action on a corresponding virtual 60 based on requests from the logical functions. port. The virtual hub may receive a notification from the USB Aspects of the present disclosure decouple logical func controller regarding virtual port events, such as a connect/ tions so that USB devices do not have to accommodate every disconnect event or a remote wakeup event, for example. In possible permutation of functionality configurations. Logical block 516, the virtual hub may respond to the notification by functions can be independently loaded and unloaded in real sending a status change notification to the USB host over an 65 time without affecting other logical functions. This enables interrupt endpoint. The virtual hub may recognize certain simplified deployment of numerous applications to USB electrical events on the physical USB port, such as a connect/ devices such as , for example. Software appli US 8,850,082 B2 9 10 cations and functionality may therefore utilize a level of readable media encoded with a computer program. Com extendibility on a USB device that has previously only been puter-readable media includes physical computer storage available on a USB host. media. A storage medium may be any available medium that According to aspects of the present disclosure, multiple can be accessed by a computer. By way of example, and not logical functions may be hosted on different CPUs without limitation, Such computer-readable media can include RAM, using Inter-Process Communication (IPC). This enables a ROM, EEPROM, CD-ROM or other optical disk storage, high data rate on a USB peripheral device such as a USB magnetic disk storage or other magnetic storage devices, or modem, for example. Such high data rates may be used in any other medium that can be used to store desired program LTE devices, for example. code in the form of instructions or data structures and that can Certain device designs include a physical USB hub in the 10 device to enable both a modem and application processor to be accessed by a computer, disk and disc, as used herein, concurrently communicate with a USB host. This allows data includes compact disc (CD), laser disc, optical disc, digital sent at a high data rate by the modem processor to go directly versatile disc (DVD), floppy disk and blu-ray disc where to the USB hardware without first passing through an appli disks usually reproduce data magnetically, while discs repro cation processor. The virtual USB hub according to aspects of 15 duce data optically with lasers. Combinations of the above the present disclosure can reduce the cost size and power should also be included within the scope of computer-read consumption of a device. Such as an LTE modem, by simu able media. lating the USB hub with a combination of hardware and In addition to storage on computer readable medium, software. instructions and/or data may be provided as signals on trans FIG. 7 is a block diagram showing an exemplary wireless mission media included in a communication apparatus. For communication system 700 in which an aspect of the disclo example, a communication apparatus may include a trans Sure may be advantageously employed. For purposes of illus ceiver having signals indicative of instructions and data. The tration, FIG.7 shows three remote units 720,730, and 750 and instructions and data are configured to cause one or more two base stations 740. It will be recognized that wireless processors to implement the functions outlined in the claims. communication systems may have many more remote units 25 According to aspects of the present disclosure, apparatus and base stations. Remote units 720, 730, and 750 include IC may have means for enumerating a USB peripheral device as devices 725A, 725C and 725B that include the disclosed a virtual hub using a low current draw from a USB host, virtual USB compound device. It will be recognized that means for requesting a high current draw from the USB host, other devices may also include the disclosed virtual USB and means for enumerating a second USB functionality of the compound device. Such as the base stations, Switching 30 USB peripheral device via the virtual hub using the high devices, and network equipment. FIG. 7 shows forward link current draw. In one aspect, the aforementioned means may signals 780 from the base station 740 to the remote units 720, be the primary processor 402, secondary processor 404 and 730, and 750 and reverse link signals 790 from the remote the USB hardware 406 shown in FIG. 4, for example. In units 720, 730, and 750 to base stations 740. another aspect, the aforementioned means may be a module In FIG. 7, remote unit 720 is shown as a mobile telephone, 35 or any apparatus configured to perform the functions recited remote unit 730 is shown as a portable computer, and remote by the aforementioned means. unit 750 is shown as a fixed location remote unit in a wireless Those of skill would further appreciate that the various local loop system. For example, the remote units may be illustrative logical blocks, modules, circuits, and algorithm mobile phones, tablets, hand-held personal communication steps described in connection with the disclosure herein may systems (PCS) units, portable data units such as personal data 40 be implemented as electronic hardware, computer software, assistants, GPS enabled devices, navigation devices, set top or combinations of both. To clearly illustrate this interchange boxes, music players, video players, entertainment units, ability of hardware and software, various illustrative compo fixed location data units such as meter reading equipment, or nents, blocks, modules, circuits, and steps have been any other device that stores or retrieves data or computer described above generally in terms of their functionality. instructions, or any combination thereof. Although FIG. 7 45 Whether such functionality is implemented as hardware or illustrates remote units according to the teachings of the dis Software depends upon the particular application and design closure, the disclosure is not limited to these exemplary illus constraints imposed on the overall system. Skilled artisans trated units. Aspects of the disclosure may be suitably may implement the described functionality in varying ways employed in any device which includes a virtual USB com for each particular application, but such implementation deci pound device. 50 sions should not be interpreted as causing a departure from For a firmware and/or software implementation, the meth the scope of the present disclosure. odologies may be implemented with modules (e.g., proce The various illustrative logical blocks, modules, and cir dures, functions, and so on) that perform the functions cuits described in connection with the disclosure herein may described herein. Any machine-readable medium tangibly be implemented or performed with a general-purpose proces embodying instructions may be used in implementing the 55 Sor, a digital signal processor (DSP), an application specific methodologies described herein. For example, software integrated circuit (ASIC), a field programmable gate array codes may be stored in a memory and executed by a processor (FPGA) or other programmable logic device, discrete gate or unit. Memory may be implemented within the processor unit transistor logic, discrete hardware components, or any com or external to the processor unit. As used herein the term bination thereof designed to perform the functions described “memory” refers to any type of long term, short term, volatile, 60 herein. A general-purpose processor may be a microproces nonvolatile, or other memory and is not to be limited to any Sor, but in the alternative, the processor may be any conven particular type of memory or number of memories, or type of tional processor, controller, microcontroller, or state media upon which memory is stored. machine. A processor may also be implemented as a combi If implemented in firmware and/or software, the functions nation of computing devices, e.g., a combination of a DSP may be stored as one or more instructions or code on a 65 and a microprocessor, a plurality of microprocessors, one or computer-readable medium. Examples include computer more microprocessors in conjunction with a DSP core, or any readable media encoded with a data structure and computer other such configuration. US 8,850,082 B2 11 12 The steps of a method or algorithm described in connection processes, machines, manufacture, compositions of matter, with the disclosure herein may be embodied directly in hard means, methods, or steps, presently existing or later to be ware, in a software module executed by a processor, or in a developed that perform substantially the same function or combination of the two. A software module may reside in achieve Substantially the same result as the corresponding RAM memory, flash memory, ROM memory, EPROM embodiments described herein may be utilized according to memory, EEPROM memory, registers, hard disk, a remov the present disclosure. able disk, a CD-ROM, or any other form of storage medium The previous description of the disclosure is provided to known in the art. An exemplary storage medium is coupled to enable any person skilled in the art to make or use the disclo the processor Such that the processor can read information sure. Various modifications to the disclosure will be readily from, and write information to, the storage medium. In the 10 apparent to those skilled in the art, and the generic principles alternative, the storage medium may be integral to the pro defined herein may be applied to other variations without cessor. The processor and the storage medium may reside in departing from the spirit or scope of the disclosure. Thus, the an ASIC. The ASIC may reside in a user terminal. In the disclosure is not intended to be limited to the examples and alternative, the processor and the storage medium may reside designs described herein but is to be accorded the widest as discrete components in a user terminal. 15 Scope consistent with the principles and novel features dis In one or more exemplary designs, the functions described closed herein. Accordingly, the appended claims are intended may be implemented in hardware, Software, firmware, or any to include within their scope Such processes, machines, combination thereof. If implemented in software, the func manufacture, compositions of matter, means, methods, or tions may be stored on or transmitted over as one or more steps. instructions or code on a computer-readable medium. Com puter-readable media includes both computer storage media What is claimed is: and communication media including any medium that facili 1. A method comprising: tates transfer of a computer program from one place to enumerating a Universal Serial Bus (USB) peripheral another. A storage media may be any available media that can device as a virtual hub using a low current draw from a be accessed by a general purpose or special purpose com 25 USB host, the USB peripheral device not including a puter. By way of example, and not limitation, Such computer physical USB hub: readable media can comprise RAM, ROM, EEPROM, CD requesting a high current draw from the USB host, while ROM or other optical disk storage, magnetic disk storage or the USB peripheral device is being enumerated as the other magnetic storage devices, or any other medium that can virtual hub; be used to carry or store desired program code means in the 30 sending a status change notification to the USB host; and form of instructions or data structures and that can be enumerating a second USB functionality of the USB accessed by a general-purpose or special-purpose computer, peripheral device via the virtual hub using the high cur or a general-purpose or special-purpose processor. Also, any rent draw. connection is properly termed a computer-readable medium. 2. The method of claim 1, further comprising: For example, if the software is transmitted from a website, 35 charging an at least partially discharged battery of the USB server, or other remote source using a coaxial cable, fiber peripheral device with at least a portion of the high optic cable, twisted pair, digital subscriber line (DSL), or current draw. wireless technologies Such as infrared, radio, and microwave, 3. The method of claim 2, further comprising: then the coaxial cable, fiber optic cable, twisted pair, DSL, or identifying the at least partially discharged battery state of wireless technologies Such as infrared, radio, and microwave 40 the USB peripheral device; and are included in the definition of medium. Disk and disc, as performing the enumeration as the virtual hub in response used herein, includes compact disc (CD), laser disc, optical to detecting the at least partially discharged battery state. disc, digital versatile disc (DVD), floppy disk and blu-ray disc 4. The method of claim 2, further comprising: where disks usually reproduce data magnetically, while discs determining if the at least partially discharged battery of reproduce data optically with lasers. Combinations of the 45 the USB peripheral device is sufficiently charged to above should also be included within the scope of computer perform a boot routine of the second USB functionality readable media. with the low current draw from the USB host; and Although specific circuitry has been set forth, it will be performing the enumeration of the second USB function appreciated by those skilled in the art that not all of the ality directly to the USB host in response to determining disclosed circuitry is required to practice the disclosure. 50 the at least partially discharged battery is sufficiently Moreover, certain well known circuits have not been charged. described, to maintain focus on the disclosure. 5. The method of claim 1, further comprising: Although the present disclosure and its advantages have loading an operating system of the second USB function been described in detail, it should be understood that various ality using at least a portion of the high current draw. changes, Substitutions and alterations can be made herein 55 6. The method of claim 1, further comprising: without departing from the technology of the disclosure as receiving a USB interface communication from the second defined by the appended claims. For example, relational USB functionality; and terms, such as “above' and “below” are used with respect to simulating one of a port connection event and a port dis a substrate or electronic device. Of course, if the substrate or connection event to the USB host, in response to receiv electronic device is inverted, above becomes below, and vice 60 ing the USB interface communication. versa. Additionally, if oriented sideways, above and below 7. The method of claim 1, further comprising: may refer to sides of a substrate or electronic device. More integrating the USB peripheral device into at least one of a over, the scope of the present application is not intended to be , a set top box, a music player, a video limited to the particular embodiments of the process, player, an entertainment unit, a navigation device, a machine, manufacture, composition of matter, means, meth 65 computer, a hand-held personal communication systems ods and steps described in the specification. As one of ordi (PCS) unit, a portable data unit, and a fixed location data nary skill in the art will readily appreciate from the disclosure, unit. US 8,850,082 B2 13 14 8. An apparatus comprising: program code to receive a USB interface communication means for enumerating a Universal Serial Bus (USB) from the second USB functionality; and peripheral device as a virtual hub using a low current program code to simulate one of a port connection event draw from a USB host, the USB peripheral device not and a port disconnection event to the USB host, in including a physical USB hub: response to receiving the USB interface communication. means for requesting a high current draw from the USB 16. The computer program product of claim 10, integrated host, while the USB peripheral device is being enumer into at least one of a mobile phone, a set top box, a music ated as the virtual hub; player, a video player, an entertainment unit, a navigation means for sending a port status change notification to the device, a computer, a hand-held personal communication USB host; and 10 systems (PCS) unit, a portable data unit, and a fixed location means for enumerating a second USB functionality of the data unit. USB peripheral device via the virtual hub using the high 17. An apparatus for wireless communication, comprising: current draw. a memory; and 9. The apparatus of claim 8, integrated into at least one of at least one processor coupled to the memory, the at least a mobile phone, a set top box, a music player, a video player, 15 one processor being configured: an entertainment unit, a navigation device, a computer, a to enumerate a Universal Serial Bus (USB) peripheral hand-held personal communication systems (PCS) unit, a device as a virtual hub using a low current draw from portable data unit, and a fixed location data unit. a USB host, the USB peripheral device not including 10. A computer program product for wireless communica a physical USB hub: tions in a wireless network, comprising: to request a high current draw from the USB host, while a computer-readable medium having non-transitory pro the USB peripheral device is being enumerated as the gram code recorded thereon, the program code compris virtual hub; 1ng: to send a port status change notification to the USB host; program code to enumerate a Universal Serial Bus and (USB) peripheral device as a virtual hub using a low 25 to enumerate a second USB functionality of the USB current draw from a USB host, the USB peripheral peripheral device via the virtual hub using the high device not including a physical USB hub: current draw. program code to request a high current draw from the 18. The apparatus of claim 17, in which the at least one USB host, while the USB peripheral device is being processor is further configured enumerated as the virtual hub: 30 to charge an at least partially discharged battery of the USB program code to send a port status change notification to peripheral device with at least a portion of the high the USB host; and current draw. program code to enumerate a second USB functionality 19. The apparatus of claim 18, in which the at least one of the USB peripheral device via the virtual hub using processor is further configured: the high current draw. 35 to identify the at least partially discharged battery state of 11. The computer program product of claim 10, in which the USB peripheral device; and the program code further comprises: to perform the enumeration as the virtual hub in response to program code to charge an at least partially discharged detecting the at least partially discharged battery state. battery of the USB peripheral device with at least a 20. The apparatus of claim 18, in which the at least one portion of the high current draw. 40 processor is further configured: 12. The computer program product of claim 11, in which to determine if the at least partially discharged battery of the program code further comprises: the USB peripheral device is sufficiently charged to program code to identify the at east partially discharged perform a boot routine of the second USB functionality battery state of the USB peripheral device; and with the low current draw from the USB host; and program code to perform the enumeration as the virtual 45 to perform the enumeration of the second USB function hub in response to detecting the at least partially dis ality directly to the USB host in response to determining charged battery state. the at least partially discharged battery is sufficiently 13. The computer program product claim 11, in which the charged. program code further comprises: 21. The apparatus of claim 17, in which the at least one program code to determine if the at least partially dis 50 processor is further configured: charged battery of the USB peripheral device is suffi to load an operating system oldie second USB functional ciently charged to perform a boot routine of the second ity using at least a portion of the high current draw. USB functionality with the tow current draw from the 22. The apparatus of claim 17, in which the at least one USB host; and processor is further configured: program code to perform the enumeration of the second 55 to receive a USB interface communication from the second USB functionality directly to the USB host in response USB functionality; and to determining the at least partially discharged battery is to simulate one of a port connection event and a port sufficiently charged. disconnection event to the USB host, in response to 14. The computer program product of claim 10, in which receiving the USB interface communication. the program code further comprises: 60 23. The apparatus of claim 17, integrated into at least one of program code to load an operating system of the second a mobile phone, a set top box, a music player, a video player, USB functionality using at least a portion of the high an entertainment unit, a navigation device, a computer, a current draw. hand-held personal communication systems (PCS) unit, a 15. The computer program product of claim 10, in which portable data unit, and a fixed location data unit. the program code further comprises: ck k k k k