# US 2018/0024954 A1 · Apparatus and methods for dynamic role switching among usb hosts and devices

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0024954 A1
- Document ID: US20180024954A1
- Status: Published application
- Kind: A1
- Application number: 15/724,677
- Filed: 2017-10-04
- Published: 2018-01-25
- Earliest claimed: 2014-04-29
- Assignees: MCCI Corporation
- Applicants: MCCI Corporation
- Inventors: Terrill M. Moore
- Web page: https://patentgrep.com/patent/US20180024954A1

## CPC

- G06F 13/4022: {using switching circuits, e.g. switching matrix, connection or expansion network (G06F13/4009 takes precedence)}
- G06F 13/382: {using universal interface adapter}
- G06F 13/426: {using an embedded synchronisation, e.g. Firewire bus, Fibre Channel bus, SSA bus}
- G06F 13/4045: {where the bus bridge performs an extender function}
- G06F 2213/0042: Universal serial bus [USB]
- G06F 2213/3854: Control is performed at the peripheral side
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Apparatus and methods for USB hosts and USB devices to dynamically switch roles such that a product which initially operates as a USB host may instead operate as a USB device and vice versa. Products such as smartphones and tablets which initially operate as USB devices may dynamically switch roles to become USB hosts. Similarly, products such as PCs and in-vehicle infotainment systems which initially operate as USB hosts may dynamically switch roles to become USB devices. Dynamic USB role switching is permitted in a variety of topologies including those in which a direct connection exists between a host and a device as well as those in which a USB hub is present. In addition, such dynamic role switching may be performed in topologies which incorporate widely used USB Type A connectors and cables, thus avoiding the need for a special connector or cable.

## Claims

### Claim 1

A method comprising:
connecting an initial Universal Serial Bus (USB) host to an initial USB device, the initial USB host having (i) a USB host stack in a first active state, (ii) a USB device stack in a first idle state, and (iii) a root port operating as a USB host;
evaluating device descriptor information associated with the initial USB device to determine that the initial USB device is capable of switching roles;
issuing a role switch root port message from the USB host stack to the root port;
transitioning the USB device stack from the first idle state to a second active state in response to an activate message from the root port to the USB device stack;
transitioning the USB host stack from the first active state to a second idle state;
enabling the root port to attach to the 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; and
controlling the role-switched USB device using the role-switched USB host.

### Claim 2 (depends on 1)

The method of claim 1 wherein issuing the role switch root port message further comprises sending a detach message from the root port to the USB host stack to detach the root port from the USB host stack.

### Claim 3 (depends on 2)

The method of claim 2, further comprising initiating a reset port sequence of messages and responses to reset an address for the initial USB device to a first predetermined address.

### Claim 4 (depends on 3)

The method of claim 3 wherein the first predetermined address is zero.

### Claim 5 (depends on 3)

The method of claim 3 wherein initiating the reset port sequence comprises sending a reset port message from the USB host stack to the root port.

### Claim 6 (depends on 3)

The method of claim 3, further comprising assigning a second predetermined address to the initial USB device.

### Claim 7 (depends on 6)

The method of claim 6 wherein the second predetermined address is a non-zero address.

### Claim 8 (depends on 6)

The method of claim 6 wherein assigning the second predetermined address comprises sending a set address message from the USB host stack to the initial USB device.

### Claim 9 (depends on 1)

The method of claim 1 further comprising sending an attach message from the root port to the initial USB device to attach the initial USB device to the root port such that the initial USB device becomes the role-switched USB host.

### Claim 10 (depends on 9)

The method of claim 9 further comprising:
sending a reset message from the role-switched USB host to the root port to reset an address of the root port to zero; and
assigning a predetermined address to the root port.

### Claim 11 (depends on 10)

The method of claim 10 wherein the predetermined address is a non-zero address.

### Claim 12 (depends on 1)

The method of claim 1 wherein the initial USB host that becomes the role-switched USB device is one of a personal computer and an in-vehicle infotainment system.

### Claim 13 (depends on 1)

The method of claim 1 wherein the initial USB device that becomes the role-switched USB host is one of a smartphone, digital camera, MP3 player, and a mass storage device.

### Claim 14

A system comprising:
an initial Universal Serial Bus (USB) host connected to an initial USB device, the initial USB host having (i) a USB host stack in a USB host stack active state, (ii) a USB device stack in a USB device stack idle state, and (iii) a root port operating as a USB host, the initial USB host configured to:
evaluate device descriptor information associated with the initial USB device to determine that the initial USB device is capable of switching roles;
issue a role switch root port message from the USB host stack to the root port;
transition the USB device stack from the USB device stack idle state to a USB device stack active state in response to an activate message from the root port to the USB device stack;
transition the USB host stack from the USB host stack active state to a USB host stack idle state; and
enable the root port to attach to the 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.

### Claim 15 (depends on 14)

The system of claim 14, wherein the initial USB host is further configured to send a turn on message from the USB device stack in the USB device stack active state to the root port to cause the root port to turn on a D+ pullup to indicate that the root port is attached.

### Claim 16 (depends on 15)

The system of claim 15, wherein the initial USB host is further configured to send an attach message from the root port to the role-switched USB host.

### Claim 17 (depends on 16)

The system of claim 16, wherein the initial USB host is further configured to receive a reset message to reset an address of the root port to zero.

### Claim 18 (depends on 17)

The system of claim 17, wherein the initial USB host is further configured to receive new address assigned to the root port.

### Claim 19 (depends on 18)

The system of claim 18, wherein the initial USB host is further configured to transition the root port to an active state in response to receiving the new address assigned to the root port.

### Claim 20 (depends on 14)

The system of claim 14, wherein the initial USB host that transitioned to the role-switched USB device is one of a personal computer and an in-vehicle infotainment system, and the initial USB device that transitioned to the role-switched USB host is one of a smartphone, digital camera, MP3 player, and a mass storage device.
