Enabling UART on Beaglebone Black

curlysue48 picture curlysue48 · Mar 9, 2016 · Viewed 18.7k times · Source

I'm having trouble getting UART enabled. I've gone through many different directions on how to enable and troubleshoot from updating the uEnv.txt file to updating the kernel. I've come to conclude that it may be an issue with using a different kernel than the instructions, but I'm not sure? I don't know very much about the Beaglebone and I'm still learning. Whenever I try to test UART by using Python and typing the following:

import Adafruit_BBIO.UART as UART

UART.setup("UART1")

I get the error: File "stdin", line 1, in module

RuntimeError: Unable to export UART channel.

I'm also starting to worry that I simply don't have capemgr. When I run the command :

ls sys/devices

I don't have capemgr listed.

I'm using the latest Debian Image : Jessie Debian 8.3 (2016-01-24)

the Kernel version I'm running is 4.1.17-ti-rt-r46.

and my DTC version is 1.4.1-g1e75ebc9

I would really appreciate any help. I've been wrestling with this issue for a few days now. Thank you!

Answer

Timothy Vann picture Timothy Vann · Apr 3, 2017

Apparently the powers that be like to change files to keep us on our toes.

TamusJRoyce left a comment here: http://www.thing-printer.com/cape-manager-is-back-baby/ that helped me:

/media/BEAGLEBONE/env.txt and /boot/uBoot/uEnv.txt has moved to /etc/default/capemgr (file which may not exist). It also has a new syntax. Add "CAPE=BB-SPI-01,BB-UART1,BB-UART2,BB-UART4" to get main ports working. Then reboot.

To enable UART1 and UART2 on Beaglebone Black Running Debian 8

  • Step 1: sudo nano /etc/default/capemgr
  • Step 2: Change #CAPE= to: CAPE=BB-UART1,BB-UART2
  • Step 3: reboot
  • Step 4: ls /dev/ttyO*
  • result: /dev/ttyO0 /dev/ttyO1 /dev/ttyO2