DanielOgorchock / joycond

userspace daemon to combine joy-cons from the hid-nintendo kernel driver
GNU General Public License v3.0
340 stars 68 forks source link

pro controller leds keep blinking #63

Open cipitaua opened 3 years ago

cipitaua commented 3 years ago

I'm on ubuntu-devel (kernel 5.11), the pro controller (nintendo original) connects fine via bluetooth, the player LEDs start blinking periodically. However, pressing L+R doesn't stop them blinking.

This is dmesg output:

[ 2029.584797] input: Lic Pro Controller as /devices/virtual/misc/uhid/0005:0F0D:00F6.0005/input/input25
[ 2029.585276] hid-generic 0005:0F0D:00F6.0005: input,hidraw0: BLUETOOTH HID v0.01 Gamepad [Lic Pro Controller] on d8:f2:ca:b8:f6:95
~$ service joycond status
● joycond.service - joycond
     Loaded: loaded (/etc/systemd/system/joycond.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-04-26 11:00:43 CEST; 40min ago
   Main PID: 1303 (joycond)
      Tasks: 1 (limit: 18585)
     Memory: 1000.0K
     CGroup: /system.slice/joycond.service
             └─1303 /usr/bin/joycond

apr 26 11:00:43 carbone systemd[1]: Started joycond.
apr 26 11:00:43 carbone joycond[1303]: adding epoll_subscriber: fd=4
cipitaua commented 3 years ago

likely related to this issue: https://github.com/DanielOgorchock/linux/issues/10

cipitaua commented 3 years ago

I have solved by adding the vendorID 0f0d and deviceID 00f6 in

src/ctlr_detector_android.cpp: if (vid != 0xf0d && vid != 0x0f0d && vid != 0x57e)

src/ctlr_detector_android.cpp: if (pid != 0x00f6 && pid != 0x2009 && pid != 0x2007 && pid != 0x2006 && pid != 0x2017)

and

src/phys_ctlr.cpp:

    switch (product_id) {
        case 0x00f6:
            model = Model::Procon;
            std::cout << "Found Pro Controller\n";
            break;

and adding the lines with correct IDs in udev/72-joycond.rules and udev/89-joycond.rules

Should I send a patch?

cipitaua commented 3 years ago

I have made a pull request https://github.com/DanielOgorchock/joycond/pull/65#issue-629144491