I'm using a Beaglebone Black running the Angstrom v2012.12 build that came pre-loaded. I want to be able to connect another device to a serial port via the UART connections on the GPIO headers. The problem is I can't tell which /dev/tty devices these map to. When I try to access the /dev/ttyS? devices (e.g. using od /dev/ttyS2) I get a "read error: Input/output error".

Can anyone tell me if the UARTS are mapped to tty devices by default, if so, which ones and if not how I can create the right devices?


You can check this. it should be simple. http://hipstercircuits.com/enable-serialuarttty-on-beaglebone-black/

There has been talk of having to rebuild Ångström in order to enable a serial port with the new kernel. That is not necessary. The Device Tree Compiler (DTC) came installed on my BBB, so the compilation was fairly painless (once I figured out that the oscilloscope was connected to the right BeagleBone..) UART4 in the BBB_SRM is UART5 in the device tree system and ttyO4 on the bone. The TXD (transmit as seen from the device) pin is P9_13 and the RXD (receive as seen from the device) pin is P9_11. Then you can make them talk, like in the above image or you can use one BeagleBone to see the debug messages from the other as it boots. Very good for debugging..

On your beaglebone, start nano:

nano enable-uart5.dts

Copy-paste the following into nano:

 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.

/ {
    compatible = "ti,beaglebone", "ti,beaglebone-black";

    /* identification */
    part-number = "uart5";

    fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            pinctrl_uart5: pinctrl_uart5_pins {
                pinctrl-single,pins = <                                    
                        0x070 0x26  /* P9_11 = GPIO0_30 = GPMC_WAIT0 , MODE6 */
                        0x074 0x06  /* P9_13 = GPIO0_31 = GPMC_WPN, MODE6 */

        target = <&uart5>;
        __overlay__ {
            status          = "okay";

    fragment@2 {
        target = <&ocp>;
        __overlay__ {
            test_helper: helper {
                compatible = "bone-pinmux-helper";
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_uart5>;
                status = "okay";

Save the file(Ctrl-o)

Exit nano (Ctrl-x)

If you have a BeagleBone Black, you can compile firmware for device tree overlays without installing squat:

dtc -O dtb -o enable-uart5-00A0.dtbo -b 0 -@ enable-uart5.dts

You should now have a file named enable-uart5-00A0.dtbo.

Copy that file into the firmware directory:

cp enable-uart5-00A0.dtbo /lib/firmware/

Then enable the overlay:

echo enable-uart5 > /sys/devices/bone_capemgr.*/slots

You should now have a file in /dev called ttyO4. You can try to listen to it by catting it:

cat /dev/ttyO4

Or you can send something to it:

echo test > /dev/ttyO4

If you do not have the file /dev/ttyO4, check the kernel log:


To check and make sure the pins have been muxed correctly, check the listings in the pin groups:

cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups

You should see a pin group for uart5.

| improve this answer | |
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – jasonwryan May 12 '14 at 7:33
  • @jasonwryan you are right – Zhang LongQI May 12 '14 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.