zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.07k stars 6.18k forks source link

samples/subsys/usb/cdc_acm does not work quite as described #42703

Open joeyh opened 2 years ago

joeyh commented 2 years ago

Describe the bug

I tried this sample program with the adafruit_itsybitsy_m4_express board. It built successfully, and once flashed, there was a /dev/ttyACM device detected on my laptop. But upon connecting to it with minicom, I did not see any output. The documentation of the sample program led me to expect some output:

Send characters to the UART device Characters read:

But the sample does, it turns out, seem to basically work. Characters I type to the serial device get echoed back.

Looking at the code, samples/subsys/usb/cdc_acm/src/main.c does not contain "Send characters to the UART device" or "Characters read:" so I think that the documentation is just wrong.

It's also a bit confusing that the documentation talks about "The app should respond on serial output" but it means another serial device than the USB serial device.

To Reproduce

west build -b adafruit_itsybitsy_m4_express -s samples/subsys/usb/cdc_acm west flash screen /dev/ttyACM0 115200

Environment (please complete the following information):

zephyrbot commented 4 months ago

Hi @jfischer-no,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. Please confirm the issue is correctly assigned and re-assign it otherwise.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@joeyh you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!