xerpi / fakemote

A Wii cIOS module that fakes Wiimotes from the input of USB game controllers
GNU General Public License v2.0
178 stars 16 forks source link

Suggestion: Microsoft Xbox One X/S Controller #15

Open jpalm7698 opened 2 years ago

jpalm7698 commented 2 years ago

USB Device Descriptors dumped via Thesycon USB Descriptor Dumper.

Information for device Controller (VID=0x045E PID=0x0B12):

------------------------------
Connection Information:
------------------------------
Device current bus speed: FullSpeed
Device supports USB 1.1 specification
Device supports USB 2.0 specification
Device address: 0x000B
Current configuration value: 0x01
Number of open pipes: 2

------------------------------
Device Descriptor:
------------------------------
0x12    bLength
0x01    bDescriptorType
0x0200  bcdUSB
0xFF    bDeviceClass      (Vendor specific)
0x47    bDeviceSubClass   
0xD0    bDeviceProtocol   
0x40    bMaxPacketSize0   (64 bytes)
0x045E  idVendor
0x0B12  idProduct
0x0509  bcdDevice
0x01    iManufacturer   "Microsoft"
0x02    iProduct        "Controller"
0x03    iSerialNumber   "3039373132323930343637303235"
0x01    bNumConfigurations

-------------------------
Configuration Descriptor:
-------------------------
0x09    bLength
0x02    bDescriptorType
0x0077  wTotalLength   (119 bytes)
0x03    bNumInterfaces
0x01    bConfigurationValue
0x00    iConfiguration
0xA0    bmAttributes   (Bus-powered Device, Remote-Wakeup)
0xFA    bMaxPower      (500 mA)

Interface Descriptor:
------------------------------
0x09    bLength
0x04    bDescriptorType
0x00    bInterfaceNumber
0x00    bAlternateSetting
0x02    bNumEndPoints
0xFF    bInterfaceClass      (Vendor specific)
0x47    bInterfaceSubClass   
0xD0    bInterfaceProtocol   
0x00    iInterface

Endpoint Descriptor:
------------------------------
0x07    bLength
0x05    bDescriptorType
0x02    bEndpointAddress  (OUT endpoint 2)
0x03    bmAttributes      (Transfer: Interrupt / Synch: None / Usage: Data)
0x0040  wMaxPacketSize    (1 x 64 bytes)
0x04    bInterval         (4 frames)

Endpoint Descriptor:
------------------------------
0x07    bLength
0x05    bDescriptorType
0x82    bEndpointAddress  (IN endpoint 2)
0x03    bmAttributes      (Transfer: Interrupt / Synch: None / Usage: Data)
0x0040  wMaxPacketSize    (1 x 64 bytes)
0x04    bInterval         (4 frames)

Interface Descriptor:
------------------------------
0x09    bLength
0x04    bDescriptorType
0x00    bInterfaceNumber
0x01    bAlternateSetting
0x02    bNumEndPoints
0xFF    bInterfaceClass      (Vendor specific)
0x47    bInterfaceSubClass   
0xD0    bInterfaceProtocol   
0x00    iInterface

Endpoint Descriptor:
------------------------------
0x07    bLength
0x05    bDescriptorType
0x02    bEndpointAddress  (OUT endpoint 2)
0x03    bmAttributes      (Transfer: Interrupt / Synch: None / Usage: Data)
0x0040  wMaxPacketSize    (1 x 64 bytes)
0x04    bInterval         (4 frames)

Endpoint Descriptor:
------------------------------
0x07    bLength
0x05    bDescriptorType
0x82    bEndpointAddress  (IN endpoint 2)
0x03    bmAttributes      (Transfer: Interrupt / Synch: None / Usage: Data)
0x0040  wMaxPacketSize    (1 x 64 bytes)
0x02    bInterval         (2 frames)

Interface Descriptor:
------------------------------
0x09    bLength
0x04    bDescriptorType
0x01    bInterfaceNumber
0x00    bAlternateSetting
0x00    bNumEndPoints
0xFF    bInterfaceClass      (Vendor specific)
0x47    bInterfaceSubClass   
0xD0    bInterfaceProtocol   
0x00    iInterface

Interface Descriptor:
------------------------------
0x09    bLength
0x04    bDescriptorType
0x01    bInterfaceNumber
0x01    bAlternateSetting
0x02    bNumEndPoints
0xFF    bInterfaceClass      (Vendor specific)
0x47    bInterfaceSubClass   
0xD0    bInterfaceProtocol   
0x00    iInterface

Endpoint Descriptor:
------------------------------
0x07    bLength
0x05    bDescriptorType
0x03    bEndpointAddress  (OUT endpoint 3)
0x01    bmAttributes      (Transfer: Isochronous / Synch: None / Usage: Data)
0x00E4  wMaxPacketSize    (1 x 228 bytes)
0x01    bInterval         (1 frames)

Endpoint Descriptor:
------------------------------
0x07    bLength
0x05    bDescriptorType
0x83    bEndpointAddress  (IN endpoint 3)
0x01    bmAttributes      (Transfer: Isochronous / Synch: None / Usage: Data)
0x0040  wMaxPacketSize    (1 x 64 bytes)
0x01    bInterval         (1 frames)

Interface Descriptor:
------------------------------
0x09    bLength
0x04    bDescriptorType
0x02    bInterfaceNumber
0x00    bAlternateSetting
0x00    bNumEndPoints
0xFF    bInterfaceClass      (Vendor specific)
0x47    bInterfaceSubClass   
0xD0    bInterfaceProtocol   
0x00    iInterface

Interface Descriptor:
------------------------------
0x09    bLength
0x04    bDescriptorType
0x02    bInterfaceNumber
0x01    bAlternateSetting
0x02    bNumEndPoints
0xFF    bInterfaceClass      (Vendor specific)
0x47    bInterfaceSubClass   
0xD0    bInterfaceProtocol   
0x00    iInterface

Endpoint Descriptor:
------------------------------
0x07    bLength
0x05    bDescriptorType
0x04    bEndpointAddress  (OUT endpoint 4)
0x02    bmAttributes      (Transfer: Bulk / Synch: None / Usage: Data)
0x0040  wMaxPacketSize    (64 bytes)
0x00    bInterval         

Endpoint Descriptor:
------------------------------
0x07    bLength
0x05    bDescriptorType
0x84    bEndpointAddress  (IN endpoint 4)
0x02    bmAttributes      (Transfer: Bulk / Synch: None / Usage: Data)
0x0040  wMaxPacketSize    (64 bytes)
0x00    bInterval         

Microsoft OS Descriptor:
------------------------------
0x12    bLength
0x03    bDescriptorType
Hex dump: 
0x12 0x03 0x4D 0x00 0x53 0x00 0x46 0x00 0x54 0x00 
0x31 0x00 0x30 0x00 0x30 0x00 0x90 0x00 

--------------------------------
String Descriptor Table
--------------------------------
Index  LANGID  String
0x00   0x0000  0x0409 
0x01   0x0409  "Microsoft"
0x02   0x0409  "Controller"
0x03   0x0409  "3039373132323930343637303235"

------------------------------

Connection path for device: 
USB xHCI Compliant Host Controller
Root Hub
Controller (VID=0x045E PID=0x0B12) Port: 2

Running on: Windows 10 or greater (Build Version 19044)

Brought to you by TDD v2.17.0, Feb 23 2021, 14:04:02
Invictaz commented 2 years ago

Do these work via USB or only wireless?

jpalm7698 commented 2 years ago

They work over USB (it has a USB-C port) or Bluetooth on Windows out of the box (more info here). I plugged my controller into my PC and it works the same as it does over Bluetooth.

Invictaz commented 7 months ago

Maybe this piece of code will help

PID 0x0139 VID 0x0e6f

https://github.com/wiredopposite/OGX-Mini/blob/54bbdf0a41ea2ea2563e0a614173528b35dbfb3e/src/usbh/xinput/driver/xinput_host.c#L135