Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: USB Host Proxy to Pass Xbox Controller Authentication

  1. #1

    USB Host Proxy to Pass Xbox Controller Authentication

    Are there any project examples that proxy devices from a USB Host to the Teensy device? It would be like a USB analyzer reading packets from the device connected to the USB Host and forward it to the Teensy device and forward from Teensy device to USB Host. I want to make an Xbox controller for Xbox One or Series S and I read it has authentication, so I canít just use the Teensy as a XInput device.

  2. #2
    Can I do this by modifying RawHID or do I need lower level usb calls?

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    11,375
    Sorry, it is probably just me, but I don't understand what you are asking.

    If you are asking, can you somehow configure the Teensy USB type to mimic (or simply pass through) all of the USB traffic it receives from the USB Host port
    and pass it through to the PC, such that the PC thinks it has the device that is plugged into the teensy is actually plugged into the PC?

    My guess is probably not easily.

    Now if the question is, can I make the Teensy look like an XBox one controller?

    Not sure. Maybe depends on what the XBox is looking for. Also are you taking only USB or potentially Bluetooth?

    USB: - there are always lots of questions like:
    a) Do they check for the proper VID:PID (vendor ID/Product ID) to match what they are looking for?
    b) Do you know enough to replicate their interfaces and other descriptors?
    c) Which firmware version. For example with XBox One controllers, their earlier firmware is very different than their current version, which is now BLE, before it was not.

    Current firmware (I am trying to figure out how to support BLE).
    Code:
    USBDeviceInfo claim this=2000CE38
    
    ****************************************
    ** Device Level **
      vid=45E
      pid=2EA
      bDeviceClass = 255
      bDeviceSubClass = 71
      bDeviceProtocol = 208
    09 04 00 00 02 FF 47 D0 00 07 05 02 03 40 00 04 07 05 82 03 40 00 04 09 04 00 01 02 FF 47 D0 00
    07 05 02 03 40 00 04 07 05 82 03 40 00 02 09 04 01 00 00 FF 47 D0 00 09 04 01 01 02 FF 47 D0 00
    07 05 03 01 E4 00 01 07 05 83 01 40 00 01 09 04 02 00 00 FF 47 D0 00 09 04 02 01 02 FF 47 D0 00
    07 05 04 02 40 00 00 07 05 84 02 40 00 00 
    
    USBDeviceInfo claim this=2000CE38
    
    ****************************************
    ** Interface Level **
    09 04 00 00 02 FF 47 D0 00 07 05 02 03 40 00 04 07 05 82 03 40 00 04 09 04 00 01 02 FF 47 D0 00
    07 05 02 03 40 00 04 07 05 82 03 40 00 02 09 04 01 00 00 FF 47 D0 00 09 04 01 01 02 FF 47 D0 00
    07 05 03 01 E4 00 01 07 05 83 01 40 00 01 09 04 02 00 00 FF 47 D0 00 09 04 02 01 02 FF 47 D0 00
    07 05 04 02 40 00 00 07 05 84 02 40 00 00 
     bInterfaceNumber = 0
     number end points = 2
     bInterfaceClass =    255
     bInterfaceSubClass = 71
     bInterfaceProtocol = 208
    
    USBDeviceInfo claim this=2000CE38
    
    ****************************************
    ** Interface Level **
    09 04 00 01 02 FF 47 D0 00 07 05 02 03 40 00 04 07 05 82 03 40 00 02 09 04 01 00 00 FF 47 D0 00
    09 04 01 01 02 FF 47 D0 00 07 05 03 01 E4 00 01 07 05 83 01 40 00 01 09 04 02 00 00 FF 47 D0 00
    09 04 02 01 02 FF 47 D0 00 07 05 04 02 40 00 00 07 05 84 02 40 00 00 
     bInterfaceNumber = 0
     number end points = 2
     bInterfaceClass =    255
     bInterfaceSubClass = 71
     bInterfaceProtocol = 208
    
    USBDeviceInfo claim this=2000CE38
    
    ****************************************
    ** Interface Level **
    09 04 01 00 00 FF 47 D0 00 09 04 01 01 02 FF 47 D0 00 07 05 03 01 E4 00 01 07 05 83 01 40 00 01
    09 04 02 00 00 FF 47 D0 00 09 04 02 01 02 FF 47 D0 00 07 05 04 02 40 00 00 07 05 84 02 40 00 00 
     bInterfaceNumber = 1
     number end points = 0
     bInterfaceClass =    255
     bInterfaceSubClass = 71
     bInterfaceProtocol = 208
    
    USBDeviceInfo claim this=2000CE38
    
    ****************************************
    ** Interface Level **
    09 04 01 01 02 FF 47 D0 00 07 05 03 01 E4 00 01 07 05 83 01 40 00 01 09 04 02 00 00 FF 47 D0 00
    09 04 02 01 02 FF 47 D0 00 07 05 04 02 40 00 00 07 05 84 02 40 00 00 
     bInterfaceNumber = 1
     number end points = 2
     bInterfaceClass =    255
     bInterfaceSubClass = 71
     bInterfaceProtocol = 208
    
    USBDeviceInfo claim this=2000CE38
    
    ****************************************
    ** Interface Level **
    09 04 02 00 00 FF 47 D0 00 09 04 02 01 02 FF 47 D0 00 07 05 04 02 40 00 00 07 05 84 02 40 00 00 
     bInterfaceNumber = 2
     number end points = 0
     bInterfaceClass =    255
     bInterfaceSubClass = 71
     bInterfaceProtocol = 208
    
    USBDeviceInfo claim this=2000CE38
    
    ****************************************
    ** Interface Level **
    09 04 02 01 02 FF 47 D0 00 07 05 04 02 40 00 00 07 05 84 02 40 00 00
    Looks like it may match the older one. But none of these interfaces are standard ones like HID.

    So hard to know what they are doing.

    Sorry I know that is probably not much help

  4. #4
    I want the Teensy to mimic the Xbox controller to the Xbox and control the Xbox. The Xbox wonít allow any XInput device as a PC would. The Teensy would have to pass through any authentication messages between the Xbox and the controller.

    This is only USB and not Bluetooth. If mimicking a controller is not trivial, are there any Teensy projects or examples that pass through any USB device, so I donít need a hardware USB analyzer?

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    11,375
    With USBHost_t36 stuff, I will often try to capture the USB traffic to analyze it.

    You can have some luck with Software tools, like Wireshark to capture some of it.

    In other cases, I use my Logic Analyzer (usually my Logic Pro 8 by Saleae) and capture the data.
    I have my own copy of their USB LS/FS analyzer Low level Analyzer and I have my own High-Level Analyzer to try to reduce the data down to something manageable.
    But this only gets me up to Full Speed (12mbs), not up to High SPeed (480mbs) for those you need something like the Beagle 480 hardware USB analyzer.

    How doable... I have no idea. For example, maybe their device has something in it that checks something on the board, or storage or???

    You might: google things like: xbox one controller protocol and see if any of the hits give you enough information.
    For example: https://github.com/quantus/xbox-one-controller-protocol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •