Unable to export UART channel using bbio adafruit library

Hello,

I’m using ubuntu 14.04.2.

I’m trying to use UART with Adafruit library

When i execute:

UART.setup(“UART4”)

I detect this error with all the uarts:

RuntimeError: Unable to export UART channel.

this is the print of: dmesg | grep tty

[ 0.000000] Kernel command line: console=ttyO0,115200n8 quiet drm.debug=7 cap emgr.enable_partno=BB-UART1,BB-UART2,BB-UART4 root=UUID=854463c0-6305-4e7b-b9e7- d2edbfa8b232 ro rootfstype=ext4 rootwait fixrtc quiet
[ 0.000426] WARNING: Your ‘console=ttyO0’ has been replaced by ‘ttyS0’
[ 2.654234] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a 8250
[ 2.671940] console [ttyS0] enabled
[ 2.673157] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 89, base_baud = 3000000) is a 8250
[ 2.674056] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 90, base_baud = 3000000) is a 8250
[ 2.674871] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 61, base_baud = 3000000) is a 8250
[ 2.675645] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 62, base_baud = 3000000) is a 8250

ant this is the print of ls -l /dev/tty*

crw-rw---- 1 1 root root 5 May 14 15:19 /dev/ttyO0 → ttyS0
crw-rw---- 1 1 root root 5 May 14 15:19 /dev/ttyO1 → ttyS1
crw-rw---- 1 1 root root 5 May 14 15:19 /dev/ttyO2 → ttyS2
crw-rw---- 1 1 root root 5 May 14 15:19 /dev/ttyO4 → ttyS4
crw-rw---- 1 1 root root 5 May 14 15:19 /dev/ttyO5 → ttyS5
crw-rw---- 1 root tty 4, 64 May 14 15:20 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 May 14 15:19 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 May 14 15:19 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 May 14 15:19 /dev/ttyS3
crw-rw---- 1 root dialout 4, 68 May 14 15:19 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 May 14 15:19 /dev/ttyS5
crw-rw---- 1 root dialout 4, 70 May 14 15:19 /dev/ttyS6
crw-rw---- 1 root dialout 4, 71 May 14 15:19 /dev/ttyS7
crw-rw---- 1 root dialout 4, 72 May 14 15:19 /dev/ttyS8
crw-rw---- 1 root dialout 4, 73 May 14 15:19 /dev/ttyS9

This is my uEnv.txt:

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=3.14.37-ti-r57
#dtb=
cmdline=quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=quiet video=HDMI-A-1:1024x768@60e

##Example
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##enable BBB: eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

uuid=854463c0-6305-4e7b-b9e7-d2edbfa8b232

optargs=quiet drm.debug=7 capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4

Thank you,

Best regards

Hello Alessio,

this funciontion is only for the 3.8 kernel. The page says:
" The most important part here is that you are using a Linux distribution with the 3.8 kernel. This kernel version made some fairly significant changes with how GPIO, PWM and ADC are accessed."

If you want to use kernel 3.14, this post can help you: