Closed maxgerhardt closed 1 year ago
Thanks to having MounRiver Studio installed previously, the drivers I'm getting are the wch.cn ones.
Does this expect WinUSB or LibUSB and can't work with the official WCH.cn drivers?
Yes. libusb requires the libusb/WinUSB drivers to work.
The underlying error is reported by libusb_set_auto_detach_kernel_driver
. libusb
requires a generic USB driver to work with.
Added this note to README.
Can we modify the program to print a more helpful error message if this error occurs? "Likely no WinUSB / LibUSB drivers installed, please use Zadig.."
Good point. Added in be71a08
Great! I'll retry on Windows + Linux later today to make sure the error messages trigger and communication works with WinUSB/LibUSB drivers, then the issue can be closed.
Works on WinUSB drivers.
C:\Users\Max\temp\wchisp>C:\Users\Max\Downloads\wchisp.exe info
21:19:12 [INFO] Chip: CH32V307VCT6[0x7017] (Code Flash: 256KiB)
21:19:12 [INFO] Chip UID: 90-D7-3E-26-3B-38-09-36
21:19:12 [INFO] BTVER(bootloader ver): 02.80
21:19:12 [INFO] Code Flash protected: true
21:19:12 [INFO] Current config registers: ff003fc000ff00ffffffffff
RDPR_USER: 0xC03F00FF
[7:0] RDPR 0xFF (0b11111111)
`- Protected
[16:16] IWDG_SW 0x1 (0b1)
`- IWDG enabled by the software, and disabled by hardware
[17:17] STOP_RST 0x1 (0b1)
`- Disable
[18:18] STANDBY_RST 0x1 (0b1)
`- Disable, entering standby-mode without RST
[23:22] SRAM_CODE_MODE 0x0 (0b0)
`- CODE-192KB + RAM-128KB
DATA: 0xFF00FF00
[7:0] DATA0 0x0 (0b0)
[23:16] DATA1 0x0 (0b0)
WRP: 0xFFFFFFFF
`- Unprotected
Without them I get the new error message
C:\Users\Max\temp\wchisp>C:\Users\Max\Downloads\wchisp.exe info
21:00:51 [ERROR] Failed to open USB device: Bus 002 Device 002: ID 4348:55e0
21:00:51 [WARN] It's likely no WinUSB/LibUSB drivers insalled. Please install it from Zadig. See also: https://zadig.akeo.ie
Error: Failed to open USB device on Windows
Note: The CI action for the Rust build has not triggered for the latest code changes, I had to fork it and trigger it myself.
Using the latest binaries from the CI (02e8d68055968368b73fa7560ee7e03102960d6b) for Windows
Using the latest binaries from the CI in Ubuntu 22.04
Why are there binaries for Windows available when it can't do anything? 😅