Open
Description
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?
Activity
per1234 commentedon 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 commentedon May 15, 2023
These not my forum thread. but i have exactly the same problem.
facchinm commentedon May 15, 2023
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 commentedon May 15, 2023
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 commentedon May 15, 2023
@facchinm I was wrong about the cache. I change
0x100
to0x101
and it workedPhoen11xx commentedon May 15, 2023
Maybe replace this number with a timestamp or compilation number? there is no information about possible caching in the comments to this option