I’ve been playing around with my BBB for about a month now and got everything up and running. Today I spent the whole day to get UART loopback to work on Debian. It simply doesn’t work! Tried with Qt (cross-compiled and all samples are working), QSerialPortInfo::availablePorts().count() returns zero. At first I thought it can be a QtSerialPort issue. So I did a loop back on UART1 and UART2 (P9.21 connected to P9.26 and P9.22 connected to P9.24). Then opened “minicom -b 9600 -D /dev/ttyO1” and “minicom -b 9600 -D /dev/ttyO2” in two separate terminals. I expected to see whatever I type in each one of the terminals on the other one. But that wasn’t the case. Nothing happens! Any idea what’s wrong?
Here’s some info about my setup:
Fresh install of “BBB-eMMC-flasher-debian-7.7-console-armhf-2014-10-29-2gb.img.xz”. Didn’t modify anything.
"uname -a":
Linux arm 3.14.22-ti-r31 #1 SMP PREEMPT Fri Oct 24 20:50:46 UTC 2014 armv7l GNU/Linux
Many thanks. You saved my day!
I did a loopback on UART2 and UART4 and they’re both fine. However UART1 TX doesn’t work! RX is fine. I had a look at the dtb sources and pins are correct. Do you have any idea what’s wrong?
Ok after spending quite a few days playing around with UARTs seems that I can’t get UART0 to work. I needed to disable the console output. But even after doing so I can get it to work. Can anyone tell me step by step how to make this port available like the rest of the UARTs on the board? I need to use all UARTs in my design.
I am having the same problem with UART2 (the only UART I need to work) but mine worked in the past. It even worked through re-power until the BBB sat overnight unpowered. I went through all of the steps I found in links to make it work, but none of the steps were anything like yours. I am a newbie to software and linux so I don’t really understand what you are saying to do. . Can you tell me what exactly your program and compile are doing? Will it work for UART2.
When you said “The pins aren’t mixed to the peripheral.” did you mean MUXED instead of mixed?
so you have a dtb file that you compile into a dts file? Since /src/arm does no exist on my BBB do I need to create that folder to copy the file into it? I assume it is changing the mux configuration of the UART pins to be connected in the ARM to the UART iinstead of the GPIO?
Sorry of my questions seem dumb, but that is what I feel like, I spent at least 10-12 hours to get the UART to work the first time and when it stopped working the next day it set me back weeks in my project.
Thanks for the response but I got it to work right after I posted this and I tried to delete it to not bother you with the explanation. The thing worked the whole time I had my logic analyzer on the wrong pins. When I tried it on my 2nd BBB, that had never been powered until then, it worked right out of the box without any configuration or setup. I then went back to the original BBB and realized I had the test point on the wrong pins, and once probing the correct pins, I realized that it works and probably had worked from the beginning.
Thanks again for your help and responses.
John
So Uart2 works right out of the box without setting any configuration, or pin mux or anything, at least if does for my 2 BBB Rev C’s that I have.
You need to install device tree compiler. I suggest you compile it from source yourself, as there is a patch you need to apply. Here’s my instructions from a manual I wrote a while ago:
I don’t think that’s true! What I see on the manual is that UART0 pins are not muxed with USB. I do need the USB ports although they’re not in use right now (but I try them occasionally and they’re working fine). I also couldn’t find any dtb or dts files with ttyO0 in it’s name to modify. So I guess pins are muxed in another dtb file.
Which kernel are you using? I’m on 3.14.23-ti-r32 and all serial ports are available under /dev/ right after a fresh flash. But I still needed to rebuild DTBs to get them working.
Btw, have you tried this: http://beaglebone.cameon.net/home/serial-ports-uart
I noticed that on my BBB running the RCN demo image from August (debian-7.6-console-armhf-2014-08-13) on a microSD card the uEnv.txt file is actually in /boot/uboot, not in /boot. Also there was a warning in uEnv.txt “##Note: On the BeagleBone Black, there is also an uEnv.txt in the eMMC, so if these changes do not seem to be makeing a difference…” Since I’m booting directly from microSD maybe it’s looking here though I don’t think eMMC is even mounted.