Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more. Accepting essential orders - here's how.
0

Can't get UART to work
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can't get UART to work

by FPablo on Wed Nov 09, 2016 4:04 pm

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.

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

Re: Can't get UART to work

by drewfustini on Wed Nov 09, 2016 5:00 pm

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)

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Re: Can't get UART to work

by FPablo on Thu Nov 10, 2016 1:06 am

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 | TOGGLE FULL SIZE
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 | TOGGLE FULL SIZE
root@beaglebone:~# cat /etc/dogtag
BeagleBoard.org Debian Image 2016-05-13


Code: Select all | TOGGLE FULL SIZE
root@beaglebone:~# cat /etc/debian_version
8.4


And here are the photos of the test:





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

Re: Can't get UART to work

by drewfustini on Fri Nov 11, 2016 3:16 am

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

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Please be positive and constructive with your questions and comments.