1.. zephyr:code-sample:: uart-passthrough
2 :name: UART Passthrough
3 :relevant-api: uart_interface
4
5 Pass data directly between the console and another UART interface.
6
7Overview
8********
9
10This sample will virtually connect two UART interfaces together, as if Zephyr
11and the processor were not present. Data read from the console is transmitted
12to the "*other*" interface, and data read from the "*other*" interface is
13relayed to the console.
14
15The source code for this sample application can be found at:
16:zephyr_file:`samples/drivers/uart/passthrough`.
17
18Requirements
19************
20
21#. One UART interface, identified as Zephyr's console.
22#. A second UART connected to something interesting (e.g: GPS), identified as
23 the chosen ``uart,passthrough`` device - the pins and baudrate will need to
24 be configured correctly.
25
26Building and Running
27********************
28
29Build and flash the sample as follows, changing ``nucleo_l476rg`` for your
30board:
31
32.. zephyr-app-commands::
33 :zephyr-app: samples/drivers/uart/passthrough
34 :board: nucleo_l476rg
35 :goals: build flash
36 :compact:
37
38Sample Output
39=============
40
41.. code-block:: console
42
43 *** Booting Zephyr OS build zephyr-v3.5.0-2988-gb84bab36b941 ***
44 Console Device: 0x8003940
45 Other Device: 0x800392c
46 $GNGSA,A,3,31,29,25,26,,,,,,,,,11.15,10.66,3.29,1*06
47 $GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,2*0F
48 $GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,3*0E
49 $GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,4*09
50 $GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,5*08
51