Automatic Drivers for Fake Xbox 360 Wireless Receivers

I bought a cheap Xbox 360 Wireless Receiver from eBay so I could re-use the wireless pads I have (which also happen to be the best controllers I’ve ever used) with my new PC gaming set up.

The one I ended up with seems a fairly common Chinese import and came with a driver CD (of 32bit drivers) and a very small set of instructions (which didn’t work). Looking at the driver CD it was clear that they were an altered version of the official Microsoft drivers, which suggested that they would be very compatible with the official Microsoft Windows 7 64-bit drivers.

I installed the drivers (I agree, next, next, next) but they didn’t recognise the adaptor, and I still had an “Unknown Device” under “Other devices” in Device Manager.

Find the device, and select Update Driver Software:

Click Yes here, because we know what we’re doing, right?

All of those steps brought the adaptor to life, and I could pair a controller with it and all of the right things happened. After a reboot however, I had to go through all of the installation steps again- it didn’t take too many repetitions before I decided to do something about it.

Editing Windows .INF files for Fun and Profit

First, a quick introduction to how Windows pairs up devices and device drivers:

Both USB and PCI busses identify devices by two 16 bit numbers, a vendor ID and a product ID. These are normally displayed as four hexdecimal characters for each number, and you might even see them in the boot-up sequence on some older computers (Intel famously have 8086, which is just rad, as that’s the CPU family that made them rich).

You can view this by clicking on a device’s properties in Device Manager and viewing the Hardware Ids (sic) property. In this case, they are 045E and 0291, respectively.

It should be noted that 045E is actually Microsoft Corporation, and that this Far-Eastern knock-off is seriously breaking the rules by re-using another company’s identifier. 0291 is not the ID of the official receiver, though, which is why the device doesn’t just work. The real device is 0719. I don’t understand why they have done this: if you’re going to clone a device’s USB identifier, you should probably clone both.

There’s a copy of the Xbox driver files in C:\Program Files\Microsoft Xbox 360 Accessories - the file we’re going to change now is Xusb21.INF. This file lists the installation instructions for the wired and wireless controllers, as well as the play & charge cable. I can’t reproduce the whole thing, because of copyright, but excerpting some should be okay:

; Copyright 2006-2007 Microsoft Corporation
;
; XUSB21.INF file
;
; Installs the XUSB21 device driver
;
; Supports the following devices
; Wired Common Controller    USB\Vid_045E&Pid_028E
; Wireless Common Controller USB\Vid_045E&Pid_0719
; Wired CC Compatible        USB\MS_COMP_XUSB10
; Wireless CC Compatible     USB\MS_COMP_XUSB20
;
; Installs a NULL Service for the Play and Charge Cable
; Play and Charge Cable      USB\Vid_045E&Pid_028F

Hey, there’s that 0719 we were looking for. All we need to do is search and replace across the whole file, changing 0719 to 0291. As a cheeky nod to the knock-off I’m using, I also changed the XUSB21.DeviceName line, which dictates what shows up in Device Manager:

The very next time you need to manually update the drivers for this device, point it at the above folder and it will autodetect your device. It will also install it into the Windows DriverStore so you won’t be prompted again. (The first time, though, you will be asked if you’re okay installing an unsigned driver- tampering with the .INF file invalidates the digital signature).

I hope the above was useful. If you have any comments, please let me know via Twitter (@insom) or App.net (@insom).


Older: Moar Aaron

Newer: Python for Configuration Management (with Ansible) (My PYCON UK 2013 Talk)