# US 10,122,576 B2 · Intelligent role selection for dual-role devices

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

- Number: US 10,122,576 B2
- Document ID: US10122576B2
- Status: Granted
- Kind: B2
- Application number: 14/860,064
- Filed: 2015-09-21
- Published: 2016-09-22
- Granted: 2018-11-06
- Earliest claimed: 2015-03-17
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Firdosh K. Bhesania; Anthony Y. Chen; Vivek Gupta; Andrea A. Keating; Randall E. Aull; Rahul Ramadas; Robert E. Harris, Jr.; Jayson L. Kastens; Philip A. Froese; Cong Yang
- Web page: https://patentgrep.com/patent/US10122576B2

## CPC

- H04L 41/0803: Configuration setting
- H04W 52/0261: {managing power supply demand, e.g. depending on battery level}
- H04W 84/20: Leader-follower arrangements
- Y02D 30/70: in wireless communication networks
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

Embodiments described herein are directed to mechanisms that enable roles (e.g., host vs. function, power provider vs. power consumer, master vs. slave, server vs. client, source vs. sink, upstream vs. downstream) to be dynamically assigned between two interconnected dual-role devices in an intelligent and deterministic manner based on the available context on each device.

## Claims

### Claim 1

A method performed by a software-implemented role manager executing on a first device that is communicatively connected via a USB Type C cable to a second device, comprising:
determining that a first role is to be assigned to the first device and a second role is to be assigned to the second device, the first role and the second role defining an operating relationship between the first device and second device via the USB Type C cable;
causing the first role to be assigned to the first device and the second role to be assigned to the second device;
receiving information indicative of a change of capability or operational state of one or more of the first device and the second device;
determining that a role assignment swap is to be implemented based at least in part on the information; and
based at least on the determining that the role assignment swap is to be implemented, initiating the role assignment swap causing the first role to be assigned to the second device and causing the second role to be assigned to the first device, the initiating comprising causing a USB connection manager driver stack to:
assign one of a USB host or a USB function role to the first device by selectively activating one of a USB host driver stack or a USB function driver stack of the first device; and
assign the other of the USB host or a USB function role to the second device by interacting with the second device via the USB Type C cable.

### Claim 2 (depends on 1)

The method of claim 1, wherein the method further comprises assigning to the first device and the second device roles including at least one of:
a power supplier and a power consumer;
a master and a slave;
a source and a sink; or
an upstream and a downstream.

### Claim 3 (depends on 1)

The method of claim 1, wherein receiving information indicative of the change of capability or operational state of one or more of the first device and the second device comprises receiving information indicative of one or more of:
an addition, removal, activation or deactivation of a subsystem of the first device or the second device;
a change of a state of a subsystem of the first device or the second device;
a change of user preference input with respect to role assignment for the first device and second device;
a change in configuration information of the first device or the second device;
a connection or disconnection of at least a third device to or from the first device or the second device;
a change of role requirements by at least one application executing on the first device or the second device;
a change of power source by the first device or the second device;
a change of a state of a power source currently being used to supply power to the first device or the second device; and
a change in a level of consumption of a resource by the first device or the second device.

### Claim 4 (depends on 1)

The method of claim 1, wherein determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device comprises:
querying the second device for capability and operational state information associated with the second device;
receiving from the second device the capability and operational state information associated with the second device;
obtaining capability and operational state information associated with the first device; and
determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device based on the capability and operational state information associated with the first device and the second device.

### Claim 5 (depends on 1)

The method of claim 1, wherein determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device comprises:
determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device based at least on prior role assignment information for the first device and the second device.

### Claim 6 (depends on 1)

The method of claim 1, wherein determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device comprises:
determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device based at least on one historical role usage model.

### Claim 7 (depends on 1)

The method of claim 1, wherein determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device comprises:
determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device based at least on user preference information received via one or more of a user interface of the first device and a user interface of the second device.

### Claim 8 (depends on 1)

The method of claim 1, wherein determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device comprises:
determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device based at least on role requirement information provided by at least one application executing on the first device or second device.

### Claim 9

A first device, comprising:
at least one processor circuit; and
at least one memory that stores program code configured to be executed by the at least one processor circuit, the program code comprising:
a role manager configured to:
determine that a first role is to be assigned to the first device and a second role is to be assigned to a second device that is communicatively connected via a USB Type C cable to the first device, the first role and the second role defining an operating relationship between the first device and second device via the USB Type C cable;
cause the first role to be assigned to the first device and the second role to be assigned to the second device;
receive information indicative of a change of capability or operational state of one or more of the first device and the second device, to determine that a role assignment swap is to be implemented based at least in part on the information;
based at least on the determination that the role assignment swap is to be implemented, initiate the role assignment swap causing the first role to be assigned to the second device and causing the second role to be assigned to the first device, the role manager configured to initiate the role assignment swap comprising causing a USB connection manager driver stack to:
assign one of a USB host or a USB function role to the first device by selectively activating one of a USB host driver stack or a USB function driver stack of the first device; and
assign the other of the USB host or a USB function role to the second device by interacting with the second device via the USB Type C cable.

### Claim 10 (depends on 9)

The first device of claim 9, wherein the role manager is further configured to assign to the first device and the second device roles including at least one of:
a power supplier and a power consumer;
a master and a slave;
a source and a sink; or
an upstream and a downstream.

### Claim 11 (depends on 9)

The first device of claim 9, wherein the role manager is configured to receive information indicative of the change of operational state of one or more of the first device and the second device by receiving information indicative of one or more of:
an addition, removal, activation or deactivation of a subsystem of the first device or the second device;
a change of a state of a subsystem of the first device or the second device;
a change of user preference input with respect to role assignment for the first device and second device;
a change in configuration information of the first device or the second device;
a connection or disconnection of at least a third device to or from the first device or the second device;
a change of role requirements by at least one application executing on the first device or the second device;
a change of power source by the first device or the second device;
a change of a state of a power source currently being used to supply power to the first device or the second device; and
a change in a level of consumption of a resource by the first device or the second device.

### Claim 12 (depends on 9)

The first device of claim 9, wherein the role manager is configured to determine that the first role is to be assigned to the first device and the second role is to be assigned to the second device by:
querying the second device for capability and operational state information associated with the second device;
receiving the capability and operational state information associated with the second device therefrom;
obtaining capability and operational state information associated with the first device; and
determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device based on the capability and operational state information associated with the first device and the second device.

### Claim 13 (depends on 9)

The first device of claim 9, wherein the role manager is configured to determine that the first role is to be assigned to the first device and the second role is to be assigned to the second device based at least on prior role assignment information for the first device and the second device.

### Claim 14 (depends on 9)

The first device of claim 9, wherein the role manager is configured to determine that the first role is to be assigned to the first device and the second role is to be assigned to the second device based at least on one historical role usage model.

### Claim 15 (depends on 9)

The first device of claim 9, wherein the role manager is configured to determine that the first role is to be assigned to the first device and the second role is to be assigned to the second device based at least on user preference information received via one or more of a user interface of the first device and a user interface of the second device.

### Claim 16 (depends on 9)

The first device of claim 9, wherein the role manager is configured to determine that the first role is to be assigned to the first device and the second role is to be assigned to the second device based at least on role requirement information provided by at least one application executing on the first device or second device.

### Claim 17

A computer program product comprising a computer-readable memory having computer program logic recorded thereon that when executed by at least one processor of a first device causes the at least one processor to perform a method comprising:
determining that a first role is to be assigned to the first device and a second role is to be assigned to a second device that is communicatively connected via a USB Type C cable to the first device, the first role and the second role defining an operating relationship between the first device and second device via the USB Type C cable;
causing the first role to be assigned to the first device and the second role to be assigned to the second device;
receiving information indicative of a change of capability or operational state of one or more of the first device and the second device;
determining that a role assignment swap is to be implemented based at least in part on the information; and
based at least on the determining that the role assignment swap is to be implemented, initiating the role assignment swap causing the first role to be assigned to the second device and causing the second role to be assigned to the first device, the initiating comprising causing a USB connection manager driver stack to:
assign one of a USB host or a USB function role to the first device by selectively activating one of a USB host driver stack or a USB function driver stack of the first device; and
assign the other of the USB host or a USB function role to the second device by interacting with the second device via the USB Type C cable.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the method further comprises assigning to the first device and the second device roles including at least one of:
a power supplier and a power consumer;
a master and a slave;
a source and a sink; or
an upstream or a downstream.

### Claim 19 (depends on 17)

The computer program product of claim 17, wherein receiving information indicative of the change of operational state of one or more of the first device and the second device comprises receiving information indicative of one or more of:
an addition, removal, activation or deactivation of a subsystem of the first device or the second device;
a change of a state of a subsystem of the first device or the second device;
a change of user preference input with respect to role assignment for the first device and second device;
a change in configuration information of the first device or the second device;
a connection or disconnection of at least a third device to or from the first device or the second device;
a change of role requirements by at least one application executing on the first device or the second device;
a change of power source by the first device or the second device;
a change of a state of a power source currently being used to supply power to the first device or the second device; and
a change in a level of consumption of a resource by the first device or the second device.

### Claim 20 (depends on 17)

The computer program product of claim 17, wherein determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device comprises:
querying the second device for capability and operational state information associated with the second device;
receiving from the second device the capability and operational state information associated with the second device;
obtaining capability and operational state information associated with the first device; and
determining that the first role is to be assigned to the first device and the second role is to be assigned to the second device based on the capability and operational state information associated with the first device and the second device.
