WO2024137106A1 - Universal mobile game controller - Google Patents

Universal mobile game controller Download PDF

Info

Publication number
WO2024137106A1
WO2024137106A1 PCT/US2023/081101 US2023081101W WO2024137106A1 WO 2024137106 A1 WO2024137106 A1 WO 2024137106A1 US 2023081101 W US2023081101 W US 2023081101W WO 2024137106 A1 WO2024137106 A1 WO 2024137106A1
Authority
WO
WIPO (PCT)
Prior art keywords
host
descriptor
game controller
request
hid
Prior art date
Application number
PCT/US2023/081101
Other languages
French (fr)
Inventor
Shawn O'CONNER
Original Assignee
Backbone Labs, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Backbone Labs, Inc. filed Critical Backbone Labs, Inc.
Publication of WO2024137106A1 publication Critical patent/WO2024137106A1/en

Links

Definitions

  • a controller can be used with a computing device to select and/or interact with content using user input devices on the controller.
  • the content can be locally-stored on the computing device and/or streamed from a remote device.
  • the controller can be a game controller used to play a game that is native to the computing device and/or to play a game that is streamed from a remote server to a browser of the computing device.
  • Figure 1 is a block diagram of a computing environment of an embodiment.
  • Figure 2 is an illustration of a controller and computing device of an embodiment.
  • Figure 3 is a block diagram of a computing environment of an embodiment.
  • Figure 4 is an illustration of a descriptor layout of an embodiment.
  • Figure 5 is an illustration of a device descriptor of an embodiment.
  • Figure 6 is an illustration of a configuration descriptor of an embodiment.
  • Figure 7 is an illustration of an interface descriptor of an embodiment.
  • Figure 8 is an illustration of an endpoint descriptor of an embodiment.
  • Figure 9 is an illustration of a human interface device (HID) descriptor of an embodiment.
  • Figure 10 is an illustration of an HID report descriptor of an embodiment.
  • Figure 11 is a flow chart of an unauthenticated game controller flow of an embodiment.
  • Figure 12 is a flow chart of an authenticated game controller flow of an embodiment.
  • Figure 13 is an illustration of a primary system architecture of an embodiment.
  • Figure 14 is an illustration of a secondary system architecture of an embodiment.
  • Figure 15 is an illustration of a combined system architecture of an embodiment.
  • Figure 16 is an illustration of a universal serial bus (USB) architecture of an embodiment.
  • Figure 17 is an illustration of an embedded system of an embodiment.
  • Figure 18 is a data flow diagram of an embodiment.
  • Figure 19 is an illustration of an accessory-app architecture of an embodiment.
  • Figure 20 is an illustration of Android USB device descriptors of an embodiment.
  • Figure 21 is an illustration of iOS USB device descriptors of an embodiment.
  • Figure 22 is an illustration of full device descriptors of an embodiment.
  • Figure 23 is an illustration of an Android enumeration sequence of an embodiment.
  • Figure 24 is an illustration of an iOS enumeration sequence of an embodiment.
  • Figure 25 is an illustration of a Windows enumeration sequence of an embodiment.
  • Figure 26 is an illustration of a Mac enumeration sequence of an embodiment.
  • Figure 27 is an illustration of primary and secondary ports of an embodiment.
  • Figure 28 is an illustration of configurable profile data of an embodiment.
  • Figure 29 is a flow chart of a method for USB audio switching of an embodiment.
  • Figure 30 is a flow chart of a hybrid HID game controller method of an embodiment.
  • a controller in one implementation, a mobile game controller
  • multiple computing device operating systems e.g., Android and iOS, although other operating systems can be used
  • a common connector e.g., USB-C, although other common connectors can be used
  • these embodiments can enable communication to an application running within the computing device operating system. Without these embodiments, it might be necessary to have a separate embedded system to support each of the major computing device operating systems. Typically, this is done through unique product SKUs that are specifically designed for each ecosystem.
  • USB-C game controller that supports Android and iOS (examples of computing device operating systems, but others can be used) can be provided. That is, instead of building separate products for iOS and Android, for example, with these embodiments, a single version can support both, which is more efficient in various facets of product development and is more intuitive to customers because there is no ambiguity in identifying which version is needed.
  • Figure 1 is an illustration of a computing environment of an embodiment. As shown in Figure 1, this environment comprises a user controller 100, a computing device 200, and a remote device 300. The user controller 100 and computing device 200 are in communication with each other via respective wired or wireless interfaces 108, 208. Likewise, the computing device 200 and the remote device 300 are in communication with each other via wired or wireless interfaces 209, 308.
  • “in communication with” can mean in direct communication with or in indirect communication with via one or more components, which may or may not be mentioned herein.
  • the computing device 200 and the remote device 300 are in communication with each other via a network 250 (e.g., the Internet, a local area network, a peer-to-peer wireless mesh, etc.).
  • the computing device 200 and the remote device 300 can communicate with each other in the absence of a network.
  • the remote device 300 is “remote” in the sense that it is physically separate from the computing device 200 in some fashion. In many implementations, the physical distance is relatively great, such as when the remote device 300 is located in another town, state, or country.
  • the physical distance may be relatively short, such as when the remote device 300 is in the same room or building as the computing device 200.
  • the term “remote device” can refer to a single remote device or multiple remote devices.
  • the controller 100 comprises one or more processors 102, a memory 104, and one or more user input devices 106.
  • the user input devices 106 can take any suitable form, such as, but not limited to, a button, a joystick, a switch, a knob, a touch-sensitive screen/pad, a microphone for audio input (e.g., to capture a voice command or sound), a camera for video input (e.g., to capture a hand or facial gesture), etc.
  • the controller 100 can be used by a user in the selection and (passive or active) consumption of content (e.g., playing a game, watching a video, listing to audio, reading text, navigating a displayed user interface, etc.) presented using the computing device 200 in some fashion.
  • the controller 100 may be referred to based on the content with which it is being used.
  • the controller 100 can be referred to as a game controller when it is being used to play a game.
  • controller 100 can be referred to as a mobile game controller.
  • the same controller 100 may also be used to control the playback of non-game content, such as video or audio. Accordingly, a specific use should not be read into the term “controller” unless expressly stated.
  • the computing device 200 can also take any suitable form, such as, but not limited to, a mobile device (e.g., a phone, tablet, laptop, watch, eyewear, headset, etc.) or a relatively more-stationary device (e.g., a desktop computer, a set-top box, a gaming console, etc.).
  • the computing device 200 comprises one or more processors 202 and a memory 204.
  • the memory 204 stores computer-readable program code for an operating system (O/S) 210 (e.g., iOS or Android), native content 220, and an application configured for use with the controller 100 (“controller app”) 240.
  • This application 240 will sometimes be referred to herein as the client platform operating service or system.
  • native content refers to content that is at least partially stored in the computing device 200.
  • native content can be wholly stored on the computing device; or native content can be stored partially on the computing device 20 and partially on one or more remote devices 300 or some other device or set of devices.
  • the remote device 300 also comprises one or more processors 302 and memory units 304 storing remote content 320 and an application (“ app”) 340 (which is sometimes referred to herein as the remote platform operating service or system) that can be used to communicate with the controller app 240 or another entity on the computing device 200.
  • app application
  • the computing device 200 can have one or more user input device(s) (e.g., a touchscreen, buttons, switches, etc.), as well as a display (e.g., integrated with a touchscreen).
  • user input device(s) e.g., a touchscreen, buttons, switches, etc.
  • a display e.g., integrated with a touchscreen
  • the components in the controller 100, computing device 200, and remote device 300 are all shown in respective single boxes in Figure 1, implying integration in respective single devices, it should be understood that the components can be located in multiple devices.
  • the processor 302 and memory 304 in the remote device 300 can be distributed over multiple devices, such as when the processor 302 is a server and the memory 304 is a remote storage unit.
  • the remote device 300 can also refer to multiple remote devices that are in communication with the computing device 200. Other variations for any of the devices 100, 200, 300 are possible.
  • the memory 104, 204, 304 in these various devices 100, 200, 300 can take any suitable form and will sometimes be referred to herein as a non- transitory computer-readable storage medium.
  • the memory can store computer- readable program code having instructions that, when executed by one or more processors, cause the one or more processors to perform certain functions.
  • the controller 100, computing device 200, and remote device 300 can take any suitable form.
  • the controller 100 in this example takes the form of a handheld game controller
  • the computing device 200 takes the form of a mobile phone or tablet
  • the remote device 300 takes the form of a cloud gaming system. This example is shown in Figures 2 and 3.
  • Figure 2 shows an example handheld game controller 100 and mobile phone 200 of an embodiment.
  • This game controller 100 has a number of user input devices, such as joysticks 3, buttons 4, and toggle switches 5.
  • the game controller 100 takes the form of a retractable device, which, when in an extended position, is able to accept the mobile phone 200.
  • a male communication plug on the controller 100 mates with a female communication port on the computing device 200 to place the controller 100 and computing device 200 in communication with one another.
  • the controller 100 in this embodiment also has a pass-through charging port 20 that allows the computing device 200 to have its battery charged and a headphone jack 22.
  • the controller 100 can connect to the computing device 200 through other means such as pairing wirelessly to the phone 200. Again, this is just an example, and other types of controllers can be used, such as those that do not fit around a mobile device.
  • the controller 100 can be used to play a game that is locally stored on the computing device 200 (a “native game” 220) or a game 320 that is playable via a network 250 on a cloud gaming service 300.
  • remote gameplay based on input from the game controller 100, the computing device 200 sends signals 402 to the cloud gaming service 300 and receives display data 410 back.
  • a browser on the computing device 200 is used to send and receive the signals 402, 410 to stream the game 320 to the user. There can be multiple variants of remote game play.
  • One embodiment includes a host device, such a game console, PC, or other computing device not actively being controlled that can be streamed to the active computing device, such as a smartphone. from a host device (e.g., game console or PC) that a user can access remotely via their smartphone) and
  • a cloud gaming service (which can be streamed from a data center), such as Xbox Game Pass, Amazon Luna, or other service, that can be streamed to the active computing device.
  • the controller app 240 can facilitate the selection of a game (or other content).
  • the controller app 240 can display a user interface (e.g., on a display of the computing device 200 or on another display).
  • the controller app 240 can also receive user input from the controller 100 to navigate and engage with content, for example, browse for, select, and launch a game from a displayed list of games. In this example, once the game is launched, input from the game controller 100 can be provided directly to the game or indirectly to the game through the controller app 240. As will be discussed in more detail below, the controller app 240 can enhance the standard experience offered on a computing device by extending functionality and providing enhanced interface capabilities in addition to the inherent interface of the computing device itself. For example, in some embodiments, the controller app 240 assigns a function to one or more of the user input devices on the controller 100 based on the particular content being consumed.
  • the system comprises a USB host and a USB device.
  • the USB host is typically a computing device of some kind, such as a mobile phone, tablet, or PC.
  • the USB device in this case refers to a controller (in one embodiment, a mobile game controller).
  • USB hosts have a downstream connection to the device and the USB device has an upstream connection to the host.
  • the USB device supports at a minimum USB 1.1 full speed transmission characteristics. Due to the backwards compatible nature of newer USB versions, a USB 2.0 connection or even a 3.x connection is capable of enabling the type of USB communication can be used.
  • USB communication protocol of an embodiment is summarized below. Each USB transmission can be described by a series of packets, where there is first a token packet, followed by an optional data packet, and completed with a status packet. The communication is driven by the USB host, and certain packet stages allow for data to flow upstream, such as when the host wants to read data from the device.
  • every USB packet consists of the following fields: [0056] Sync (For receiver clock synchronization) [0057] PID (Packet ID, used to identify packet type) [0058] EOP (End of Packet) [0059] With conditional fields depending on the packet type: [0060] ADDR (Device Address) [0061] ENDP (Endpoint Number) [0062] CRC (Cyclic Redundancy Check) [0063] Data [0064] Frame Number [0065] Packet Types [0066] Token Packet: Either IN, OUT, or SETUP packet which informs the USB device of the type of exchange that the host wants.
  • USB endpoints are used in the USB protocol to differentiate different sources of data exchanged on the bus and are essentially the point where the low-level protocol ends and the high-level USB functions begin. Endpoints are given a number 0-15, with zero being a required (implied) control endpoint for the protocol. At the device level, an endpoint is a chunk or allocation of USB buffer memory where the data is read or written to by USB transmissions.
  • Endpoints can be further grouped into logical interfaces, which provide a greater level of abstraction to describe their function.
  • the control endpoint is used in conjunction with standardized requests to exchange information about the USB device, which ultimately informs the host about the remaining endpoints and their intended function.
  • the description of the USB device is organized into objects referred to as descriptors, which exist as a hierarchy.
  • endpoints can be one of four types which define their transfer characteristics: [0075] Control (Command and status operations) [0076] Isochronous (Continuous periodic transfers) [0077] Bulk (Large burst transfers) [0078] Interrupt (Small device initiated transfers) [0079] Descriptors [0080] In USB, the USB device provides several descriptors to the host which encode various characteristics of the device. These descriptors are organized into a hierarchy, with the device descriptor at the top, followed by one or more configuration descriptors, and each configuration descriptor containing one or more interface descriptors.
  • Interfaces can include zero or more endpoint descriptors, with the zero case being typically used to describe an idle interface (where certain endpoints can be deactivated).
  • Figure 4 is a descriptor layout of an embodiment.
  • Device Descriptor contains the basic information about the USB device. In addition to containing various device identifiers, it defines key characteristic information that determines the USB version, control max packet size, and class of device which is required to continue further communication on the control endpoint. One other key field on the device descriptor is the number of configurations, which informs the host how many configuration descriptors follow (most devices use just one).
  • Figure 5 is a device descriptor layout of an embodiment.
  • Configuration Descriptor contains all of the remaining information about the USB device and its interfaces and endpoints. In the header of the descriptor, the number of interfaces are specified, which informs the host of how many interfaces follow. The configuration descriptor also defines power related attributes, and a USB host may interrogate multiple configurations before deciding which to use (usually using power attributes as the criteria).
  • Figure 6 is a configuration descriptor layout of an embodiment.
  • Interface Descriptor [0089] The interface descriptor is essentially a grouping of endpoints that relate to the same function or feature.
  • the interface descriptor defines the interface class, subclass, and protocol which further inform the host of the interface’s function.
  • Typical interface classes HID, Audio, Vendor
  • Figure 7 is an interface descriptor layout of an embodiment.
  • Endpoint Descriptor [0093] The endpoint descriptor associates the transfer attributes (direction, type, packet size, interval) for an endpoint number. The host uses this information for determining bandwidth requirements on the bus.
  • Figure 8 is an endpoint descriptor layout of an embodiment.
  • String Descriptor [0096] Each string on the device is stored in its own descriptor, and referenced in various other descriptors via an index.
  • HID Descriptor When implementing a human interface device (HID), this descriptor informs the host of which HID version is being used and how many associated descriptors are present. For example, if the descriptor type is specified as “report”, the descriptor count is the number of HID report descriptors implemented.
  • Figure 9 is an HID descriptor layout of an embodiment.
  • HID Report Descriptor [00101] A special descriptor used with the HID interface class/descriptor to encode the HID device and its report details.
  • a report is essentially a packet of bytes that are exchanged with the host, usually via an interrupt endpoint.
  • the HID descriptor can potentially reference multiple report descriptors, but it is up to the host to decide how to handle multiple HID devices.
  • Figure 10 is an HID report descriptor layout of an embodiment.
  • USB requests [00104] Standard requests [00105] The eight standard USB requests begin with a setup packet (token packet with the PID of setup), and are followed by a data packet in situations where data is returned, such as on a get operation.
  • USB enumeration [00121] At a high level, all USB hosts follow a similar sequence to identify a USB device through control transfers, at least at first.
  • USB device enumeration The sequence of requests to read out the descriptors of a USB device is often referred to as the USB device enumeration.
  • a typical enumeration flow can be summarized as follows: [00123] 1. Set Address [00124] 2. Get Device Descriptor [00125] 3. Get Configuration Descriptor [00126] 4. (Optional) Get String Descriptors [00127] 5. SetConfiguration [00128] 6. (Optional) Get HID Report Descriptors [00129] 7. SetInterface [00130] Once the address is set, the first part of the USB enumeration process is to get the device descriptor. The host will then use the bNumConfigurations field to determine how many configuration descriptors to read.
  • the host Upon reading the configuration descriptor, the host will decide whether the configuration is supported and allocate resources for the supported interfaces. Next, the host will usually read out the various product strings as this typically needs to be displayed to the user. Assuming the configuration is deemed acceptable, the host will issue a SetConfiguration call to inform the device which configuration it would like to use. Finally, the host does another pass of reading secondary descriptors such as HID report descriptors, strings, and finally sets idle or active interfaces.
  • Unauthenticated Game Controller For USB hosts, such as those running Android OS, that do not implement custom protocols such as authentication, the game controller device can configure a subset of its USB descriptors in a standard way such that the USB host can easily identify the game controller without custom protocols.
  • USB host behavior does not necessarily mean it cannot support custom protocols.
  • a USB host can also provide an API to interact with vendor interfaces. For example, an application running on a USB host can use an API to establish bulk data communication with the mobile game controller via connecting to a vendor interface.
  • FIG 11 is a flow chart 1100 of an unauthenticated game controller flow of an embodiment. As shown in Figure 11, the USB device is physically connected to the USB host (act 1110). Then, the USB host initiates enumeration of USB device descriptors (act 1120).
  • the USB host identifies the HID interface and reads the HID report descriptor (act 1130). The USB host then parses the HID report descriptor and determines that the device is a game controller (act 1140). Finally, the USB device is added as a game controller because no authentication is needed (act 1150).
  • Authenticated Game Controller [00136] For USB hosts that support a custom protocol for identification or authentication of accessory devices, such as hosts that run iOS, specific vendor interfaces can be used to implement the protocol. In certain embodiments, the USB host checks each vendor interface on the USB device, looking for a specific protocol identifier.
  • the host can inspect the associated endpoints, looking for a compatible combination, for example the existence of a pair bulk data endpoints (IN and OUT) which would be required for bi-directional communication. Bulk endpoints are commonly used due to their flexibility in packet sizes and bandwidth efficiency. If the host is satisfied with the USB configuration, it can enable the interface which in turn lets the device (mobile game controller) initiate communication for the custom protocol.
  • the mobile game controller will identify itself as a HID device and provide the specific HID report descriptors to the host. In some embodiments, the HID report descriptor is communicated directly through the protocol, and any subsequent HID input reports are transmitted via said protocol.
  • the HID report descriptor is referenced from the standard USB device configuration.
  • the device communicates the interface number in the device configuration in which to locate the HID descriptor, via the custom protocol.
  • the USB host then knows which HID interface to use.
  • the custom HID interface should not be the first to appear in the configuration, such that standard host setups can be simultaneously allowed.
  • Figure 12 is a flow chart of an authenticated game controller flow of an embodiment. As shown in Figure 12, the USB device is physically connected to the USB host (act 1205). Then, the USB host initiates enumeration of USB device descriptors (act 1210).
  • the USB host identifies the HID interface and reads the HID report descriptor (act 1215). The USB host then parses the HID report descriptor and determines that the device is a game controller (act 1220). The USB device is added as a game controller but not exposed because the USB device is unauthenticated (act 1225).
  • the USB host identifies the vendor interface and enables/activates data endpoints (act 1230). The USB device responds to the vendor interface activating and initiates a custom protocol (act 1235). The USB host requests authorization via the custom protocol (act 1240), and the USB device responds with an authentication response (act 1245). The USB device also sends a configuration for an authenticated game controller (act 1250).
  • the USB device is added as an authenticated game controller in the operating system (act 1255).
  • the system comprises a USB-C equipped game controller and a USB-C equipped computing device, typically a smartphone or other mobile device (though not necessarily limited to the type of computing device, and it should be understood that USB-C provides an example physical configuration of a connector between the two devices).
  • the two devices communicate via USB, and the primary solution is the architecture and behavior of the game controller side of the system.
  • the game controller is shown below connecting to a mobile phone.
  • Figure 13 is an illustration of a primary system architecture of an embodiment.
  • a universal game controller 1300 is connected, via a USB-C plug 1310, with a mobile device 1330.
  • the universal game controller 1300 comprises a USB device transceiver 1320, and the mobile device 1330 comprises a USB-C receptacle 1340 and a USB host transceiver 1350.
  • the game controller is shown below connecting to a different class of mobile device, in this case a tablet.
  • Figure 14 is an illustration of a secondary system architecture of an embodiment. As shown in Figure 14, in this architecture, a universal game controller 1400 is connected with a mobile device 1430 via a USB-C cable 1449.
  • the universal game controller 1400 comprises a USB-C receptacle 1410 and a USB device transceiver 1420.
  • the mobile device 1430 comprises a USB-C receptacle 1450 and a USB host transceiver 1460.
  • the two use cases are combined in a single architecture.
  • Figure 15 is an illustration of a combined system architecture of an embodiment. As shown in Figure 15, in this architecture, a universal game controller 1500 comprises a USB-C receptacle 1510, a USB device transceiver 1520, a multiplexor 1530, and a USB-C plug 1580.
  • the USB-C plug 1580 connects the universal game controller 1500 with a mobile phone 1585 that comprises a USB-C receptacle 1590 and a USB host transceiver 1595. Also, a USB-C cable 1550 connects the universal game controller 1500 with a mobile device 1540 that comprises a USB-C receptacle 1560 and a USB host transceiver 1570.
  • a USB-C cable 1550 connects the universal game controller 1500 with a mobile device 1540 that comprises a USB-C receptacle 1560 and a USB host transceiver 1570.
  • USB universal serial bus
  • this architecture 1600 comprises a USB-C plug 1610 that connects with a phone 1615, a USB-C receptacle that connects with a charger/data element 1625, and a jack 1630 that connects with a headset 1635.
  • the architecture 1600 also comprises an MCU 1650, a multiplexor 1660, and game inputs 1670.
  • Figure 17 is an illustration of an embedded system 1700 of an embodiment.
  • the embedded system 1700 comprises a processor 1710, a memory 1720, a primary transceiver 1730, a game controller interface 1740 (which comprises a measurement sequencer 1742, an HID gamepad 1744, and a gamepad profile manager 1746), a configurable secondary port 1750 (which comprises a secondary transceiver 1752 and a charger subsystem 1754), an application interaction model 1760, a controller analytics element 1770, and boot/upgrade support element 1780.
  • the primary and secondary transceivers 1730, 1752 in this case are USB and are actually sharing the same internal USB hardware.
  • FIG. 18 is a data flow diagram of an embodiment.
  • Figure 18 shows a USB device 1800, a gamepad profile 1830, a gamepad input system 1840, and an accessory event system 1850.
  • the USB device 1800 comprise an HID interface 1805, various vendor interfaces 1810, and a USB audio interface 1820, which accepts audio DSP 1860 and audio control 1870 inputs.
  • the gamepad profile 1830 comprises an HID gamepad report builder 1832, an accessory-app interface 1834, a vendor accessory protocol element 1836, and an HID gamepad report builder 1838.
  • the flow of data is visualized, showing which USB interfaces are used for the various functions of the controller.
  • custom controller buttons and other system events are packaged up and sent on to the vendor interface 1810 via bulk endpoints.
  • the protocol is initiated automatically once the USB host responds to the start message sent via another vendor interface.
  • Figure 19 is an illustration of an accessory-app architecture of an embodiment. This is a subset of the architecture focused on how controller inputs, audio, and accessory messages flow through the system.
  • this diagram is more focused on the paths within the mobile computing device, with the game controller side being a bit more generalized.
  • this architecture comprises a mobile game controller 1900 and a mobile device 1910.
  • the mobile game controller 1900 comprises a CPU 1901, a memory 1902, a game controller interface 1903, an audio interface 1904, a charging subsystem 1905, and a transceiver 1906.
  • the mobile device 1910 comprises a transceiver 1920, an operating system 1930, and a mobile application 1940.
  • the operating system 1930 comprises an input framework 1932, an accessory framework 1934, and system audio 1936.
  • the mobile application 1940 comprises a game controller interface 1942, a software stack 1944, and an accessory interface 1946.
  • USB Device In one embodiment, the controller operates as a USB device (rather than USB host). This is primarily due to the bus-powered nature, but also because this is the typical role for USB input peripherals.
  • the USB descriptors include the following interfaces: [00155] HID interface(s) [00156] Audio control interface [00157] Audio input interface [00158] Audio output interface [00159] Bulk in interface(s) [00160] Bulk out interface(s) [00161] Interrupt interfaces(s) [00162] Since the device implements multiple class interfaces, we consider this a composite device. In simple terms, a composite device is a device with multiple functions.
  • FIG. 22 is an illustration of full device descriptors of an embodiment.
  • HID Interfaces One element of the universal mobile game controller is the ability to expose multiple HID interfaces. Each mobile device may have its own set of requirements and button mappings for HID game controllers, and therefore having multiple HID interfaces can allow for correct button mappings per platform. Although USB does attempt to standardize HID usage values, it leaves the interpretation of various game controller buttons up to the host. As a result, each platform has a slightly different HID report descriptor to make game controllers work properly.
  • HID interfaces can either be presented through a standard USB interface with the HID class identifier, or can be established through a vendor interface via a custom accessory protocol.
  • the custom accessory protocol can also be used to specify which USB HID interface to use in the event there are multiple included in the USB device configuration.
  • the primary HID interface would be used for an unauthenticated game controller, and a secondary HID interface would be used for an authenticated game controller.
  • the secondary HID interface only gets utilized once a vendor message is exchanged to specify the interface number of the desired interface.
  • Vendor Interfaces [00169] The automatic aspect of the universal mobile game controller is partially achieved through vendor interfaces. In USB, a vendor interface is just a standard interface with a vendor class identifier. On most USB hosts, unknown vendor protocols are generally ignored unless a specific device driver is installed in the system.
  • a vendor interface can be used to implement a host specific accessory protocol which is required for one platform, but ignored on the other.
  • vendor interfaces can be reused across host platforms.
  • the vendor interface for establishing bulk data communication between the mobile game controller and mobile application can be reused because this paradigm can be easily implemented by multiple platforms.
  • the total number of endpoints in use can be reduced, freeing up resources for host specific interfaces and endpoints.
  • Audio Interfaces [00172] In some embodiments, the mobile game controller can expose USB audio capabilities on top of the existing HID and vendor capabilities.
  • USB audio class support is generally standardized across hosts.
  • the audio control behaviors can be treated differently.
  • some USB hosts may opt to handle their audio volume differently, such as implement source scaled volume rather than rely on the USB device to scale the volume.
  • the mobile game controller can use the vendor interfaces to identify which host vendor is connected, and change its behavior accordingly.
  • the USB host may not fully support USB audio class 2.0 features. In the event the host does not support the audio connector request for example, the mobile game controller can decide to re-enumerate in a secondary USB configuration that utilizes a reduced set of audio capabilities for better compatibility.
  • USB descriptor which can support both Android and iOS.
  • the primary HID descriptor is designed for use on Android, which falls under the category of unauthenticated game controller described previously. When this same descriptor is seen on iOS, it does not get immediately used because the system requires authentication first.
  • USB vendor interfaces are instead used to authenticate the device and also communicate the details of the game controller. The controller will attempt to initiate a custom protocol with the iOS device on the vendor interface, which will have no effect on Android, but is recognized on iOS. Once the device has completed authentication, it will present a HID descriptor that describes the controller for the iOS platform.
  • USB Host Fingerprinting the detection of the USB host can be achieved by “fingerprinting” the USB host based on the characteristics of its communication.
  • fingerprinting is referring to identifying characteristics of the USB host behavior in a way that can uniquely identify the host from other hosts.
  • the USB device makes a decision during USB enumeration based on various techniques. For example, a certain USB host may make specific or unique USB requests during enumeration that other hosts do not implement.
  • FIG. 23 is an illustration of an Android enumeration sequence 2300 of an embodiment.
  • this sequence 2300 comprises getting the device descriptor (act 2310), getting the device qualifier descriptor (act 2320), getting the configuration descriptor (act 2330), getting the string descriptor (act 2340), setting the configuration (act 2350), and getting the report descriptor (act 2360).
  • Figure 24 is an illustration of an iOS enumeration sequence 2400 of an embodiment. As shown in Figure 24, this sequence 2400 comprises getting the device descriptor (act 2410), getting the string descriptor(s) (act 2420), getting the configuration descriptor (act 2430), setting the configuration (act 2440), getting the string descriptor(s) (act 2450), and initiating custom protocols (act 2460). These diagrams show the differences between host enumeration patterns.
  • the USB device can use more compact versions of its descriptors, which are more or less a subset of the combined superset descriptors.
  • a Windows and Mac USB host enumeration sequence can be compared.
  • Figure 25 is an illustration of a Windows enumeration sequence 2500 of an embodiment. As shown in Figure 25, this sequence 2500 comprises getting the device descriptor (act 2510), getting the string descriptor(s) (act 2520), getting the configuration descriptor (act 2530), setting the configuration (act 2540), getting the string descriptor(s) (act 2550), setting the audio interface (act 2560), and getting the report descriptor (act 2570).
  • Figure 26 is an illustration of a Mac enumeration sequence 2600 of an embodiment.
  • this sequence 2600 comprises getting the device descriptor (act 2610), getting the string descriptor(s) (act 2620), getting the configuration descriptor (act 2630), setting the configuration (act 2640), getting the string descriptor(s) (act 2650), getting the report descriptor (act 2660), and setting the audio interface (act 2670).
  • the initial sequence between Windows and Mac are very similar. However, later in the sequence there is a difference in when the audio interfaces are requested relative to the HID report descriptor request. This gives the device an opportunity to dynamically swap out the HID report descriptor content based on what sequence of requests is encountered.
  • the length of the HID report descriptor has to be declared early on when the configuration descriptor is read. Therefore, the descriptor length has to be the same for Windows and Mac. This can be worked around by manipulating the HID report descriptor by adjusting the organization of fields within the descriptor. For example, adding in padding bits or explicitly declaring field sizes can increase the size artificially to match the size requirements.
  • the game controller can be manually reconfigured into a specific profile for use with non-mobile devices such as a PC, or any platform that does not fully conform to the paradigms described above.
  • the secondary USB port can be reconfigured as a static, non-automatic game controller profile that targets a single platform.
  • the specific profile can be selected through commands exchanged through one of the vendor interfaces. This command exchange can either be done in advance, such as through a smart phone app using the primary connector, or can be configured directly on the target platform by an app.
  • the universal game controller logic is itself a setting in a configurable profile system.
  • Figure 27 is an illustration of primary and secondary ports 2710, 2720 of an embodiment.
  • the primary port 2710 comprises a universal profile 2712
  • the secondary port 2720 comprises a default universal profile 2722, a Mac profile 2724, a Windows profile 2726, and a programmable profile 2728.
  • the primary port 2710 is automatically configured for use with mobile operating systems, and the secondary port 2720 is user configurable.
  • the universal profile can be used to expand support to Android and Apple tablets, which share compatibility with their phone equivalents.
  • the user may want to enable other kinds of devices which can be achieved by switching the profile setting within the device.
  • the configurable port can be set to one of many options, one of which being a completely flexible profile that can be programmed dynamically.
  • FIG. 28 is an illustration of configurable profile data 2800 of an embodiment. In this arrangement, there are four sections of the profile data which get transmitted from the mobile application and written into the USB device: [00189] Base Profile Index 2802 - Specifies which base profile to use for this custom profile. Usually this is a standard HID game controller, but could also point to any other built-in profiles such as universal, windows, mac, etc.
  • Profile Attributes 2804 - Specifies attributes of the game controller such as controller input rate, joystick deadzone, etc.
  • HID report descriptor 2806 - Specifies the report descriptor to present when enumerating over USB (or custom protocol).
  • HID usage map 2808 - Specifies how the physical controller inputs of the product map to the usage values presented in the HID report descriptor.
  • Physical Switch [00194] In some embodiments, the product may have a physical switch or button to alternate between support game controller profiles. Leveraging the same profile system that is used for the secondary port, this can also be applied to the primary port. In this embodiment, there would be a physical switch on the product such as a two-position slide switch.
  • the controller When the position of the switch changes, the controller will load a different profile (e.g. Android to the left, iOS to the right).
  • the product may opt to reuse an existing controller button rather than adding a switch. In this case, the user would hold the button down (for example a specific directional pad button) while connecting their phone which can inform the controller which profile to use at startup.
  • USB audio volume As a side effect of the automatic detection of the host device, the controller can also apply this knowledge to other aspects of the USB device such as audio. For example, on Android the USB audio implement is non-standard in that it does not use standard volume messages and, instead, scales the content based on the volume level.
  • the host does not scale the content and instead uses standard volume messages to have the USB device apply the attenuation.
  • This difference in volume behavior makes it difficult to build a product that works well for both. If you applied volume control on the device side on Android, the attenuation would be twice as strong because both sides of the system are scaling for volume. [00198]
  • the outcome of the automatic switching behavior can be used to inform the USB device what it is connected to. So, if the device determines it is connected to an Android device, it can disable its own volume scaling so as to not interfere with the phone’s built in volume scaling. Conversely, if it detects an iOS device, it can continue to use the standard USB audio volume behavior where the device applies its own volume scaling.
  • USB connector support For USB audio, there are multiple versions of the USB audio class that can be supported by the host. USB audio 1.0 is the baseline and is widely supported. However, USB audio class 2.0 is not quite as ubiquitous. One convenient feature of USB audio class 2.0 is the ability to implement an audio connector. This connector mechanism allows for the USB device to dynamically turn its audio support on/off based on the presence on the connector. For example, you would only want audio to stream out of the phone when a 3.5mm jack is plugged in. If the jack was unplugged, you would want the audio to stream from the phone’s speaker.
  • USB device When the USB device is first connected, it will use the interrupt endpoint associated with this audio connector control, and wait for the USB host to inquire about the connector state. If the USB host does not send a request within a couple hundred milliseconds, the device can infer that USB audio 2.0 is not fully supported and can reboot into a mode which omits USB audio from the descriptors entirely.
  • FIG. 29 is a flow chart 2900 of a method for USB audio switching of an embodiment. As shown in Figure 29, after the method starts (act 2905), a determination is made on whether a headphone is plugged in (act 2910).
  • the device is enumerated with USB audio 2.0 (act 2915). If a headphone is not plugged in, a saved enumeration is loaded, or USB audio 2.0 is used if there is no saved enumeration (act 2920). Next, a determination is made on whether the enumeration supports USB 2.0 audio (act 2925). If the enumeration does not support USB audio 2.0, the device remains on an audio-less USB enumeration (act 2930). However, if the enumeration does support USB audio 2.0, a connect interrupt is sent (act 2935). Then, a determination is made on whether the host requested connector status before timeout (act 2940).
  • USB there is no feature of USB that specifically enables identification of a host.
  • mechanism (1) can return the result of the detection quite late and, as such, may not allow for descriptor customization. So, mechanism (2) may be preferred, as it obtains the host identification early enough where a last-minute descriptor change can be made to take effect.
  • the approach of fingerprinting over USB can take the form of recording the sequence of USB requests into an array, then comparing against a known sequence or set of criteria. There are a few different points in time where the host can be potentially identified. For a HID game controller, two convenient places to identify the host are during the Get Configuration Descriptor and Get HID Report Descriptor requests. When the USB host requests the configuration descriptor, this is the first time we are responding with data referencing a HID interface. In this case, the length of the HID report descriptor is declared within the configuration data, but the HID report descriptor contents are not yet transmitted.
  • USB requests are: Get device descriptor, Get device qualifier descriptor, Get string descriptor, Get report descriptor, Set configuration, Set idle, Set interface, and other Class requests.
  • Apple devices request the various device descriptor strings (product name, manufacturer name, and serial number) prior to reading the configuration descriptor.
  • a short two-byte request happens first to know how long the string is. The subsequent read uses the length from the first request.
  • the Apple host appears to request string descriptors for each interface in the configuration descriptor.
  • Android prior to setting the USB address, Android requests the device descriptor with a length of 64.
  • many Android devices request the device qualifier descriptor between the device and configuration descriptor requests.
  • Android does not read device strings prior to reading the configuration descriptor.
  • Windows is similar to Apple enumerations but is fairly distinct from Android and different in a couple of ways to Apple. For example, Windows requests product name and manufacturer name and serial number prior to reading configuration descriptor like Apple. When reading strings, a short two-byte request happens first to know how long the string is. The subsequent read uses the length from the first request. Same as Apple. Between the Set Configuration and Get HID report descriptor requests the Windows host appears to read interface name for every interface in the configuration descriptor.
  • Windows Prior to requesting the HID report descriptor, Windows usually sends the Get Configuration request (appears to occur after the batch of string reads). Windows requests the device qualifier descriptor, but with less predictable timing than Android, and generally after the configuration descriptor. [00211] Windows also supports a Microsoft-specific descriptor, called a MS OS descriptor. The way this works is that the very first time Windows sees a device it will make a very specific string descriptor read with index 0xEE to determine if the device supports this protocol. If it does, it will follow up and request the MS OS descriptor contents. If the string descriptor read fails, it will remember this result and never ask again.
  • a MS OS descriptor Microsoft-specific descriptor
  • USB host fingerprinting approach is implemented as follows.
  • the USB device records the SETUP packet for key USB requests into a history array which can be referenced later.
  • An example SETUP packet can have the following fields: bmRequestType bRequest wValue wIndex wLength [00213]
  • bmRequestType bRequest wValue wIndex wLength
  • the most interesting and consistent requests end up being standard device get or set requests since these occur early on in the USB enumeration process. Since most response data is coming from the USB device itself, it would be redundant to record response data, and, in practice, the SETUP packet is enough.
  • the history array contents can be processed to predict what USB host platform the device is connected to.
  • the fingerprint algorithm is largely concerned with the sequence of USB requests. The algorithm keeps track of whether certain requests precede or secede other requests, and these patterns can be recorded as forms of evidence. Evidence for each USB host platform is recorded such that it can be tallied up at the end. To make the data more interpretable, each type of evidence is given a unique identifier, such that the list of evidence can be organized as a vector, which is the fingerprint. The host platform with the highest evidence is what gets returned (or acted on). In the event the USB host detection result is ambiguous, the device can use whatever is default.
  • the host gets detected during the Get Configuration Descriptor request, which gives the USB device an opportunity to swap out the configuration descriptor before responding with data to the host.
  • what gets swapped out is the HID report descriptor length in preparation for when it will be requested later.
  • the host can get detected when the HID report descriptor is requested, which, in one example, is the final place where a decision can be made about the controller mapping. Since the length of the descriptor was specified earlier on, making changes to the descriptor contents is more difficult as the number of bytes must match.
  • HID report descriptor would need to be manipulated to introduce padding bits or alternate ways of defining HID usages to artificially change the final size.
  • a HID report descriptor can be created that satisfies both Android and iOS, but only a subset of the HID usages work on either platform.
  • the USB host fingerprint can be used to determine which host is connected and, subsequently, which usage map to apply. A convenient place would be when the HID report descriptor is read, as this is the earliest the host could even interpret data coming from the HID device.
  • the USB device can supply one combined descriptor and simply update its HID usage mapping. Basically, the USB device internally remaps its gamepad elements based on the host platform that was detected. [00216] This has the advantage of being more robust as there are more USB events that occur before a decision has to be made, and the decision is only choosing how to map the bits, not the meaning of the bits. This also enables a failsafe behavior where the Android or iOS app could manually override the mapping once a connection to the app was made; the app has a 100% reliable sense of what type of phone it is. [00217] The following list of example rules/patterns can be used as evidence by the algorithm.
  • Two-Stage Get String Descriptor [00229] Apple devices (and most USB hosts) read strings in a two-transaction process, where first they read two bytes of the string to establish the length of the string descriptor, then follow up with the correct length request to get the entire string. Android does not follow this behavior. [00230] 7. 255-Byte Get String Descriptor [00231] Android devices read strings in a single transaction by reading the maximum amount of bytes possible for the string (255 bytes) and then internally extract the meaningful length from the subsequent buffer. Of the hosts tested, Android is the only OS that exhibits this behavior (but maybe not all Android devices) [00232] 8.
  • USB hosts that support multiple configurations tend to ask for the current configuration at some point during the enumeration process, usually before obtaining the HID report descriptor. This may not be useful for Android vs iOS, but it could be useful to specifically detect Windows or Mac.
  • Get String Descriptor Before Get Configuration Descriptor [00235] Some hosts (iOS, Windows, Mac) request string descriptors immediately after reading the device descriptor, and before the configuration descriptor. Presumably, this information is necessary to create an entry for the device in advance of reading its configuration (e.g. look up driver in registry). Android however does not appear to do this. [00236] 10.
  • iOS HID Descriptor UsagePage(GenericDesktop) Usage(GenericDesktop,Gamepad) Collection(Application) Usage(GenericDesktop,Gamepad) Collection(Logical) ReportID(GAMEPAD_REPORT_ID) Logical(-32767, 32767) Physical(-32767, 32767) Usage(GenericDesktop, Pointer) Collection(Physical) ReportSize(16) ReportCount(4) Usage(GenericDesktop, X) Usage(GenericDesktop, Y) Usage(GenericDesktop, Z) Usage(GenericDesktop, Rz) Input(data,var,abs) EndCollection ReportSize(8)
  • a process to load a gamepad can be used, where the process can use hybrid HID descriptor.
  • the controller can run a USB host fingerprint algorithm, but rather than make a detection decision when sending the configuration descriptor, the controller can wait until the HID report descriptor is read. Based on the USB host detection result, the controller can select the appropriate button mapping (e.g., Android or iOS). If/when the controller establishes communication with the smart phone app, the USB host platform can be explicitly updated as this can be 100% accurate (e.g., the Android app only runs on an Android phone).
  • Figure 30 is a flow chart 3000 of a hybrid HID game controller method of an embodiment.
  • the USB device e.g., the game controller
  • the USB host e.g., the phone
  • the USB host then initiates enumeration of USB device descriptors (act 3020).
  • the USB device tracks USB communication patterns in a history buffer (act 3030).
  • the USB host identifies the HID interface and reads the HID report descriptor (act 3040).
  • the USB device calculates fingerprints for the USB host and updates the HID usage map (act 3050). If the mobile app is installed in the host, the mobile app can start communication with the USB device via a vendor interface (act 3060) and inform the USB device of the local USB host platform (act 3070).
  • Example 1 A universal mobile game controller as described above.
  • Example 2. A method for using a universal mobile game controller as described above.
  • Example 3. A system comprising a computing device and a universal mobile game controller as described above.
  • a game controller comprising: a connector; at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: sending to a host connected to the game controller via the connector both (i) a first set of descriptors configured to enable a first operating system to use the game controller and (ii) a second set of descriptors configured to enable a second operating system to use the game controller, wherein both the first and second sets of descriptors are sent to the host irrespective of which one of the first and second operating systems the host uses. [00256] Example 5.
  • Example 6 The game controller of any one of the preceding Examples, wherein the host is configured to use both the first and second sets of descriptors.
  • Example 7 The game controller of any one of the preceding Examples, wherein the host is further configured to authenticate the game controller using one of the first and second sets of descriptors and use the other set of descriptors after the game controller has been authenticated. [00259] Example 8.
  • Example 9 The game controller of any one of the preceding Examples, wherein the first and second sets of descriptors comprise a device descriptor, a configuration descriptor, a human interface device (HID) descriptor, and/or a vendor descriptor.
  • Example 9 The game controller of any one of the preceding Examples, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: sending the first and second sets of descriptors to the host in response to a request from the host for the game controller to identify itself during an enumeration process.
  • Example 10 The game controller of any one of the preceding Examples, wherein the first operating system comprises Android and the second operating system comprises iOS.
  • Example 11 The game controller of any one of the preceding Examples, wherein the first operating system comprises Android and the second operating system comprises iOS.
  • Example 12 A method comprising: performing in a universal serial bus (USB) device in communication with a host via a connector: receiving, from the host, a request for the USB device to identify itself during an enumeration process; and in response to receiving the request, sending, to the host, a first set of descriptors configured to enable a first operating system to use the USB device and a second set of descriptors configured to enable a second operating system to use the USB device, wherein one or both of the first and second sets of descriptors are usable by both the first and second operating systems.
  • USB universal serial bus
  • Example 14 The method of any one of the preceding Examples, wherein the first and second sets of descriptors comprise a device descriptor, a configuration descriptor, a human interface device (HID) descriptor, and/or a vendor descriptor.
  • Example 14 The method of any one of the preceding Examples, wherein the first and second sets of descriptors are further configured to provide an audio setting to the host.
  • Example 15 The method of any one of the preceding Examples, wherein the host is configured to authenticate the USB device using one of the first and second sets of descriptors and use the other set of descriptors after the USB device has been authenticated .
  • Example 16 Example 16
  • Example 17 The method of any one of the preceding Examples, wherein the first operating system comprises Android and the second operating system comprises iOS.
  • Example 17 The method of any one of the preceding Examples, wherein the connector comprises a USB-C connector.
  • Example 18 The method of any one of the preceding Examples, wherein the USB device comprise a game controller.
  • Example 19 The method of any one of the preceding Examples, wherein the USB device comprise a game controller.
  • a non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform functions comprising: sending to a host in communication with the mobile game controller both (i) a first set of descriptors configured to enable a first operating system to use the mobile game controller and (ii) a second set of descriptors configured to enable a second operating system to use the mobile game controller: wherein: both the first and second sets of descriptors are sent to the host irrespective of which one of the first and second operating systems the host uses; and the host is configured to authenticate the game controller using one of the first and second sets of descriptors and use the other set of descriptors after the game controller has been authenticated.
  • Example 20 The non-transitory computer-readable medium of any one of the preceding Examples, wherein: the host is in communication with the mobile game controller via a first connector; and the program instructions, when executed by the one or more processors, further cause the one or more processors to perform functions comprising: sending the first and second sets of descriptors to another host connected to the mobile game controller via a second connector.
  • Example 21 The non-transitory computer-readable medium of any one of the preceding Examples, wherein: the host is in communication with the mobile game controller via a first connector; and the program instructions, when executed by the one or more processors, further cause the one or more processors to perform functions comprising: sending the first and second sets of descriptors to another host connected to the mobile game controller via a second connector.
  • Example 22 The non-transitory computer-readable medium of any one of the preceding Examples, wherein: the host is in communication with the mobile game controller via a Universal Serial Bus (USB)-C connector.
  • USB Universal Serial Bus
  • Example 24 A game controller comprising: at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: receiving, from a host, a plurality of requests as part of an enumeration process; sending a plurality of descriptors to the host in response to receiving the plurality of requests, wherein the plurality of descriptors are sent to the host without the game controller knowing which operating system is used by the host; analyzing the plurality of requests to determine an operating system used by the host; and sending, to the host, a human interface device (HID) descriptor configured for the operating system determined to be used by the host, wherein the HID descriptor is sent to the host without restarting the enumeration process.
  • HID human interface device
  • Example 25 The game controller of any one of the preceding Examples, further comprising: dynamically swapping out a HID descriptor configured for an operating system not used by the host for the HID descriptor configured for the operating system determined to be used by the host.
  • Example 26 The game controller of any one of the preceding Examples, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: reporting a length of the HID descriptor to the host prior to determining the operating system used by the host, wherein the reported length is different from an actual length of the HID descriptor; and modifying the HID descriptor to match the reported length.
  • Example 27 Example 27.
  • Example 28 The game controller of any one of the preceding Examples, wherein the HID descriptor is modified by adjusting an organization of fields of the HID descriptor, adding padding bits to the HID descriptor, and/or declaring a larger field size of the HID descriptor.
  • Example 28 The game controller of any one of the preceding Examples, wherein a presence of a request in the plurality of requests for a device qualifier descriptor is used to determine the operating system used by the host.
  • Example 29 The game controller of any one of the preceding Examples, wherein a presence of a request in the plurality of requests for a string descriptor is used to determine the operating system used by the host.
  • Example 30 Example 30.
  • Example 31 The game controller of any one of the preceding Examples, wherein a sequence in the plurality of requests of a request for an audio interface and a request for a report descriptor is used to determine the operating system used by the host.
  • Example 31 The game controller of any one of the preceding Examples, wherein the HID descriptor is sent to the host after the host authenticates the game controller using one of the plurality of descriptors.
  • Example 32 The game controller of any one of the preceding Examples, further comprising a Universal Serial Bus (USB)-C connector configured to connect the game controller with the host.
  • USB Universal Serial Bus
  • a method comprising: performing in a universal serial bus (USB) device in communication with a host: receiving a plurality of communications from the host; sending, to the host, (a) a first set of descriptors configured for at least a first operating system and (b) a second set of descriptors configured for at least a second operating system, wherein the first and second sets of descriptors are sent to the host without the USB device knowing which one of the first and second operating systems is used by the host; determining which one of the first and second operating systems is used by the host based on the plurality of communications; and sending, to the host, an additional descriptor configured for the one of the first and second operating systems determined to be used by the host [00285] Example 34.
  • USB universal serial bus
  • Example 35 The method of any one of the preceding Examples, wherein the additional descriptor comprises a human interface device (HID) descriptor.
  • Example 36 The method of any one of the preceding Examples, wherein a presence of a certain request in the plurality of communications is indicative of which one of the first and second operating systems is used by the host.
  • Example 37 The method of any one of the preceding Examples, wherein a specific sequence of at least two requests in the plurality of communications is indicative of which one of the first and second operating systems is used by the host.
  • Example 38 Example 38.
  • Example 39 The method of any one of the preceding Examples, wherein the first operating system comprising iOS and the second operating system comprises Android.
  • Example 40 The method of any one of the preceding Examples, wherein the first operating system comprising Mac and the second operating system comprises Windows. [00292] Example 41.
  • a non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform functions comprising: receiving a plurality of requests from the host; sending, to the host, (i) a first descriptor configured for at least a first operating system and (ii) a second descriptor configured for at least a second operating system, wherein the first and second descriptors are sent to the host without the game controller knowing which one of the first and second operating systems is used by the host; analyzing the plurality of requests to determine which one of the first and second operating systems is used by the host; and sending, to the host, a human interface device (HID) descriptor configured for use by the one of the first and second operating systems determined to be used by the host.
  • HID human interface device
  • Example 42 The non-transitory computer-readable medium of any one of the preceding Examples, wherein a presence of a certain request in the plurality of requests is indicative of which one of the first and second operating systems is used by the host.
  • Example 43 The non-transitory computer-readable medium of any one of the preceding Examples, wherein a specific sequence of at least two requests in the plurality of requests is indicative of which one of the first and second operating systems is used by the host.
  • Example 44 Example 44.
  • a game controller comprising: at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform at least one act discussed herein.
  • Example 45 A method comprising: performing at least one step discussed herein in a universal serial bus (USB) device in communication with a host.
  • Example 46 A non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform at least one function discussed herein.
  • Example 47 Example 47.
  • a game controller comprising: at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: receiving a plurality of requests from a host, wherein one of the plurality of requests comprises a request for a human interface device (HID) descriptor; sending a single HID descriptor to the host, wherein the single HID descriptor comprises a first subset of information configured for a first operating system and a second subset of information configured for a second operating system; analyzing the plurality of requests to determine which of the first and second operating systems is used by the host; and selecting a mapping for user input elements of the game controller based on which of the first and second operating systems is determined to be used by the host.
  • HID human interface device
  • Example 48 The game controller of any one of the preceding Examples, wherein the plurality of requests are analyzed in response to receiving a request to get a HID report descriptor.
  • Example 49 The game controller of any one of the preceding Examples, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: receiving, from a game controller application running on the host, an identification of an operating system actually running on the host; determining whether the selected mapping is configured for the operating system actually running on the host; and in response to determining that the selected mapping is not configured for the operating system actually running on the host, using a different mapping.
  • Example 50 Example 50.
  • the game controller of any one of the preceding Examples wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: recording a setup packet for each of the plurality of requests in a history array.
  • each setup packet comprises one or more of the following fields: bmRequestType, bRequest, wValue, wIndex, or wLength [00303]
  • Example 52 The game controller of any one of the preceding Examples , wherein requests that indicate that the host uses the first operation system or the second operating system are associated with unique identifiers and a list of unique identifiers is organized as a vector [00304] Example 53.
  • Example 54 The game controller of any one of the preceding Examples, further comprising a Universal Serial Bus (USB)-C connector configured to connect the game controller with the host.
  • USB Universal Serial Bus
  • a method comprising: performing in a universal serial bus (USB) device in communication with a host: tracking a plurality of communications received from a host; sending a hybrid human interface device (HID) descriptor to the host, wherein the hybrid HID descriptor comprises a plurality of subsets of information configured for a respective plurality of operating systems; analyzing the plurality of communications to determine an operating system used by the host; and selecting a usage map based on the operating system determined to be used by the host.
  • USB universal serial bus
  • Example 56 The method of any one of the preceding Examples, wherein the plurality of communications are analyzed in response to receiving a request to get a HID report descriptor.
  • Example 58 The method of any one of the preceding Examples, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a request for a device qualifier descriptor, a request for a string descriptor, a specific sequence of a request for an audio interface and a request for a report descriptor, a request for a 64-byte get device descriptor, or a two-stage get device descriptor request.
  • Example 59 Example 59.
  • Example 60 The method of any one of the preceding Examples, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a get device qualifier request before a get configuration descriptor request, a get device qualifier request after a get configuration descriptor request, an absence of a device qualifier request before a get report descriptor request, a two-stage get string descriptor request, or a request for a 255-byte get string descriptor. [00311] Example 60.
  • Example 61 The method of any one of the preceding Examples, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a get configuration request before a get report descriptor request, a get string descriptor request before a get configuration descriptor request, an absence of a get string descriptor before a get configuration descriptor request, a set idle request before a get report descriptor request, or a request for a Microsoft operating system (MS OS) descriptor.
  • MS OS Microsoft operating system
  • a non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform functions comprising: receiving a plurality of requests from the host; sending a descriptor to the host, wherein the descriptor comprises a plurality of subsets of information configured for a respective plurality of operating systems; analyzing the plurality of requests to determine an operating system used by the host; and internally mapping various gamepad elements of the mobile game controller based on the operating system determined to be used by the host.
  • Example 62 The non-transitory computer-readable medium of any one of the preceding Examples , wherein the descriptor comprises a human interface device (HID) descriptor.
  • HID human interface device
  • Example 63 The non-transitory computer-readable medium of any one of the preceding Examples , wherein the plurality of requests are analyzed in response to receiving a request to get a HID report descriptor.
  • Example 64 The non-transitory computer-readable medium of any one of the preceding Examples, wherein the program instructions, when executed by one or more processors in the mobile game controller, further cause the one or more processors to perform functions comprising: internally re-mapping the various gamepad elements of the mobile game controller based on learning an actual operating system used by the host.
  • Example 65 Example 65.
  • Example 66 The non-transitory computer-readable medium of any one of the preceding Examples, wherein the mobile game controller comprises a trigger, and wherein the mapping comprises an analog-to-digital conversion of a signal generated by actuation of the trigger.

Abstract

A universal mobile game controller is provided that can interoperate with multiple computing device operating systems (e.g., Android and iOS) in an automatic way through a common connector (e.g., USB-C). With these embodiments, instead of building a separate mobile game controller for each operating system, a single mobile game controller can be used for all operating systems. These embodiments can also enable communication with an application running within the computing device operating system. Other embodiments are provided.

Description

Universal Mobile Game Controller Cross-Reference to Related Applications [0001] This application claims the benefit of U.S. Provisional Patent Application No. 63/435,089, filed December 23, 2022; U.S. Provisional Patent Application No. 63/524,014, filed June 29, 2023; U.S. Patent Application No. 18/136,509, filed April 19, 2023; U.S. Patent Application No. 18/237,680, filed April August 24, 2023; and U.S. Patent Application No. 18/237, 698, filed August 24, 2023; all of which are hereby incorporated by reference. Background [0002] A controller can be used with a computing device to select and/or interact with content using user input devices on the controller. The content can be locally-stored on the computing device and/or streamed from a remote device. For example, the controller can be a game controller used to play a game that is native to the computing device and/or to play a game that is streamed from a remote server to a browser of the computing device. Brief Description of the Drawings [0003] Figure 1 is a block diagram of a computing environment of an embodiment. [0004] Figure 2 is an illustration of a controller and computing device of an embodiment. [0005] Figure 3 is a block diagram of a computing environment of an embodiment. [0006] Figure 4 is an illustration of a descriptor layout of an embodiment. [0007] Figure 5 is an illustration of a device descriptor of an embodiment. [0008] Figure 6 is an illustration of a configuration descriptor of an embodiment. [0009] Figure 7 is an illustration of an interface descriptor of an embodiment. [0010] Figure 8 is an illustration of an endpoint descriptor of an embodiment. [0011] Figure 9 is an illustration of a human interface device (HID) descriptor of an embodiment. [0012] Figure 10 is an illustration of an HID report descriptor of an embodiment. [0013] Figure 11 is a flow chart of an unauthenticated game controller flow of an embodiment. [0014] Figure 12 is a flow chart of an authenticated game controller flow of an embodiment. [0015] Figure 13 is an illustration of a primary system architecture of an embodiment. [0016] Figure 14 is an illustration of a secondary system architecture of an embodiment. [0017] Figure 15 is an illustration of a combined system architecture of an embodiment. [0018] Figure 16 is an illustration of a universal serial bus (USB) architecture of an embodiment. [0019] Figure 17 is an illustration of an embedded system of an embodiment. [0020] Figure 18 is a data flow diagram of an embodiment. [0021] Figure 19 is an illustration of an accessory-app architecture of an embodiment. [0022] Figure 20 is an illustration of Android USB device descriptors of an embodiment. [0023] Figure 21 is an illustration of iOS USB device descriptors of an embodiment. [0024] Figure 22 is an illustration of full device descriptors of an embodiment. [0025] Figure 23 is an illustration of an Android enumeration sequence of an embodiment. [0026] Figure 24 is an illustration of an iOS enumeration sequence of an embodiment. [0027] Figure 25 is an illustration of a Windows enumeration sequence of an embodiment. [0028] Figure 26 is an illustration of a Mac enumeration sequence of an embodiment. [0029] Figure 27 is an illustration of primary and secondary ports of an embodiment. [0030] Figure 28 is an illustration of configurable profile data of an embodiment. [0031] Figure 29 is a flow chart of a method for USB audio switching of an embodiment. [0032] Figure 30 is a flow chart of a hybrid HID game controller method of an embodiment. Detailed Description [0033] Introduction [0034] The following embodiments describe a system architecture and implementation that allow a controller (in one implementation, a mobile game controller) to interoperate with multiple computing device operating systems (e.g., Android and iOS, although other operating systems can be used) in an automatic way through a common connector (e.g., USB-C, although other common connectors can be used). In addition, these embodiments can enable communication to an application running within the computing device operating system. Without these embodiments, it might be necessary to have a separate embedded system to support each of the major computing device operating systems. Typically, this is done through unique product SKUs that are specifically designed for each ecosystem. Even if a single hardware solution were developed, there would still be a significant product usability issue; without a way to automatically detect what kind of computing device was attached, the product would require manual user intervention to configure the game controller. With these embodiments, a fully automatic USB-C game controller that supports Android and iOS (examples of computing device operating systems, but others can be used) can be provided. That is, instead of building separate products for iOS and Android, for example, with these embodiments, a single version can support both, which is more efficient in various facets of product development and is more intuitive to customers because there is no ambiguity in identifying which version is needed. [0035] Before turning to a description of example implementations of a universal game controller, the following section provides an overview of an exemplary computing environment. It should be understood that these are merely examples and other implementations can be used. Accordingly, none of the details presented herein should be read into the claims unless expressly recited therein. [0036] Overview of an Exemplary Computing Environment [0037] Turning now to the drawings, Figure 1 is an illustration of a computing environment of an embodiment. As shown in Figure 1, this environment comprises a user controller 100, a computing device 200, and a remote device 300. The user controller 100 and computing device 200 are in communication with each other via respective wired or wireless interfaces 108, 208. Likewise, the computing device 200 and the remote device 300 are in communication with each other via wired or wireless interfaces 209, 308. As used herein, “in communication with” can mean in direct communication with or in indirect communication with via one or more components, which may or may not be mentioned herein. For example, in the embodiment shown in Figure 1, the computing device 200 and the remote device 300 are in communication with each other via a network 250 (e.g., the Internet, a local area network, a peer-to-peer wireless mesh, etc.). However, in other embodiments, the computing device 200 and the remote device 300 can communicate with each other in the absence of a network. Also, as used herein, the remote device 300 is “remote” in the sense that it is physically separate from the computing device 200 in some fashion. In many implementations, the physical distance is relatively great, such as when the remote device 300 is located in another town, state, or country. In other implementations, the physical distance may be relatively short, such as when the remote device 300 is in the same room or building as the computing device 200. Also, the term “remote device” can refer to a single remote device or multiple remote devices. [0038] As shown in Figure 1, in this embodiment, the controller 100 comprises one or more processors 102, a memory 104, and one or more user input devices 106. The user input devices 106 can take any suitable form, such as, but not limited to, a button, a joystick, a switch, a knob, a touch-sensitive screen/pad, a microphone for audio input (e.g., to capture a voice command or sound), a camera for video input (e.g., to capture a hand or facial gesture), etc. To be clear, as used herein a “user input device” refers to a control surface and not to the entire system or parent device on which user input devices are placed. [0039] Generally speaking, the controller 100 can be used by a user in the selection and (passive or active) consumption of content (e.g., playing a game, watching a video, listing to audio, reading text, navigating a displayed user interface, etc.) presented using the computing device 200 in some fashion. The controller 100 may be referred to based on the content with which it is being used. For example, the controller 100 can be referred to as a game controller when it is being used to play a game. And if the controller 100 is being used to play a game on a mobile device, such as a phone or tablet (as opposed to a relatively-stationary game console), the controller 100 can be referred to as a mobile game controller. However, the same controller 100 may also be used to control the playback of non-game content, such as video or audio. Accordingly, a specific use should not be read into the term “controller” unless expressly stated. [0040] The computing device 200 can also take any suitable form, such as, but not limited to, a mobile device (e.g., a phone, tablet, laptop, watch, eyewear, headset, etc.) or a relatively more-stationary device (e.g., a desktop computer, a set-top box, a gaming console, etc.). In the embodiment shown in Figure 1, the computing device 200 comprises one or more processors 202 and a memory 204. In this particular embodiment, the memory 204 stores computer-readable program code for an operating system (O/S) 210 (e.g., iOS or Android), native content 220, and an application configured for use with the controller 100 (“controller app”) 240. This application 240 will sometimes be referred to herein as the client platform operating service or system. Exemplary functions of this application 240 will be described herein. Also, as used herein, “native content” refers to content that is at least partially stored in the computing device 200. For example, native content can be wholly stored on the computing device; or native content can be stored partially on the computing device 20 and partially on one or more remote devices 300 or some other device or set of devices. [0041] The remote device 300 also comprises one or more processors 302 and memory units 304 storing remote content 320 and an application (“ app”) 340 (which is sometimes referred to herein as the remote platform operating service or system) that can be used to communicate with the controller app 240 or another entity on the computing device 200. [0042] It should be understood that more or fewer components than what are shown in Figure 1 can be used. For example, the computing device 200 can have one or more user input device(s) (e.g., a touchscreen, buttons, switches, etc.), as well as a display (e.g., integrated with a touchscreen). Further, while the components in the controller 100, computing device 200, and remote device 300 are all shown in respective single boxes in Figure 1, implying integration in respective single devices, it should be understood that the components can be located in multiple devices. For example, the processor 302 and memory 304 in the remote device 300 can be distributed over multiple devices, such as when the processor 302 is a server and the memory 304 is a remote storage unit. As used, the remote device 300 can also refer to multiple remote devices that are in communication with the computing device 200. Other variations for any of the devices 100, 200, 300 are possible. [0043] Finally, the memory 104, 204, 304 in these various devices 100, 200, 300 can take any suitable form and will sometimes be referred to herein as a non- transitory computer-readable storage medium. The memory can store computer- readable program code having instructions that, when executed by one or more processors, cause the one or more processors to perform certain functions. [0044] As mentioned above, the controller 100, computing device 200, and remote device 300 can take any suitable form. For purposes of describing one particular implementation of an embodiment, the controller 100 in this example takes the form of a handheld game controller, the computing device 200 takes the form of a mobile phone or tablet, and the remote device 300 takes the form of a cloud gaming system. This example is shown in Figures 2 and 3. Again, this is just one example, and other implementations can be used. Further, as mentioned above, a game is just one example of content that can be consumed, and the controller 100 can be used with other types of content (e.g., video, audio, text). So, the details presented herein should not be read into the claims unless expressly recited therein. [0045] Turning first to Figure 2, Figure 2 shows an example handheld game controller 100 and mobile phone 200 of an embodiment. This game controller 100 has a number of user input devices, such as joysticks 3, buttons 4, and toggle switches 5. In this example, the game controller 100 takes the form of a retractable device, which, when in an extended position, is able to accept the mobile phone 200. A male communication plug on the controller 100 mates with a female communication port on the computing device 200 to place the controller 100 and computing device 200 in communication with one another. The controller 100 in this embodiment also has a pass-through charging port 20 that allows the computing device 200 to have its battery charged and a headphone jack 22. In other embodiments, the controller 100 can connect to the computing device 200 through other means such as pairing wirelessly to the phone 200. Again, this is just an example, and other types of controllers can be used, such as those that do not fit around a mobile device. [0046] As shown in Figure 3, in this embodiment, the controller 100 can be used to play a game that is locally stored on the computing device 200 (a “native game” 220) or a game 320 that is playable via a network 250 on a cloud gaming service 300. In this example embodiment, remote gameplay, based on input from the game controller 100, the computing device 200 sends signals 402 to the cloud gaming service 300 and receives display data 410 back. In one embodiment, a browser on the computing device 200 is used to send and receive the signals 402, 410 to stream the game 320 to the user. There can be multiple variants of remote game play. One embodiment includes a host device, such a game console, PC, or other computing device not actively being controlled that can be streamed to the active computing device, such as a smartphone. from a host device (e.g., game console or PC) that a user can access remotely via their smartphone) and Another embodiment includes a cloud gaming service (which can be streamed from a data center), such as Xbox Game Pass, Amazon Luna, or other service, that can be streamed to the active computing device. [0047] In one embodiment, the controller app 240 can facilitate the selection of a game (or other content). For example, the controller app 240 can display a user interface (e.g., on a display of the computing device 200 or on another display). The controller app 240 can also receive user input from the controller 100 to navigate and engage with content, for example, browse for, select, and launch a game from a displayed list of games. In this example, once the game is launched, input from the game controller 100 can be provided directly to the game or indirectly to the game through the controller app 240. As will be discussed in more detail below, the controller app 240 can enhance the standard experience offered on a computing device by extending functionality and providing enhanced interface capabilities in addition to the inherent interface of the computing device itself. For example, in some embodiments, the controller app 240 assigns a function to one or more of the user input devices on the controller 100 based on the particular content being consumed. [0048] Example Implementations of a Universal Game Controller [0049] Hardware [0050] In one embodiment, the system comprises a USB host and a USB device. The USB host is typically a computing device of some kind, such as a mobile phone, tablet, or PC. The USB device in this case refers to a controller (in one embodiment, a mobile game controller). USB hosts have a downstream connection to the device and the USB device has an upstream connection to the host. [0051] In one embodiment, the USB device supports at a minimum USB 1.1 full speed transmission characteristics. Due to the backwards compatible nature of newer USB versions, a USB 2.0 connection or even a 3.x connection is capable of enabling the type of USB communication can be used. [0052] Communication [0053] The USB communication protocol of an embodiment is summarized below. Each USB transmission can be described by a series of packets, where there is first a token packet, followed by an optional data packet, and completed with a status packet. The communication is driven by the USB host, and certain packet stages allow for data to flow upstream, such as when the host wants to read data from the device. [0054] Packet Fields [0055] In one embodiment, every USB packet consists of the following fields: [0056] Sync (For receiver clock synchronization) [0057] PID (Packet ID, used to identify packet type) [0058] EOP (End of Packet) [0059] With conditional fields depending on the packet type: [0060] ADDR (Device Address) [0061] ENDP (Endpoint Number) [0062] CRC (Cyclic Redundancy Check) [0063] Data [0064] Frame Number [0065] Packet Types [0066] Token Packet: Either IN, OUT, or SETUP packet which informs the USB device of the type of exchange that the host wants. [0067] Data Packet: One of four data transmission types: DATA0, DATA1, DATA2, MDATA [0068] Handshake Packet [0069] One of three packet IDs: ACK, NAK, STALL [0070] Start of Frame Packet [0071] Endpoints [0072] USB endpoints are used in the USB protocol to differentiate different sources of data exchanged on the bus and are essentially the point where the low-level protocol ends and the high-level USB functions begin. Endpoints are given a number 0-15, with zero being a required (implied) control endpoint for the protocol. At the device level, an endpoint is a chunk or allocation of USB buffer memory where the data is read or written to by USB transmissions. [0073] When the host communicates with a device at the functional level, it is communicating through an endpoint. Endpoints can be further grouped into logical interfaces, which provide a greater level of abstraction to describe their function. [0074] The control endpoint is used in conjunction with standardized requests to exchange information about the USB device, which ultimately informs the host about the remaining endpoints and their intended function. The description of the USB device is organized into objects referred to as descriptors, which exist as a hierarchy. In addition, endpoints can be one of four types which define their transfer characteristics: [0075] Control (Command and status operations) [0076] Isochronous (Continuous periodic transfers) [0077] Bulk (Large burst transfers) [0078] Interrupt (Small device initiated transfers) [0079] Descriptors [0080] In USB, the USB device provides several descriptors to the host which encode various characteristics of the device. These descriptors are organized into a hierarchy, with the device descriptor at the top, followed by one or more configuration descriptors, and each configuration descriptor containing one or more interface descriptors. Interfaces can include zero or more endpoint descriptors, with the zero case being typically used to describe an idle interface (where certain endpoints can be deactivated). [0081] Figure 4 is a descriptor layout of an embodiment. [0082] Device Descriptor [0083] The device descriptor contains the basic information about the USB device. In addition to containing various device identifiers, it defines key characteristic information that determines the USB version, control max packet size, and class of device which is required to continue further communication on the control endpoint. One other key field on the device descriptor is the number of configurations, which informs the host how many configuration descriptors follow (most devices use just one). [0084] Figure 5 is a device descriptor layout of an embodiment. [0085] Configuration Descriptor [0086] The configuration descriptor contains all of the remaining information about the USB device and its interfaces and endpoints. In the header of the descriptor, the number of interfaces are specified, which informs the host of how many interfaces follow. The configuration descriptor also defines power related attributes, and a USB host may interrogate multiple configurations before deciding which to use (usually using power attributes as the criteria). [0087] Figure 6 is a configuration descriptor layout of an embodiment. [0088] Interface Descriptor [0089] The interface descriptor is essentially a grouping of endpoints that relate to the same function or feature. In addition to the number of endpoint descriptors to follow, the interface descriptor defines the interface class, subclass, and protocol which further inform the host of the interface’s function. [0090] Typical interface classes: HID, Audio, Vendor [0091] Figure 7 is an interface descriptor layout of an embodiment. [0092] Endpoint Descriptor [0093] The endpoint descriptor associates the transfer attributes (direction, type, packet size, interval) for an endpoint number. The host uses this information for determining bandwidth requirements on the bus. [0094] Figure 8 is an endpoint descriptor layout of an embodiment. [0095] String Descriptor [0096] Each string on the device is stored in its own descriptor, and referenced in various other descriptors via an index. Generally, the strings do not change the function of the device and are primarily used for display purposes. [0097] HID Descriptor [0098] When implementing a human interface device (HID), this descriptor informs the host of which HID version is being used and how many associated descriptors are present. For example, if the descriptor type is specified as “report”, the descriptor count is the number of HID report descriptors implemented. [0099] Figure 9 is an HID descriptor layout of an embodiment. [00100] HID Report Descriptor [00101] A special descriptor used with the HID interface class/descriptor to encode the HID device and its report details. In this context, a report is essentially a packet of bytes that are exchanged with the host, usually via an interrupt endpoint. The HID descriptor can potentially reference multiple report descriptors, but it is up to the host to decide how to handle multiple HID devices. [00102] Figure 10 is an HID report descriptor layout of an embodiment. [00103] USB requests [00104] Standard requests [00105] The eight standard USB requests begin with a setup packet (token packet with the PID of setup), and are followed by a data packet in situations where data is returned, such as on a get operation. [00106] Get Status [00107] Clear Feature [00108] Set Feature [00109] Set Address [00110] Get Descriptor [00111] Set Descriptor [00112] Get Configuration [00113] Set Configuration [00114] In addition, there are a few standard interface requests which are requests that reference specific USB interfaces from the USB descriptor: [00115] Get Status [00116] Clear Feature [00117] Set Feature [00118] Get Interface [00119] Set Interface [00120] USB enumeration [00121] At a high level, all USB hosts follow a similar sequence to identify a USB device through control transfers, at least at first. The sequence of requests to read out the descriptors of a USB device is often referred to as the USB device enumeration. [00122] A typical enumeration flow can be summarized as follows: [00123] 1. Set Address [00124] 2. Get Device Descriptor [00125] 3. Get Configuration Descriptor [00126] 4. (Optional) Get String Descriptors [00127] 5. SetConfiguration [00128] 6. (Optional) Get HID Report Descriptors [00129] 7. SetInterface [00130] Once the address is set, the first part of the USB enumeration process is to get the device descriptor. The host will then use the bNumConfigurations field to determine how many configuration descriptors to read. Upon reading the configuration descriptor, the host will decide whether the configuration is supported and allocate resources for the supported interfaces. Next, the host will usually read out the various product strings as this typically needs to be displayed to the user. Assuming the configuration is deemed acceptable, the host will issue a SetConfiguration call to inform the device which configuration it would like to use. Finally, the host does another pass of reading secondary descriptors such as HID report descriptors, strings, and finally sets idle or active interfaces. [00131] Unauthenticated Game Controller [00132] For USB hosts, such as those running Android OS, that do not implement custom protocols such as authentication, the game controller device can configure a subset of its USB descriptors in a standard way such that the USB host can easily identify the game controller without custom protocols. Usually, this can be achieved by simply making the standard configuration appear first, as most hosts just pick the first interface it encounters. For example, if the standard HID interface that describes the HID game controller appears first, the unauthenticated device procedure will select that first interface, ignoring any subsequent HID interfaces that appear later in the USB configuration. Although additional HID interfaces are ignored by the operating system, these interfaces could still be used by a mobile application, for example to support additional custom buttons. [00133] Standard USB host behavior does not necessarily mean it cannot support custom protocols. Outside of the HID game controller, a USB host can also provide an API to interact with vendor interfaces. For example, an application running on a USB host can use an API to establish bulk data communication with the mobile game controller via connecting to a vendor interface. Using the API, the application can select the appropriate vendor interface (by filtering the protocol identifier), while ignoring any other vendor interfaces that are not intended for use on this platform. One example of a vendor interface could include two bulk endpoints for IN and OUT communication which would be the primary data pipe for the app and game controller to exchange vendor messages. Another example would be an interrupt endpoint declared in a vendor interface, used to transmit asynchronous messages to the app such as custom button presses. [00134] Figure 11 is a flow chart 1100 of an unauthenticated game controller flow of an embodiment. As shown in Figure 11, the USB device is physically connected to the USB host (act 1110). Then, the USB host initiates enumeration of USB device descriptors (act 1120). Next, the USB host identifies the HID interface and reads the HID report descriptor (act 1130). The USB host then parses the HID report descriptor and determines that the device is a game controller (act 1140). Finally, the USB device is added as a game controller because no authentication is needed (act 1150). [00135] Authenticated Game Controller [00136] For USB hosts that support a custom protocol for identification or authentication of accessory devices, such as hosts that run iOS, specific vendor interfaces can be used to implement the protocol. In certain embodiments, the USB host checks each vendor interface on the USB device, looking for a specific protocol identifier. When found, the host can inspect the associated endpoints, looking for a compatible combination, for example the existence of a pair bulk data endpoints (IN and OUT) which would be required for bi-directional communication. Bulk endpoints are commonly used due to their flexibility in packet sizes and bandwidth efficiency. If the host is satisfied with the USB configuration, it can enable the interface which in turn lets the device (mobile game controller) initiate communication for the custom protocol. [00137] As part of the custom protocol, the mobile game controller will identify itself as a HID device and provide the specific HID report descriptors to the host. In some embodiments, the HID report descriptor is communicated directly through the protocol, and any subsequent HID input reports are transmitted via said protocol. [00138] However, in other embodiments, the HID report descriptor is referenced from the standard USB device configuration. In this case, the device communicates the interface number in the device configuration in which to locate the HID descriptor, via the custom protocol. The USB host then knows which HID interface to use. In the context of universality, the custom HID interface should not be the first to appear in the configuration, such that standard host setups can be simultaneously allowed. [00139] Figure 12 is a flow chart of an authenticated game controller flow of an embodiment. As shown in Figure 12, the USB device is physically connected to the USB host (act 1205). Then, the USB host initiates enumeration of USB device descriptors (act 1210). Next, the USB host identifies the HID interface and reads the HID report descriptor (act 1215). The USB host then parses the HID report descriptor and determines that the device is a game controller (act 1220). The USB device is added as a game controller but not exposed because the USB device is unauthenticated (act 1225). Next, the USB host identifies the vendor interface and enables/activates data endpoints (act 1230). The USB device responds to the vendor interface activating and initiates a custom protocol (act 1235). The USB host requests authorization via the custom protocol (act 1240), and the USB device responds with an authentication response (act 1245). The USB device also sends a configuration for an authenticated game controller (act 1250). Finally, the USB device is added as an authenticated game controller in the operating system (act 1255). [00140] System Overview [00141] In this disclosure, the system comprises a USB-C equipped game controller and a USB-C equipped computing device, typically a smartphone or other mobile device (though not necessarily limited to the type of computing device, and it should be understood that USB-C provides an example physical configuration of a connector between the two devices). In the example, the two devices communicate via USB, and the primary solution is the architecture and behavior of the game controller side of the system. [00142] In the primary use case, the game controller is shown below connecting to a mobile phone. Figure 13 is an illustration of a primary system architecture of an embodiment. As shown in Figure 13, in this architecture, a universal game controller 1300 is connected, via a USB-C plug 1310, with a mobile device 1330. The universal game controller 1300 comprises a USB device transceiver 1320, and the mobile device 1330 comprises a USB-C receptacle 1340 and a USB host transceiver 1350. [00143] In the secondary use case, the game controller is shown below connecting to a different class of mobile device, in this case a tablet. Figure 14 is an illustration of a secondary system architecture of an embodiment. As shown in Figure 14, in this architecture, a universal game controller 1400 is connected with a mobile device 1430 via a USB-C cable 1449. The universal game controller 1400 comprises a USB-C receptacle 1410 and a USB device transceiver 1420. The mobile device 1430 comprises a USB-C receptacle 1450 and a USB host transceiver 1460. [00144] In a particular embodiment, the two use cases are combined in a single architecture. Figure 15 is an illustration of a combined system architecture of an embodiment. As shown in Figure 15, in this architecture, a universal game controller 1500 comprises a USB-C receptacle 1510, a USB device transceiver 1520, a multiplexor 1530, and a USB-C plug 1580. The USB-C plug 1580 connects the universal game controller 1500 with a mobile phone 1585 that comprises a USB-C receptacle 1590 and a USB host transceiver 1595. Also, a USB-C cable 1550 connects the universal game controller 1500 with a mobile device 1540 that comprises a USB-C receptacle 1560 and a USB host transceiver 1570. [00145] Hardware Overview [00146] A simplified block diagram of a universal serial bus (USB) architecture of an embodiment is shown in Figure 16. This diagram shows how USB data is multiplexed in the hardware, allowing the embedded system to switch between whether the USB-C plug is active or the USB-C charging receptacle is active. Using USB-C power delivery, the system can intelligently switch power sources and roles, in addition to implementing pass through charging to the phone. [00147] More specifically, as shown in Figure 16, this architecture 1600 comprises a USB-C plug 1610 that connects with a phone 1615, a USB-C receptacle that connects with a charger/data element 1625, and a jack 1630 that connects with a headset 1635. The architecture 1600 also comprises an MCU 1650, a multiplexor 1660, and game inputs 1670. [00148] Embedded System [00149] Figure 17 is an illustration of an embedded system 1700 of an embodiment. As shown in Figure 17, the embedded system 1700 comprises a processor 1710, a memory 1720, a primary transceiver 1730, a game controller interface 1740 (which comprises a measurement sequencer 1742, an HID gamepad 1744, and a gamepad profile manager 1746), a configurable secondary port 1750 (which comprises a secondary transceiver 1752 and a charger subsystem 1754), an application interaction model 1760, a controller analytics element 1770, and boot/upgrade support element 1780. In this diagram, the different blocks in the embedded system 1700 are used to implement an embodiment. The primary and secondary transceivers 1730, 1752 in this case are USB and are actually sharing the same internal USB hardware. The game controller interface 1740 implements a HID gamepad 1744 that can be dynamically reconfigured to target different USB hosts through profiles. Lastly, the embedded system 1700 has several secondary blocks which are used when interacting with the app on the smartphone. [00150] Figure 18 is a data flow diagram of an embodiment. Figure 18 shows a USB device 1800, a gamepad profile 1830, a gamepad input system 1840, and an accessory event system 1850. The USB device 1800 comprise an HID interface 1805, various vendor interfaces 1810, and a USB audio interface 1820, which accepts audio DSP 1860 and audio control 1870 inputs. The gamepad profile 1830 comprises an HID gamepad report builder 1832, an accessory-app interface 1834, a vendor accessory protocol element 1836, and an HID gamepad report builder 1838. In this diagram, the flow of data is visualized, showing which USB interfaces are used for the various functions of the controller. In the accessory-app interface 1834, custom controller buttons and other system events are packaged up and sent on to the vendor interface 1810 via bulk endpoints. For the vendor accessory protocol 1836, the protocol is initiated automatically once the USB host responds to the start message sent via another vendor interface. [00151] Accessory-App Architecture [00152] Figure 19 is an illustration of an accessory-app architecture of an embodiment. This is a subset of the architecture focused on how controller inputs, audio, and accessory messages flow through the system. This diagram is more focused on the paths within the mobile computing device, with the game controller side being a bit more generalized. As shown in Figure 19, this architecture comprises a mobile game controller 1900 and a mobile device 1910. The mobile game controller 1900 comprises a CPU 1901, a memory 1902, a game controller interface 1903, an audio interface 1904, a charging subsystem 1905, and a transceiver 1906. The mobile device 1910 comprises a transceiver 1920, an operating system 1930, and a mobile application 1940. The operating system 1930 comprises an input framework 1932, an accessory framework 1934, and system audio 1936. The mobile application 1940 comprises a game controller interface 1942, a software stack 1944, and an accessory interface 1946. [00153] USB Device [00154] In one embodiment, the controller operates as a USB device (rather than USB host). This is primarily due to the bus-powered nature, but also because this is the typical role for USB input peripherals. The USB descriptors include the following interfaces: [00155] HID interface(s) [00156] Audio control interface [00157] Audio input interface [00158] Audio output interface [00159] Bulk in interface(s) [00160] Bulk out interface(s) [00161] Interrupt interfaces(s) [00162] Since the device implements multiple class interfaces, we consider this a composite device. In simple terms, a composite device is a device with multiple functions. For example, when connected to a PC, you would see not only a human interface device connected, but also an audio device connected, both of which are grouped within a composite device collection. In addition, the descriptor below includes audio interfaces, but audio is optional for purposes of the embodiments. However, the automatic detection of the mobile device is actually quite useful to handle differences in how audio is handled across the major mobile operating systems. [00163] Using a flexible game controller profile system, we are able to support multiple permutations of USB descriptors. In the diagrams below, we show distinct profiles for Android and iOS, and a third profile which is designed to support both simultaneously. [00164] Figure 20 is an illustration of Android USB device descriptors of an embodiment. Figure 21 is an illustration of iOS USB device descriptors of an embodiment. Figure 22 is an illustration of full device descriptors of an embodiment. [00165] HID Interfaces [00166] One element of the universal mobile game controller is the ability to expose multiple HID interfaces. Each mobile device may have its own set of requirements and button mappings for HID game controllers, and therefore having multiple HID interfaces can allow for correct button mappings per platform. Although USB does attempt to standardize HID usage values, it leaves the interpretation of various game controller buttons up to the host. As a result, each platform has a slightly different HID report descriptor to make game controllers work properly. [00167] HID interfaces can either be presented through a standard USB interface with the HID class identifier, or can be established through a vendor interface via a custom accessory protocol. The custom accessory protocol can also be used to specify which USB HID interface to use in the event there are multiple included in the USB device configuration. In this alternate embodiment, the primary HID interface would be used for an unauthenticated game controller, and a secondary HID interface would be used for an authenticated game controller. The secondary HID interface only gets utilized once a vendor message is exchanged to specify the interface number of the desired interface. [00168] Vendor Interfaces [00169] The automatic aspect of the universal mobile game controller is partially achieved through vendor interfaces. In USB, a vendor interface is just a standard interface with a vendor class identifier. On most USB hosts, unknown vendor protocols are generally ignored unless a specific device driver is installed in the system. This behavior can be used to expose a superset of required host functionalities without negatively affecting the core device support. For example, a vendor interface can be used to implement a host specific accessory protocol which is required for one platform, but ignored on the other. [00170] In some embodiments, vendor interfaces can be reused across host platforms. For example, the vendor interface for establishing bulk data communication between the mobile game controller and mobile application can be reused because this paradigm can be easily implemented by multiple platforms. By sharing the USB interface and endpoints in this case, the total number of endpoints in use can be reduced, freeing up resources for host specific interfaces and endpoints. [00171] Audio Interfaces [00172] In some embodiments, the mobile game controller can expose USB audio capabilities on top of the existing HID and vendor capabilities. USB audio class support is generally standardized across hosts. However, in certain embodiments, the audio control behaviors can be treated differently. For example, some USB hosts may opt to handle their audio volume differently, such as implement source scaled volume rather than rely on the USB device to scale the volume. In this case, the mobile game controller can use the vendor interfaces to identify which host vendor is connected, and change its behavior accordingly. [00173] In some embodiments, the USB host may not fully support USB audio class 2.0 features. In the event the host does not support the audio connector request for example, the mobile game controller can decide to re-enumerate in a secondary USB configuration that utilizes a reduced set of audio capabilities for better compatibility. [00174] Automatic Switching [00175] In one embodiment, a combined USB descriptor is used which can support both Android and iOS. The primary HID descriptor is designed for use on Android, which falls under the category of unauthenticated game controller described previously. When this same descriptor is seen on iOS, it does not get immediately used because the system requires authentication first. USB vendor interfaces are instead used to authenticate the device and also communicate the details of the game controller. The controller will attempt to initiate a custom protocol with the iOS device on the vendor interface, which will have no effect on Android, but is recognized on iOS. Once the device has completed authentication, it will present a HID descriptor that describes the controller for the iOS platform. Once the device is authenticated and the game controller configuration is accepted, the device knows to switch its internal game controller processing to use the vendor interface instead of the USB HID interface. [00176] USB Host Fingerprinting [00177] In certain embodiments, the detection of the USB host can be achieved by “fingerprinting” the USB host based on the characteristics of its communication. In this context, fingerprinting is referring to identifying characteristics of the USB host behavior in a way that can uniquely identify the host from other hosts. In this alternative approach, the USB device makes a decision during USB enumeration based on various techniques. For example, a certain USB host may make specific or unique USB requests during enumeration that other hosts do not implement. This can be a signal to re-enumerate as a different device variation for that host. Similarly, a USB host may have a very particular behavior or sequence in how it interrogates interfaces. For example, if a USB host requests string identifiers or other relevant descriptors on a custom vendor interface this can imply the host inherently recognizes the interface, and can be used to infer the host’s capabilities. [00178] Figure 23 is an illustration of an Android enumeration sequence 2300 of an embodiment. As shown in Figure 23, this sequence 2300 comprises getting the device descriptor (act 2310), getting the device qualifier descriptor (act 2320), getting the configuration descriptor (act 2330), getting the string descriptor (act 2340), setting the configuration (act 2350), and getting the report descriptor (act 2360). Figure 24 is an illustration of an iOS enumeration sequence 2400 of an embodiment. As shown in Figure 24, this sequence 2400 comprises getting the device descriptor (act 2410), getting the string descriptor(s) (act 2420), getting the configuration descriptor (act 2430), setting the configuration (act 2440), getting the string descriptor(s) (act 2450), and initiating custom protocols (act 2460). These diagrams show the differences between host enumeration patterns. [00179] In the Android enumeration case, there is a device qualifier descriptor request before the configuration descriptor is requested. This gives the USB device the opportunity to set up a specific configuration descriptor ahead of time. In the event the device qualifier descriptor is not requested, the device will default to the iOS based configuration. This particular approach is desirable since it technically does not require the USB device to restart or re-enumerate. [00180] For the above embodiment, the USB device can use more compact versions of its descriptors, which are more or less a subset of the combined superset descriptors. [00181] In another example, a Windows and Mac USB host enumeration sequence can be compared. Figure 25 is an illustration of a Windows enumeration sequence 2500 of an embodiment. As shown in Figure 25, this sequence 2500 comprises getting the device descriptor (act 2510), getting the string descriptor(s) (act 2520), getting the configuration descriptor (act 2530), setting the configuration (act 2540), getting the string descriptor(s) (act 2550), setting the audio interface (act 2560), and getting the report descriptor (act 2570). Figure 26 is an illustration of a Mac enumeration sequence 2600 of an embodiment. As shown in Figure 26, this sequence 2600 comprises getting the device descriptor (act 2610), getting the string descriptor(s) (act 2620), getting the configuration descriptor (act 2630), setting the configuration (act 2640), getting the string descriptor(s) (act 2650), getting the report descriptor (act 2660), and setting the audio interface (act 2670). [00182] In this example, the initial sequence between Windows and Mac are very similar. However, later in the sequence there is a difference in when the audio interfaces are requested relative to the HID report descriptor request. This gives the device an opportunity to dynamically swap out the HID report descriptor content based on what sequence of requests is encountered. In this example, the length of the HID report descriptor has to be declared early on when the configuration descriptor is read. Therefore, the descriptor length has to be the same for Windows and Mac. This can be worked around by manipulating the HID report descriptor by adjusting the organization of fields within the descriptor. For example, adding in padding bits or explicitly declaring field sizes can increase the size artificially to match the size requirements. [00183] Secondary Port [00184] In some embodiments, the game controller can be manually reconfigured into a specific profile for use with non-mobile devices such as a PC, or any platform that does not fully conform to the paradigms described above. Although the unauthenticated game controller could still be made to work with a PC via button remapping, there is still value in arranging the button inputs based on the platform. [00185] In this embodiment, the secondary USB port can be reconfigured as a static, non-automatic game controller profile that targets a single platform. The specific profile can be selected through commands exchanged through one of the vendor interfaces. This command exchange can either be done in advance, such as through a smart phone app using the primary connector, or can be configured directly on the target platform by an app. In such an embodiment, the universal game controller logic is itself a setting in a configurable profile system. [00186] Figure 27 is an illustration of primary and secondary ports 2710, 2720 of an embodiment. The primary port 2710 comprises a universal profile 2712, and the secondary port 2720 comprises a default universal profile 2722, a Mac profile 2724, a Windows profile 2726, and a programmable profile 2728. In this arrangement, the primary port 2710 is automatically configured for use with mobile operating systems, and the secondary port 2720 is user configurable. By default, the universal profile can be used to expand support to Android and Apple tablets, which share compatibility with their phone equivalents. However, the user may want to enable other kinds of devices which can be achieved by switching the profile setting within the device. The configurable port can be set to one of many options, one of which being a completely flexible profile that can be programmed dynamically. [00187] In some embodiments, a programmable profile is implemented which allows for the USB device descriptors to be written dynamically by an application and stored into persistent memory. This allows for additional support of new USB host platforms in the future, and largely eliminates any memory limitations caused by a large number of profile permutations. [00188] Figure 28 is an illustration of configurable profile data 2800 of an embodiment. In this arrangement, there are four sections of the profile data which get transmitted from the mobile application and written into the USB device: [00189] Base Profile Index 2802 - Specifies which base profile to use for this custom profile. Usually this is a standard HID game controller, but could also point to any other built-in profiles such as universal, windows, mac, etc. [00190] Profile Attributes 2804 - Specifies attributes of the game controller such as controller input rate, joystick deadzone, etc. [00191] HID report descriptor 2806 - Specifies the report descriptor to present when enumerating over USB (or custom protocol). [00192] HID usage map 2808 - Specifies how the physical controller inputs of the product map to the usage values presented in the HID report descriptor. [00193] Physical Switch [00194] In some embodiments, the product may have a physical switch or button to alternate between support game controller profiles. Leveraging the same profile system that is used for the secondary port, this can also be applied to the primary port. In this embodiment, there would be a physical switch on the product such as a two-position slide switch. When the position of the switch changes, the controller will load a different profile (e.g. Android to the left, iOS to the right). [00195] In other embodiments, the product may opt to reuse an existing controller button rather than adding a switch. In this case, the user would hold the button down (for example a specific directional pad button) while connecting their phone which can inform the controller which profile to use at startup. [00196] USB audio volume [00197] As a side effect of the automatic detection of the host device, the controller can also apply this knowledge to other aspects of the USB device such as audio. For example, on Android the USB audio implement is non-standard in that it does not use standard volume messages and, instead, scales the content based on the volume level. However, on an iOS device, the host does not scale the content and instead uses standard volume messages to have the USB device apply the attenuation. This difference in volume behavior makes it difficult to build a product that works well for both. If you applied volume control on the device side on Android, the attenuation would be twice as strong because both sides of the system are scaling for volume. [00198] To address this, the outcome of the automatic switching behavior can be used to inform the USB device what it is connected to. So, if the device determines it is connected to an Android device, it can disable its own volume scaling so as to not interfere with the phone’s built in volume scaling. Conversely, if it detects an iOS device, it can continue to use the standard USB audio volume behavior where the device applies its own volume scaling. Usually, you want to implement volume scaling on the device doing the audio rendering for highest quality, but not all USB hosts operate this way. [00199] USB connector support [00200] For USB audio, there are multiple versions of the USB audio class that can be supported by the host. USB audio 1.0 is the baseline and is widely supported. However, USB audio class 2.0 is not quite as ubiquitous. One convenient feature of USB audio class 2.0 is the ability to implement an audio connector. This connector mechanism allows for the USB device to dynamically turn its audio support on/off based on the presence on the connector. For example, you would only want audio to stream out of the phone when a 3.5mm jack is plugged in. If the jack was unplugged, you would want the audio to stream from the phone’s speaker. [00201] Unfortunately, some phones do not support the USB audio connector feature. In this situation, the phone will always route audio to the USB device regardless of the audio jack state. To a user, this is very confusing because the audio is not heard despite no headphones plugged in. To address this, a process was established which allows the USB device to infer whether the audio support is available. [00202] When the USB device is first connected, it will use the interrupt endpoint associated with this audio connector control, and wait for the USB host to inquire about the connector state. If the USB host does not send a request within a couple hundred milliseconds, the device can infer that USB audio 2.0 is not fully supported and can reboot into a mode which omits USB audio from the descriptors entirely. When the audio jack is plugged in however, the USB device can reboot into its original audio mode to restore audio functionality. In addition, to prevent extra switching, the USB device can remember the last USB host it was connected to. So if the last time it was connected was on a phone without USB audio 2.0 support, it can boot up in the appropriate state to reduce an extra reboot. Of course, any time the audio jack is plugged in, we always need to load the full audio descriptors. [00203] Figure 29 is a flow chart 2900 of a method for USB audio switching of an embodiment. As shown in Figure 29, after the method starts (act 2905), a determination is made on whether a headphone is plugged in (act 2910). If a headphone is plugged in, the device is enumerated with USB audio 2.0 (act 2915). If a headphone is not plugged in, a saved enumeration is loaded, or USB audio 2.0 is used if there is no saved enumeration (act 2920). Next, a determination is made on whether the enumeration supports USB 2.0 audio (act 2925). If the enumeration does not support USB audio 2.0, the device remains on an audio-less USB enumeration (act 2930). However, if the enumeration does support USB audio 2.0, a connect interrupt is sent (act 2935). Then, a determination is made on whether the host requested connector status before timeout (act 2940). If it did, the device remains on USB audio 2.0 (act 2945); otherwise, the device is rebooted with audio-less USB enumeration (act 2955). Either way, a decision about USB enumeration is saved for next time (act 2950). [00204] There are several advantages associated with these embodiments. Some advantages include automatic switching between Android and iOS allowing for a single product to be used for both platforms which greatly reduces customer confusion, especially when the USB-C connector is common between the phone vendors. [00205] Additional Embodiments [00206] In one embodiment, in an effort to automatically support several kinds of USB host platforms (e.g., Mac, iOS, Android, etc.), a detection mechanism can be used to identify the host. Unfortunately, there is no feature of USB that specifically enables identification of a host. However, as discussed above, it is possible to “fingerprint” a host based on its request patterns. If the question is purely “Is it an Android device or is it an iOS device?”, in one embodiment, the following two mechanisms can be used: (1) if the host communicates on the custom vendor interface used for iAP2, it is an Apple device; otherwise it is an Android device; or (2) if the host requests the device qualifier descriptor, it is likely an Android device. However, mechanism (1) can return the result of the detection quite late and, as such, may not allow for descriptor customization. So, mechanism (2) may be preferred, as it obtains the host identification early enough where a last-minute descriptor change can be made to take effect. [00207] The approach of fingerprinting over USB can take the form of recording the sequence of USB requests into an array, then comparing against a known sequence or set of criteria. There are a few different points in time where the host can be potentially identified. For a HID game controller, two convenient places to identify the host are during the Get Configuration Descriptor and Get HID Report Descriptor requests. When the USB host requests the configuration descriptor, this is the first time we are responding with data referencing a HID interface. In this case, the length of the HID report descriptor is declared within the configuration data, but the HID report descriptor contents are not yet transmitted. Once the host reaches the point of reading the HID report descriptor, it already knows the expected length of the descriptor, and this is the last opportunity for the device to make changes to the game controller HID. With these two decision points in mind, many of the sources of evidence for the fingerprint are based on the sequence of other requests, and often relative to the configuration or report descriptor requests. Examples of notable USB requests are: Get device descriptor, Get device qualifier descriptor, Get string descriptor, Get report descriptor, Set configuration, Set idle, Set interface, and other Class requests. [00208] These embodiments take advantage of the fact that different USB host platforms have different USB communication patterns. For example, for Apple devices, iOS and iPadOS are almost identical, and Mac is not too different, but does not support the same accessory protocols. Essentially, all Apple devices request the various device descriptor strings (product name, manufacturer name, and serial number) prior to reading the configuration descriptor. When reading strings, a short two-byte request happens first to know how long the string is. The subsequent read uses the length from the first request. Between the Set Configuration request and requesting the HID report descriptor, the Apple host appears to request string descriptors for each interface in the configuration descriptor. [00209] For Android, prior to setting the USB address, Android requests the device descriptor with a length of 64. In addition, many Android devices request the device qualifier descriptor between the device and configuration descriptor requests. In contrast to Apple devices, Android does not read device strings prior to reading the configuration descriptor. When requesting string descriptors, Android reads with a length of 255 rather than a two-stage read like other platforms. Finally, prior to requesting the HID report descriptor, Android sends a HID SetIdle class request, which is notably absent on Apple devices. [00210] Windows is similar to Apple enumerations but is fairly distinct from Android and different in a couple of ways to Apple. For example, Windows requests product name and manufacturer name and serial number prior to reading configuration descriptor like Apple. When reading strings, a short two-byte request happens first to know how long the string is. The subsequent read uses the length from the first request. Same as Apple. Between the Set Configuration and Get HID report descriptor requests the Windows host appears to read interface name for every interface in the configuration descriptor. Same as Apple. Prior to requesting the HID report descriptor, Windows usually sends the Get Configuration request (appears to occur after the batch of string reads). Windows requests the device qualifier descriptor, but with less predictable timing than Android, and generally after the configuration descriptor. [00211] Windows also supports a Microsoft-specific descriptor, called a MS OS descriptor. The way this works is that the very first time Windows sees a device it will make a very specific string descriptor read with index 0xEE to determine if the device supports this protocol. If it does, it will follow up and request the MS OS descriptor contents. If the string descriptor read fails, it will remember this result and never ask again. Since this behavior is unique to Windows, it is a strong form of evidence to distinguish Windows from other USB hosts. [00212] In another embodiment, the USB host fingerprinting approach is implemented as follows. The USB device records the SETUP packet for key USB requests into a history array which can be referenced later. An example SETUP packet can have the following fields: bmRequestType bRequest wValue wIndex wLength [00213] The most interesting and consistent requests end up being standard device get or set requests since these occur early on in the USB enumeration process. Since most response data is coming from the USB device itself, it would be redundant to record response data, and, in practice, the SETUP packet is enough. Upon receiving even more specific requests (such as Get Configuration Descriptor or Get HID Report Descriptor), the history array contents can be processed to predict what USB host platform the device is connected to. The fingerprint algorithm is largely concerned with the sequence of USB requests. The algorithm keeps track of whether certain requests precede or secede other requests, and these patterns can be recorded as forms of evidence. Evidence for each USB host platform is recorded such that it can be tallied up at the end. To make the data more interpretable, each type of evidence is given a unique identifier, such that the list of evidence can be organized as a vector, which is the fingerprint. The host platform with the highest evidence is what gets returned (or acted on). In the event the USB host detection result is ambiguous, the device can use whatever is default. When detecting iOS and Android, it may be better to have Android be the default as iOS devices have a high degree of consistency due to a single manufacturer. [00214] In a first-order approach, the host gets detected during the Get Configuration Descriptor request, which gives the USB device an opportunity to swap out the configuration descriptor before responding with data to the host. In one implementation, what gets swapped out is the HID report descriptor length in preparation for when it will be requested later. In a second-order approach, the host can get detected when the HID report descriptor is requested, which, in one example, is the final place where a decision can be made about the controller mapping. Since the length of the descriptor was specified earlier on, making changes to the descriptor contents is more difficult as the number of bytes must match. To make the number of bytes match, the HID report descriptor would need to be manipulated to introduce padding bits or alternate ways of defining HID usages to artificially change the final size. [00215] In another embodiment, a HID report descriptor can be created that satisfies both Android and iOS, but only a subset of the HID usages work on either platform. In order for the USB device to choose the correct HID usage mapping for its game controller elements, the USB host fingerprint can be used to determine which host is connected and, subsequently, which usage map to apply. A convenient place would be when the HID report descriptor is read, as this is the earliest the host could even interpret data coming from the HID device. Instead of swapping out the HID report descriptor, the USB device can supply one combined descriptor and simply update its HID usage mapping. Basically, the USB device internally remaps its gamepad elements based on the host platform that was detected. [00216] This has the advantage of being more robust as there are more USB events that occur before a decision has to be made, and the decision is only choosing how to map the bits, not the meaning of the bits. This also enables a failsafe behavior where the Android or iOS app could manually override the mapping once a connection to the app was made; the app has a 100% reliable sense of what type of phone it is. [00217] The following list of example rules/patterns can be used as evidence by the algorithm. This is not an exhaustive list of all differences, but these are the ones that may occur early enough in the enumeration process to make changes to the descriptors “in-flight”. [00218] 1. 64-Byte Get Device Descriptor [00219] Android devices ask for a 64-byte descriptor prior to even setting the USB address as a way of knowing the USB protocol version in advance (or possibly work around specific kinds of devices). iOS does not exhibit this behavior. Android will only read the 18-byte descriptor later as it already did a read at the beginning. [00220] 2. Two-Stage Get Device Descriptor [00221] iOS (and most other platforms) first read 8 bytes of the device descriptor to get the USB protocol version then re-read the descriptor again with the correct length for said version. Most Android devices do not do this. [00222] 3. Get Device Qualifier Before Get Configuration Descriptor [00223] Most Android devices request the Device Qualifier prior to reading the configuration descriptor to figure out if the device supports high speed or not. iOS does not utilize the device qualifier descriptor. Other hosts ask for device qualifier, but only Android asks for it so early on. [00224] 4. Get Device Qualifier After Get Configuration Descriptor [00225] Similar to the previous evidence type except DQ is received after. It is notably different than the negated form of the previous evidence type, because it implies a Device Qualifier request occurred which may or may not always be the case on all hosts. [00226] 5. Never Got Device Qualifier (Before Get Report Descriptor) [00227] This is the case where a device qualifier request is never seen. Usually the determination for this evidence is confirmed once the GetReportDescriptor (HID) is encountered as this is the last place where changes to the USB game controller configuration can be realistically made. [00228] 6. Two-Stage Get String Descriptor [00229] Apple devices (and most USB hosts) read strings in a two-transaction process, where first they read two bytes of the string to establish the length of the string descriptor, then follow up with the correct length request to get the entire string. Android does not follow this behavior. [00230] 7. 255-Byte Get String Descriptor [00231] Android devices read strings in a single transaction by reading the maximum amount of bytes possible for the string (255 bytes) and then internally extract the meaningful length from the subsequent buffer. Of the hosts tested, Android is the only OS that exhibits this behavior (but maybe not all Android devices) [00232] 8. Get Configuration Before Get Report Descriptor [00233] USB hosts that support multiple configurations (seems like mostly PCs do this) tend to ask for the current configuration at some point during the enumeration process, usually before obtaining the HID report descriptor. This may not be useful for Android vs iOS, but it could be useful to specifically detect Windows or Mac. [00234] 9. Get String Descriptor Before Get Configuration Descriptor [00235] Some hosts (iOS, Windows, Mac) request string descriptors immediately after reading the device descriptor, and before the configuration descriptor. Presumably, this information is necessary to create an entry for the device in advance of reading its configuration (e.g. look up driver in registry). Android however does not appear to do this. [00236] 10. No Get String Descriptor Before Get Configuration Descriptor [00237] Just a negation of the previous evidence type. Strings descriptors are always read, so there are really only two types of behavior here. [00238] 11. Set Idle Before Get Report Descriptor [00239] On Android and Windows, the host will send a HID SetIdle request before requesting the HID report descriptor. iOS does not appear to ever issue a SetIdle request, so this must be a behavior needed for certain classes of Human Interface Devices. [00240] The following is an example history buffer. Here, a sequence of SETUP packets is recorded during enumeration. Even with this short subset of events, there are already multiple degrees of evidence, such as the use of two-stage descriptor reads, presence of string reads before the configuration descriptor is requested, and the absence of device qualifier descriptor requests. bmRequestType bRequest wValue wIndex wLength 0x80 0x06 0x0100 0x0000 0x0008 Get Device Descriptor (8 bytes) 0x80 0x06 0x0100 0x0000 0x0012 Get Device Descriptor (18 bytes) 0x80 0x06 0x0301 0x0409 0x0002 Get String Descriptor (2 bytes) 0x80 0x06 0x0301 0x0409 0x0044 Get String Descriptor (68 bytes) 0x80 0x06 0x0302 0x0409 0x0002 Get String Descriptor (2 bytes) 0x80 0x06 0x0302 0x0409 0x0028 Get String Descriptor (40 bytes) 0x80 0x06 0x0303 0x0409 0x0002 Get String Descriptor (2 bytes) 0x80 0x06 0x0303 0x0409 0x001E Get String Descriptor (30 bytes) 0x80 0x06 0x0200 0x0000 0x0009 Get Configuration Descriptor (9 bytes) 0x80 0x06 0x0200 0x0000 0x019C Get Configuration Descriptor (412 bytes) [00241] In another embodiment, a HID descriptor is created that contains all of the necessary HID usages to support both iOS and Android game controller mappings. By clever organization of the descriptor, and some automatic remapping of the bits, the same HID descriptor can be presented to both iOS and Android instead of attempting to detect the host before it asks for the descriptor. [00242] The following is an example iOS HID Descriptor: UsagePage(GenericDesktop) Usage(GenericDesktop,Gamepad) Collection(Application) Usage(GenericDesktop,Gamepad) Collection(Logical) ReportID(GAMEPAD_REPORT_ID) Logical(-32767, 32767) Physical(-32767, 32767) Usage(GenericDesktop, Pointer) Collection(Physical) ReportSize(16) ReportCount(4) Usage(GenericDesktop, X) Usage(GenericDesktop, Y) Usage(GenericDesktop, Z) Usage(GenericDesktop, Rz) Input(data,var,abs) EndCollection ReportSize(8) ReportCount(2) Logical(0, 255) Physical(0, 255) UsagePage(Button) Usage(Button, Button7) Usage(Button, Button8) Input(data,var,abs) ReportSize(1) ReportCount(4) Logical(0,1) Physical(0,1) UsagePage(GenericDesktop) Usage(GenericDesktop, DpadUp) Usage(GenericDesktop, DpadRight) Usage(GenericDesktop, DpadDown) Usage(GenericDesktop, DpadLeft) Input(data,var,abs) ReportCount(4) UsagePage(Button) Usage(Button, Button1) Usage(Button, Button2) Usage(Button, Button3) Usage(Button, Button4) Input(data,var,abs) ReportCount(4) Usage(Button, Button5) Usage(Button, Button6) Usage(Button, Button9) Usage(Button, Button10) Input(data,var,abs) ReportCount(5) UsagePage(Consumer) Usage(Consumer, AcHome) Usage(Consumer, AcProperties) Usage(Consumer, AcExit) Usage(Consumer, Record) Usage(Consumer, Snapshot) Input(data,var,abs) ReportCount(7) Input(const,var,abs) EndCollection EndCollection [00243] The following is an example Android Descriptor: UsagePage(GenericDesktop) Usage(GenericDesktop, Gamepad) Collection(Application) Collection(Logical) ReportID(GAMEPAD_REPORT_ID) ReportSize(16) ReportCount(4) Logical(-32767, 32767) Physical(-32767, 32767) Usage(GenericDesktop, X) Usage(GenericDesktop, Y) Usage(GenericDesktop, Z) Usage(GenericDesktop, Rz) Input(data,var,abs) ReportSize(8) ReportCount(2) Logical(0, 255) Physical(0, 255) UsagePage(Simulation) Usage(Simulation, Brake) Usage(Simulation, Accelerator) Input(data,var,abs) ReportSize(4) ReportCount(1) Logical(0,7) Physical(0,315) Unit(degrees) Usage(GenericDesktop, HatSwitch) Input(data,var,abs,null) Unit(none) ReportSize(1) ReportCount(16) Logical(0,1) Physical(0,1) UsagePage(Button) UsageMin(Button1) UsageMax(Button16) Input(data,var,abs) ReportCount(3) UsagePage(Consumer) Usage(Consumer, Power) Usage(Consumer, VolumeIncrement) Usage(Consumer, VolumeDecrement) Input(data,var,abs) ReportCount(1) Input(const,var,abs) EndCollection EndCollection [00244] The following is an example of a combined iOS and Android Descriptor: UsagePage(GenericDesktop) Usage(GenericDesktop,Gamepad) Collection(Application) Usage(GenericDesktop,Gamepad) Collection(Logical) Logical(-32767, 32767) Physical(-32767, 32767) Usage(GenericDesktop, Pointer) Collection(Physical) ReportSize(16) ReportCount(4) Usage(GenericDesktop, X) Usage(GenericDesktop, Y) Usage(GenericDesktop, Z) Usage(GenericDesktop, Rz) Input(data,var,abs) EndCollection ReportSize(8) ReportCount(2) Logical(0, 255) Physical(0, 255) UsagePage(Button) Usage(Button, Button7) Usage(Button, Button8) Input(data,var,abs) ReportSize(8) ReportCount(2) Logical(0, 255) Physical(0, 255) UsagePage(Simulation) Usage(Simulation, Brake) Usage(Simulation, Accelerator) Input(data,var,abs) ReportSize(4) ReportCount(1) Logical(0,7) Physical(0,315) Unit(degrees) Usage(GenericDesktop, HatSwitch) Input(data,var,abs,null) ReportSize(1) ReportCount(4) Logical(0,1) Physical(0,1) UsagePage(GenericDesktop) Usage(GenericDesktop, DpadUp) Usage(GenericDesktop, DpadRight) Usage(GenericDesktop, DpadDown) Usage(GenericDesktop, DpadLeft) Input(data,var,abs) ReportCount(16) UsagePage(Button) Usage(Button, Button1) Usage(Button, Button2) Usage(Button, Button3) Usage(Button, Button4) Usage(Button, Button5) Usage(Button, Button6) Usage(Button, Button9) Usage(Button, Button10) Usage(Button, Button11) Usage(Button, Button12) Usage(Button, Button13) Usage(Button, Button14) Usage(Button, Button15) Usage(Button, Button16) Usage(Button, Button17) Usage(Button, Button18) Input(data,var,abs) ReportCount(8) UsagePage(Consumer) Usage(Consumer, AcHome) Usage(Consumer, AcProperties) Usage(Consumer, AcExit) Usage(Consumer, Record) Usage(Consumer, Snapshot) Usage(Consumer, Power) Usage(Consumer, VolumeIncrement) Usage(Consumer, VolumeDecrement) Input(data,var,abs) EndCollection EndCollection [00245] The following are examples of usage maps that would be used by the at least one processor in the controller to map various usages to the user input elements of the controller: iOS MAP(GamepadButton_JoystickX, Usage(GenericDesktop, X)), MAP(GamepadButton_JoystickY, Usage(GenericDesktop, Y)), MAP(GamepadButton_JoystickZ, Usage(GenericDesktop, Z)), MAP(GamepadButton_JoystickRz, Usage(GenericDesktop, Rz)), MAP(GamepadButton_L2, Usage(Button, Button7)), MAP(GamepadButton_R2, Usage(Button, Button8)), MAP(GamepadButton_DpadUp, Usage(GenericDesktop, DpadUp)), MAP(GamepadButton_DpadRight, Usage(GenericDesktop, DpadRight)), MAP(GamepadButton_DpadDown, Usage(GenericDesktop, DpadDown)), MAP(GamepadButton_DpadLeft, Usage(GenericDesktop, DpadLeft)), MAP(GamepadButton_A, Usage(Button, Button1)), MAP(GamepadButton_B, Usage(Button, Button2)), MAP(GamepadButton_X, Usage(Button, Button3)), MAP(GamepadButton_Y, Usage(Button, Button4)), MAP(GamepadButton_L1, Usage(Button, Button5)), MAP(GamepadButton_R1, Usage(Button, Button6)), MAP(GamepadButton_L3, Usage(Button, Button9)), MAP(GamepadButton_R3, Usage(Button, Button10)), MAP(GamepadButton_Menu, Usage(Consumer, AcExit)), MAP(GamepadButton_Options, Usage(Consumer, AcProperties)), MAP(GamepadButton_Record, Usage(Consumer, Record)), MAP(GamepadButton_Home, Usage(Consumer, AcHome)), MAP(GamepadButton_Screenshot, Usage(Consumer, Snapshot)), Android MAP(GamepadButton_JoystickX, Usage(GenericDesktop, X)), MAP(GamepadButton_JoystickY, Usage(GenericDesktop, Y)), MAP(GamepadButton_JoystickZ, Usage(GenericDesktop, Z)), MAP(GamepadButton_JoystickRz, Usage(GenericDesktop, Rz)), MAP(GamepadButton_L2, Usage(Simulation, Brake)), MAP(GamepadButton_R2, Usage(Simulation, Accelerator)), MAP(GamepadButton_L2, Usage(Button, Button9)), MAP(GamepadButton_R2, Usage(Button, Button10)), MAP(GamepadButton_Hat, Usage(GenericDesktop, HatSwitch)), MAP(GamepadButton_A, Usage(Button, Button1)), MAP(GamepadButton_B, Usage(Button, Button2)), MAP(GamepadButton_X, Usage(Button, Button4)), MAP(GamepadButton_Y, Usage(Button, Button5)), MAP(GamepadButton_L1, Usage(Button, Button7)), MAP(GamepadButton_R1, Usage(Button, Button8)), MAP(GamepadButton_L3, Usage(Button, Button14)), MAP(GamepadButton_R3, Usage(Button, Button15)), MAP(GamepadButton_Options, Usage(Button, Button11)), MAP(GamepadButton_Menu, Usage(Button, Button12)), MAP(GamepadButton_Screenshot, Usage(Consumer, Power)), MAP(GamepadButton_Screenshot, Usage(Consumer, VolumeDecrement)), MAP(GamepadButton_Home, Usage(Button, Button13)), [00246] Regarding value differences, in one embodiment, the only shared usages that differ in interpretation is the Y axis on the joysticks. This is inverted between the host platforms. In addition, for compatibility, the Android mapping also has a digital version of the left and right triggers. Since triggers are often expected to be analog, an analog digital conversion can be applied. Thus, the below code can be implemented in a value transformation callback: if (detectedUsbHost == UsbHostPlatform_ANDROID) { // Android Y axis is inverted relative to iOS if (usage == Usage(GenericDesktop, Y) || usage == Usage(GenericDesktop, Rz)) { return -value; } // Convert analog triggers to digital if (usage == Usage(Button, Button9) || usage == Usage(Button, Button10)) { // Greater than 0.5 is 1, otherwise 0 return (value > 127) ? 1 : 0; } } [00247] Several findings may be of interest to these embodiments. For example, Android may get confused when it sees both Usage(GenericDesktop, HatSwitch) and Usage(GenericDesktop, DpadUp) in the same descriptor. However, due to the way the Android code works, if it sees HatSwitch in the descriptor first, it can correctly establish the intended HID usage for AXIS_HAT and issues can be avoided (such as Dpad-up being permanently stuck on). Also, in one example, Button7 and Button8 are analog in the iOS mapping and digital in the Android mapping. However, Android will convert the analog values to digital, so Button7 and Button8 can still work as digital L1/R1 despite being configured with a 0-255 range in the descriptor. Further, Usage(Simulation, Brake), Usage(Simulation, Accelerator), and Usage(GenericDesktop, HatSwitch) are ignored on iOS and are safe to interleave in the descriptor. Additionally, unmapped Button page usages are generally ignored on both platform, but included for future proofing. Both platforms appear to have plans/provisions for extra gamepad buttons in the case new inputs like paddles are added. [00248] Any suitable method can be used to implement any of the alternatives noted above. For example, a process to load a gamepad can be used, where the process can use hybrid HID descriptor. The controller can run a USB host fingerprint algorithm, but rather than make a detection decision when sending the configuration descriptor, the controller can wait until the HID report descriptor is read. Based on the USB host detection result, the controller can select the appropriate button mapping (e.g., Android or iOS). If/when the controller establishes communication with the smart phone app, the USB host platform can be explicitly updated as this can be 100% accurate (e.g., the Android app only runs on an Android phone). [00249] Turning again to the drawings, Figure 30 is a flow chart 3000 of a hybrid HID game controller method of an embodiment. As shown in Figure 30, the USB device (e.g., the game controller) physically connects to the USB host (e.g., the phone) (act 3010). The USB host then initiates enumeration of USB device descriptors (act 3020). In response, the USB device tracks USB communication patterns in a history buffer (act 3030). The USB host then identifies the HID interface and reads the HID report descriptor (act 3040). Next, the USB device calculates fingerprints for the USB host and updates the HID usage map (act 3050). If the mobile app is installed in the host, the mobile app can start communication with the USB device via a vendor interface (act 3060) and inform the USB device of the local USB host platform (act 3070). The USB device then updates its HID usage map, if needed (act 3080). [00250] Examples [00251] The disclosed technology is illustrated, for example, according to various examples described below. Various examples of examples of the disclosed technology are described as numbered examples (1, 2, 3, etc.) for convenience. These are provided as examples and do not limit the disclosed technology. It is noted that any of the dependent examples may be combined in any combination, and placed into a respective independent example. The other examples can be presented in a similar manner. [00252] Example 1. A universal mobile game controller as described above. [00253] Example 2. A method for using a universal mobile game controller as described above. [00254] Example 3. A system comprising a computing device and a universal mobile game controller as described above. [00255] Example 4. A game controller comprising: a connector; at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: sending to a host connected to the game controller via the connector both (i) a first set of descriptors configured to enable a first operating system to use the game controller and (ii) a second set of descriptors configured to enable a second operating system to use the game controller, wherein both the first and second sets of descriptors are sent to the host irrespective of which one of the first and second operating systems the host uses. [00256] Example 5. The game controller of Claim 1, wherein the host is configured to use one of the first and second sets of descriptors and is further configured to ignore the other set of descriptors. [00257] Example 6. The game controller of any one of the preceding Examples, wherein the host is configured to use both the first and second sets of descriptors. [00258] Example 7. The game controller of any one of the preceding Examples, wherein the host is further configured to authenticate the game controller using one of the first and second sets of descriptors and use the other set of descriptors after the game controller has been authenticated. [00259] Example 8. The game controller of any one of the preceding Examples, wherein the first and second sets of descriptors comprise a device descriptor, a configuration descriptor, a human interface device (HID) descriptor, and/or a vendor descriptor. [00260] Example 9. The game controller of any one of the preceding Examples, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: sending the first and second sets of descriptors to the host in response to a request from the host for the game controller to identify itself during an enumeration process. [00261] Example 10. The game controller of any one of the preceding Examples, wherein the first operating system comprises Android and the second operating system comprises iOS. [00262] Example 11. The game controller of any one of the preceding Examples, wherein the connector comprises a Universal Serial Bus (USB)-C connector. [00263] Example 12. A method comprising: performing in a universal serial bus (USB) device in communication with a host via a connector: receiving, from the host, a request for the USB device to identify itself during an enumeration process; and in response to receiving the request, sending, to the host, a first set of descriptors configured to enable a first operating system to use the USB device and a second set of descriptors configured to enable a second operating system to use the USB device, wherein one or both of the first and second sets of descriptors are usable by both the first and second operating systems. [00264] Example 13. The method of any one of the preceding Examples, wherein the first and second sets of descriptors comprise a device descriptor, a configuration descriptor, a human interface device (HID) descriptor, and/or a vendor descriptor. [00265] Example 14. The method of any one of the preceding Examples, wherein the first and second sets of descriptors are further configured to provide an audio setting to the host. [00266] Example 15. The method of any one of the preceding Examples, wherein the host is configured to authenticate the USB device using one of the first and second sets of descriptors and use the other set of descriptors after the USB device has been authenticated . [00267] Example 16. The method of any one of the preceding Examples, wherein the first operating system comprises Android and the second operating system comprises iOS. [00268] Example 17. The method of any one of the preceding Examples, wherein the connector comprises a USB-C connector. [00269] Example 18. The method of any one of the preceding Examples, wherein the USB device comprise a game controller. [00270] Example 19. A non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform functions comprising: sending to a host in communication with the mobile game controller both (i) a first set of descriptors configured to enable a first operating system to use the mobile game controller and (ii) a second set of descriptors configured to enable a second operating system to use the mobile game controller: wherein: both the first and second sets of descriptors are sent to the host irrespective of which one of the first and second operating systems the host uses; and the host is configured to authenticate the game controller using one of the first and second sets of descriptors and use the other set of descriptors after the game controller has been authenticated. [00271] Example 20. The non-transitory computer-readable medium of any one of the preceding Examples, wherein: the host is in communication with the mobile game controller via a first connector; and the program instructions, when executed by the one or more processors, further cause the one or more processors to perform functions comprising: sending the first and second sets of descriptors to another host connected to the mobile game controller via a second connector. [00272] Example 21. The non-transitory computer-readable medium of any one of the preceding Examples, wherein: the host is in communication with the mobile game controller via a first connector; and the program instructions, when executed by the one or more processors, further cause the one or more processors to perform functions comprising: sending a set of descriptors different from the first and second sets of descriptors to another host connected to the mobile game controller via a second connector. [00273] Example 22. The non-transitory computer-readable medium of any one of the preceding Examples, wherein the host is in communication with the mobile game controller via a Universal Serial Bus (USB)-C connector. [00274] Example 23. The non-transitory computer-readable medium of any one of the preceding Examples, wherein the first operating system comprises Android and the second operating system comprises iOS. [00275] Example 24. A game controller comprising: at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: receiving, from a host, a plurality of requests as part of an enumeration process; sending a plurality of descriptors to the host in response to receiving the plurality of requests, wherein the plurality of descriptors are sent to the host without the game controller knowing which operating system is used by the host; analyzing the plurality of requests to determine an operating system used by the host; and sending, to the host, a human interface device (HID) descriptor configured for the operating system determined to be used by the host, wherein the HID descriptor is sent to the host without restarting the enumeration process. [00276] Example 25. The game controller of any one of the preceding Examples, further comprising: dynamically swapping out a HID descriptor configured for an operating system not used by the host for the HID descriptor configured for the operating system determined to be used by the host. [00277] Example 26. The game controller of any one of the preceding Examples, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: reporting a length of the HID descriptor to the host prior to determining the operating system used by the host, wherein the reported length is different from an actual length of the HID descriptor; and modifying the HID descriptor to match the reported length. [00278] Example 27. The game controller of any one of the preceding Examples, wherein the HID descriptor is modified by adjusting an organization of fields of the HID descriptor, adding padding bits to the HID descriptor, and/or declaring a larger field size of the HID descriptor. [00279] Example 28. The game controller of any one of the preceding Examples, wherein a presence of a request in the plurality of requests for a device qualifier descriptor is used to determine the operating system used by the host. [00280] Example 29. The game controller of any one of the preceding Examples, wherein a presence of a request in the plurality of requests for a string descriptor is used to determine the operating system used by the host. [00281] Example 30. The game controller of any one of the preceding Examples, wherein a sequence in the plurality of requests of a request for an audio interface and a request for a report descriptor is used to determine the operating system used by the host. [00282] Example 31. The game controller of any one of the preceding Examples, wherein the HID descriptor is sent to the host after the host authenticates the game controller using one of the plurality of descriptors. [00283] Example 32. The game controller of any one of the preceding Examples, further comprising a Universal Serial Bus (USB)-C connector configured to connect the game controller with the host. [00284] Example 33. A method comprising: performing in a universal serial bus (USB) device in communication with a host: receiving a plurality of communications from the host; sending, to the host, (a) a first set of descriptors configured for at least a first operating system and (b) a second set of descriptors configured for at least a second operating system, wherein the first and second sets of descriptors are sent to the host without the USB device knowing which one of the first and second operating systems is used by the host; determining which one of the first and second operating systems is used by the host based on the plurality of communications; and sending, to the host, an additional descriptor configured for the one of the first and second operating systems determined to be used by the host [00285] Example 34. The method of any one of the preceding Examples, wherein the USB device comprises a game controller and the additional descriptor describes user input elements of the game controller. [00286] Example 35. The method of any one of the preceding Examples, wherein the additional descriptor comprises a human interface device (HID) descriptor. [00287] Example 36. The method of any one of the preceding Examples, wherein a presence of a certain request in the plurality of communications is indicative of which one of the first and second operating systems is used by the host. [00288] Example 37. The method of any one of the preceding Examples, wherein a specific sequence of at least two requests in the plurality of communications is indicative of which one of the first and second operating systems is used by the host. [00289] Example 38. The method of any one of the preceding Examples, wherein the host is configured to authenticate the USB using one of the first and second sets of descriptors and use the other set of descriptors after the USB device has been authenticated. [00290] Example 39. The method of any one of the preceding Examples, wherein the first operating system comprising iOS and the second operating system comprises Android. [00291] Example 40. The method of any one of the preceding Examples, wherein the first operating system comprising Mac and the second operating system comprises Windows. [00292] Example 41. A non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform functions comprising: receiving a plurality of requests from the host; sending, to the host, (i) a first descriptor configured for at least a first operating system and (ii) a second descriptor configured for at least a second operating system, wherein the first and second descriptors are sent to the host without the game controller knowing which one of the first and second operating systems is used by the host; analyzing the plurality of requests to determine which one of the first and second operating systems is used by the host; and sending, to the host, a human interface device (HID) descriptor configured for use by the one of the first and second operating systems determined to be used by the host. [00293] Example 42. The non-transitory computer-readable medium of any one of the preceding Examples, wherein a presence of a certain request in the plurality of requests is indicative of which one of the first and second operating systems is used by the host. [00294] Example 43. The non-transitory computer-readable medium of any one of the preceding Examples, wherein a specific sequence of at least two requests in the plurality of requests is indicative of which one of the first and second operating systems is used by the host. [00295] Example 44. A game controller comprising: at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform at least one act discussed herein. [00296] Example 45. A method comprising: performing at least one step discussed herein in a universal serial bus (USB) device in communication with a host. [00297] Example 46. A non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform at least one function discussed herein. [00298] Example 47. A game controller comprising: at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: receiving a plurality of requests from a host, wherein one of the plurality of requests comprises a request for a human interface device (HID) descriptor; sending a single HID descriptor to the host, wherein the single HID descriptor comprises a first subset of information configured for a first operating system and a second subset of information configured for a second operating system; analyzing the plurality of requests to determine which of the first and second operating systems is used by the host; and selecting a mapping for user input elements of the game controller based on which of the first and second operating systems is determined to be used by the host. [00299] Example 48. The game controller of any one of the preceding Examples, wherein the plurality of requests are analyzed in response to receiving a request to get a HID report descriptor. [00300] Example 49. The game controller of any one of the preceding Examples, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: receiving, from a game controller application running on the host, an identification of an operating system actually running on the host; determining whether the selected mapping is configured for the operating system actually running on the host; and in response to determining that the selected mapping is not configured for the operating system actually running on the host, using a different mapping. [00301] Example 50. The game controller of any one of the preceding Examples, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: recording a setup packet for each of the plurality of requests in a history array. [00302] Example 51. The game controller of any one of the preceding Examples, wherein each setup packet comprises one or more of the following fields: bmRequestType, bRequest, wValue, wIndex, or wLength [00303] Example 52. The game controller of any one of the preceding Examples, wherein requests that indicate that the host uses the first operation system or the second operating system are associated with unique identifiers and a list of unique identifiers is organized as a vector [00304] Example 53. The game controller of any one of the preceding Examples, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: selecting a default operating system in response to the analyzing being inclusive as to which of the first and second operating systems is used by the host. [00305] Example 54. The game controller of any one of the preceding Examples, further comprising a Universal Serial Bus (USB)-C connector configured to connect the game controller with the host. [00306] Example 55. A method comprising: performing in a universal serial bus (USB) device in communication with a host: tracking a plurality of communications received from a host; sending a hybrid human interface device (HID) descriptor to the host, wherein the hybrid HID descriptor comprises a plurality of subsets of information configured for a respective plurality of operating systems; analyzing the plurality of communications to determine an operating system used by the host; and selecting a usage map based on the operating system determined to be used by the host. [00307] Example 56. The method of any one of the preceding Examples, wherein the plurality of communications are analyzed in response to receiving a request to get a HID report descriptor. [00308] Example 57. The method of any one of the preceding Examples, further comprising: updating the usage map in response to learning, from an application running on the host, that the host is using a different operating system. [00309] Example 58. The method of any one of the preceding Examples, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a request for a device qualifier descriptor, a request for a string descriptor, a specific sequence of a request for an audio interface and a request for a report descriptor, a request for a 64-byte get device descriptor, or a two-stage get device descriptor request. [00310] Example 59. The method of any one of the preceding Examples, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a get device qualifier request before a get configuration descriptor request, a get device qualifier request after a get configuration descriptor request, an absence of a device qualifier request before a get report descriptor request, a two-stage get string descriptor request, or a request for a 255-byte get string descriptor. [00311] Example 60. The method of any one of the preceding Examples, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a get configuration request before a get report descriptor request, a get string descriptor request before a get configuration descriptor request, an absence of a get string descriptor before a get configuration descriptor request, a set idle request before a get report descriptor request, or a request for a Microsoft operating system (MS OS) descriptor. [00312] Example 61. A non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform functions comprising: receiving a plurality of requests from the host; sending a descriptor to the host, wherein the descriptor comprises a plurality of subsets of information configured for a respective plurality of operating systems; analyzing the plurality of requests to determine an operating system used by the host; and internally mapping various gamepad elements of the mobile game controller based on the operating system determined to be used by the host. [00313] Example 62. The non-transitory computer-readable medium of any one of the preceding Examples, wherein the descriptor comprises a human interface device (HID) descriptor. [00314] Example 63. The non-transitory computer-readable medium of any one of the preceding Examples, wherein the plurality of requests are analyzed in response to receiving a request to get a HID report descriptor. [00315] Example 64. The non-transitory computer-readable medium of any one of the preceding Examples, wherein the program instructions, when executed by one or more processors in the mobile game controller, further cause the one or more processors to perform functions comprising: internally re-mapping the various gamepad elements of the mobile game controller based on learning an actual operating system used by the host. [00316] Example 65. The non-transitory computer-readable medium of any one of the preceding Examples, wherein the mobile game controller comprises a joystick, and wherein the mapping is for movement on a Y axis of the joystick. [00317] Example 66. The non-transitory computer-readable medium of any one of the preceding Examples, wherein the mobile game controller comprises a trigger, and wherein the mapping comprises an analog-to-digital conversion of a signal generated by actuation of the trigger. [00318] Conclusion [00319] It is intended that the foregoing detailed description be understood as an illustration of selected forms that the invention can take and not as a definition of the invention. It is only the following claims, including all equivalents, that are intended to define the scope of the claimed invention. Finally, it should be noted that any aspect of any of the embodiments described herein can be used alone or in combination with one another.

Claims

What is claimed is: 1. A game controller comprising: at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: receiving a plurality of requests from a host, wherein one of the plurality of requests comprises a request for a human interface device (HID) descriptor; sending a single HID descriptor to the host, wherein the single HID descriptor comprises a first subset of information configured for a first operating system and a second subset of information configured for a second operating system; analyzing the plurality of requests to determine which of the first and second operating systems is used by the host; and selecting a mapping for user input elements of the game controller based on which of the first and second operating systems is determined to be used by the host.
2. The game controller of Claim 1, wherein the plurality of requests are analyzed in response to receiving a request to get a HID report descriptor.
3. The game controller of Claim 1, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: receiving, from a game controller application running on the host, an identification of an operating system actually running on the host; determining whether the selected mapping is configured for the operating system actually running on the host; and in response to determining that the selected mapping is not configured for the operating system actually running on the host, using a different mapping.
4. The game controller of Claim 1, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: recording a setup packet for each of the plurality of requests in a history array.
5. The game controller of Claim 4, wherein each setup packet comprises one or more of the following fields: bmRequestType, bRequest, wValue, wIndex, or wLength
6. The game controller of Claim 4, wherein requests that indicate that the host uses the first operation system or the second operating system are associated with unique identifiers and a list of unique identifiers is organized as a vector
7. The game controller of Claim 1, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: selecting a default operating system in response to the analyzing being inclusive as to which of the first and second operating systems is used by the host.
8. The game controller of Claim 1, further comprising a Universal Serial Bus (USB)-C connector configured to connect the game controller with the host.
9. A method comprising: performing in a universal serial bus (USB) device in communication with a host: tracking a plurality of communications received from a host; sending a hybrid human interface device (HID) descriptor to the host, wherein the hybrid HID descriptor comprises a plurality of subsets of information configured for a respective plurality of operating systems; analyzing the plurality of communications to determine an operating system used by the host; and selecting a usage map based on the operating system determined to be used by the host.
10. The method of Claim 9, wherein the plurality of communications are analyzed in response to receiving a request to get a HID report descriptor.
11. The method of Claim 9, further comprising: updating the usage map in response to learning, from an application running on the host, that the host is using a different operating system.
12. The method of Claim 9, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a request for a device qualifier descriptor, a request for a string descriptor, a specific sequence of a request for an audio interface and a request for a report descriptor, a request for a 64-byte get device descriptor, or a two-stage get device descriptor request.
13. The method of Claim 9, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a get device qualifier request before a get configuration descriptor request, a get device qualifier request after a get configuration descriptor request, an absence of a device qualifier request before a get report descriptor request, a two-stage get string descriptor request, or a request for a 255-byte get string descriptor.
14. The method of Claim 9, wherein a presence of one or more of the following in the plurality of communications is indicative of the operating system used by the host: a get configuration request before a get report descriptor request, a get string descriptor request before a get configuration descriptor request, an absence of a get string descriptor before a get configuration descriptor request, a set idle request before a get report descriptor request, or a request for a Microsoft operating system (MS OS) descriptor.
15. A non-transitory computer-readable medium storing program instructions that, when executed by one or more processors in a mobile game controller, cause the one or more processors to perform functions comprising: receiving a plurality of requests from the host; sending a descriptor to the host, wherein the descriptor comprises a plurality of subsets of information configured for a respective plurality of operating systems; analyzing the plurality of requests to determine an operating system used by the host; and internally mapping various gamepad elements of the mobile game controller based on the operating system determined to be used by the host.
16. The non-transitory computer-readable medium of Claim 15, wherein the descriptor comprises a human interface device (HID) descriptor.
17. The non-transitory computer-readable medium of Claim 16, wherein the plurality of requests are analyzed in response to receiving a request to get a HID report descriptor.
18. The non-transitory computer-readable medium of Claim 15, wherein the program instructions, when executed by one or more processors in the mobile game controller, further cause the one or more processors to perform functions comprising: internally re-mapping the various gamepad elements of the mobile game controller based on learning an actual operating system used by the host.
19. The non-transitory computer-readable medium of Claim 15, wherein the mobile game controller comprises a joystick, and wherein the mapping is for movement on a Y axis of the joystick.
20. The non-transitory computer-readable medium of Claim 15, wherein the mobile game controller comprises a trigger, and wherein the mapping comprises an analog-to-digital conversion of a signal generated by actuation of the trigger.
21. A game controller comprising: a connector; at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: sending to a host connected to the game controller via the connector both (i) a first set of descriptors configured to enable a first operating system to use the game controller and (ii) a second set of descriptors configured to enable a second operating system to use the game controller, wherein both the first and second sets of descriptors are sent to the host irrespective of which one of the first and second operating systems the host uses.
22. The game controller of Claim 21, wherein the host is configured to use one of the first and second sets of descriptors and is further configured to ignore the other set of descriptors.
23. The game controller of Claim 21, wherein the host is configured to use both the first and second sets of descriptors.
24. The game controller of Claim 23, wherein the host is further configured to authenticate the game controller using one of the first and second sets of descriptors and use the other set of descriptors after the game controller has been authenticated.
25. The game controller of Claim 21, wherein the first and second sets of descriptors comprise a device descriptor, a configuration descriptor, a human interface device (HID) descriptor, and/or a vendor descriptor.
26. The game controller of Claim 21, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: sending the first and second sets of descriptors to the host in response to a request from the host for the game controller to identify itself during an enumeration process.
27. The game controller of Claim 21, wherein the first operating system comprises Android and the second operating system comprises iOS.
28. The game controller of Claim 21, wherein the connector comprises a Universal Serial Bus (USB)-C connector.
29. A game controller comprising: at least one processor; a non-transitory computer-readable medium; and program instructions stored on the non-transitory computer-readable medium that, when executed by the at least one processor, cause the at least one processor to perform functions comprising: receiving, from a host, a plurality of requests as part of an enumeration process; sending a plurality of descriptors to the host in response to receiving the plurality of requests, wherein the plurality of descriptors are sent to the host without the game controller knowing which operating system is used by the host; analyzing the plurality of requests to determine an operating system used by the host; and sending, to the host, a human interface device (HID) descriptor configured for the operating system determined to be used by the host, wherein the HID descriptor is sent to the host without restarting the enumeration process.
30. The game controller of Claim 29, further comprising: dynamically swapping out a HID descriptor configured for an operating system not used by the host for the HID descriptor configured for the operating system determined to be used by the host.
31. The game controller of Claim 29, wherein the program instructions, when executed by the at least one processor, further cause the at least one processor to perform functions comprising: reporting a length of the HID descriptor to the host prior to determining the operating system used by the host, wherein the reported length is different from an actual length of the HID descriptor; and modifying the HID descriptor to match the reported length.
32. The game controller of Claim 31, wherein the HID descriptor is modified by adjusting an organization of fields of the HID descriptor, adding padding bits to the HID descriptor, and/or declaring a larger field size of the HID descriptor.
33. The game controller of Claim 29, wherein a presence of a request in the plurality of requests for a device qualifier descriptor is used to determine the operating system used by the host.
34. The game controller of Claim 29, wherein a presence of a request in the plurality of requests for a string descriptor is used to determine the operating system used by the host.
35. The game controller of Claim 29, wherein a sequence in the plurality of requests of a request for an audio interface and a request for a report descriptor is used to determine the operating system used by the host.
36. The game controller of Claim 29, wherein the HID descriptor is sent to the host after the host authenticates the game controller using one of the plurality of descriptors.
37. The game controller of Claim 29, further comprising a Universal Serial Bus (USB)-C connector configured to connect the game controller with the host.
PCT/US2023/081101 2022-12-23 2023-11-27 Universal mobile game controller WO2024137106A1 (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
US63/435,089 2022-12-23
US18/136,509 2023-04-19
US63/524,014 2023-06-29
US18/237,698 2023-08-24
US18/237,680 2023-08-24

Publications (1)

Publication Number Publication Date
WO2024137106A1 true WO2024137106A1 (en) 2024-06-27

Family

ID=

Similar Documents

Publication Publication Date Title
US20090198839A1 (en) Plug-and-play device and method of using the same
US20100115145A1 (en) Plug-and-play device and method of using the same
US8626932B2 (en) Device-dependent selection between modes for asymmetric serial protocols
US9804859B2 (en) Re-enumeration of USB 3.0 compatible devices
KR101251250B1 (en) System for performing remote control using remote device driver and method for performing the same
CN113646828B (en) Game controller operable in Bluetooth Low Energy (BLE) mode
US8135874B2 (en) Automatic mapping and updating computer switching device
KR102456456B1 (en) An electronic device having a plurality of displays and control method
GB2526695A (en) Smart pen pairing and connection
KR20190032040A (en) Method and apparatus for controlling a update of software of an electronic device
US9569375B2 (en) Unifying class device interface with one host interface by using embedded controller
EP3723337B1 (en) Electronic device and operation method of electronic device
KR20100011740A (en) Host and client device and method for changing class thereof
CN103092648B (en) A kind of image upgrade method, system and subscriber equipment and personal computer
KR20200058157A (en) Electronic device and method for providing in-vehicle infortainment service
US20240207721A1 (en) Universal Mobile Game Controller
WO2024137106A1 (en) Universal mobile game controller
US20240207724A1 (en) Universal Mobile Game Controller
US20240207725A1 (en) Universal Mobile Game Controller
JP2003337784A (en) Control system and usb device
CN101788964B (en) Automatic correspondence updating computer switching device
EP3413205A1 (en) Re-enumeration of usb 3.0 compatible devices
KR20200059410A (en) Electronic apparatus providing service requiring security through security element and controlling method thereof
KR101475472B1 (en) Apparatus for controlling connection between devices
CN111988768B (en) Bluetooth pairing control method and device, bluetooth equipment and readable storage medium