joaorb64 / joycond-cemuhook

Support for cemuhook's UDP protocol for joycond devices
MIT License
148 stars 18 forks source link

Error when pairing #51

Closed PranavSakthivel closed 3 years ago

PranavSakthivel commented 3 years ago

Hi, I'm running Fedora 34 KDE. I got the pairing to work, I saw all the LEDs flashing after pairing via bluetooth, and pressing both triggers changed the LED to player 1. As soon as this happens, the program keeps repeating this info:

Cemu does not detect the controller at all.

Device disconnected: Nintendo Switch Pro Controller
Task exception was never retrieved
future: <Task finished name='Task-181' coro=<SwitchDevice._handle_motion_events() done, defined at /home/pranav/Programs/joycond-cemuhook/joycond-cemuhook.py:199> exception=AttributeError("'InputDevice' object has no attribute 'absinfo'")>
Traceback (most recent call last):
  File "/home/pranav/Programs/joycond-cemuhook/joycond-cemuhook.py", line 210, in _handle_motion_events
    axis = self.motion_device.absinfo(event.code)
AttributeError: 'InputDevice' object has no attribute 'absinfo'
================= ('127.0.0.1', 26760) ================
Device         LED status   Battery Lv   MAC Addr    
1 ❎ 
2 ❎ 
3 ❎ 
4 ❎ 
=======================================================

================= ('127.0.0.1', 26760) ================
Device         LED status   Battery Lv   MAC Addr    
1 🎮 Pro       ■ □ □ □      55.0 ▄       60:6B:FF:19:2F:DA
2 ❎ 
3 ❎ 
4 ❎ 
=======================================================
gal20 commented 3 years ago

AttributeError: 'InputDevice' object has no attribute 'absinfo' suggests your evdev module is too old. Try to update it to the latest version.

joaorb64 commented 3 years ago

@gal20 do you know what's the minimum version for it to work properly? I think someone else had this same issue before, maybe we could ensure the version in the dependencies txt and in the program itself.

PranavSakthivel commented 3 years ago

AttributeError: 'InputDevice' object has no attribute 'absinfo' suggests your evdev module is too old. Try to update it to the latest version.

Hi, thanks for the response. I grabbed the latest version of evdev I could I could using the fedora repository/dnf. How would I get this updated?

[pranav@OMEN-15-Linux ~]$ pip install evdev
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: evdev in /usr/lib64/python3.9/site-packages (1.1.2)
[pranav@OMEN-15-Linux ~]$ sudo dnf install libevdev
Last metadata expiration check: 0:00:09 ago on Wed 30 Jun 2021 04:55:47 PM IST.
Package libevdev-1.11.0-1.fc34.x86_64 is already installed.
[pranav@OMEN-15-Linux ~]$ sudo dnf install evdev
No match for argument: evdev
Error: Unable to find a match: evdev
[pranav@OMEN-15-Linux ~]$ sudo dnf install libevdev-devel
Package libevdev-devel-1.11.0-1.fc34.x86_64 is already installed.
gal20 commented 3 years ago

@PranavSakthivel The fedora dnf for the evdev module is python3-evdev. You can either remove it and then run pip install evdev, or you can keep it and run pip install --upgrade evdev.

@joaorb64 The changelog says absinfo was added in 1.3.0.

PranavSakthivel commented 3 years ago

Thanks so much, that seems to get everything except rumble working on Cemu. For future reference, I had to install python3-devel to get pip install evdev to work.

joaorb64 commented 3 years ago

@PranavSakthivel the cemuhook protocol doesn't process rumble. For that, you can use a mixed configuration: configure the controller from the config menus using the evdev device (which has rumble) and then pull only motion from cemuhook.