Users may interact with a variety of different devices in a given day. For example, a user may interact with a desktop PC, a laptop computer, a mobile communication device (e.g., a mobile phone), a game console, and so on. Traditional interaction with the devices, however, was often disjointed such that interaction with one device was divorced from interaction with another device. Further, even though techniques were subsequently developed in an attempt to rectify this problem, these techniques were often complicated and inefficient and therefore users typically chose to forgo this functionality.
Device linking is described. In one or more implementations, data is maintained at a network service that describes characteristics of a plurality of devices that are associated with a user account of the network service. A communication is formed to be received by one of the plurality of devices that includes a portion of the data that pertains to another one of the plurality of devices and that is suitable by the receiving device to discover the other one of the plurality of devices to initiate a local network connection between the devices.
In one or more implementations, data is received at a computing device, which is associated with a user account, from a network service that identifies another computing device associated with the user account. Responsive to a determination by the computing device that the other computing device is available via a local network connection, the local network connection is formed by the computing device with the other computing device. Responsive to a determination by the computing device that the other computing device is not available via a local network connection, a non-local network connection is formed by the computing device with the other computing device.
In one or more implementations, availability is discovered, through communication with a network service, of a device to support a companion experience, the availability determined through association of the device with a user account. Data received from the network service is used to initiate a local network connection between the computing device and the device as a result of the discovering that is usable to communicate data involved in the companion experience.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
The detailed description is described with reference to the accompanying figures. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The use of the same reference numbers in different instances in the description and the figures may indicate similar or identical items. Entities represented in the figures may be indicative of one or more entities and thus reference may be made interchangeably to single or plural forms of the entities in the discussion.
Overview
Traditional techniques that were utilized to link devices together typically involve a multitude of manual steps to be performed by the user. Further, these steps were often complicated and therefore users traditionally did not avail themselves of these techniques, even when available.
Device linking techniques are described. In one or more implementations, techniques are described in which different types of devices may work in conjunction, such as use of a mobile communications device to support interaction with a game console. A variety of techniques are discussed herein that may be leveraged to link the devices together, such as to support this interaction. Examples of this include leveraging use of the “cloud” and a local connection to perform the setup, use of local and remote connections, support of fallback functionality, and so on. Further discussion of this and other techniques may be found in relation to the following sections.
In the following discussion, an example environment is first described that may employ the techniques described herein. Example procedures are then described which may be performed in the example environment as well as other environments. Consequently, performance of the example procedures is not limited to the example environment and the example environment is not limited to performance of the example procedures.
Example Environment
The computing devices 102, 104 are each illustrated as including an input/output module 106, 108, respectively. The input/output modules 106, 108 are representative of functionality relating to recognition of inputs and/or provision of outputs by the respective computing device. For example, the input/output modules 106, 108 may be configured to receive inputs from a keyboard, mouse, to identify gestures and cause operations to be performed that correspond to the gestures, and so on. The inputs may be detected by the input/output modules 106, 108 in a variety of different ways.
The input/output module 106 for instance, may be configured to receive one or more inputs via touch interaction with a hardware device, such as a controller 110 as illustrated. Touch interaction may involve pressing a button, moving a joystick, movement across a track pad, use of a touch screen of the display device (e.g., detection of a finger of a user's hand or a stylus by the computing device 102), and so on.
Recognition of the inputs may be leveraged by the input/output modules 106, 108 to interact with a user interface output by the respective computing device 102, 104 such as to interact with a game, an application, browse the internet, change one or more settings of the computing devices 102, 104, and so forth. A variety of other hardware devices are also contemplated that involve touch interaction with the device. Examples of such hardware devices include a cursor control device (e.g., a mouse), a remote control (e.g. a television remote control), a mobile communication device (e.g., a wireless phone configured to control one or more operations of the computing device 102 as illustrated by computing device 104), and other devices that involve touch on the part of a user or object.
A natural user interface (NUI) may also be supported by the input/output modules 106, 108, such as to recognize interactions that may not involve touch. For example, the computing devices 102, 104 may leverage input devices to detect inputs without having a user touch a particular device, such as to recognize audio inputs through use of a microphone. For instance, the input/output modules 106, 108 may be configured to perform voice recognition to recognize particular utterances (e.g., a spoken command) as well as to recognize a particular user that provided the utterances.
In another example, the input/output modules 106, 108 that may be configured to recognize gestures, presented objects, images, and so on through use of a camera. The camera, for instance, may be configured to include multiple lenses so that different perspectives may be captured and thus determine depth as shown for computing device 102 in the game console configuration. The different perspectives, for instance, may be used to determine a relative distance from the input device and thus a change in the relative distance. The different perspectives may be leveraged by the respective computing devices 102, 104 as depth perception. Naturally, other images may also be leveraged without use to depth sensing, such as a camera of the computing device 104 as configured as a mobile communications device. The images may be leveraged to provide a variety of functionality, such as techniques to identify particular users (e.g., through facial recognition), objects, perform searches, and so on.
The input-output modules 106, 108 may leverage the inputs to perform skeletal mapping along with feature extraction of particular points of a human body (e.g., 48 skeletal points) to track one or more users (e.g., four users simultaneously) to perform motion analysis. For instance, captured images may be analyzed by the input/output modules 106, 108 to recognize one or more motions made by a user, including what body part is used to make the motion as well as which user made the motion. An example is illustrated through recognition of positioning and movement of one or more fingers of a user's hand 112 and/or movement of the user's hand 112 as a whole. The motions may be identified as gestures by the input/output modules 106, 108 to initiate a corresponding operation.
The computing devices 102, 104 are further illustrated as including respective linking modules 114, 116. The linking modules 114, 116 are representative of functionality of the respective devices to initiate and manage one or more network connections between the devices. The connections may be used to support a variety of different functionality, such as a companion experience. For example, the computing device 104 configured as a mobile communications device may interact with the computing device 102 configured as a game console to supplement the user experience. This may include use of the computing device 104 as a game controller, output of an electronic program guide to control an output of broadcast content by the computing device 102, and so on. Thus, interaction with the computing device 104 may be used to control one or more operations performed by the computing device 102 and vice versa. The computing device 102, for instance, may provide supplemental content for output by the computing device 104.
The linking modules 114, 116 may include a variety of different functionality to initiate and manage the network connections. For example, the linking modules 114, 116 may include functionality to form a local network connection 118 between the devices (e.g., a local Wi-Fi connection) and/or a remote connection involving a network 120, e.g., “over the cloud” by leveraging a service provider 122 that is accessible via the Internet. Accordingly, in this second example the service provider 122 is also illustrated as including a linking module 124 which is representative of functionality of the service provider 122 to also support device linking functionality.
The linking modules 114, 116, for instance, may leverage the remote connection of the network 120 to contact the service provider 120 to perform device discovery, e.g., “locate” a device with which to communicate. This data may then be used to set-up a local network connection 118 between the devices to support the companion experience as described earlier. In another example, this connection may be maintained in whole or in part over a remote connection involving the network 120, e.g., the Internet or other wide area network. Thus, the linking modules 114, 116 may leverage a variety of different types of connections and techniques to form the connections, further discussion of which may be found in relation to the following figure.
Generally, any of the functions described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), or a combination of these implementations. The terms “module,” “functionality,” and “logic” as used herein generally represent software, firmware, hardware, or a combination thereof. In the case of a software implementation, the module, functionality, or logic represents program code that performs specified tasks when executed on a processor (e.g., CPU or CPUs). The program code can be stored in one or more computer readable memory devices. The features of the techniques described below are platform-independent, meaning that the techniques may be implemented on a variety of commercial computing platforms having a variety of processors.
For example, the computing devices 102, 104 may also include an entity (e.g., software) that causes hardware of the computing devices 102, 104 to perform operations, e.g., processors, functional blocks, and so on. For example, the computing devices 102, 104 may include a computer-readable medium that may be configured to maintain instructions that cause the computing device, and more particularly hardware of the computing devices 102, 104 to perform operations. Thus, the instructions function to configure the hardware to perform the operations and in this way result in transformation of the hardware to perform functions. The instructions may be provided by the computer-readable medium to the computing device 102 through a variety of different configurations.
One such configuration of a computer-readable medium is signal bearing medium and thus is configured to transmit the instructions (e.g., as a carrier wave) to the hardware of the computing device, such as via a network. The computer-readable medium may also be configured as a computer-readable storage medium and thus is not a signal bearing medium. Examples of a computer-readable storage medium include a random-access memory (RAM), read-only memory (ROM), an optical disc, flash memory, hard disk memory, and other memory devices that may use magnetic, optical, and other techniques to store instructions and other data.
Once authenticated, functionality of the linking module 124 may be exposed, such as to form a connection between the devices. The linking module 124, for instance, may be configured to maintain data that describes network connection details that may be utilized to form a network connection between the devices. This may include data that describes local network connection 118 details, such as to support a Wi-Fi connection through use of an identifier, network name, and so on. This data may also describe remote connection details for access via the network 120 (e.g., the Internet), such as an IP address, bandwidth supported, location information, network access type, and so on.
The data may be communicated to the service provider 122 in a variety of ways and at a variety of times. For example, the data may be communicated as part of authentication, may be stored from a previous communication, may be provided in response to a request received from the service provider 122 (e.g., after authentication has been achieved), and so on. Thus, the linking modules 114, 116 may communicate a variety of different data that may be leveraged to form a connection.
In one or more implementations, settings may be exposed on the respective linking modules 114, 116 to control whether to provide this data. For example, a configuration setting may be exposed to make the respective computing device discoverable, which may be set “on” as a default although other examples are also contemplated.
Additionally, another configuration setting may be used to control whether the computing device is to maintain a live connection with the service provider 122, which may be set to “off” as a default. This may be used to reduce resource consumption (e.g., by the network 120 and/or service provider), such that the service provider 122 is not forced to maintain the device connection feature for devices that do not wish to do so. For example, this setting may be set to “off” initially. However, once a connection is attempted this setting may be switched to “on” automatically and without user intervention to maintain a “ready” open connection to perform the linking described herein.
To initiate a connection, the computing devices 102, 104 may first “discover” each other in a variety of ways. For example, the linking modules 114, 116 may be configured to first determine whether another device is available via the local network connection 118, such as available via a Wi-Fi, Bluetooth, or other wired or wireless network. This discovery may be configured to leverage data previously stored by the respective linking modules 114, 116, such as identification of particular network identifiers of the respective computing devices 102, 104, networks, and other information, although other examples are also contemplated.
If a device is not so discovered, the linking modules 114, 116 may communicate with the service provider 112 to discover if another device is available for a connection. The computing devices 102, 104, for instance, may communicate data that indicates a location of the devices, data that is usable to discover the devices over a local connection, and so on. The data may indicate a particular location, such as in a particular room, leverage GPS coordinates, and other position-determination functionality. Further, this information may be used to determine a type of connection to establish, such as to establish a remote connection via the network 120 when a local network connection 118 is not available, e.g., the devices are located apart at a distance that is greater than that supported by the local network connection 118.
For example, the computing device 104 may communicate with the linking module 124 of the service provider 122 via the network 120 to determine whether other devices (e.g., computing device 102) that are registered with the user's account are available for linking The service provider 122 may then return an answer, which may include additional local network connection information (e.g., wireless or wired subnet) for those devices. The linking module 116 of the computing device 104 may then search the local network to try to find the other device or devices using that information. If found, the computing devices 102, 104 may negotiate a direct link via a local network connection 118 to communicate, which may support more efficient communication than that supported via the network 120 in one or more instances. For instance, the local network connection 118 may support a higher bandwidth than a remote connection via network 120. Further, cost considerations may also be utilized as part of a decision process regarding which network to use, e.g., a Wi-Fi network versus a mobile phone network that has a usage cap.
If not found, the computing devices 102, 104 may communicate via the network 120 in a variety of ways. For example, communications may pass through the service provider 122 as an intermediary. Thus, the communications in this example may leverage the internet or other wide area network to connect the devices, one to another. In another example of a remote connection, tunneling techniques may be supported to pass the communications, such as by leveraging IP addresses of the other devices by the respective linking modules 114, 116 to communicate directly via the network 120 without having the service provider 122 actively work as an intermediary.
A variety of other examples are also contemplated, such as a hybrid mode in which different communications are passed via different networks. For example, such a hybrid mode may be used to support communication of commands via the network 120 and content via the local network connection 118 and vice versa. This division of communications may be performed for a variety of reasons, such as due to limitations in a topology of specific network connections supported by the respective networks.
In some instances, characteristics of a network connection may change during usage. Accordingly, the linking modules 114, 116, 124 may be configured in a variety of different ways to address these changes. For example, the linking modules 114, 116, 124 may be configured to notify a user (e.g., via a user interface) of this change. Additionally, the linking modules 114, 116, 124 may be configured to adjust (e.g., disable) features that may not work well in this state, such as to reduce a resolution, functionality that is communication intensive, features that are not supported by that network, and so on.
Further, the linking modules 114, 116, 124 may be configured to cache commands, which may be used to improve efficiency and handle intermittent connection issues. This caching may be performed at the computing devices 102, 104 as well as at the service provider 122. A variety of other examples are also contemplated.
For example, the linking modules 114, 116, 124 may be configured to support automatic fallback recovery. The local network connection 118, for instance, may degrade or become disconnected, such as due to movement of the computing device 104 away from computing device 102, network interference, and so on. In such instances, the linking modules 114, 116, 124 may cause a connection to be achieved via the network 120, instead, may decide to employ a hybrid format as previously described, and so on. The reverse is also true in that if reliability of the network 120 decreases the local network connection 118 may be leveraged automatically and without user intervention to support communication between the devices.
This change may also be used to switch networks responsive to a determination that another one of the networks has become available. For example, computing device 104 may initially communicate with computing device 102 over the Internet, such as when the computing device 104 is positioned at a distance at which the local network connection 118 is not supported. Responsive to a determination that the computing device 104 is now within local network range of the computing device 102, the linking modules 114, 116 may automatically communicate over the local network connection 118. As previously described, a variety of considerations may be taken into account in use of this functionality, such as cost considerations described above. Thus, a variety of different functionality may be leveraged to support device linking, which may also be used to support a variety of additional functionality such as a companion experience as previously described.
A variety of other functionality may also be supported by the linking modules 114, 116, 124. For example, as described above the connection may be bi-direction such that each of the devices may send and receive data from other devices. This functionality may be leveraged in a variety of ways. Computing device 102, for instance, may be configured to inform computing device 104 as to a current state in an output of content. Computing device 104 may then leverage this information to provide functionality, such as to locate related content, perform an Internet search based on one or more scenes associated with the related content, and so forth. The reverse is also true in that computing device 104 may communicate a state to computing device 102, which may be leveraged by the device to support functionality, such as to continue playback of content at a current point by computing device 102 that corresponds to an output of content by computing device 104.
In another example, the linking modules 114, 116, 124 may also support a variety of different encryption methods to protect communications, both via the local network connection 118, remotely via the network 120, and so on. Further, although the internet was described in relation to network 120, a variety of different types of networks may also be supported by the techniques, such as with a single domain, as part of an enterprise, an intranet, and so on. Further discussion of device linking techniques may be found in relation to the following procedures.
Example Procedures
The following discussion describes device linking techniques that may be implemented utilizing the previously described systems and devices. Aspects of each of the procedures may be implemented in hardware, firmware, or software, or a combination thereof. The procedures are shown as a set of blocks that specify operations performed by one or more devices and are not necessarily limited to the orders shown for performing the operations by the respective blocks. In portions of the following discussion, reference will be made to the environment 100 of
A communication is formed to be received by one of the plurality of devices that includes a portion of the data that pertains to another one of the plurality of devices and that is suitable by the receiving device to discover the other one of the plurality of devices to initiate a local network connection between the devices (block 304). The communication, for instance, may include data usable to locate the devices locally, e.g., a wired or wireless subnet via which the other device is accessible via the local network connection. The communication may also include data usable to locate the devices remotely, such as an IP address. This data may then be used to form connections that may be used to support a variety of functionality, such as a companion experience as described earlier.
Responsive to a determination by the computing device that the other computing device is available via a local network connection, the local network connection is formed by the computing device with the other computing device (block 404). The computing device 102, for instance, may form a local wireless connection (e.g., Wi-Fi) with computing device 104, if available.
Responsive to a determination by the computing device that the other computing device is not available via a local network connection, a non-local network connection is formed by the computing device with the other computing device (block 406). Continuing with the previous example, if the computing device 104 is not available via the local network connection 118, the computing device 102 may form a network connection via the network 120, e.g., the Internet or other wide area network. A variety of other examples are also contemplated.
Data received from the network service is used to initiate a local network connection between the computing device and the device as a result of the discovering that is usable to communicate data involved in the companion experience (block 504). The computing device 104, for instance, may receive data described a wired or wireless subnet via which computing device 102 is available. A variety of other examples are also contemplated, examples of which may be found in relation to the following implementation example.
Implementation Example
The following describes an implementation example of the techniques described previously. In one or more companion experience scenarios, a user may be able to use a device to browse the video catalog and so on and then pick a movie, rent it and play it on the console. During the movie, the user may be able to control it, for example, play/pause, fast forward and rewind and so on using a mobile communications device or other device. A game console may also be configured to notify the device about things happening on the console, like current movie state, title change on the console etc. From the device, the user may be able to launch a title on the console, e.g., to get the title ID of the title running on the console.
In terms of communication between the devices, message exchanges may fall into a variety of categories, examples of which include:
There are a variety of notifications that may occur in the system:
There are a variety of operations that can be issued in the system:
Media State
The primary data structure in this example that is used in both protocol and APIs is the media state structure. This structure represents the current play head state and content ID that is playing within a media application/title. Media State may be derived from the console Media APIs and includes the following fields/properties:
ScourTransportState is an enumeration taken from the console media APIs:
An additional enumeration value to indicate that no media is playing (e.g., a game is running) may be configured as follows:
When this value is used, the remaining fields of the media state are undefined.
TransportCapabilities is a flags enumeration that indicates what operations the media player may perform:
Communication
The communication stack used to enable companion scenarios may combine local low-latency TCP and UDP messaging with a cloud-based service to support security and device discovery as well as communication between devices that do not have line-of-sight IP connectivity.
Communication may be coordinated through the cloud, e.g., a network service. The console registers with the companion service in order to be discovered by companion devices. The companion device uses the companion service to determine with which device it may communicate. If there is line-of-sight IP connectivity between the console and the companion device, subsequent communication between that device and the console may happen over local TCP and UDP messaging without service intervention. If there is no line-of-sight IP connectivity between the console and the companion device, communication may happen via the companion service, albeit at a higher latency. The companion application may adapt its user interface based on whether a low-latency communication stack is available, disabling features that “do not make sense” when relying on cloud-based messaging.
Device discovery/pairing/authorization may happen through the companion service. The system may perform this as follows:
The console may re-register with the companion service when the set of logged on users changes. Part of this registration may include a set of active users, an IP address of the console, and the TCP port being used to listen for local companion commands. Upon registering, the companion service may return a secure session key that the console can use to securely sign and encrypt messages on the local subnet.
When the companion device attempts to join a session, it contacts the companion service, which then returns both the network address of the console the current user is logged into, as well as the secure session key that can be used to sign and seal messages on the local subnet.
Communication with the service may be performed over HTTPS. If line-of-sight IP connectivity is available, subsequent communication may take place using the TCP/IP for commands (using the TCP/IP address of the console), and UDP broadcast for notifications (using the IP subnet address of the console). If line-of-sight IP connectivity is not available, subsequent communications may take place via the companion service.
In one or more implementations, it is possible that TCP connectivity to the console is possible, but UDP broadcast to the device is not due to the console and companion device being separated by an IP router. In that case, the companion device may receive notifications via the companion service but still issue commands (and receive their responses) over direct TCP to the console.
Security
In addition to the security provided by the local-subnet (e.g., WEP or WPA over Wi-Fi), communication in the system may be secured as follows.
Companion Device to Companion Service
Communication between the companion device and the service may be performed over HTTPS, which may be authenticated using a network ID that corresponds to a valid console ID. The mobile communications device, for instance, may acquire an authentication (e.g., SAML) token from a linking service such as XBL, which it then presents to the companion service. The companion service then issues one or more security tokens for subsequent calls to the service. For example, a token may be used of subsequent calls to the service and another token may be used for the console and the mobile communication device to authenticate the messages.
Console to Companion Service
Communication between the console and the service may be performed over HTTPS. When the set of logged in XBL users on the console changes, the console may acquire a SAML token from XBL, which it then presents to the companion service. The companion service then issues a security token for subsequent calls to the service.
Companion Device to/From Console
Once the companion device or console have authenticated against the companion service, the devices may then establish a secure session to communicate, one with another. A session may be thought of as a secure context that multiple devices can use to communicate. Each session may have:
Messages sent between devices on the local subnet may be integrity protected and encrypted. Integrity protection may be provided using HMAC-SHA1, while encryption may be performed using AES-128 in CBC mode. Replay protection may be implemented using sequence numbers. The receiver may maintain a ‘high water mark’ number and reject messages with a lower number.
Console Implementation
The majority of the communication stack for companion may be implemented in the console operating system, with a minimal API set exposed to titles.
Console API
The companion API may be called by titles. The API may be referred to as “LrcSetMediaState.” LrcSetMediaState is called by media player titles to communicate that the playhead state or content ID has changed. This function may be called:
The implementation of this API may implement the heuristics to determine when to actually send media state change notifications based on the type of change that has occurred. In general:
The signature of the API is as follows
The function returns S_OK upon success, E_FAIL upon failure.
LrcGetInput/LrcGetInputWithSeek
The LrcGetInput/LrcGetInputWithSeek API is designed to be called as part of a title's input polling routine. LrcGetInput is designed to be called from titles that cannot support seek commands for getting control commands from a companion device. LrcGetInputWithSeek is designed for titles that can support a “seek” operation.
If there is an input event present, the function returns ERROR_SUCCESS. If there is no input event present, the function returns ERROR_EMPTY.
The pdwUserIndex is a pointer to an index of the signed-in user (e.g., gamer) associated with the device, which can be a value in the range from 0 to XUSER_MAX_COUNT−1, or set to XUSER_INDEX_ANY to fetch the next available input event from any user.
On return, the variable pointed to by pdwUserIndex may contain the index of the gamer associated with the device that was the source of the input event. This is useful if the variable pointed to by pdwUserIndex contained XUSER_INDEX_ANY on input.
The dwFlags parameters may be either XINPUT_FLAG_ANYDEVICE or, if pdwUserIndex has the value XUSER_INDEX_ANY, XINPUT_FLAG_ANYUSER.
The pKeystroke parameter may be a non-null pointer to an XINPUT_KEYSTROKE structure.
The pSeekPos parameter may be a non-null pointer to a ULONGLONG.
For LrcGetInput, if the function returns ERROR_SUCCESS, the structure referenced by pKeystroke may contain the XINPUT_KEYSTROKE data for this input event.
For LrcGetInputWithSeek,
For both of these APIs, the human interface device (HID) code corresponding to the input is standard hardware code. The UserIndex may be set to the correct index based on the companion device's current user, which may be zero to three. In no new keys have been pressed (and the case of GetInputWithSeek, there is no seek information), the APIs return ERROR_EMPTY. If pdwUserindex contains an ID on input for which there is no corresponding logged on user, these APIs return ERROR_DEVICE_NOT_CONNECTED.
Implementation of Companion Component Inside Console
At boot, the console creates a TCP listener socket on a dynamic port between X and Y to support incoming connections for commands. The listen queue length is one (1), and the console may accept one incoming connection at a time to conserve resources. That means that after servicing an incoming command request and sending the corresponding response, the console may close the TCP connection prior to making the next accept call on the listener socket.
When sending a notification over the local subnet, the console may create a UDP socket, make the call to sendto, and then close the socket. Note that both the TCP and UDP socket usage is optimized to reduce the number of open sockets, which is the correct optimization for code running in the console. The protocol may be designed to allow implementations to hold TCP connections open for more than one message exchange. In addition to the socket usage described above, one additional socket may be consumed for the console to interact with the companion service.
At each logon change that involves an XBL account/profile logging in or out, the console contacts the companion service indicating that the set of users has changed on that console. This call also registers the local IP address of the console and the TCP port being used to listen for incoming command requests. Additionally, a pending COMET-style HTTP request may be kept “parked” on the service to respond to incoming requests from non-line-of-sight-IP devices. This request is reissued every thirty seconds, and is terminated when the logon set on the console changes.
Console Resource Consumption
The total socket usage from the console is:
That means a minimum of 2 sockets are consumed, and a maximum of 4 (if a UDP notification is allowed to be sent prior to sending a TCP response) or 3 (if notifications are deferred for sending until the TCP connection is torn down).
Protocol Overview
The protocol uses direct TCP connections that are initiated from the companion device to the console to support invoking operations on the console. The protocol design supports multiple pending requests per TCP connection, as well as out-of-order response delivery, however, our console implementation may close the connection after sending the first response.
The protocol uses UDP broadcast from the console to companion devices to support sending notifications. The message formats below may be sent securely over TCP or UDP using the signing/encryption rules described below.
Message Formats
Messages may be encoded in binary big-endian format over the network. Each message fields may be aligned on their native boundary (i.e., WORD on a 2-byte boundary, DWORD on a 4-byte boundary, etc.). Fixed length strings are encoded as ‘\0’-terminated UTF-8 text, and do not contain a leading Unicode BOM, which may be stripped by the writer.
A secure framing protocol is defined for use in both TCP connections and UDP payloads. The format of those messages includes:
Message Headers
Messages begin with a 32 byte message header whose content is as follows:
The “To” and “From” message header fields are used to support replay detection as each companion device has its own sequence number. Without the “From” field in requests, the console would not be able to determine which client had sent the message and so would be unable to determine the correct sequence number. Without the “To” field in responses, an attacker could potentially replay a message intended for one device to a different device.
There are two discriminator fields in the message header: MessageKind and MessageType. The MessageKind field indicates whether the message is a:
The MessageType field identifies the format and semantics of a given operation or notification. An example list of message types supported are:
Response messages have to additional fields in their message header.
“Response” messages begin with a four byte result code that is treated like an HRESULT. Specifically, a value of 0×00000000/S_OK indicates successful execution of the requested operation. Specific result codes are defined for each response message type.
Message Trailers
Messages ends with a 20 byte
Message Bodies
This section defines the format and semantics of the specific message types that may be supported by the protocol. The bytes follow the SequenceNumber message header field and precede the message trailer are encrypted.
JoinSession Request Message
This message is sent from a companion device to a console in order to (a) ensure that the protocol versions match and (b) acquire initial sequence numbers to use for inbound and outbound messages. The JoinSession request/response may occur before any additional messages from the companion device are sent to the console over the local subnet.
JoinSession Response Message
This message is sent to a companion device to/from a console in order to (a) ensure that the protocol versions match and (b) convey initial sequence numbers to use for inbound and outbound messages.
If the ResultCode is S_OK (0), then the requested protocol version is supported. Also:
GetActiveTitleId Request Message
This message is sent from a companion device to a console in order to query the active title ID on the console.
GetActiveTitleId Response Message
This message is sent to a companion device to/from a console in response to a GetActiveTitleId request message and indicates the currently running title.
The TitleId is the console Title ID for the title currently running on the console.
LaunchTitle Request Message
This message is sent from a companion device to a console in order to launch a title with a specified command-line argument.
The TitleId is the console Title ID for the title currently running on the console. The LaunchParameter field typically identifies the content to be played once the title has launched. The exact interpretation of this field is title-specific.
LaunchTitle Response Message
This message is sent to a companion device to from a console in order to indicate the success/failure of title launch.
SendInput Request Message
The ValidFields field has a value of 0×01 if the request contains a keystroke, 0×02 if the request contains a seek command and 0×03 if it contains both. The VirtualKey is identical to its definition in XINPUT_KEYSTROKE. The SeekPosition is used to convey a seek command If this request message is NOT indicating a seek, this field may have a value of 0×FFFFFFFFFFFFFFFF (−1).
SendInput Response Message
This message is sent to a companion device to/from a console in order to indicate the success/failure of the SendInput operation.
GetMediaAndTitleState Command Message
This message is sent from a companion device to a console in order to query the media state on the console.
GetMediaAndTitleState Response Message
If the ResultCode is S_OK (0) and the TransportState is not SCOURTRANSPORTSTATE_NOMEDIA, then the other media state fields (Duration, Position, . . . , MediaAssetId) are all valid. If the ResultCode is S_OK (0) and the TransportState is SCOURTRANSPORTSTATE_NOMEDIA, then there is no current media on the console and the remaining media state values are undefined.
NonMediaTitleStateNotification Message
The NonMediaTitleStateNotification message indicates that a non-media-enabled console title (e.g., a game) is currently running on the console. The NonMediaTitleStateNotification message is sent by the console via UDP broadcast when:
This message does NOT need to be sent from the console to the cloud, as title change forces a re-authentication against the cloud, which conveys the title ID. This message may be sent from the cloud to the companion devices.
MediaTitleStateNotification Message
The MediaTitleStateNotification message indicates that a media-enabled console title (e.g., a tile related to a video streaming service) is currently running on the console. This message conveys both the console title ID as well as the current content ID and playhead state.
The MediaTitleStateNotification message is sent by the console via UDP broadcast when:
The MediaTitleStateNotification message is sent by the console to the cloud when:
This message may be sent from the cloud to the companion devices.
If the TransportState is not SCOURTRANSPORTSTATE_NOMEDIA, then the other media state fields (Duration, Position, . . . , MediaAssetId) are valid. If the TransportState is SCOURTRANSPORTSTATE_NOMEDIA, then there is no current media on the console and the remaining media state values are undefined.
Console and Cloud Communication
When a user logs on to the console, the console reports the user info to the cloud so that the cloud may know who is logged onto the console. The console also tells the cloud about its local subnet IP address. The console reports to the cloud when a user logs off.
Notification Model
The console may use the unicast approach to announce certain changes on the console, like title change, media state change, and so on. The socket established between the device and the console may be used to do this.
On the companion device side, the runtime library may provide notification capability. That is, a linking module can register for whatever events it is interested in and the runtime layer may notify the app to those events as the events happen.
Runtime Library on the Device Side
A runtime library may be utilized on each supported devices.
Here are example APIs that may be supported:
1. bool JoinSession( )
2. DisconnectSession( )
3. TitleInfo[] GetAvailableTitles( )
For example, here is one of the possible returns from this function:
4. unsigned int GetCurrentRunningTitleId( )
5. void Launch(unsigned int TitleId, string parameter)
6. void SendControlCommand(CommandType key)
7. Notification APIs
public interface IconsolePropertyChangeDelegate
These APIs are used to let the device receive notification events from the console, like the state change, title change on the console, and so on. Although specific examples are described, it should be readily apparent that the discussion and following claims are not necessarily limited to those examples.
Example System and Device
In the example system 600, multiple devices are interconnected through a central computing device. The central computing device may be local to the multiple devices or may be located remotely from the multiple devices. In one embodiment, the central computing device may be a cloud of one or more server computers that are connected to the multiple devices through a network, the Internet, or other data communication link. In one embodiment, this interconnection architecture enables functionality to be delivered across multiple devices to provide a common and seamless experience to a user of the multiple devices. Each of the multiple devices may have different physical requirements and capabilities, and the central computing device uses a platform to enable the delivery of an experience to the device that is both tailored to the device and yet common to all devices. In one embodiment, a class of target devices is created and experiences are tailored to the generic class of devices. A class of devices may be defined by physical features, types of usage, or other common characteristics of the devices.
In various implementations, the computing device 102 may assume a variety of different configurations, such as for computer 602, mobile 604, and television 606 uses. Each of these configurations includes devices that may have generally different constructs and capabilities, and thus the computing device 102 may be configured according to one or more of the different device classes. For instance, the computing device 102 may be implemented as the computer 602 class of a device that includes a personal computer, desktop computer, a multi-screen computer, laptop computer, netbook, and so on.
The computing device 102 may also be implemented as the mobile 604 class of device that includes mobile devices, such as a mobile phone, portable music player, portable gaming device, a tablet computer, a multi-screen computer, and so on. The computing device 102 may also be implemented as the television 606 class of device that includes devices having or connected to generally larger screens in casual viewing environments. These devices include televisions, set-top boxes, gaming consoles, and so on. The techniques described herein may be supported by these various configurations of the computing device 102 and are not limited to the specific examples the techniques described herein.
The cloud 608 includes and/or is representative of a platform 610 for content services 612. The platform 610 abstracts underlying functionality of hardware (e.g., servers) and software resources of the cloud 608. The content services 612 may include applications and/or data that can be utilized while computer processing is executed on servers that are remote from the computing device 102. Content services 612 can be provided as a service over the Internet and/or through a subscriber network, such as a cellular or Wi-Fi network. Examples of this are illustrated as inclusion of the linking module 114 on the computing device. As previously described, these techniques may also leverage “the cloud,” such as through implementation of the linking module 124 as part of the platform 310 described below.
The platform 610 may abstract resources and functions to connect the computing device 102 with other computing devices. The platform 610 may also serve to abstract scaling of resources to provide a corresponding level of scale to encountered demand for the content services 612 that are implemented via the platform 610. Accordingly, in an interconnected device embodiment, implementation of functionality of the functionality described herein may be distributed throughout the system 600. For example, the functionality may be implemented in part on the computing device 102 as well as via the platform 610 that abstracts the functionality of the cloud 608.
Device 700 also includes communication interfaces 708 that can be implemented as any one or more of a serial and/or parallel interface, a wireless interface, any type of network interface, a modem, and as any other type of communication interface. The communication interfaces 708 provide a connection and/or communication links between device 700 and a communication network by which other electronic, computing, and communication devices communicate data with device 700.
Device 700 includes one or more processors 710 (e.g., any of microprocessors, controllers, and the like) which process various computer-executable instructions to control the operation of device 700 and to implement embodiments of the techniques described herein. Alternatively or in addition, device 700 can be implemented with any one or combination of hardware, firmware, or fixed logic circuitry that is implemented in connection with processing and control circuits which are generally identified at 712. Although not shown, device 700 can include a system bus or data transfer system that couples the various components within the device. A system bus can include any one or combination of different bus structures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and/or a processor or local bus that utilizes any of a variety of bus architectures.
Device 700 also includes computer-readable media 714, such as one or more memory components, examples of which include random access memory (RAM), non-volatile memory (e.g., any one or more of a read-only memory (ROM), flash memory, EPROM, EEPROM, etc.), and a disk storage device. A disk storage device may be implemented as any type of magnetic or optical storage device, such as a hard disk drive, a recordable and/or rewriteable compact disc (CD), any type of a digital versatile disc (DVD), and the like. Device 700 can also include a mass storage media device 716.
Computer-readable media 714 provides data storage mechanisms to store the device data 704, as well as various device applications 718 and any other types of information and/or data related to operational aspects of device 700. For example, an operating system 720 can be maintained as a computer application with the computer-readable media 714 and executed on processors 710. The device applications 718 can include a device manager (e.g., a control application, software application, signal processing and control module, code that is native to a particular device, a hardware abstraction layer for a particular device, etc.). The device applications 718 also include any system components or modules to implement embodiments of the techniques described herein. In this example, the device applications 718 include an interface application 722 and an input/output module 724 that are shown as software modules and/or computer applications. The input/output module 724 is representative of software that is used to provide an interface with a device configured to capture inputs, such as a touchscreen, track pad, camera, microphone, and so on. Alternatively or in addition, the interface application 722 and the input/output module 724 can be implemented as hardware, software, firmware, or any combination thereof. Additionally, the input/output module 724 may be configured to support multiple input devices, such as separate devices to capture visual and audio inputs, respectively.
Device 700 also includes an audio and/or video input-output system 726 that provides audio data to an audio system 728 and/or provides video data to a display system 730. The audio system 728 and/or the display system 730 can include any devices that process, display, and/or otherwise render audio, video, and image data. Video signals and audio signals can be communicated from device 700 to an audio device and/or to a display device via an RF (radio frequency) link, S-video link, composite video link, component video link, DVI (digital video interface), analog audio connection, or other similar communication link. In an embodiment, the audio system 728 and/or the display system 730 are implemented as external components to device 700. Alternatively, the audio system 728 and/or the display system 730 are implemented as integrated components of example device 700.
Conclusion
Although the invention has been described in language specific to structural features and/or methodological acts, it is to be understood that the invention defined in the appended claims is not necessarily limited to the specific features or acts described. Rather, the specific features and acts are disclosed as example forms of implementing the claimed invention.
This application is a continuation of and claims priority to U.S. patent application Ser. No. 15/442,346, filed Feb. 24, 2017, and titled “Device Linking,” which is a continuation of and claims priority to U.S. patent application Ser. No. 13/915,597, filed Jun. 11, 2013 and titled “Device Linking,” which is a continuation of and claims priority to U.S. patent application Ser. No. 13/291,354, filed Nov. 8, 2011 and titled “Device Linking,” which claims priority under 35 U.S.C. Section 119(e) to U.S. Provisional Patent Application No. 61/545,947, filed Oct. 11, 2011 and titled “Device Linking”. The entire disclosure of each application is hereby incorporated by reference.
Number | Name | Date | Kind |
---|---|---|---|
20040068756 | Chiu | Apr 2004 | A1 |
20120206317 | Wong | Aug 2012 | A1 |
Number | Date | Country |
---|---|---|
102130807 | Jul 2011 | CN |
Entry |
---|
“Non-Final Office Action Issued in U.S. Appl. No. 15/442,346”, dated May 18, 2017, 13 Pages. |
“Office Action Issued in Canadian Patent Application No. 2,851,507”, dated Aug. 28, 2018, 7 Pages. |
“Office Action Issued in Indian Patent Application No. 2433/CHENP/2014”, dated Oct. 16, 2019, 6 Pages. |
“Office Action Issued in Canadian Patent Application No. 2,851,507”, dated Jan. 14, 2020, 3 Pages. |
Number | Date | Country | |
---|---|---|---|
20180234831 A1 | Aug 2018 | US |
Number | Date | Country | |
---|---|---|---|
61545947 | Oct 2011 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 15442346 | Feb 2017 | US |
Child | 15951494 | US | |
Parent | 13915597 | Jun 2013 | US |
Child | 15442346 | US | |
Parent | 13291354 | Nov 2011 | US |
Child | 13915597 | US |