This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

UART Passthrough


This sample will virtually connect two UART interfaces together, as if Zephyr and the processor were not present. Data read from the console is transmitted to the “other” interface, and data read from the “other” interface is relayed to the console.

The source code for this sample application can be found at: samples/drivers/uart/passthrough.


  1. One UART interface, identified as Zephyr’s console.

  2. A second UART connected to something interesting (e.g: GPS), identified as the chosen uart,passthrough device - the pins and baudrate will need to be configured correctly.

Building and Running

Build and flash the sample as follows, changing nucleo_l476rg for your board:

west build -b nucleo_l476rg samples/drivers/uart/passthrough
west flash

Sample Output

*** Booting Zephyr OS build zephyr-v3.5.0-2988-gb84bab36b941 ***
Console Device: 0x8003940
Other Device:   0x800392c