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

-DCDC_DISABLED not working #534

Open
Phoen11xx opened this issue May 15, 2023 · 6 comments
Open

-DCDC_DISABLED not working #534

Phoen11xx opened this issue May 15, 2023 · 6 comments
Labels

Comments

@Phoen11xx
Copy link

Hello. I am trying to create a usb device and I need to disable the CDC so that only the hid device works.
To install the code, I use usbasp. After enabling the -DC DC_DISABLED parameter or adding define, the CRC still works and I get a hid device plus a non-working device.
Does anyone know the solution to this problem?

@per1234
Copy link
Contributor

per1234 commented May 15, 2023

Hi @Phoen11xx. Thanks for your report. I know there has been a recent discussion about the use of this macro on Arduino Forum:

https://forum.arduino.cc/t/remove-serial-port/1123859

Is that you? I ask because that discussion contains valuable information about how the users are setting the macro (via the boards definition instead of trying to do it via the sketch code).

@Phoen11xx
Copy link
Author

These not my forum thread. but i have exactly the same problem.

@facchinm
Copy link
Member

The issue is very likely due to how Windows caches the USB descriptors; you can try changing the productVersion field here , replacing 0x100 with any other number, to check if it forgets the previous association.

@Phoen11xx
Copy link
Author

I recorded a video showing this problem:
https://www.youtube.com/watch?v=9o1CELyCOsc
It doesn't look like the problem is in the cache. digitalWrite still working but mouse.move not working with CDC_DISABLED define

@Phoen11xx
Copy link
Author

Phoen11xx commented May 15, 2023

@facchinm I was wrong about the cache. I change 0x100 to 0x101 and it worked

@Phoen11xx
Copy link
Author

Maybe replace this number with a timestamp or compilation number? there is no information about possible caching in the comments to this option

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

No branches or pull requests

3 participants