Practical Guide to Getting Started with the TS-7250-V2

Introduction

This guide will walk you through the basic steps of getting your TS-7250-V2 up and running. It’s mostly an extrapolation from the official TS-7250-V2 Manual, but provides a more practical approach in setting up common connections, networking, and environments to begin development.

Connections

Let’s get our TS-7250-V2 hooked up! This includes our very basic connections we’ll need for most any development or project: power, serial console, and Ethernet.

TS-7250-V2 with power, console, and Ethernet
TS-7250-V2 with power, console, and Ethernet

Serial Console

Nothing beats a good ‘ol serial console for direct access to an embedded system. Where others like telnet and SSH might fail due to bad startup scripts or network snafus, a direct serial console connection will always be there to bail you out. For this, you’ll need a NULL modem cable and a DB9 Serial to USB adapter. Technologic Systems has the NULL modem cable available for sale, as you probably seen when ordering it, but they do not sell a serial to USB adapter. You can get them from many places, and, having learned from experience, it seems that the ones with the Prolific PL2303 chipset are easiest and most compatible, like this one from Amazon.com. If you go this route, you’ll want to be sure to download and install the Prolific PL2303 drivers here.  Note, if you’re on a Linux machine you shouldn’t have to install any drivers, as they come preloaded in the Linux kernel, otherwise, for Windows or Mac users, you’ll need to download the drivers.  If you need a NULL modem cable, they have them for available on Amazon.com, like this one.

Prolific PL2303 Serial to USB Adapter
Prolific PL2303 Serial to USB Adapter

Connect the NULL modem cable directly to the RS-232 port on the TS-7250-V2 and the serial to USB adapter. After installing the Prolific PL2303 drivers on your computer (restart may be required), plugin the serial to USB adapter into your computer and follow the instructions given in the “Get a Console” section of the TS-7250-V2 manual. After applying power, which we’ll talk about next, you’ll see something similar to the screenshot below (Mac OSX Terminal running minicom):

Screenshot of TS-7250-V2 Busybox Shell via Console
Screenshot of TS-7250-V2 Busybox Shell via Console

Pro-tip: Running minicom alone will constrain the terminal row and column count to something pretty small that will never take up the whole terminal window. To take advantage of all the real estate your terminal window has to offer, run TERM=linux minicom instead. Remember to setup an alias as a shortcut for yourself!

Power

The TS-7250-V2 has three different power options: 5 Vin, 8 – 28 Vin, and via micro USB. It doesn’t really matter which you choose unless you need the additional power to drive additional I/O or peripherals. Whichever option you choose, simply plug it in, and you’ll see status LEDs start blinking. If you have your console setup properly, you should see the bootup process like in the picture above.

Ethernet

Naturally, we’ll want to be able to connect this to the network so we can get it to talk with the local network or Internet, or even accessing the board via SSH or booting to an NFS filesystem. There are two Ethernet ports on the TS-7250-V2, eth0.1 and eth0.2. We’ll be using eth0.1, which is the one closest to the micro USB connector. You can read more about them in the “Configuring the Network” section of the TS-7250-V2 manual. So, plug in a standard Ethernet cable connected to your router, and we should be good to proceed to the next steps!

Default Boot to Debian

Now, we should be looking at a shell terminal, awaiting our commands. This shell is what we call an initial RAM disk, or initrd, with a Busybox shell. It’s a minimalistic, ready only environment which can be booted incredibly quickly (0.52 seconds) and begin executing your programs. Busybox is known as the “The Swiss Army Knife of Embedded Linux”, and you can accomplish quite a bit here. This is an excellent spot to put production-ready code because of the fast bootup and the read-only nature. For development, the Debian environment, which is pre-installed on the startup drive, is perhaps the easiest to work with, especially for those getting their feet wet in embedded Linux. So, we’re going to boot to the Debian environment, which gives us access to not only a more familiar Linux environment with tools like apt-get and compilers, but also an environment with more storage and debugging tools. For this, we’ll need to set the soft jumper, JP1, which will tell the board to boot directly to Debian upon bootup as documented in the “Initrd/Busybox” section of the TS-7250-V2 manual. For this, we use the tshwctl command followed by a reboot:

You should now see Debian startup sequence, followed by a login. For this, we’re just going to use ‘root’ as the user name. There is no password by default.

Screenshot of TS-7250-V2 Debian Shell via Console
Screenshot of TS-7250-V2 Debian Shell via Console

Pro Tip: If you’d like to use SSH after setting up your network connection, you’ll need to set a password. Run passwd to create a password followed by dpkg-reconfigure openssh-server. Also, refer to the “Setting up SSH” section of the TS-7250-V2 manual.

Setup Networking

If you recall, we’re going to be setting up our eth0.1 network interface, since that’s the one we’re plugged into. For this, we’re going to follow the “Configuring the Network” section of the manual. We’ll set our board to use a static IP address since this is common for server type applications.  For this, we’ll edit the /etc/network/interfaces file to read like the following.  Make sure to modify it to fit your specific network settings.

The next thing we need is to tell our network interface which DNS nameservers to use, so that we can ping by domain name, like google.com. For this, we’ll edit /etc/resolv.conf and use the same gateway IP from above as the nameserver. You file should look like something like this:

After saving your changes, we simply need to reload the service responsible for the network interfaces. To do this, we run the commands:

Then, you should be able to run ifconfig eth0.1 and see the settings applied.

You may want to test your connection at this point. Try pinging your gateway, aka router. You’ll know it’s successfully up and running when you see 0% packet loss in the report.

Set Date and Real Time Clock (RTC)

Sometimes, having the wrong date on your board can give you unexpected problems with other programs, such as apt-get, which count on an accurate date for keys and the like. So, let’s make sure our hardware clock is set appropriately. Before you start, double check to see if it hasn’t already been setup by running the date command.

If this isn’t correct, continue reading. We’ll want to first set the system time using date -s, and then setup the real time clock.

Double check that the values stuck:

Now, let’s make sure the real time clock is initiated properly:

You should now be able to restart your TS-7250-V2 and the correct date should persist.

Conclusion

In this guide, we learned about common steps in setting up our TS-7250-V2 in order to easily begin development out of the box, from connections to networking and setting the real time clock (RTC). You should now be well on your way to begin development on your application. If you’re looking for inspiration, take a look at Creating a Human-Machine Interface (HMI) Web Application.

Is there anything else you’d like to see added to this practical getting started guide for the TS-7250-V2?

Author: Derek Hildreth

eBusiness Manager for Technologic Systems