How to Configure BBB UARTs

Home > Guides

This guide describes how to configure a file on the BBB to enable UART 1 and UART 4.

    *Note* The BBB UARTS are not enabled by default.

Steps:

    1. Connect to the BBB.

    2. If not already present, create a bin directory in the Debian home directory.

    mkdir bin

    3. Change into the bin directory.

    cd ./bin

    4. Start nano to create a new file.

    nano

    5. Copy the following code and paste into nano:

    #!/bin/sh
    # Set up the serial port UART1.
    echo "==== Setting up serial port UART1 ===="
    config-pin p9.24 uart
    config-pin p9.26 uart
    stty -F /dev/ttyO1 sane
    stty -F /dev/ttyO1

    # Set up the serial port UART4.
    echo "==== Setting up serial port UART4 ===="
    config-pin p9.11 uart
    config-pin p9.13 uart
    stty -F /dev/ttyO4 sane
    stty speed 115200 -F /dev/ttyO4
    stty -F /dev/ttyO4

    6. Press ‘ctrl+x’ to exit the file.

    7. Enter ‘Y’ when prompted to save the file.

    8. When prompted, enter the name of the file to be ‘pinconfig.sh’ and press ‘Enter’.

*Note* The pinconfig.sh file can now be used to enable the UARTS.