Short and General Question
I'm running Debian 9 (Stretch) on a Beaglebone Black with kernel 4.9. I have tried following the instructions that I've found online, but have thus far been seemingly unable to configure its UART devices. How do I configure my device? How do I debug/trouble-shoot my configuration? How can I verify whether my configuration is correct?
Long and Detailed Question
I'm very new to embedded Linux in general and to Beaglebone in particular. I followed the instructions given here:
I downloaded the latest "Stretch IoT (without graphical desktop) for BeagleBone and PocketBeagle via microSD card" image (specifically bone-debian-9.3-iot-armhf-2018-03-05-4gb.img) from the latest images page and flashed the Beagleboard from an SD card. After installation I was able to access the Beaglebone from my Linux desktop via a serial-to-USB cable - in a manner similar to what's described in the following article:
I was able to use the following screen command successfully:
screen /dev/ttyUSB0 115200
I was also able to a Micro-USB to USB cable to connect via SSH:
ssh [email protected]
Once connected to the Beaglebone I verified that my kernel version was Linux beaglebone 4.9.82-ti-r102. I then read through several articles on Beaglebone UART configuration, including the following:
My take-away was that (generally speaking) there are several different configuration files to check for, depending on the operating system and kernel version. These included the following:
/boot/uEnv.txt/boot/uboot/uEnv.txt/etc/default/capemgr/media/BEAGLEBONE/uEnv.txt
There were also several device files mentioned, such as:
- /sys/devices/bone_capemgr.*/slots
I tried adding each of the following lines to each of the various uEnv.txt files:
cape_enable=capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4,BB-UART5optargs=capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3,BB-UART5
I also tried adding the following line to /etc/default/capemgr:
CAPE=BB-SPI-01,BB-UART1,BB-UART2,BB-UART4
After rebooting I used the following command to check to see if the UART devices had appeared:
ls -l /dev/ttyO*
Unfortunately I got the following (unexpected results):
debian@beaglebone:~$ ls -l /dev/ttyO*
lrwxrwxrwx 1 root root 5 Jan 1 00:00 /dev/ttyO0 -> ttyS0
NOTE: I'm not concerned with ttyO0, but rather with ttyO1, ..., ttyO5.
I also tried a few other things but (in the interest of saving time and space) I won't describe every attempt unless it's requested.
What am I doing wrong here? What's the correct way to enable the UART devices?