Beaglebone Serial - techniq/wiki GitHub Wiki
There is a dedicated header (J1) for getting to the UART0 pins and connecting a debug cable. Five additional serial ports are brought to the expansion headers P8 and P9, but one of them only has a single direction brought to the headers.
Two point five ways to access the serial console on your Beaglebone Black
/dev/ttyO1
- /dev/ttyO5
Enable $ sudo su -
$ echo BB-UART1 > $SLOTS # /sys/devices/bone_capemgr.9/slots
$ echo BB-UART2 > $SLOTS
$ ...
TODO: Enable at startup
Pins
| RX | TX | CTS | RTS | Device | Remark
------- | ----- | ----- | ----- | ----- | ------------- | ------------
UART0 | J1_4 | J1_5 | | | /dev/ttyO0 | BeagleBone Black only
UART1 | P9_26 | P9_24 | P9_20 | P9_19 | /dev/ttyO1 |
UART2 | P9_22 | P9_21 | P8_37 | P8_38 | /dev/ttyO2 |
UART3 | | P9_42 | P8_36 | P8_34 | /dev/ttyO3 | TX only
UART4 | P9_11 | P9_13 | P8_35 | P8_33 | /dev/ttyO4 |
UART5 | P8_38 | P8_37 | P8_31 | P8_32 | /dev/ttyO5 |
/dev/ttyO0
)
Debug header (J1) (Pin | Function |
---|---|
1 | Ground |
2 | Not connected |
3 | Not connected |
4 | RXD (Receive data) |
5 | TXD (Transmit data) |
6 | Not connected |
Port settings
Name | Value |
---|---|
Baud | 115,200 |
Bits | 8 |
Parity | N |
Stop Bits | 1 |
Handshake | None |
Using Screen
Using a FTDI cable on Mac OSX, you can connect using:
screen /dev/tty.usbserial-AFWR836M 115200 8n1
# or
minicom -D /dev/tty.usbserial-AFWR836M -b 115200
To exit screen, you can either detach using Ctrl-a Ctrl-d
and resume using screen -r
or kill the window using Ctrl-a Ctrl-k
Setting baud rate (or other settings)
stty -F /dev/ttyO1 9600
stty -F /dev/ttyO1 -a
/dev/ttyO0
to /dev/ttyO4
) - TODO
Changing kernel default serial (from from: https://groups.google.com/forum/#!topic/beagleboard/p8oEVlENq44 Instructions like http://www.armhf.com/beaglebone-black-serial-uart-device-tree-overlays-for-ubuntu-and-debian-wheezy-tty01-tty02-tty04-tty05-dtbo-files/ will help you enable one of the other serial ports after boot. You'll want to modify the default am335x-bone.dts to enable the ttyO4 at boot and add console=ttyO4 to the uenv.txt, so that you'll start seeing kernel output. I suggest you get to that point before trying to patch u-boot to use a different default serial port.
Links
- Serial UART Header Pins
- BeagleBone Black Serial UART Device Tree Overlays for Ubuntu and Debian Wheezy (tty01, tty02, tty04, tty05 .dtbo files)
- Serial tty Device Tree Overlays (scroll down)
- Serial over USB
- Enable serial/UART/tty on BeagleBone Black
- BeagleBone Black Serial Debug Connection
- Flyswatter2 BeagleBone Black How To
- BeagleBone Black JTAG Adapter Kit
- Enabling ttyO1 on BeagleBone