ch552tool
ch552tool copied to clipboard
USB_ERROR_CANNOT_SET_CONFIG error on CH552
Hi there, I would like to flash CH552 on linux, then your tool seems be a good option. When I just run python ch55xtool.py I always get the USB_ERROR_CANNOT_SET_CONFIG error.
BTW, usb rules has been added, and I can see the USB device from lsusb:
Bus 001 Device 007: ID 4348:55e0 WinChipHead
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Any hint to debug on this?
Which OS you are using? Can you try just remove the set config section and see will it work?
try:
dev.set_configuration()
except usb.core.USBError:
return (None, 'USB_ERROR_CANNOT_SET_CONFIG')
Thanks @MarsTechHAN I'm using Manjaro, with python 3.8.6
After comment out the "set_configuration", it will fails at clain_interface.
Do you have the right privilege to access usb devices? Maybe you can remove the try block and take a screen shot of the exact error it throw? (Both with and without set_configuration, and with and without set_configuration and claim_interface)