Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
DISCONNECTION DETECTION OF ELECTRONIC DEVICES
Document Type and Number:
WIPO Patent Application WO/2008/146073
Kind Code:
A1
Abstract:
The present invention provides a method comprising connecting an electronic device having a power source with a second electronic device via a wired interface comprising a first data line and a voltage line, turning off power provided to said voltage line, monitoring the voltage level of said first data line, and determining that said second electronic device has been disconnected if a change from high level to low level is detected. A second method is provided comprising connecting an electronic device with a first electronic device via a wired interface comprising a second data line and a voltage line, connecting a second pull -down resistor with said second data line, monitoring said voltage line, disconnecting said second pull -down resistor from said second data line and connecting a second pull-up resistor with said second data line if power provided on said voltage line is turned off, monitoring a voltage level of said second data line, and determining that said first electronic device has been disconnected if a change from low level to high level is detected.

Inventors:
LUECK DANIELA (DE)
HUBO MICHAEL (DE)
BENCAK DANIEL (DE)
Application Number:
PCT/IB2007/001439
Publication Date:
December 04, 2008
Filing Date:
June 01, 2007
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
NOKIA CORP (FI)
LUECK DANIELA (DE)
HUBO MICHAEL (DE)
BENCAK DANIEL (DE)
International Classes:
G06F13/38; G06F1/26; G06F1/32
Foreign References:
US20060075152A12006-04-06
US20060076977A12006-04-13
Other References:
"Universal Serial Bus Micro-USB Cables and Connectors Specification", 4 April 2007 (2007-04-04), XP003022733, Retrieved from the Internet
"On-The-Go Supplement to the Usb 2.0 Specification", 5 December 2006 (2006-12-05), XP003022734, Retrieved from the Internet
Attorney, Agent or Firm:
KURIG, Thomas (Kurig Strau, Bavariastrasse 7 München, DE)
Download PDF:
Claims:

Claims

1. Method, comprising: connecting an electronic device having a power source with a second electronic device via a wired interface comprising a first data line and a voltage line; turning off power provided to said voltage line; monitoring the voltage level of said first data line; and determining that said second electronic device has been disconnected if a change from high level to low level is detected.

2. Method according to claim 1, further comprising: turning on power provided to said voltage line after said second electronic device has been disconnected.

3. Method according to claim 1, further comprising: providing a notification that said second electronic device has been disconnected; and turning on power provided to said voltage line; immediately after disconnection or when a timeout after disconnection of said second device is reached.

4. Method according to claim 1 , further comprising: detecting if a third electronic device is connected with said electronic device after said second electronic device has been disconnected; and - turning on power provided to said voltage line when a third electronic device is connected.

5. Method according to claim 4, wherein: detecting if a third electronic device is connected comprises monitoring an identification line of said wired interface; and turning on power is performed when said identification line changes from

floating to grounded state.

6. Method according to anyone of claims 1 to 5, comprising: monitoring an identification line of said wired interface; - determining that said second electronic device has been disconnected from a connection cable connecting it with said electronic device if a change from high level to low level on said first data line is detected and said identification line remains grounded.

7. Method according to anyone of claims 1 to 5, comprising: monitoring an identification line of said wired interface; and determining that said cable has been disconnected from said electronic device if a change from high level to low level on said first data line is detected and said identification line changes from grounded to floating state.

8. Method according to claim 6, further comprising: providing a corresponding notification if said second electronic device has been disconnected from said cable.

9. Method according to claim 7, further comprising: providing a corresponding notification if said cable has been disconnected from said electronic device.

10. Method, comprising: - connecting an electronic device with a first electronic device via a wired interface comprising a second data line and a voltage line; connecting a second pull-down resistor with said second data line; monitoring said voltage line; disconnecting said second pull-down resistor from said second data line and connecting a second pull-up resistor with said second data line if power provided on said voltage line is turned off;

monitoring a voltage level of said second data line; and determining that said first electronic device lias been disconnected if a change from low level to high level is detected.

11. Method according to claim 10, further comprising: providing a corresponding notification if said first electronic device has been disconnected.

12. Method according to claim 10 or 11, further comprising: - disconnecting said second pull-up resistor from said second data line and connecting said second pull-down resistor with said second data line, responsive to said disconnection.

13. Computer program product comprising program code means for carrying out the method of anyone of claims 1 to 12 when said program product is run on an electronic device.

14. Computer program product comprising program code means stored on a computer- readable medium for carrying out the method of anyone of claims 1 to 12 when said program product is run on an electronic device.

15. Electronic device, comprising: a wired interface, comprising a first data line; - a voltage line; and a first pull-down resistor connected with said first data line; a power source for providing power to said voltage line; a controller adapted for turning off power provided to said voltage line when a second electronic device is connected via said wired interface, for monitoring a voltage level of said first data line, and for determining that said second electronic device has been disconnected if a change from high level to low level is detected.

Th

16. Device according to claim 15, wherein said controller is further adapted for turning on power provided to said voltage line when said second electronic device has been disconnected.

17. Device according to claim 15 or 16, further comprising: a notification component; wherein said controller is further adapted for providing a corresponding notification if said second electronic device has been disconnected, via said notification component.

18. Device according to claim 17, further comprising: a timer; wherein said controller is further adapted for starting said timer when said second electronic device has been disconnected, and for providing said notification and turning on power provided to said voltage line when said timer reaches a timeout.

19. Device according to anyone of claims 15 to 19, wherein said controller is further adapted for detecting if a third electronic device is connected with said electronic device after said second electronic device has been disconnected, and for turning on power provided to said voltage line when a third electronic device is connected.

20. Device according to claim 19, wherein said wired interface comprises an identification line; and said controller is adapted for monitoring said identification line, and for turning on power when said identification line changes from floating to grounded state.

21. Device according to anyone of claims 15 to 20, wherein said wired interface comprises an identification line; said controller is further adapted for monitoring said identification line, and for determining that said second electronic device has been disconnected from a cable connecting said electronic device and said second electronic device if a change from

high level to low level on said first data line is detected and said identification line remains grounded.

22. Device according to anyone of claims 15 to 21, wherein - said wired interface comprises an identification line; said controller is further adapted for monitoring said identification line, and for determining that said cable connecting said device and said second electronic device has been disconnected from said electronic device if a change from high level to low level on said first data line is detected and said identification line changes from grounded to floating state.

23. Device according to claim 21, comprising: a notification component; wherein said controller is further adapted for providing a corresponding notification if said second electronic device has been disconnected from said cable.

24. Device according to claim 22 or 23, comprising: a notification component; wherein said controller is further adapted for providing a corresponding notification if said cable has been disconnected from said electronic device.

25. Device according to claim 17, 18, 23 or 24, wherein said notification component comprises: a loudspeaker; - a headset; a vibration alarm; a light emitter; or a display.

26. Device according to anyone of claims 15 to 25, wherein said electronic device is a Universal Serial Bus, USB 3 On-The-Go A device;

said first data line is the USB D+ line; said voltage line is the USB VBUS line; and said identification line is the USB ID line.

27. Device according to anyone of claims 15 to 26, wherein said electronic device comprises one of or a combination of: a mobile terminal; a mobile communication device; a Personal Digital Assistant; - a portable media player device; a portable storage device; a computer device.

28. Electronic device, comprising: - a wired interface for connecting with a first electronic device, comprising a second data line; a voltage line; a second pull-up resistor and a second pull-down resistor connectable with said second data line; - a controller adapted for connecting said second pull-down resistor with said second data line when said first electronic device is connected, for monitoring said voltage line, for disconnecting said second pull-down resistor from said second data line and connecting said second pull-up resistor with said second data line if power provided on said voltage line is turned off, for monitoring a voltage level of said second data line, and for deteπrήning that said first electronic device has been disconnected if a change from low level to high level is detected.

29. Device according to claim 28, further comprising: a notification component; wherein said controller is further adapted for providing a corresponding notification if said first electronic device has been disconnected.

30. Device according to claim 28or 29, wherein said controller is further adapted for disconnecting said second pull-up resistor from said second data line and connecting said second pull-down resistor with said second data line if a change from low level to high level is detected.

31. Device according to anyone of claims 28 to 30, wherein the resistance value Rp u iiup °f said second pull-up resistor is higher than the resistance value Rp u ii Down of said second pull-down resistor.

32. Device according to claim 28, wherein Rp u nup > 10* RpuiiDown-

33. Device according to claim 28 to 32, wherein said electronic device is a Universal Serial Bus, USB, B device or a USB peripheral device; said second data line is the USB D- line; and said voltage line is the USB VBUS line.

34. Device according to anyone of claims 28 to 33, wherein said electronic device comprises one of or a combination of: a headset; a digital camera; a printer device; a scanner device; - a portable storage device; a computer device; a mobile terminal; a portable media player; a personal digital assistant;

35. Apparatus, comprising:

means for connecting an electronic device having a power source with a second electronic device; means for turning off power provided to a voltage line of said connecting means; - means for monitoring a voltage level of a first data line of said connecting means; and means for determining that said second electronic device has been disconnected if a change from high level to low level is detected.

36. Apparatus, comprising: means for connecting an electronic device with a first electronic device; means for connecting a second pull-down resistor with a second data line of said connecting means; means for monitoring a voltage line of said connecting means; - means for disconnecting said second pull-down resistor from said second data line and connecting a second pull-up resistor with said second data line if power provided on said voltage line is turned off; means for monitoring a voltage level of said second data line; and means for determining that said first electronic device has been disconnected if a change from low level to high level is detected.

Description:

Disconnection detection of electronic devices

The present invention relates to methods and devices for the detection of disconnection of electronic devices under powerless conditions of the connection interface.

The Universal Serial Bus (USB) has become a popular interface between a personal computer (PC) and peripheral devices. An increasing number of portable devices are using the USB interface to communicate with the PC. Previously a USB communication was configured to take place only between a host device and a peripheral device, wherein the host device was defined as a device comprising storage for a large number of device drivers, an A-type USB connector receptacle, and having the capability to provide a large current to another USB device. These requirements are not practical for many portable devices, and also they are not needed in many cases to interface portable devices with each other. Therefore the USB On-The-Go (OTG) specification has been developed as addition to the USB 2.0 standard, to allow portable devices to take over the role of a limited USB host, without fulfilling all the above mentioned characteristics.

The USB OTG specification (On-The-Go Supplement to the USB 2.0 Specification, Revision 1.3, published December 5, 2006) is mandatory for mobile devices that have a USB micro-

AB receptacle. OTG devices provide limited host and peripheral functionality. The OTG host is allowed to turn off the power (VBUS) if an attached B-device supports the Session

Request Protocol (SRP) to save power while the USB bus is not in use. Assuming the case where an A and a B device are connected, if the A device disables VBUS (due to power management) and a user removes the plug from the connected B device neither A nor B device will detect that the other device is removed.

The problem relies in that if the user now connects another B device to the plug (e.g. a standard peripheral that doesn't support SRP) the A device would not recognize this

reconnection. The A device cannot detect the disconnection and the connection of a new device and would consequently not enable VBUS. The newly connected B device will not receive power and thus might not be able to start working if it does not support SRP. Hence from the end user perspective nothing would happen when the new device is attached in this manner, which is apparently undesirable, as the device appears nonfunctional.

To overcome this issue the A device could enable the VBUS from time to time to poll if the B device is still attached. In order to achieve a good responsibility the polling should be executed every 2-5 seconds. This would mean that a full enumeration procedure is performed every 2-5 sec, which results in increased power consumption because the A device must wakeup and enable VBUS for the polling. This would contradict the power saving intended by turning off VBUS and is therefore undesirable.

Another alternative would be to remove and re-insert the A plug manually by the user so that a new session is started. However, this would require that the user first recognizes the situation, which is unlikely because there are no means to notify the user thereof. Therefore he would most probably only attempt re-insertion because his connected devices do not operate as expected, which apparently creates a bad user experience. Hence this is inconvenient for users and is thus also undesirable. Furthermore, pointless disconnection and re- insertion should be avoided in order not to deteriorate the lifetime of the involved plugs and sockets, which is particularly relevant for the sensible miniaturized plugs and sockets of small portable devices.

It is an object of the present invention to provide methods and devices for reliably detecting the disconnection of an electronic device while maintaining power management capabilities, and for reliably detecting disconnection from an electronic device during powered-off conditions.

Summary

According to a first aspect a method is provided, comprising:

connecting an electronic device having a power source with a second electronic device via a wired interface comprising a first data line and a voltage line; turning off power provided to said voltage line; monitoring the voltage level of said first data line; and - deteπnining that said second electronic device has been disconnected if a change from high level to low level is detected.

This method allows detecting a disconnection of the second device even during conditions when the electrical power provided to the voltage line is turned off. Being able to turn off power, or generally being able to use power management features, without sacrificing the possibility to detect a disconnection of the second device, saves power. This is particularly advantageous in battery-powered mobile devices having only limited power supplies. As the disconnection of the second device can thus be detected automatically without any required user interaction the user experience is improved, and possible disconnection and re-insertion attempts can be avoided, such that the lifetime of plugs and sockets can be prolonged.

According to an exemplary embodiment the method further comprises: turning on power provided to said voltage line after said second electronic device has been disconnected.

Turning on power again allows to re-insert another device and to start another connection session in a reliable manner. In case of USB devices an exemplary embodiment allows to disconnect a B device supporting Session Request Protocol (SRP) during conditions with power turned off and to connect another B device that is not supporting SRP. Further it ensures the smooth operation of the connected B device. Without the inventive method the power would remain turned off as the A device could not detect re-connection of another non-SRP capable B device. As the new B device cannot request a connection session via SRP, it would appear to the user to be non-functional. With this exemplary embodiment the smooth operation also of non-SRP capable B devices is made possible.

According to an exemplary embodiment the method further comprises:

providing a notification that said second electronic device has been disconnected; and turning on power provided to said voltage line; immediately or after a timeout after disconnection of said second device is reached.

This is an alternative embodiment, wherein power is turned on directly after disconnection of the second device or after an optional timeout is reached (or generally after a timeout including zero). The user is informed of the disconnection after the timeout, and can reconnect another device. As power is turned on again, it is irrelevant if the newly connected device requires power supply or not, because it will operate normally in either case.

According to an exemplary embodiment the method further comprises: detecting if a third electronic device is connected with said electronic device after said second electronic device has been disconnected; and turning on power provided to said voltage line when a third electronic device is connected.

As a further alternative, an embodiment allows turning on the power only in case another device is connected. This can further improve power consumption, as unnecessary turning on of the power supply can be avoided. The term "third" device is to be understood in the context of the present invention as indicating a newly connected device, regardless if it is actually a "new", i.e. different, device or if the second electronic device is simply being reconnected.

According to an exemplary embodiment: - detecting if a third electronic device is connected comprises monitoring an identification line of said wired interface; and turning on power is performed when said identification line changes from floating to grounded state.

For interfaces supporting an identification (ID) line this exemplary embodiment allows for an easy and reliable detection that another device has been connected. An example for such a

wired interface is a USB Micro AB receptacle including an ID line, which allows distinguishing if a USB Micro-A or Micro-B plug is inserted. In case of the Micro- A plug the ID line will become grounded upon connection, indicating that a B device may have been connected.

According to an exemplary embodiment the method comprises: monitoring an identification line of said wired interface; deteiTnining that said second electronic device has been disconnected from a connection cable connecting it with said electronic device if a change from high level to low level on said first data line is detected and said identification line remains grounded.

In another exemplary embodiment the method comprises: monitoring an identification line of said wired interface; and determining that said cable has been disconnected from said electronic device if a change from high level to low level on said first data line is detected and said identification line changes from grounded to floating state.

These two exemplary embodiments allow detecting two different cases of disconnection. In the first case a cable connecting with the second device remains plugged in at the device, but the second device has been disconnected from its plug on the other side of the cable. In the second case the cable has been disconnected from the device. It is to be noted that it is possible to monitor and determine only one of both possibilities while the other possibility is not checked, or to monitor both possibilities simultaneously and determine which one actually occurs.

According to an exemplary embodiment the method further comprises: providing a corresponding notification if said second electronic device has been disconnected from said cable.

According to an exemplary embodiment the method further comprises: providing a corresponding notification if said cable has been disconnected from said

electronic device.

These exemplary embodiments enable a user to take appropriate actions or at least recognize the connection situation. For example, if the notification indicates that the cable has been disconnected from the device, the user may check the seat of the plug in the devices socket. If the notification indicates that the second device has been disconnected from the cable the user can accordingly check the second devices connection to the cable. This allows the user to detect errors in the connection, e.g. a defective plug on either end of the cable or a defective socket in one of the devices. Generally spealdng these exemplary embodiments improve the diagnosis of connection errors. The notification can be performed optically, acoustically, by vibration, either individually or as a combination thereof.

According to a second aspect of the invention a method is provided, comprising: connecting an electronic device with a first electronic device via a wired interface comprising a second data line and a voltage line; connecting a second pull-down resistor with said second data line; monitoring said voltage line; disconnecting said second pull-down resistor from said second data line and connecting said second pull-up resistor with said second data line if power provided on said voltage line is turned off; monitoring a voltage level of said second data line; and determining that said first electronic device has been disconnected if a change from low level to high level is detected.

This method allows a first device to detect a disconnection of the device even during conditions when the electrical power provided to the voltage line is turned off. It enables the first device to turn off power, or generally to use power management features, without sacrificing the possibility to detect a disconnection of the device.

According to an exemplary embodiment the method further comprises: providing a corresponding notification if said first electronic device has been

disconnected.

This embodiment enables user notification also at the second electronic device (for example the B device in case of USB). The user is enabled to recognize connection events such as e.g. connection errors and can then take appropriate steps.

According to an exemplary embodiment the method further comprises: disconnecting said second pull-up resistor from said second data line and connecting said second pull-down resistor with said second data line, responsive to said disconnection. This exemplary embodiment allows the device to become operational for a new connection to another device.

According to a third aspect of the invention a computer program product is provided, comprising program code means for carrying out the method described above when said program product is run on an electronic device. The code means can be stored on a computer- readable medium.

According to a fourth aspect of the invention an electronic device is provided, comprising: a wired interface, comprising a first data line; a voltage line; and a first pull-down resistor connected with said first data line; a power source for providing power to said voltage line; a controller adapted for turning off power provided to said voltage line when a second electronic device is connected via said wired interface, for monitoring a voltage level of said first data line, and for determining that said second electronic device has been disconnected if a change from high level to low level is detected.

According to an exemplary embodiment said controller is further adapted for turning on power provided to said voltage line when said second electronic device has been disconnected.

According to an exemplary embodiment the device further comprises: a notification component; wherein said controller is further adapted for providing a corresponding notification if said second electronic device has been disconnected, via said notification component.

According to an exemplary embodiment the device further comprises: a timer; wherein said controller is further adapted for starting said timer when said second electronic device has been disconnected, and for providing said notification and turning on power provided to said voltage line when said timer reaches a timeout.

According to an exemplary embodiment said controller is further adapted for detecting if a third electronic device is connected with said electronic device after said second electronic device has been disconnected, and for turning on power provided to said voltage line when a third electronic device is connected.

According to an exemplary embodiment said wired interface comprises an identification line; and - said controller is adapted for monitoring said identification line, and for turning on power when said identification line changes from floating to grounded state.

According to an exemplary embodiment said wired interface comprises an identification line; - said controller is further adapted for monitoring said identification line, for determining that said second electronic device has been disconnected from a cable connecting said electronic device and said second electronic device if a change from high level to low level on said first data line is detected and said identification line remains grounded.

According to an exemplary embodiment

said wired interface comprises an identification line; said controller is further adapted for monitoring said identification line, for determining that said cable connecting said device and said second electronic device has been disconnected from said electronic device if a change from high level to low level on said first data line is detected and said identification line changes from grounded to floating state.

According to an exemplary embodiment the device comprises: a notification component; and said controller is further adapted for providing a corresponding notification if said second electronic device has been disconnected from said cable.

According to an exemplary embodiment the device comprises: a notification component; and said controller is further adapted for providing a corresponding notification if said cable has been disconnected from said electronic device.

According to an exemplary embodiment said notification component comprises: a loudspeaker; a headset; - a vibration alarm; a light emitter; or a display.

The user can be notified via a loudspeaker sound similar to an SMS or other alert tone. The notification can be provided using an LED, for example by employing a different colour for connected/disconnected device, a different blink rhythm or like. A graphical representation of connected/disconnected state can be provided if the device comprises a display, e.g. using a fixed symbol or an animated symbol.

According to an exemplary embodiment said electronic device is a Universal Serial Bus, USB, On-The-Go A device;

said first data line is the USB D+ line; said voltage line is the USB VBUS line; and said identification line is the USB ID line.

According to an exemplary embodiment said electronic device comprises: a mobile terminal; a mobile communication device; a personal digital assistant; a portable media player device; - a portable storage device; a computer device.

According to a fifth aspect of the invention an electronic device is provided, comprising: a wired interface for connecting with a first electronic device, comprising - a second data line; a voltage line; a second pull-up resistor and a second pull-down resistor connectable with said second data line; a controller adapted for connecting said second pull-down resistor with said second data line when said first electronic device is connected, for monitoring said voltage line, for disconnecting said second pull-down resistor from said second data line and connecting said second pull-up resistor with said second data line if power provided on said voltage line is turned off, for monitoring a voltage level of said second data line, for determining that said first electronic device has been disconnected if a change from low level to high level is detected.

According to an exemplary embodiment said device further comprises: a notification component; wherein said controller is further adapted for providing a corresponding notification if said first electronic device has been disconnected.

According to an exemplary embodiment said controller is further adapted for disconnecting said second pull-up resistor from said second data line and connecting said second pull-down resistor with said second data line if a change from low level to high level is detected.

According to an exemplary embodiment the resistance value Rp u iiu p of said second pull-up resistor is higher than the resistance value Rp u n Down of said second pull-down resistor. In an exemplary embodiment R Pul iu P can be higher than 1Ox Rp u ra> own -

According to an exemplary embodiment - said electronic device is a Universal Serial Bus, USB, B device or a USB peripheral device; said second data line is the USB D- line; and said voltage line is the USB VBUS line.

According to an exemplary embodiment said electronic device comprises: a headset; a digital camera; a printer device; a scanner device; a portable storage device; a computer device; a mobile terminal; a portable media player; a personal digital assistant.

According to a sixth aspect of the invention an apparatus is provided, comprising: means for connecting an electronic device having a power source with a second electronic device; means for turning off power provided to a voltage line of said connecting means; - means for monitoring a voltage level of a first data line of said connecting means; and means for determining that said second electronic device has been disconnected if a

change from high level to low level is detected.

According to a sixth aspect of the invention an apparatus is provided, comprising: means for connecting an electronic device with a first electronic device; - means for connecting said second pull-down resistor with a second data line of said connecting means; means for monitoring a voltage line of said connecting means; means for disconnecting said second pull-down resistor from said second data line and connecting said second pull-up resistor with said second data line if power provided on said voltage line is turned off; means for monitoring a voltage level of said second data line; and means for determining that said first electronic device has been disconnected if a change from low level to high level is detected.

Brief description of the drawings

The invention can be more fully understood from the following detailed description of exemplary embodiments, when also referring to the drawings, which are provided in an exemplary manner only and are not intended to limit the invention to any particular embodiment illustrated therein. In the drawings

Fig. 1 shows elements to be connected using a USB connection;

Fig. 2 is a schematic view of a USB connection situation;

Fig. 3 shows an embodiment of the invention in connected state;

Fig. 4 shows the embodiment of fig. 3 in a disconnected state;

Fig. 5 is a state table of the connection situations of fig. 3 and 4;

Fig. 6 shows the embodiment of fig. 3 in another disconnected state;

Fig. 7 is a state table of the connection situations of fig. 3 and 6;

Fig. 8 is a flow diagram of an embodiment of the method of the invention; and

Fig. 9 is a flow diagram of another embodiment of the method of the invention.

Detailed description

The following description of exemplary embodiments will focus on USB devices for illustration of the invention. However, it is to be noted that the invention is not limited to any particular connection standard or specification like USB OTG. It is also to be noted that elements from different embodiments are not restricted to use in the particular embodiment in conjunction of which they are described, but may also be combined with elements from other embodiments.

Fig. 1 shows a schematic representation of elements to be connected using a USB connection. A first electronic device (not shown) has a wired USB interface or receptacle 2, comprising a voltage line VBUS, a ground line GND, an identification line ID, and a first and a second data line D+ and D-. A second device (not shown) has a corresponding interface. The two devices are to be connected by a USB cable 10, having a first plug 6 and a second plug 8, each plug comprising a voltage pin VBUS, a ground pin GND, an identification pin ID, a first and a second data line D+ and D-.

In the example shown here the plug 6 has an identification line ID connected to the ground line (directly or via a resistor having a resistance value between 0 and 10 0, according to the USB OTG specification), to identify that it is a Micro-A type plug. On the other side plug 8 does have the ID line floating (or having it connected to ground via a resistor having a resistance value over 100 kω, according to the USB OTG specification), to identify that it is a Micro-B type plug.

The first electronic device could be a mobile communication device, a mobile terminal, a personal digital assistant, a portable media player device, a portable storage device or a multimedia computer. The device could also combine some or all of the above functionality in one entity. This first device is operating according to the USB OTG standard as an A- device. The second electronic device could be any of the devices listed above, or could be for example a headset, a digital camera, a printer device, a scanner device or a portable storage device. The second device could also combine some or all of the above functionality in one device. The second device may be an OTG device in the B device role.

In fig. 2 the elements from fig. 1 are shown in a situation after actual connection thereof. The power on VBUS is active here. It is shown here that at interface 2 a pull-down resistor 12 is connected with the first data line D+, and another pull-down resistor 14 is connected with the second data line D-. At interface 4, a pull-up resistor 16 is connected with the first data line D+, and a second pull-down resistor 18 is connected with the second data line D-. In this manner the two devices are distinguished, according to the USB OTG specification. In the depicted example the interface 2 belongs to a (not shown) USB host or A-type device, while the interface 4 belongs to a (not shown) peripheral or B-type device.

Fig. 3 shows an embodiment of the present invention. Compared to the situation depicted in fig. 2 the VBUS power is turned off here, for example after end of a data exchange session due to power management. Furthermore, according to the invention, a second weak pull-up resistor 20 is provided in the interface 4 of the (not shown) B-type device. This pull-up resistor 20 can be connected with the second data line D- instead of the pull-down resistor 18 which is disconnected here. It will be connected by the B-type device when it is detected that VBUS power has been turned off.

Fig. 4 shows the situation similar to fig. 3 after disconnection of the plug 8 from the B-type interface 4.

Fig. 5 is a table showing the respective levels of lines of the interfaces 2 and 4, before (see

fig. 3) and after disconnection (see fig. 4) of the plug 8 from the interface 4. VBUS remains turned off, as well as GND line remains grounded. Also, for both A device and B device the respective levels of the ID line remain the same (grounded for A device, and floating for B device).

For the A device the first data line D+ is relevant, this device monitors the level on this line after VBUS power was turned off. Before disconnection of the B device the level is high, due to pull-up resistor 16 on interface 4. After disconnection of the B device the level of the first data line D+ changes from HIGH to LOW, due to pull-down resistor 12. According the USB OTG specification the pull-down resistors should be in the range from 14.25 to 24.8 kω. Thus a transition from HIGH to LOW level indicates, at the A device, disconnection of the B device. It is to be noted that the ID line does not change, as the cable remains connected in this example and the plug 2 connects the ID line with GND. Thus a change from HIGH to LOW on D+ in combination with the ID line remaining grounded indicates disconnection of the B device from the cable, while the cable remains plugged in to interface 2.

Similarly, for the B device the second data line D- is relevant, this device monitors the level on this line after the VBUS off state was detected. Before disconnection of the B device from the cable the level is low, due to pull-down resistor 14 on interface 2 and weak pull-up resistor 20. After disconnection of the B device the level of the first data line D- changes from LOW to HIGH, due to the weak pull-up resistor 20. Thus a transition from LOW to HIGH level indicates, at the B device, disconnection from the A device. In an embodiment the weak pull-up resistor may be higher than the pull-down resistor. The value of the resistor may be at least ten times higher as the pull-down resistor.

Fig. 6 shows the situation similar to fig. 3 after disconnection of the plug 6 from the A-type interface 2.

Fig. 7 is a table showing the respective levels of lines of the interfaces 2 and 4, before (see fig. 3) and after disconnection (see fig. 6) of the plug 6 from the interface 2. Again VBUS remains turned off, as well as GND line remains grounded.

For the A device the first data line D+ is relevant, this device monitors the level on this line.

Before disconnection of the USB cable from interface 2 the level is high, due to pull-up resistor 16 on interface 4. After disconnection of the cable the level of the first data line D+ changes from HIGH to LOW, due to pull-down resistor 12. Thus a transition from HIGH to

LOW level indicates, at the A device, disconnection of the cable. It is to be noted that the ID line does change here, from grounded to floating state, as the cable is removed from the interface 2 in this example and the plug 2 does not connect the ID line with GND anymore.

Thus a change from HIGH to LOW on D+ in combination with the ID line changing from grounded to floating indicates disconnection of the cable from interface 2.

From the point of view of the B device the situation is identical to that depicted in fig. 4 and shown in the table of fig. 5.

Therefore, in both examples shown in figs. 3-7 the A device as well as the B device are able to detect disconnection, and can initiate appropriate actions. E.g. at the A device this will entail turning on the VBUS again, in order to be ready to connect with another (third) electronic device. If this third device is a device not supporting the Session Request Protocol, it will still be normally operational, as VBUS is turned on again. Furthermore the invention also enables the A device to distinguish if the B device has been disconnected from the cable or if the cable has been disconnected from the A device.

Fig. 8 is a flow diagram showing the steps of an embodiment of the inventive disconnection detection method. Fig. 8 shows the steps performed at the A- type device. In step 102 a connection is made with a second electronic device. This may involve initiating a data exchange session, for example using the SRP. It is assumed that this session is completed after step 102 here. Responsive to session end, the A device will turn off power provided to the VBUS line, in step 104, to conserve power. After turning off power the level of a first data line (e.g. D+, see previous figures) is monitored in step 106. Responsive to a change in voltage level from HIGH to LOW in step 108, it is determined that the second device has been disconnected in step 110. Otherwise, the process returns to step 106.

From step 110 there are at least three alternatives which are depicted here, these alternatives being optional. In a first branch the power provided to the VBUS is turned on immediately following the detection of the disconnection, step 112. In a second branch a timer is started, to determine if a timeout has been reached. If, in step 114, it is determined that the timeout has been reached, a user of the electronic device is being notified of the disconnection in step 116, and the process continues again with step 112. It should be noted that the timeout is optional, i.e. it can also include a zero value, such that step 114 would actually be omitted.

The user notification might be performed via a loudspeaker, a headset, a vibration alarm, a light emitter or some special information provided on a display. There may be a dedicated notification available for the case when the cable is disconnected or for the case when the second device is disconnected or it may be possible to have a combined notification for both cases. A third branch involves detecting if another (third) electronic device is connected in step 118. Only upon connection of the electronic device the power to VBUS is turned on again, step 112.

Fig. 9 is a flow diagram showing the steps of an embodiment of the inventive disconnection detection method. Fig. 9 shows the steps performed at the B-type device. In step 202 a connection is made with a first electronic device, e.g. a data exchange session, for example using the SRP. It is assumed that this session is completed after step 202 here. In step 206 a voltage line of the interface to the first electronic device is monitored. If the voltage is turned off, which is detected in step 208, the process continues to step 210.

hi step 210 the second pull-down resistor is disconnected from the second data line, and instead a second pull-up resistor is connected therewith. In step 212 the voltage level of the second data line is monitored. If, in step 214, a transition on the second data line from low to high level is detected, it is determined in step 216 that the first device has been disconnected. Finally, in step 218 the second pull-up resistor is disconnected again, and instead the second pull-down resistor is connected, hi addition the first pull-up resistor on the first data line has to be disconnected after the detection of the disconnection. This step is required to comply

1& with the USB OTG specification and is not shown in the flow diagram.

The methods illustrated by the flow diagrams in fig. 8 and 9 are just exemplary embodiments. It should be noted that other implementations are possible, for example a different succession or combination and/or omission of the steps illustrated or other steps described in this specification.

It should be noted that the above described methods might be implemented as hardware component that can be implemented using any known or future developed hardware technologies or hybrids of these, such as MOS (Metal Oxide Semiconductor), CMOS (Complementary MOS), BiCMOS (Bipolar CMOS), ECL (Emitter Coupled Logic), TTL (Transistor Transistor Logic), etc., using for example ASCI (Application Specific Integrated Circuit) components or DSP (Digital Signal Processor) components, as an example. Beside that the method could be implemented as program code that runs on an electronic device. The code can be stored on a computer-readable medium.

In view of the foregoing description it will be evident to a person skilled in the art that various modifications may be made within the scope of the invention as defined by the appended claims.