zephyr/samples/subsys/usb/cdc_acm_composite
Kumar Gala 9958757c0f samples: cdc_acm_composite: rework sample logging
Match the logging changes made in samples/.../usb/cdc_acm to the
cdc_acm_composite sample.  This allows any device testing checks to work
properly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-08-27 10:28:24 -04:00
..
src samples: cdc_acm_composite: rework sample logging 2019-08-27 10:28:24 -04:00
CMakeLists.txt
Kconfig
README.rst
prj.conf
sample.yaml

README.rst

.. _usb_cdc-acm_composite:

USB CDC ACM Sample Composite Application
########################################

Overview
********

This sample app demonstrates use of a USB Communication Device Class (CDC)
Abstract Control Model (ACM) driver provided by the Zephyr project in
Composite configuration.

Two serial ports are created when the device is plugged to the PC.
Received data from one serial port is sent to another serial port
provided by this driver.

Running
*******

Plug the board into a host device, for example, a PC running Linux.
The board will be detected as shown by the Linux dmesg command:

.. code-block:: console

   usb 1-1.5.4: new full-speed USB device number 28 using ehci-pci
   usb 1-1.5.4: New USB device found, idVendor=2fe3, idProduct=0100
   usb 1-1.5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
   usb 1-1.5.4: Product: Zephyr CDC ACM sample
   usb 1-1.5.4: Manufacturer: ZEPHYR
   usb 1-1.5.4: SerialNumber: 0.01
   cdc_acm 1-1.5.4:1.0: ttyACM1: USB ACM device
   cdc_acm 1-1.5.4:1.2: ttyACM2: USB ACM device

The app prints on serial output, used for the console:

.. code-block:: console

   Wait for DTR

Open a serial port emulator, for example, minicom,
and attach it to both detected CDC ACM devices:

.. code-block:: console

   minicom --device /dev/ttyACM1
   minicom --device /dev/ttyACM2

The app should respond on serial output with:

.. code-block:: console

   DTR set, start test
   Baudrate detected: 115200
   Baudrate detected: 115200

And on ttyACM devices provided by the Zephyr USB device stack:

.. code-block:: console

   Send characters to another UART device

The characters entered in one serial port will be sent to another
serial port.