Greetings;
opened 05:14PM - 16 Jun 17 UTC
closed 07:43AM - 19 Jun 17 UTC
Component: USB Device
Library: HID
Type: Wontfix
USB: CDC serial
feature request
Hello! I'm using IDE 1.8.0 and Arduino leonardo. I try the standard USB HID keyb… oard sketch. Please tell me how to disable the serial port that appears in Device manager (Windows 7 x64) when the device is connected (after the bootloader finish) - it's called Arduino Leonardo (COM 40) for example. But i need, that there is only a USB HID keyboard and nothing else.
In this thread, dude seem to have decided this question:
[Link](https://forum.arduino.cc/index.php?topic=262897)
but the structure of the USBDesc.h file in my IDE 1.8.0 is different ...
```cpp
#define PLUGGABLE_USB_ENABLED
#if defined(EPRST6)
#define USB_ENDPOINTS 7 // AtMegaxxU4
#else
#define USB_ENDPOINTS 5 // AtMegaxxU2
#endif
#define ISERIAL_MAX_LEN 20
#define CDC_INTERFACE_COUNT 2
#define CDC_ENPOINT_COUNT 3
#define CDC_ACM_INTERFACE 0 // CDC ACM
#define CDC_DATA_INTERFACE 1 // CDC Data
#define CDC_FIRST_ENDPOINT 1
#define CDC_ENDPOINT_ACM (CDC_FIRST_ENDPOINT) // CDC First
#define CDC_ENDPOINT_OUT (CDC_FIRST_ENDPOINT+1)
#define CDC_ENDPOINT_IN (CDC_FIRST_ENDPOINT+2)
#define INTERFACE_COUNT (MSC_INTERFACE + MSC_INTERFACE_COUNT)
#define CDC_RX CDC_ENDPOINT_OUT
#define CDC_TX CDC_ENDPOINT_IN
#define IMANUFACTURER 1
#define IPRODUCT 2
#define ISERIAL 3
```
Any ideas? Thanks!
Following this method, I commented out a few lines of USBcore.cpp, and uploaded using that modified core file, of course not realizing that once uploaded, this would disable CDC serial comm to the board, which I now need to upload to. Again. Am I ruined, both as a programmer and as a human being? Or doth salvation exist within this forum?
Thanks for any help that I pray might be forthcoming.
William Hawes
There is more than one way to program an arduino - over to you - no pain no gain!
Mark
pert
April 19, 2019, 11:24am
#3
Which board are you using?
If you press the reset button, does the onboard LED pulse?