Home/Support / Knowledge Base / How to test a serial device connected to a Digi ConnectCore module running Linux

How to test a serial device connected to a Digi ConnectCore module running Linux

Sometimes you need to run a serial terminal program on an embedded device to check from your shell how a connected serial device is answering on characters beeing send to it.

Below we describe how to compile the simple Linux terminal program miniterm and use it on a Digi ConnectCore module or the Digi Connect ME 9210 running Linux.

Get the miniterm source code from the web. Just search for lpg-0.4.examples.tar.gz or try getting it from ftp://sunsite.unc.edu/pub/Linux/docs/LDP/programmers-guide/

Deflate it in any working directory:
# tar -xzf lpg-0.4.examples.tar.gz
# cd lpg-0.4.examples

Patch the sources to your needs, e.g.:
#define BAUDRATE ...
#define MODEMDEVICE "/dev/ttyS1"

Where the /dev/tty* should match the device you want to connect on your embedded module.
Compiling it is very simple:
# /usr/local/DigiEL-*/usr/bin/arm-linux-gcc miniterm.c -o miniterm
Deploy it into the embedded modules root directory, either by adding it to the add_files.sh of your project or to rootfs/rootfs_base, or if you just want to test it once:
# ftp yourmodule-ip
user: root, password: root
# cd /usr/bin
# bin
# put miniterm

Then login either via console or telnet or ssh and just start it:
# miniterm
Any character is directly send to the tty you specified in MODEMDEVICE (without local echo) and you will see any char coming from the connected device.
Last updated: Aug 08, 2017

Recently Viewed Articles

No recently viewed articles
Contact a Digi expert and get started today! Contact Us