Closed mwlock closed 2 years ago
hidapi is raw usb. You either need elevated privileges (sudo) or need to setup a udev rule for the controller to use is with user permissions
I am having the same issue. I am on a raspberry pi 5 and am getting the error
Traceback (most recent call last):
File "/home/harrison06/ps5test.py", line 25, in <module>
dualsense.init()
File "/home/harrison06/.local/lib/python3.11/site-packages/pydualsense/pydualsense.py", line 108, in init
self.device: hidapi.Device = self.__find_device()
^^^^^^^^^^^^^^^^^^^^
File "/home/harrison06/.local/lib/python3.11/site-packages/pydualsense/pydualsense.py", line 186, in __find_device
dual_sense = hidapi.Device(
^^^^^^^^^^^^^^
File "/home/harrison06/.local/lib/python3.11/site-packages/hidapi.py", line 256, in __init__
raise IOError("Could not open connection to device.")
OSError: Could not open connection to device.
I set up the udev file 70-ps5-controller but that didn't fix the issue. I am not experienced so any commands i can copy would be helpful.
Ubuntu 22.04