I'll share what I have so far, but NOTE I can't seem to repeat my experiments again for some reason; my 8bitdo is always setting everything to player 1's LED, I might have changed some parts of my code, but I was indeed able to set the LEDs individually at some point of my testing:
Anyways,
I looked at a pending patch of the Linux kernel and found this piece of code for the
joycon's LEDI modified your
led script from
req->data[0] = d->joystick_port;
to
req->data[0] =
(0 << 4) | (0xF >> (4-4));
this seems to set the player LEDs as follows(where `+` is the LED being on, and `-` is the LED turned off)
+ - - -
(which is player 1)
and if I change the code to:
req->data[0] =
(0 << 4) | (0xF >> (4-0));
I get
+ + + +
(which is player 4)
and if I did:
req->data[0] =
(0 << 4) | 0x7;
I got:
+ + - -
(which is player 2 in Nintendo's way)
I was never able to set the other LEDs though. So, maybe there's something wrong with our payload structure? I think I played with the payload too much, that I can't repeat my experiments...