dualshock-tools / ds4-tools

Scripts I use to play and reverse-engineer the DualShock 4
MIT License
335 stars 56 forks source link

V2 pads returns crash Traceback on Windows 10 x64. #17

Closed Jacksoft closed 6 months ago

Jacksoft commented 1 year ago

Hi, I tested this tool on three V1 pads and worked successfully! But, I have a problem with V2 pads. The script works fine on Linux machine (Ubuntu 22 x64)!

C:\Users\Jacksoft\Desktop\DS4-Tools_v0.01\ds4-tools-master>ds4-tool.py info Waiting for a DualShock 4... Found a DualShock 4: vendorId=054c productId=09cc Traceback (most recent call last): File "C:\Users\Jacksoft\Desktop\DS4-Tools_v0.01\ds4-tools-master\ds4-tool.py", line 319, in args.func(args) File "C:\Users\Jacksoft\Desktop\DS4-Tools_v0.01\ds4-tools-master\ds4-tool.py", line 117, in info info = self.VersionInfo(self.__dev.hid_get_report(0xa3, 0x30)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jacksoft\Desktop\DS4-Tools_v0.01\ds4-tools-master\ds4-tool.py", line 53, in hid_get_report return dev.ctrl_transfer(HID_REQ.DEV_TO_HOST, HID_REQ.GET_REPORT, report_id, 0, size + 1)[1:].tobytes() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jacksoft\AppData\Local\Programs\Python\Python311\Lib\site-packages\usb\core.py", line 1080, in ctrl_transfer self._ctx.managed_claim_interface(self, interface_number) File "C:\Users\Jacksoft\AppData\Local\Programs\Python\Python311\Lib\site-packages\usb\core.py", line 113, in wrapper return f(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jacksoft\AppData\Local\Programs\Python\Python311\Lib\site-packages\usb\core.py", line 178, in managed_claim_interface self.backend.claim_interface(self.handle, i) File "C:\Users\Jacksoft\AppData\Local\Programs\Python\Python311\Lib\site-packages\usb\backend\libusb0.py", line 537, in claim_interface _check(_lib.usb_claim_interface(dev_handle, intf)) File "C:\Users\Jacksoft\AppData\Local\Programs\Python\Python311\Lib\site-packages\usb\backend\libusb0.py", line 447, in _check raise USBError(errmsg, ret) usb.core.USBError: [Errno None] b'libusb0-dll:err [claim_interface] could not claim interface 0, win error: Parametro non corretto.\r\n'

System is Windows 10 LTSC x64 Italian (tested also on Windows 10 Home x64 Italian). Python 3.11.3 x64 (Setup from developer website). Zadig driver correctly installed and cmd runned as administrator.

Jacksoft commented 1 year ago

Found that ONLY the Wireless Controller Audio Device have to be Zadigged!

DAOWAce commented 11 months ago

Same thing here.

usb.core.USBError: [Errno None] b'libusb0-dll:err [claim_interface] could not claim interface 0, win error: The parameter is incorrect.\r\n'

Doesn't seem to matter which device I zadig, the python script just errors 100% of the time.

What version of windows is this targeting? Or more accurately, what version is the usb core targeting? It's clearly not suitable for LTSC.

EDIT: Ended up just installing Linux on a Virtual Machine and doing it that way.

Jacksoft commented 11 months ago

I use LTSC 2019, you have to target Zadig with libusb32 on Interface 0 ONLY, not Interface 3!