PDP Wired Controller - Blue Camo ... working in Linux

In the last Amazon prime day, I purchased a PDP Wired Controller - Blue Camo (https://www.pdp.com/en/shop/pdp-wired-controller-048-082-na-cm02). I think PDP controllers offer the “best bang for the buck” and also I was aware that they work with linux from kernel 4.15 onward (https://www.phoronix.com/scan.php?page=news_item&px=PDP-Xbox-One-Linux-4.15).

But the controller did not work, not even the power led was lit. I am running kernel 4.18.

I tested the controller on Windows and it worked, so it was not faulty.

I checked the patch that added support for PDP controllers to XPad and I noticed that the product-ids considered are 0x02AB and 0x02A4:

{ 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
{ 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE }

My controller has the product-id 0x02A6, so the PDP Wired Controller - Blue Camo is not considered in the patch.

But this is open source, if something is missing, we can add it ourselves.

I had read that PDP controllers have an odd initialization sequence. I can see that sequence in the XPad source code:

/*
 * This packet is required for some of the PDP pads to start
 * sending input reports. These pads include: (0x0e6f:0x02ab),
 * (0x0e6f:0x02a4).
 */
static const u8 xboxone_pdp_init1[] = {
	0x0a, 0x20, 0x00, 0x03, 0x00, 0x01, 0x14
};

/*
 * This packet is required for some of the PDP pads to start
 * sending input reports. These pads include: (0x0e6f:0x02ab),
 * (0x0e6f:0x02a4).
 */
static const u8 xboxone_pdp_init2[] = {
	0x06, 0x20, 0x00, 0x02, 0x01, 0x00
};

The first step was to check the initialization sequence of my controller, so I needed to see the raw USB data between the Windows driver and the controller. With the help of a friend of mine and Wireshark (and USBPcap https://wiki.wireshark.org/CaptureSetup/USB) , I was able to see the raw data. For my convenience is the same sequence that XPad already considers.

I added a couple of lines to xpad.c, built the XPad module and installed it in my system. The power led lit immediately and the controller now works flawlessly.

I did not know how to build XPad alone. After quick google search I came across a github user called brianguertin, he also modified the XPad module some time ago. I used his makefile (https://github.com/brianguertin/xpad).

I created a patch with my modifications to xpad.c and I submitted it for review. I hope it gets approved.

I am really impressed with this controller, it was relatively cheap and the build quality is top-notch. I get the appeal and the convenience of wireless controllers, but a wired connection will always be faster and more reliable, and if you are playing on your PC, you are probably just a meter away.

2 Likes

Good work, nice controller too. I am always glad to see people not only fixing things but also adding them back for everyone to use.

Hi, i tried to install your xpad.c but i have this error:

~/Descargas/xpad-master  make
make modules -C /usr/src/linux-headers-4.17.17-1-MANJARO SUBDIRS=/home/equipo/Descargas/xpad-master
make[1]: *** /usr/src/linux-headers-4.17.17-1-MANJARO: There is no file or directory. Stop
make: *** [Makefile:8: all] Error 2

I have manjaro, and i have the kernel 4.17.17-1, any idea of what can i do? thanks

Check that you have the linux headers installed and that they are in the directory that the Makefile looks for them. If you have them installed, they are probably just in another location. Check the first line of the Makefile.

If you want to build Xpad, use the actual xpad.c from the kernel repository (https://github.com/torvalds/linux), apply the patch https://lore.kernel.org/patchwork/patch/978185/ and build it.

This patch only adds three lines to xpad.c, but if you own this controller, those three lines will become pure joy.

I already applied the patch and tried to build the xpad:

~/Descargas/xpad-master  make
make modules -C /usr/lib/modules/4.17.18-1-MANJARO/build/ SUBDIRS=/home/equipo/Descargas/xpad-master
make[1]: se entra en el directorio ‘/usr/lib/modules/4.17.18-1-MANJARO/build’
Building modules, stage 2.
MODPOST 1 modules
make[1]: se sale del directorio ‘/usr/lib/modules/4.17.18-1-MANJARO/build’
~/Descargas/xpad-master  sudo make install
[sudo] password for equipo:
cp -f xpad.ko /usr/lib/modules/4.17.18-1-MANJARO/kernel/drivers/input/joystick
~/Descargas/xpad-master  sudo modprobe -r xpad
~/Descargas/xpad-master  sudo depmod -a
~/Descargas/xpad-master  sudo modprobe xpad

But the controller still not working. I have the PDP Camo, but in black color, maybe the initialization sequence in my controller and yours are diferent?

What is the product-id of your controller? Run a lsusb to see it. In my system my controller looks like this:

Bus 003 Device 002: ID 0e6f:02a6 Logic3

(I do not know why it names it like “Logic3”)

I run lsusb, i have this:

$lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 03f0:0b0c HP, Inc Wireless Keyboard and Optical Mouse receiver
Bus 005 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 05e3:0745 Genesys Logic, Inc. Logilink CR0012
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 046d:c31d Logitech, Inc. Media Keyboard K200
Bus 004 Device 003: ID 0e6f:0161 Logic3
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

The ID it’s diferent on my controller: 0e6f:0161

See /var/lib/usbutils/usb.ids - that’s where the Logic3 name comes from; presumably they make the controller.

Your controller is already considered in xpad.c:

{ 0x0e6f, 0x0161, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },

But xpad does not use the PDP odd initialization sequence for this controller and I really do not know if it requires the sequence. But we can test it.

I modified xpad.c to use the odd initialization sequence with your controller. Compile it, install it and cross your fingers.

Download the modified version of xpad.c

I installed it and it did not work. Thanks, I will try to see the initialization sequence for the control (if it is possible) to add it to the xpad

We made the effort, probably there are just a couple of bytes different in the sequence.

I think PDP has gone and released a new one. I bought a “Black Raven” controller today, and it isn’t working on LInux. I am using Ubuntu, so it’s possible that the issue is Ubuntu not updating fast enough, but I checked xpad.c in the linux github page, and it doesn’t look like the product code for my controller is supported yet, assuming I’m reading the file right. :frowning:

For reference, here’s my relevant entry from lsusb:

Bus 001 Device 010: ID 0e6f:02a7 Logic3

I just checked the last version of xpad.c and, indeed, your controller is not supported yet.

Every PDP controller that I have tested uses the same initialization sequence.

If you want, we can modify xpad to use the initialization sequence with your controller and see if it works. It is a simple process.

Yeah I figured my options were to either (1) return it or (2) do the open source thing and add support. I like option (2) so count me in. I’ll try to get wireshark working so I can get the raw data.

Started wrestling with wireshark, then said screw it and on a hunch I tried just adding:

{ 0x0e6f, 0x02a7, "PDP Wired Controller for Xbox One - Other Series", 0, XTYPE_XBOXONE },

to the xpad_device array. I don’t know the proper name of the series though, which is why I wrote “Other Series”.

It works like a charm! Since all the other PDP pads share the same initialization sequence I figured it was probably a safe bet…

2 Likes

Awesome! It seems that the guys at PDP just change the product id in every xbox one controller they make.

According to PDP website (https://www.pdp.com/en/pdp-wired-controller-048-082-na-bk) is called just “black”, but the box says “Raven Black”. They have some kind of miscommunication there.

I think you should name it “PDP Wired Controller for Xbox One - Raven Black” and submit your patch.

1 Like

OK I’ve already done this and had it working, then the controller went kaput and I had to update it trough Windows and it works again there, but no longer works on Linux.

The address hasn’t changed (02a8 - I made my own fork rather than adding to the master so it’s not on there) so I’m really confused as to why it won’t work, even on a fresh install.

Anyone have any ideas?

Here’s what I added: { 0x0e6f, 0x02a8, “PDP Wired Controller for Xbox One - Arctic White”, 0, XTYPE_XBOXONE },

Likely to keep adding things as I think of them: the light is no longer on but it’s listed in lsusb as a Logic3 controller. Basically it’s how it was before building/installing the module. Something must have changed during the update, but I can’t think what.

Bus 007 Device 002: ID 0e6f:02a8 Logic3
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 71
bDeviceProtocol 208
bMaxPacketSize0 64
idVendor 0x0e6f Logic3
idProduct 0x02a8
bcdDevice 2.23
iManufacturer 1 Performance Designed Products
iProduct 2 PDP Wired Controller for Xbox One - Arctic White
iSerial 3 000071C83B7C2402
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0040
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 71
bInterfaceProtocol 208
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 4
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 71
bInterfaceProtocol 208
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 71
bInterfaceProtocol 208
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x00e0 1x 224 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0080 1x 128 bytes
bInterval 1
can’t get device qualifier: Resource temporarily unavailable
can’t get debug descriptor: Resource temporarily unavailable
Device Status: 0x0002
(Bus Powered)
Remote Wakeup Enabled

Did you flash a new firmware to “revive” the controller? If that is the case, probably the initialization sequence changed.

Try capturing the USB packets from the initialization sequence in Windows using Wireshark and USBPCap, and compare them with the values that XPad sends.

I am currently also having issues, it does seem each model of controller has a diff ver # as mine is 0e6f:02b8
I tried just adding
XTYPE_XBOX360 },
{ 0x0e6f, 0x02b8, “PDP AFTERGLOW Wired XBOX ONE”, 0, XTYPE_XBOX360 },
to xpad.c … re-make & install… nothing…
no controller detected.
I tried doing devive by id & type, came up unknown name, but the rest of xboxdrv output populated correctly.

– [ ERROR ] ------------------------------------------------------
USBController::USBController(): libusb_open() failed: LIBUSB_ERROR_ACCESS

I suspect it’s something small I’m missing, any suggestions ??

It may work in linux but you need to install xboxdrv just like every other ms or sony controller lol.