Managing a real device
Echoing data over an emulated serial connection can be educational, but we want to manage real devices, so let's connect one to our BeagleBone Black.
The BeagleBone Black has six on-board serial ports but only one is enabled by default: the /dev/ttyO0
device that is coupled to the serial console, as we saw in the previous chapters. The other serial ports must be enabled before they can be used.
Note
The default serial port name for the BeagleBone Black is /dev/ttyOX, where X addresses the X-th available serial port.
If we do log in to the system, we can easily verify this using the following command:
root@BeagleBone:~# ls -l /dev/ttyO* crw-rw---- 1 root tty 248, 0 Apr 23 20:20 /dev/ttyO0
Ok, the /dev/ttyO0
device is the only available serial port.
To enable the other serial ports, we need to modify the kernel settings in order to ask it to enable the serial port we wish to use. Which ports need to be enabled depends on the pins we'd like to use to connect our device. The...