Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB_ERROR_CANNOT_SET_CONFIG error on CH552 #13

Open
suda-morris opened this issue Nov 17, 2020 · 3 comments
Open

USB_ERROR_CANNOT_SET_CONFIG error on CH552 #13

suda-morris opened this issue Nov 17, 2020 · 3 comments

Comments

@suda-morris
Copy link

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?

@MarsTechHAN
Copy link
Owner

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')

@suda-morris
Copy link
Author

Thanks @MarsTechHAN I'm using Manjaro, with python 3.8.6
After comment out the "set_configuration", it will fails at clain_interface.

@MarsTechHAN
Copy link
Owner

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants