Can't get UART to work

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
FPablo
 
Posts: 3
Joined: Wed Jul 22, 2015 10:33 am

Can't get UART to work

Post by FPablo »

Hi, I am using the Adafruit_BBIO Library to work with the beaglebone pins. I followed this guide for the uart setup:
https://learn.adafruit.com/setting-up-i ... black/uart
But when I ran the example from this web page, it didn't work. I can't send or receive any character from minicom.
Please, can you guide me in the right direction?
I am using the latest debian image for beaglebone black.
English is not my mother tongue; please excuse any errors on my part.

User avatar
drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Can't get UART to work

Post by drewfustini »

Please attach a photo of your wiring.

Please paste the output of the following:
uname -a

cat /etc/dogtag

cat /etc/debian_version


Is this the code you are running?
import Adafruit_BBIO.UART as UART
import serial

UART.setup("UART1")

ser = serial.Serial(port = "/dev/ttyO1", baudrate=9600)
ser.close()
ser.open()
if ser.isOpen():
print "Serial is open!"
ser.write("Hello World!")
ser.close()

# Eventually, you'll want to clean up, but leave this commented for now,
# as it doesn't work yet
#UART.cleanup()
Run the Python code and please copy and paste the content of the terminal on the BeagleBone (or take a screenshot of the terminal and upload here)

User avatar
FPablo
 
Posts: 3
Joined: Wed Jul 22, 2015 10:33 am

Re: Can't get UART to work

Post by FPablo »

Thanks for your quick reply.
I'm not using that code. I followed the steps from the part "Testing and Using the UART".

The command outputs are:

Code: Select all

root@beaglebone:~# uname -a
Linux beaglebone 4.4.9-ti-r25 #1 SMP Thu May 5 23:08:13 UTC 2016 armv7l GNU/Linux

Code: Select all

root@beaglebone:~# cat /etc/dogtag
BeagleBoard.org Debian Image 2016-05-13

Code: Select all

root@beaglebone:~# cat /etc/debian_version
8.4
And here are the photos of the test:
Captura de pantalla 2016-11-09 a las 11.46.37 p.m..png
Captura de pantalla 2016-11-09 a las 11.46.37 p.m..png (464.02 KiB) Viewed 567 times
Captura de pantalla 2016-11-09 a las 11.47.27 p.m..png
Captura de pantalla 2016-11-09 a las 11.47.27 p.m..png (321.36 KiB) Viewed 567 times
Captura de pantalla 2016-11-09 a las 11.51.07 p.m..png
Captura de pantalla 2016-11-09 a las 11.51.07 p.m..png (811.05 KiB) Viewed 567 times

User avatar
drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Can't get UART to work

Post by drewfustini »

I believe the issue is related to cape-universal.

Please enter the following commands:


config-pin P9_21 uart
config-pin P9_22 uart
config-pin P9_24 uart
config-pin P9_26 uart


Also please paste the output from this command (which displays the Linux kernel log):
dmesg | tail -20

Please also paste the output of this command:
cat /boot/uEnv.txt |grep -v '^[#]'|grep '^[a-z]'

And paste the output of this command:
cat /sys/devices/platform/bone_capemgr/slots

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”