US 9,811,488 B2
Apparatus and methods for dynamic role switching among USB hosts and devices
Terrill M. Moore, Trumansburg, NY (US)
Assigned to MCCI Corporation, Ithaca, NY (US)
Filed by MCCI Corporation, Ithaca, NY (US)
Filed on Apr. 29, 2015, as Appl. No. 14/699,558.
Claims priority of provisional application 61/985,786, filed on Apr. 29, 2014.
Prior Publication US 2015/0309954 A1, Oct. 29, 2015
Int. Cl. G06F 3/00 (2006.01); G06F 13/40 (2006.01); G06F 13/38 (2006.01); G06F 13/42 (2006.01)
CPC G06F 13/4022 (2013.01) [G06F 13/382 (2013.01); G06F 13/426 (2013.01); G06F 13/4045 (2013.01); G06F 2213/0042 (2013.01); G06F 2213/3854 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method for switching roles between an initial Universal Serial Bus (USB) host and an initial USB device such that the initial USB host becomes a role-switched USB device and the initial USB device becomes a role-switched USB host, the method comprising:
maintaining, by the initial USB host, a USB host stack in a USB host stack active state, a USB device stack in a USB device stack idle state, and a root port operating as a USB host;
maintaining a connection between the initial USB host and the initial USB device;
determining, by the USB host stack, that the initial USB device is capable of switching roles based on device descriptor information associated with the initial USB device;
sending, by the USB host stack, a role switch root port message to the root port;
sending, by the root port, a detach message to the USB host stack in response to receiving the role switch root port message;
detaching the root port from the USB host stack;
sending, by the root port, an activate message to the USB device stack to cause the USB device stack to transition to a USB device stack active state;
transitioning the USB host stack to a USB host stack idle state;
using the USB device stack to enable the root port to attach to the initial USB device such that that the initial USB host becomes the role-switched USB device and the initial USB device becomes the role-switched USB host; and
using the role-switched USB host to control the role-switched USB device.