README.rst
1.. zephyr:code-sample:: usb-cdc-acm-bridge
2 :name: USB CDC-ACM bridge
3 :relevant-api: uart_interface
4
5 Use USB CDC-ACM driver to implement a serial port bridge.
6
7Overview
8********
9
10This sample app demonstrates use of a USB CDC-ACM to bridge a standard hardware
11UART on a supported board.
12This sample can be found under :zephyr_file:`samples/subsys/usb/cdc_acm_bridge` in the
13Zephyr project tree.
14
15Requirements
16************
17
18This project requires an USB device driver, which is available for multiple
19boards supported in Zephyr.
20
21The board has to have an USB interface as well as hardware UART, the device
22node for the hardware UART is board specific so each supported board needs an
23explicit overlay.
24
25Building and Running
26********************
27
28Reel Board
29===========
30
31To see the console output of the app, open a serial port emulator and
32attach it to the USB to TTL Serial cable. Build and flash the project:
33
34.. zephyr-app-commands::
35 :zephyr-app: samples/subsys/usb/cdc_acm_bridge
36 :board: reel_board
37 :goals: flash
38 :compact:
39
40Running
41=======
42
43Plug the board into a host device, for example, a PC running Linux, the board
44should enumerate as a CDC-ACM device, the CDC-ACM input and output should be
45echoed back to the real UART, and configuration changes to the CDC-ACM uart
46such as bitrate will be propagated to the hardware port.
47
48If the hardware port is connected to an on-board debugger then the output
49should be echoed between the two ports, if it's connected to some pins on the
50boards the pins can be shorted together to test that the driver is working
51correctly.
52