I’ve been struggling to get serial comms going on UART1. I have enabled it by creating a service that performs
echo BB-UART1 > /sys/devices/bone_capemgr.9/slots
and lo! the device /dev/ttyO1 appears. However, with two terminal windows open, doing ‘cat /dev/ttyO1’ in one and ‘echo “wibble” > /dev/ttyO1’ in the other results in nothing at all appearing in the cat window. I’ve tried several combinations of baud rates and flow control, with no success. What am I missing?
Oh, my board revision is B6.
Not and expert here, but I did manage to get communication with a device connected to UART1. What do you have connected? If there is nothing there your transmit data will just go off into space. To see data come back you would have to have a device in loopback mode, or at least the Tx connected to the Rx.
Hope this helps,
Thanks for your reply. One of the frustrating things is the changes between board revisions - I am on B6, and there are a set of overlays provided for UART support living in /lib/firmware so that if I go (from my recall so can’t get the exact syntax)
echo BB-UART1 > /sys/device/…/capemgr_dev.*/slots
then /dev/ttyO1 appears like magic. Great! I am now talking to the UART via hypertrm on my PC. And it appears that the problem I am experiencing may be a kernel issue. I can read from the UART, but the select() and poll() functions that ought to report as to whether data is ready to read in the FIFOs are not doing so. In fact, I have bypassed UART1 and installed an FTDI USB serial device on the BBB - this appears as /dev/ttyUSB0. Now I try select() on that, and it does come back, but only with every other character that I type. If I just read() from the file, I get the complete string. So I am a bit concerned that the Angstrom kernel is not as good as it could be, or needs to be.