HIP:TS-7000:serial

From Earlham CS Department
Jump to navigation Jump to search

Using serial ports on the TS-7260

To use the serial ports on the TS-7260 board, one must first free them from getty which is by default enabled to run on both serial ports. The init of getty is found in /etc/inittab which is the init file for processes that run continously on the board. Comment-out the line that looks like:

lgn1:12345:respawn:/sbin/getty -L 115200 ttyAM1

by placing a "#" in front of it if you want to use com2 for communications with a device other than a console. The serial ports on the 7260 are /dev/ttyAM0 and /dev/ttyAM1 rather than the usual locations.

For instructions on installing the perl serial port module, see Getting Perl.

Include in perl scripts that use the serial port:

use Device::SerialPort;

Installing minicom

Installing minicom in ts-linux is done by doing an apt-get install on the Debian linux and then copying the necessary files over to the ts-linux directories in the same way as the method for perl outlined in Getting Perl.

First:

debian$ apt-get install minicom

Then copy:

debian$ sudo cp /usr/bin/minicom <tslinux>/usr/bin/.
debian$ sudo cp /lib/libncurses.so.* <tslinux>/lib/.
debian$ sudo cp -r /etc/terminfo/ <tslinux>/etc/.

Where <tslinux> is the path to the root of your ts-linux install.