We should coordinate bro, so we can offload you. Guess what? This evening I compiled your kernel with the last xpad.c (just like you did) and did some tests.

First, compiling the kernel (it was the first time I compiled the kernel and I crosscompiled anything), I discovered that the current kernel contains the xpad driver (as you just said), an old version, but still a working version so I did some tests with the current kernel.

I tried again the Wireless Xbox360 joypad with the sync’n’charge cable, but, again I got nothing. Then I tried the Wireless Xbox360 joypad with the official Microsoft dongle and boom! It works, correctly lighting the second led (because it was the second joypad connected). Here’s the observed events:

Code: Select all

`XBox360 Wireless + Microsoft dongle (045e:0719)`

UP:Input event: type=EV_KEY, code=706(0x2c2), value=1

Input event: type=EV_ABS, Axis=17, Offset:=-1

Input event: type=EV_KEY, code=706(0x2c2), value=0

Input event: type=EV_ABS, Axis=17, Offset:=0

DOWN:Input event: type=EV_KEY, code=707(0x2c3), value=1

Input event: type=EV_ABS, Axis=17, Offset:=1

Input event: type=EV_KEY, code=707(0x2c3), value=0

Input event: type=EV_ABS, Axis=17, Offset:=0

LEFT:Input event: type=EV_KEY, code=704(0x2c0), value=1

Input event: type=EV_ABS, Axis=16, Offset:=-1

Input event: type=EV_KEY, code=704(0x2c0), value=0

Input event: type=EV_ABS, Axis=16, Offset:=0

RIGHT:Input event: type=EV_KEY, code=705(0x2c1), value=1

Input event: type=EV_ABS, Axis=16, Offset:=1

Input event: type=EV_KEY, code=705(0x2c1), value=0

Input event: type=EV_ABS, Axis=16, Offset:=0

A:Input event: type=EV_KEY, code=304(0x130), value=1

Input event: type=EV_KEY, code=304(0x130), value=0

B:Input event: type=EV_KEY, code=305(0x131), value=1

Input event: type=EV_KEY, code=305(0x131), value=0

X: Input event: type=EV_KEY, code=307(0x133), value=1

Input event: type=EV_KEY, code=307(0x133), value=0

Y: Input event: type=EV_KEY, code=308(0x134), value=1

Input event: type=EV_KEY, code=308(0x134), value=0

LB:Input event: type=EV_KEY, code=310(0x136), value=1

Input event: type=EV_KEY, code=310(0x136), value=0

RB:Input event: type=EV_KEY, code=311(0x137), value=1

Input event: type=EV_KEY, code=311(0x137), value=0

LT:Input event: type=EV_ABS, Axis=2, Offset:=26

Input event: type=EV_ABS, Axis=2, Offset:=48

Input event: type=EV_ABS, Axis=2, Offset:=73

Input event: type=EV_ABS, Axis=2, Offset:=99

Input event: type=EV_ABS, Axis=2, Offset:=123

Input event: type=EV_ABS, Axis=2, Offset:=156

Input event: type=EV_ABS, Axis=2, Offset:=164

Input event: type=EV_ABS, Axis=2, Offset:=191

Input event: type=EV_ABS, Axis=2, Offset:=209

Input event: type=EV_ABS, Axis=2, Offset:=232

Input event: type=EV_ABS, Axis=2, Offset:=241

Input event: type=EV_ABS, Axis=2, Offset:=252

Input event: type=EV_ABS, Axis=2, Offset:=255

Input event: type=EV_ABS, Axis=2, Offset:=235

Input event: type=EV_ABS, Axis=2, Offset:=161

Input event: type=EV_ABS, Axis=2, Offset:=109

Input event: type=EV_ABS, Axis=2, Offset:=62

Input event: type=EV_ABS, Axis=2, Offset:=24

Input event: type=EV_ABS, Axis=2, Offset:=0

RT:Input event: type=EV_ABS, Axis=5, Offset:=57

Input event: type=EV_ABS, Axis=5, Offset:=116

Input event: type=EV_ABS, Axis=5, Offset:=182

Input event: type=EV_ABS, Axis=5, Offset:=255

Input event: type=EV_ABS, Axis=5, Offset:=254

Input event: type=EV_ABS, Axis=5, Offset:=210

Input event: type=EV_ABS, Axis=5, Offset:=138

Input event: type=EV_ABS, Axis=5, Offset:=60

Input event: type=EV_ABS, Axis=5, Offset:=0

L3:Input event: type=EV_KEY, code=317(0x13d), value=1

Input event: type=EV_ABS, Axis=1, Offset:=1279

Input event: type=EV_ABS, Axis=1, Offset:=895

Input event: type=EV_ABS, Axis=1, Offset:=383

Input event: type=EV_KEY, code=317(0x13d), value=0

R3:Input event: type=EV_KEY, code=318(0x13e), value=1

Input event: type=EV_ABS, Axis=4, Offset:=-129

Input event: type=EV_ABS, Axis=4, Offset:=-513

Input event: type=EV_ABS, Axis=4, Offset:=-1025

Input event: type=EV_ABS, Axis=3, Offset:=1649

Input event: type=EV_ABS, Axis=3, Offset:=2157

Input event: type=EV_ABS, Axis=4, Offset:=-1537

Input event: type=EV_ABS, Axis=4, Offset:=-2177

Input event: type=EV_ABS, Axis=4, Offset:=-2561

Input event: type=EV_ABS, Axis=3, Offset:=2665

Input event: type=EV_ABS, Axis=4, Offset:=-1921

Input event: type=EV_ABS, Axis=4, Offset:=-1

Input event: type=EV_ABS, Axis=3, Offset:=2284

Input event: type=EV_ABS, Axis=3, Offset:=1776

Input event: type=EV_ABS, Axis=4, Offset:=639

Input event: type=EV_KEY, code=318(0x13e), value=0

BACK: Input event: type=EV_KEY, code=314(0x13a), value=1

Input event: type=EV_KEY, code=314(0x13a), value=0

START:Input event: type=EV_KEY, code=315(0x13b), value=1

Input event: type=EV_KEY, code=315(0x13b), value=0

GUIDE: Input event: type=EV_KEY, code=316(0x13c), value=1

Input event: type=EV_KEY, code=316(0x13c), value=0

LEFT_ANALOG (CW circle from 0 to 12):Input event: type=EV_ABS, Axis=0, Offset:=-32516

Input event: type=EV_ABS, Axis=1, Offset:=22783

Input event: type=EV_ABS, Axis=0, Offset:=-32768

Input event: type=EV_ABS, Axis=1, Offset:=20607

Input event: type=EV_ABS, Axis=1, Offset:=17023

Input event: type=EV_ABS, Axis=1, Offset:=13823

Input event: type=EV_ABS, Axis=1, Offset:=10495

Input event: type=EV_ABS, Axis=1, Offset:=6783

Input event: type=EV_ABS, Axis=1, Offset:=4991

Input event: type=EV_ABS, Axis=1, Offset:=-3201

Input event: type=EV_ABS, Axis=1, Offset:=-4865

Input event: type=EV_ABS, Axis=1, Offset:=-8577

Input event: type=EV_ABS, Axis=1, Offset:=-10241

RIGHT_ANALOG (CW circle from 0 to 12):Input event: type=EV_ABS, Axis=3, Offset:=-3431

Input event: type=EV_ABS, Axis=3, Offset:=-764

Input event: type=EV_ABS, Axis=3, Offset:=1776

Input event: type=EV_ABS, Axis=3, Offset:=3681

Input event: type=EV_ABS, Axis=3, Offset:=5967

Input event: type=EV_ABS, Axis=3, Offset:=6475

Input event: type=EV_ABS, Axis=3, Offset:=7110

Input event: type=EV_ABS, Axis=3, Offset:=8888

Input event: type=EV_ABS, Axis=3, Offset:=11174

Input event: type=EV_ABS, Axis=3, Offset:=13206

Input event: type=EV_ABS, Axis=3, Offset:=15619

Input event: type=EV_ABS, Axis=3, Offset:=16254

Input event: type=EV_ABS, Axis=3, Offset:=16889

Input event: type=EV_ABS, Axis=4, Offset:=-32001

Input event: type=EV_ABS, Axis=4, Offset:=-29697

Input event: type=EV_ABS, Axis=4, Offset:=-28033

Input event: type=EV_ABS, Axis=4, Offset:=-25473

Input event: type=EV_ABS, Axis=4, Offset:=-23297

Input event: type=EV_ABS, Axis=4, Offset:=-20225

As you can see we have a new VID:PID 045e:0719, but we get the same exact events and axis mapping (with the same ranges) as the 8bitdo mimicking the wired Xbox360 controller. So we have another clue leading to my hypothesis about a standardized xinput HID event mapping. The only difference is that, with the DPad we have double events, just like it’s acting both as an axis and a button. This seems to be coherent with xpad.c which has a kernel module parameter dpad_to_buttons. How do I pass a value to a static kernel module parameter? Through uboot?

Then I tried fiddling with /sys/class/leds/xpadN/brightness as suggested here

https://github.com/paroj/xpad/ and it works! Pretty cool! Tomorrow I’ll try to see if the led light show works with Nintendo joypads through 8bitdo dongles. @Sorgelig, why don’t you try with your SF30Pro?

Anyway, after this tests I compiled my first kernel, with the last xpad.c (just as you did) and… it works!!! I’m very satisfied. Here’s my compiled kernel

http://www.filedropper.com/zimagedtb pretty useless, since you did the same, but I’m happy and I want to share. I didn’t many tests with this kernel, because the old one works with my joypads, but the main difference should be that this new one supports more joypads and, in particular, the Xbox One joypad… so, why @Newsdee don’t you try and, eventually, make a log of the event mapping? If it is confirmed the standard event/axis mapping, I think it should be useful that Sorgelig extends the new analog axis handling to more VID:PID than just 045e:028e; he could use the VIDs and PIDs enumerated in

https://github.com/paroj/xpad/blob/master/xpad.c or he could search for device IDs containing “IG_” as suggested by Microsoft here

https://msdn.microsoft.com/library/wind ... 17014.aspxThank you and good night.

Locutus73