Abstract:
An accessory device ( 12 ), such as a DVB-T receiver is operable as a USB host to a mobile telephone ( 11 ) to which it is connected via a USB bus ( 13 ). When acting as a host, the accessory device ( 12 ) provides a 4V supply voltage on V BUS  to the mobile telephone, which includes a regulator ( 18 ) regulating the voltage to 3.3 Volts. When a host device (PC) is also connected to the USB bus ( 13 ), the voltage on V BUS  rises, and this is detected by a comparator ( 21 ). In response, the accessory device ( 12 ) sends a USB reset command sends its USB lines tri-state, and ceases to supply V BUS , thereby relinquishing host status. Loss of the PC ( 10 ) is detected by detecting a low voltage on V BUS , following which the accessory device reassumes host status.

Description:
FIELD OF THE INVENTION  
       [0001]     This invention relates to a device operable as a USB host, and to a system including such a device. The invention relates also to a device operable as a host, to a system including such, and to a device operable as a USB host.  
       BACKGROUND TO THE INVENTION  
       [0002]     The USB (universal serial bus) standard is in wide use today, and is commonly used to connect, for example, PCs (personal computers) or laptop computers to peripheral devices such as printers, scanners and the like. The USB 1.1 and 2.0 specifications require that a host device provides a voltage supply on a V BUS  line, for use by a non-host device connected thereto. In USB, only one host and one non-host can ever be present on a USB bus, with the non-host being termed a ‘device’. However, in the following such devices are termed non-host devices.  
         [0003]     A supplement called USB on-the-go (OTG) is proposed, and is discussed at www.usb.org/developers/onthego. In USB OTG, some devices can act as hosts and non-host devices, and are termed dual-mode devices.  
         [0004]     In USB OTG, the power supply V BUS  need not be provided if the bus is not being used. A dual-mode device that wants to adopt host status can signal on the bus that host status is required using V BUS  pulsing, which is effective whether or not V BUS  is supplied with a voltage supply. A dual-mode host is not able to provide a voltage supply on V BUS , but by signalling can request a host device not having host status to provide a Voltage supply for use by the dual-mode device. The voltage supply is specified by the USB standard to be between 4.4 Volts and 5.25 Volts. PCs and laptops tend to provide V BUS  of at least 4.75 Volts. Mobile telephones and PDAs (personal digital assistants) will be non-host devices, not host or dual-mode devices, although it is anticipated that a subsequent generation of such devices could be dual-mode devices.  
       SUMMARY OF THE INVENTION  
       [0005]     According to a first aspect of the invention, there is provided a device operable as a host device and having a port connected to a bus, in which the device includes means for detecting the presence of another host connected to the bus and for relinquishing host status in response thereto.  
         [0006]     Such a device can operate as a host device on the bus, yet relinquishing host status when another host is detected allows the device to be used with host devices which are not specially adapted for use in multi-host systems. The device may be one specially designed for operation with devices operating according to the USB on-the-go standard.  
         [0007]     The device preferably includes a power supply for providing a supply voltage on a voltage supply line of the bus. Here, it is advantageous if the supplied voltage is less than a minimum allowed voltage for the voltage supply line of the bus.  
         [0008]     The detecting means can include means, such as a comparator, for detecting a change in voltage, preferably an increase, on a or the voltage supply line of the bus, thereby detecting the presence of the other host.  
         [0009]     Advantageously, the device is arranged for causing at least some lines of the port to be forced tri-state on detecting the presence of another host.  
         [0010]     Preferably the device includes first and second ports, which are preferably connected directly to the bus and thereby also directly to each other. This allows the connection of a non-host device (or a dual-mode device operating as a non-host device) to one port and the connection of a host device to the other port. When a host is detected, the device can act as a pass-through device but act as a host device otherwise. The device may include a digital video broadcast receiver, such as a DVB-T receiver. This feature provides pass-through capabilities. This is particularly convenient in the case of a USB device with USB ports since the device can therefore have pass-through USB capabilities.  
         [0011]     In one embodiment, the device is operable as a USB host and has at least one USB port connectable to a USB bus further, the presence detecting means being means for detecting the presence of another USB host. Here, the device preferably includes a power supply for providing a supply voltage on a V BUS  line of the USB bus, allowing it to supply power to a USB non-host device connected to the bus. Preferably the supply voltage is less than 4.4 Volts, which is the minimum required by the USB standard, which allows operation with USB non-host devices which do not rely on a USB power supply according to the standard. If the detecting means includes means for detecting a change in voltage on a or the V BUS  line of the USB bus, the presence of the other USB host can be detected in a simple manner, for example using a comparator. When another USB host is detected, the device advantageously causes at least some lines of the USB bus to be forced tri-state, i.e. presented with a high impedance. The impedance is likely to be at least one megaohm. This prevents the device interfering to an unacceptable degree with subsequent communications on the bus, with which the device is not an active participant. Sending a USB reset command via the USB bus in response to detecting the presence of another USB host is advantageous since it can cause a non-host device (or a dual-mode device acting as a non-host) on the bus to be reset ready for communication with the newly connected host device. The device preferably includes means for detecting the loss of the other host, and for reassuming host status in response thereto. The loss detecting means advantageously includes means for detecting a reduction in voltage on a or the V BUS  line of the USB bus, thereby detecting loss of the other host.  
         [0012]     Alternatively or in addition, a device operable as a USB host device includes first and second USB ports connected directly to each other and to a USB host module. The ports are likely in a practical implementation to be connected together by a USB bus, also connected to the USB host module. This is a particularly convenient arrangement which can allow connection to a USB non-host device (or a dual-mode device operating as a non-host device), whilst also allowing a USB host device to be connected to the non-host device via the device of the invention. Thus, the device of the invention does not need to be disconnected from the non-host device when it is required to connect a host device to the non-host device. This is seen to have particular application for use with portable non-host devices, particularly those operating according to the USB on-the-go standard.  
         [0013]     Any of the above devices can be a mobile telecommunications device comprising first and second USB ports each connected to a USB bus, and one of a) a USB non-host module and b) a USB dual-mode module connected to the USB bus. This can allow the attachment to one port of an accessory device having USB communication capabilities to communicate with the module and/or with a host device connected to the other port. Preferably, the module is able to communicate as a non-host with a host connected to either port.  
         [0014]     Preferably the device includes first and second USB ports, which are preferably connected directly to the USB bus and hereby also directly to each other. The device can therefore have pass-through USB capabilities. This allows the connection of a non-host device (or a dual-mode device operating as a non-host device) to one port and the connection of a host device to the other port. When a host is detected, the device can act as a pass-through device but act as a host device otherwise. The device may include a digital video broadcast receiver, such as a DVB-T receiver.  
         [0015]     The invention also provides a system including any of the above devices, and a host device connected to the port. Here, the system can comprise a non-host device connected to a or the second port of the device.  
         [0016]     According to a second aspect of the invention, there is provided method of operating a device operable as a host, the method comprising: detecting a change in voltage on a voltage supply line forming part of a bus; and relinquishing host status in response thereto.  
         [0017]     In the above, each port may include a male or a female connector. Each port is for allowing connection to an external device.  
         [0018]     The invention allows for a new class of device which is operable as a host device but which relinquishes host status, and preferably goes into a standby mode, on detecting the presence of another host. Preferably, the detection involves detecting a change in voltage on a supply line of a bus to which the port is connected. Providing the device with means to provide a voltage on the supply line which is less than the minimum allowed voltage on that line is advantageous since it can allow the detection of another host quite simply. On detecting the presence of another host, lines connected to the port are preferably forced tri-state, or high impedance, so the device does not interfere with the control of the bus by the other host.  
         [0019]     Preferably, the device sends a reset command before or at the same time as relinquishing host status. By monitoring the supply voltage line of the bus, the device can detect when the other host is lost, by disconnection or disablement for instance, and take steps to reassume host status. Detection can result from detecting a voltage drop, preferably below a threshold, which is preferably set lower than the minimum allowed voltage. In a preferred embodiment, the threshold is set at less the one half the minimum allowed voltage. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0020]     Embodiments of the invention will now be described, by way of example only, with reference to the accompanying drawings, in which:  
         [0021]      FIG. 1  is a schematic diagram of a system including three devices connected together by a USB bus, according to the invention;  
         [0022]      FIG. 2  is a circuit diagram of one embodiment of a comparator circuit used in the  FIG. 1  system; and  
         [0023]      FIGS. 3, 4  and  5  are schematic diagrams of alternative embodiments of the  FIG. 1  system. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0024]     Referring to  FIG. 1 , three devices  10 - 12  are shown connected to a USB bus  13 . A PC  10  includes a USB host module  14 , which is connected to D+, D− and ground lines thereafter termed ‘the other lines’  15  of the USB bus  13 , and a 5 Volt power supply  16 , which is connected to a supply voltage line V BUS  of the USB bus. The PC  10  is a conventional device, operating according to the USB standard without the OTG supplement. A mobile telephone (or alternatively a PDA) is also connected to the USB bus  13 . In particular, a USB non-host module  17  is connected to the other lines  15 , so that the mobile telephone  11  can communicate with another device connected to the USB bus  13 . The mobile telephone  11  also includes a regulator  18 , which is connected to V BUS . The regulator  18  is arranged to convert the voltage supply provided on V BUS  to a 3.3 Volt supply, which is suitable for use by the mobile telephone  11 . Any convenient form may be used for the regulator  18 .  
         [0025]     An accessory device  12  is also connected to the USB bus  13 . The accessory device  12  is not a non-host device not a dual-mode device; rather it is a host device which does not operate strictly according to the USB or the USB OTG standards. The accessory device  12  is intended for connection to mobile telephones, PDAs and the like which have USB ports but which do not require a voltage supply within the standard range of 4.4 to 5.25 Volts. In this example, the accessory device  12  is dedicated for use with such mobile telephones, PDAs etc, to the extent that it would not function properly if used with devices conforming to the full USB standard. The accessory device  12  may be for example a DVB-T (digital video broadcasting-terrestrial) receiver. Alternatively, it could be a GPS (global positioning system) module, an FM radio module, a camera module, a wireless LAN module, a Bluetooth™ module, or a receiver for any of the ISDB-T, ATSC and DAB systems, for example. It is a USB host device since it is intended for connection to mobile telephones and PDAs, which do not have host capabilities. The accessory device  12  includes a USB host module  19 , connected to the other lines  15  of the USB bus  13 , a 4 Volt power supply  20 , which is connected to V BUS , and a comparator  21 . The comparator  21  includes a first input connected to V BUS , a second input connected to a reference voltage V REF , and an output IRQ, which is connected to an interrupt input of the USB host module  19 . The power supply  20  may alternatively provide any suitable voltage, the range 3.6 to 4.2 volts being suitable for this example.  
         [0026]     The USB host module  19  has a control output CTRL connected to a control input of the power supply  20 , by which the USB host module can control whether the power supply provides a 4 Volt supply or presents a high impedance to V BUS .  
         [0027]     Operation may begin with the mobile telephone  11  connected to the accessory device  12  by the USB bus  13 , with the PC  10  being unconnected. In this state, the accessory device  12  provides a voltage supply on V BUS , which is used by the mobile telephone  11  after conversion to 3.3 Volts (for example) by the regulator  18 . Here, the accessory device  12  acts as a host to the non-host mobile telephone  11 , and communication between the two device occurs using the other lines  15  of the USB bus  13 . In this state, IRQ is inactive, so the USB host module  19  is not interrupted, and CTRL is active, causing the voltage supply  20  to provide 4 Volts to V BUS .  
         [0028]     When subsequently the PC  10  is connected to the USB bus  13 , the following occurs. As the PC  10  is connected, the voltage on V BUS  rises as a result of the voltage supply  16 . When the voltage on V BUS  exceeds a threshold of 4.2 Volts, this is detected by the comparator  21 , which sends IRQ active, to activate an interrupt. The USB host module  19  on detecting that IRQ has gone active takes a number of actions. Firstly, the USB host module  19  sends a reset command on the D +  and D −  lines  15 , which causes resetting of the USB non-host module  17  of the mobile telephone  11 . Secondly, the USB host module  19  causes the accessory device  12  to relinquish host status by going tri-state, that is by presenting a high impedance to each of the D +  and D −  lines  115 . The impedance is typically several megaohms, but is at least one megaohm. Lastly, the USB host module  19  sends CTRL inactive, in response to which the voltage supply  20  is controlled to cease providing a supply voltage for V BUS  and to tri-state, i.e. present a high impedance to V BUS . As a result, the PC  10  is able to assume host status with the mobile telephone  11  whilst the accessory device  12  waits in a standby mode.  
         [0029]     When the PC  10  is subsequently disconnected, because it is physically removed from the bus  10  or its USB host module  14  is switched off for example, the following occurs. As the voltage on V BUS  falls (neither voltage supply  16 ,  20  is supplying V BUS ), the comparator  21  in the accessory device  12  detects this by detecting when the level falls below a threshold of 1.3 Volts (for example). On such a detection, the comparator  21  sends IRQ inactive, which wakes the USB host module  19 , triggering it to reassume host status by sending CTRL active, causing the voltage supply  20  to supply V BUS  with 4 Volts, by removing the tri-state status of the D +  and D −  lines  15 . The accessory device  12  may then communicate with the mobile telephone  11  in the same way as occurred prior to the PC  10  being connected to the USB bus  13 . It may be desirable to arrange for a delay between detecting the low voltage condition and waking the USB host module  19 .  
         [0030]     A preferred form for the comparator  21  will now be described with reference to  FIG. 2 . Referring to  FIG. 2 , the comparator  21  is shown implemented using an LMV331, produced by National Semiconductor, which has an open-drain output. The values of resistors R 1  to R 6  are selected such that the rising voltage threshold is 4.2 Volts and the falling voltage threshold is 1.3 Volts. To obtain this, R 1  to R 5  can be IMΩ resistors, with feedback resistor R 6  being a 422 kΩ resistor. All resistors have a 1% tolerance. It will be appreciated that the falling voltage threshold is not so important as the rising voltage threshold, which is set taking into account the minimum voltage required for the regulator  18  to operate and the minimum voltage which could be supplied to V BUS  by the USB host PC  10 . Although the example above uses 4.2 Volts as the rising level threshold, the threshold could be anywhere in the range 3.8 to 4.4 Volts. The lower value depends on the voltage supplied by the voltage supply  20 .  
         [0031]     Referring now to  FIG. 3 , a mechanical arrangement for connection of the components of the  FIG. 1  system is shown. The mobile telephone  11  includes a USB port  30 , to which is connected a first and  31  of a first short USB cable  32 . The other end  33  of the first USB cable  32  is plugged into a first USB port  34  forming part of the accessory device  12 . Similarly, the PC  10  includes a USB port  35 , in which is plugged a first end  36  of a second, longer USB cable  37 . The other end  38  of the second cable  37  is plugged into a second USB port  39  of the accessory device  12 . In the accessory device  12 , connections of the first USB port  34  are connected by respective wires directly to corresponding connections of the second USB port  39 , allowing USB communication between the PC  10  and the mobile telephone  11  without involving the accessory device. In this example, the VBUS line is shown, and the other lines are grouped together as  40 . The comparator  21 , the voltage supply  20  and the USB host module  19  are connected to respective ones of VBUS and the other lines, as described above in relation to  FIG. 1 . Accordingly, when the PC  10  is not hosting the USB bus  13 , the accessory device  12  can detect this and assume host status. In this example, the USB ports  30 ,  34 ,  38  and  35  each include a female connector, and the cable ends  31 ,  33 ,  38  and  36  each include a male connector. To prevent current being fed along V BUS  towards the USB host  10 , one of the cable end  38  and the second USB port  34  might include a suitably arranged diode (not shown) or other arrangement having a similar effect.  
         [0032]     In an alternative arrangement (not shown), the first USB port  34  includes a male USB connector, which connects into the USB female connector  30  of the mobile telephone without the use of the first USB cable  32 .  
         [0033]     A cable-less arrangement is shown in  FIG. 4 . Referring to  FIG. 4 , a docking cradle  41  is provided at one end of the second USB cable, in place of the plug  38 . The docking cradle includes a male USB plug  42 , which mates with the second USB port  39  in the accessory device  12 . The first USB port  34  of the accessory  12  includes a male connector, which plugs into a USB port  30  of the mobile telephone. No USB cables are required in this embodiment. A diode (not shown) or other device is connected to disallow flow of current along V BUS  towards the USB host.  
         [0034]     A still further arrangement is shown in  FIG. 5 . Referring to  FIG. 5 , a mobile telephone  50  is provided with a connector to a battery pack  51 , including a battery cell (not shown). The battery pack  51  could be termed an extension module or a side module. As well as the connector including the usual battery terminal connectors  52 , it includes also a female USB connector  53 , which connects with a male USB connector  54  of the battery pack  51  when fitted to the mobile telephone  50 . A V BUS  line and other lines  55  are connected to the USB connector  53 , and to a USB non-host module  56  internal to the mobile telephone  50 . These lines are also connected directly to a USB female connector  57 , by which an external USB cable  58  having a male connector  59  can be connected to the USB non-host module  56 , allowing connection of a USB host, such as a PC (not shown). Although not shown, the battery pack  51  includes the same circuitry as the accessory devices  12  described in the above embodiments. A diode (not shown) or other device is included in the USB female connector  57  or the USB male connector  59 , to prevent current flowing towards the USB host. The battery pack  51  may include a DVB-T (digital video broadcasting-terrestrial) receiver (not shown) or the like, which communicates with the mobile telephone  51  using the USB bus  55 , V BUS .