-
Notifications
You must be signed in to change notification settings - Fork 78
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
Can't implement CDC with HID #102
Comments
Do you have a |
I don't, I'm kind of new to embedded developement and as far as I understand I need to have a debug probe to get this, maybe I understand it wrong. P.S. I'm using Pi Pico. |
To get |
I'm on Windows currently, I can try WSL or use my laptop on linux and yes it does work with CDC or HID only. |
Just tested on my ubuntu, and... HID works, but I can't connect to serial port. I tried to connect using Also checked |
Forgot to answer, yes I'm using release build. |
Hmm, could you check if it works in Windows without |
I think one issue may be that you're calling let mut last_state = button_pin.is_high().unwrap();
loop {
// Poll stuff as above. I'm not sure how HID works so maybe keep it as-is, maybe adapt as below
let current_state = button_pin.is_high().unwrap();
if last_state != current_state {
last_state = current_state;
if current_state {
serial.write(b"Pressed").ok();
} else {
serial.write(b"Released").ok();
}
} |
I'd also leave out the line |
I know about calling |
Okay, I managed to open serial monitor with |
What version of If you don't have that fix implemented, it's highly unlikely that your device will enumerate on Windows. |
Have you tried adding interface association descriptors (IADs)? Windows is usually more picky about them than other OSs. You can add them by removing |
Just updated P.S. The program is probably not crashing, because I can see the led light up when I'm pressing the button, the only thing that is not working is usb on Windows. |
Changing |
I created a CDC and HID classes with one device
And the loop code:
However the USB device is not recognized by my PC, I tried the solution from #85 but it does not fix the issue and the device keep being unrecognized, how do I implement the HID with CDC?
The text was updated successfully, but these errors were encountered: