Practical Guide to Getting Started with the TS-TPC-7990

Introduction

The goal of this practical guide is to get you through the basic steps of getting your TS-TPC-7990 up and running so you can begin development. It’s mostly an extrapolation of the official TS-TPC-7900 Manual, but provides a more practical and casual approach in setting up connection, networking, and general development environment.

Here are some suggested supplies:

  • TS-TPC-7990
    • Any product configuration will do, but this guide will be using the top-of-the-line TS-TPC-7990-QMW3E, with Quad Core CPU, WiFi, Bluetooth, and accelerometer.
  • Bootable microSD card with USB reader (PN: MSD-8GB-CLASS10-USB-4900)
    • Media to boot from during development. Onboard flash is preloaded, so technically you could get away without one, but it’s very easy to modify contents of an microSD card via card reader should something go wrong.
    • Note: Part number to change soon!
  • Optional: WiFi antenna (PN: CB-ANT-TIWI)
    • Only necessary if you plan on connecting via WiFi adapter.
    • Note: Part number to change soon!
  • Development stand (PN: LCD7-STAND2)
    • This stand helps your TPC sit upright for easy viewing and development.
  • Power supply (PN: PS-12VDC-REG-2_5AMP-3PB)
    • You could also use a bench power supply to provide 5 VDC or 8 – 28 VDC. This wall wart style power cable makes it easy.
  • Micro USB Cable (Type A-Male to Type Micro-B Male)
    • The same type of cable used for charging your phone with.

Assembling the LCD7-STAND2

Once you’ve broken through the formidable packaging (compliments of our excellent shipping department) and unboxed everything, you’ll be ready to assemble the TS-TPC-7990 with LCD7-STAND2. If you didn’t order a LCD7-STAND2, you can skip this step, but know that it’s an incredibly handy piece of hardware to have when developing.

The LCD7-STAND2 is a very simple piece of hardware. There are only three pieces: one mounting frame and two legs. The legs are attached to the mounting frame by four screws total (two for each leg). I like to start by screwing these legs on first.

Once the legs have been attached, you’ll then attach the TS-TPC-7990 to the LCD7-STAND2 using four screws, one on each corner of the mounting frame as shown in the image above. Make sure the TS-TPC-7990 is oriented correctly by referring to the image below. After this, you’re finished! Set the whole thing up on the supportive legs and we can start making connections.

Connections

Let’s get our TS-TPC-7990 hooked up! This includes the basic connections we’ll need for most any development or project: power, serial console, Ethernet, and WiFi. The image above shows the locations of the various components we’ll be talking about.

Jumpers

Note: Jumpers on Rev. B and above are labelled CAN, U Boot, and SD Boot.

The TS-TPC-7990 has three jumpers in total, but we’re only concerned with JP3, which tells the board whether to boot from the microSD card or onboard eMMC flash. By default, JP3 should be populated so that the board boots to the microSD card. If we were further in our development, and ready for production deployment, we might think about loading our application to the eMMC flash and boot from it instead. For now, we’ll boot from the microSD card.

For the sake of being complete in explaining each of the jumpers, JP1 is unassigned at this time and JP2, unpopulated by default, will check for USB updates and then stop at the U-Boot console. For now, leave the jumpers as is. We won’t concern ourselves with these in our basic getting started guide.

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 simply need a type A-male to type micro-B male USB cable, the same type of cable used for charging your phone and other gadgets. No need to deal with NULL modem cables or USB to serial adapters in this case. Just a clean, single cable solution. Plug the USB cable into the micro USB connector on the bottom of the board between the ribbon cable and mounting screw.

It’s recommended that you work from a Linux development machine. Not only are the serial port drivers already installed, but you’ll also need it if you plan on using our cross compile toolchains for a larger project later on. For now, if you’re on a Windows or Mac OSX machine, you can obtain the serial port driver from the Silabs USB-to-UART drivers page (be sure to restart once you’ve installed the driver). Your mileage may vary though, as some reported Windows 10 “just worked”.

Next step is to connect the USB cable to your computer and follow the instructions given in the “Get a Console” section of the TS-TPC-7990 manual. This author’s preference is minicom, a no-frills, cross-platform serial communications program. Basically, we’re setting the baud rate to be 115200 with 8N1 parity, no hardware or software flow control. Typically, your serial device name may be:

  • Linux, /dev/ttyUSB0
  • Mac OSX, /dev/tty.SLAB_USBtoUART
  • Windows, Check Device Manager for its dynamic allocation

If you’re following along with minicom, you’ll run the command minicom -s  in order to modify the serial port settings.

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! Also, once you have a console loaded, you can issue the command resize, which uses some clever escape codes to talk to your actual terminal emulator and size the serial console appropriately.

After modifying your serial port settings according to the manual and settings mentioned above, you should be ready to move onto the next section with applying power below.

Console in a Linux Virtual Machine (VirtualBox)

As a quick aside, you can also use a virtual Linux development machine using VMWare or VirtualBox. This author’s choice is VirtualBox for its simplicity and ‘just works’ feel. To get serial console working, refer to the image below: you’ll need to boot your VM, 1.) click on the USB icon, 2.) select the Silicon Labs connection from the list, and then 3.) start minicom (after pointing it to /dev/ttyUSB0).

Network Connections

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. The TS-TPC-7990 comes with two Ethernet ports, one Gigabit and one 10/100. The primary, designated as eth0, is located next to the speaker. The secondary, designated as eth1, is located next to the USB connectors . Plug in a standard Ethernet cable which is also connected to your router or switch, and we’ll get to the network interface configuration in the networking section below. Of course, you could go wireless as well, but for development, a good ‘ol solid Ethernet connection eliminates a lot of guesswork and headache.

Wireless Module Antenna

In order for the wireless feature to work, you’ll need to attach the CB-ANT-TIWI antenna. This is easy as there’s only one obvious spot to plug it into, but it’s a little tight and hard to press on when you do it the first time. If you need to, grab a pair of tweezers to help get it in place.

With the antenna connected to the WiFi module, you could move on, leaving it dangling on your workspace. Here’s a nice tip for those of you out there who prefer not leaving things dangling around during development: use some hot glue to attach the antenna to the frame, as shown below.  Please note, however, that the combination of a horizontal antenna position and aluminum frame and bezel may have a small impact on range, which in a noisy environment, may cause performance issues.  For most folks, it should be perfectly acceptable during development.

USB Keyboard and Mouse

There are two standard USB ports on the TS-TPC-7990. As you’d suspect, you can plugin a keyboard and mouse if you’d like. Just plug and play!

Power

The moment has arrived! Let’s work on applying power. You’ll notice there’s an extra connector already attached to the power terminals, simply remove this by pulling up and then slide the PS-12VDC-REG-2_5AMP-3PB power supply in its place. If you’re curious about using your own power supply, take a look at the “Power Specifications” section of the TS-TPC-7990 manual for the nitty gritty details.

Once power is applied, you’ll see a Technologic Systems’ logo splash on the screen and, if your serial console is setup properly, output similar to the screenshot below (Mac OSX Terminal running minicom):

Once the TS-TPC-7990 has fully booted (~13 seconds), you’ll see a login prompt. Bypass this incredibly secure system by using username ‘root’ without any password. Now, use your hacker powers for good, not evil. Seriously though, it’s not setup out of the box with security in mind, that’s for you to setup as you’re ready to move into production. If you’re really paranoid and would like to get a password setup right away, you can use the command passwd to set one.

About the Embedded Linux Environment

The TS-TPC-7990 has the ability to boot to several different OSs and environments via U-Boot, a general purpose bootloader sitting on the small, 8 MB SPI flash chip onboard. These OS images, as we call them, include Linux camp members Yocto, Debian, Ubuntu, and Slack as well as Android, Windows Embedded Compact, and even a custom OS. Unless you specified otherwise, you’ll be getting the Debian Linux environment preloaded onto both the onboard eMMC flash and microSD (sold separate).

Pro Tip: For development, best practice is to boot to microSD card for ease of recovery should something go wrong. Just plug the microSD card into a development machine using a USB card reader and modify files directly.

The onboard eMMC flash can be configured in two ways: 4 GB MLC for maximum capacity, and 2 GB pSLC (pseudo-SLC) for maximum data reliability. The images all weigh in at about 1.2 GB, so while you could use either option, you may be uncomfortable with space restrictions with 2 GB (1.8 GB usable) pSLC.

Pro Tip: We’ve taken a hint from the eMMC flash manufacturer and called it pseudo SLC, or pSLC because it ships as MLC and SLC-like operation can be performed by running a command, which blows a fuse on the chip, making it behave like SLC flash.

Otherwise, the flash and microSD card contain a single partition, where the filesystem and kernel are located. U-Boot understands how to load the kernel, device tree, and boot arguments and run the OS. More information about U-Boot startup sequence can be found in the “U-Boot” section of the TS-TPC-7990 manual.

Pro Tip: If you’ve used any of our products in the past, you probably remember having four different partitions for the kernel, initrd, file system, and spare storage as well as a busybox fast boot environment separate from the full Debian distribution environment. The TS-TPC-7990 has a much simpler setup with a single partition and boot environment. A busybox-like fast boot environment can be booted to, but you’ll want to contact support for instructions on how to do that.

Setup Networking

Let’s take a look at getting connected to the network and Internet through wired and wireless connections.

Wired

If you recall, we’re going to be setting up our eth0 network interface. For this, we’re going to follow the “Debian Networking” section of the TS-TPC-7990 manual. First, we’ll enable the network interface, and then we’ll go about obtaining an IP address. The easiest way to get an IP address is dynamically using DHCP. For some applications, like a web server, a static IP address is better to use. We’ll take a look at both.

Dynamic IP

First, we need to enable the eth0 network interface by issuing the following command:

Then, in order to get an IP address, we issue the command:

Issuing the ifconfig  command should show us our connection information, which in this case the board was assigned the IP address of 192.168.1.138:

Pro Tip: If you’d like to see all of the network interfaces, simply execute the command ifconfig -a  to see all available interfaces, and ifconfig  to see all enabled interfaces.

Nothing to it! You should now be able to ping an external URL to test your connection:

Static IP

For this, we’ll edit the /etc/network/interfaces file to read like the following. The highlighted section is what we’re adding. Make sure to modify the highlighted sections below 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 debian.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 enable the interface and then reload the service responsible for the network interfaces. To do this, we run the commands:

Then, you should be able to run ifconfig eth0  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.

Wireless

Note: Rev. B and above are using Atmel ATWILC3000.

The wireless module included on the TS-TPC-7990 is the LSR TiWi-BLE transceiver module. If you’re curious about the nitty gritty, download the datasheet. We’ll concentrate on connecting to an access point in this guide.

Since we’ve already completed the step of creating the interface configuration file in the wired section before this, we’ll just jump right into enabling the interface, scanning for an access point, and then associating with it.

Enabling the wireless interface is a simple command:

Then, we’ll want to scan for access points using iwlist like so:

The output can be overwhelming, so you may want to filter out just the essid names using the command:

Okay, so once you’ve identified an access point you want to connect to, you’ll need to associate with it. Now, there are open access points that don’t require any credentials to associate and there are protected ones using WEP or WPA security types.

Open Access Point

This is the easiest. You’ll be able to simply issue the following command to associate:

Now, make sure you’ve associated with the access point:

Finally, run udhcpc -i eth0  to get an IP address.

WEP Protected Access Point

Very similar to ‘Open Access Point’ section above except you’ll need to specify a password:

Same as above, follow up with iwconfig wlan0  and udhcpc -i wlan0 .

WPA Protected Access Point

For this, we’re going to use the wpa_passphrase  and wpa_supplicant  utilities which make life easier. First, create the /etc/wpa_supplicant/ directory and generate a passphrase configuration file. Replace ‘the_essid’ and ‘the_password’ with the essid and password to connect to the access point.

You can take a look at this file, but essentially it contains information and a hashed password for the association. Next step is to start the wpa_supplicant  daemon which will run in the background.

You should see output similar to this:

Then, same as the other sections above, follow up with iwconfig wlan0  and udhcpc -i wlan0 .

Finally, if you want your connection to be there when you reboot, you’ll need to configure systemctl  to automatically set everything for you.

As always, feel free to review the “WIFI Client” section of the TS-TPC-7990 manual for more information.

Setup Bluetooth

For this, you’ll be using Bluez, the official Linux bluetooth protocol stack. There’s not much you need to do for setup, but there are some commands you’ll want to become familiar with such as hcitool  and hciconfig . There is plenty of documentation and guides available online for this, so we won’t go into any detail on it here. We also have a small “Bluetooth” section of the TS-TPC-7990 manual you can refer to in order to get a taste of how it works.

Kiosk Demo

The TS-TPC-7990 can be easily configured to run in a kiosk mode which disables and hides any window borders and desktop navigation for use in a public area. Simple edit the file /usr/bin/mini-x-session and replace this line:

with this (or, with the program of your choosing, like a Qt app):

Now, reboot using shutdown -r now and you’ll find yourself looking at the embeddedarm.com website once it boots up again. Of course, replace with your own website or even point it to localhost where you can run a simple HMI application via web, and you’ll be up and running in no time!

Pro Tip: Qt is a much more lightweight alternative to running in a chromium environment (aka Google Chrome), and there’s already been some leg work done by Technologic Systems’ engineers to get fullscreen webkit demo in Qt. You can find the source code in the official GIT repository here, and instructions for getting Qt working in the “Configuring QT Creator IDE” section of the TS-TPC-7990 manual. For more advanced HMI/SCADA applications, you’ll want to look at using Qt Creator or Qt Quick for development rather than HTML for performance reasons. Yocto is currently the only environment with graphics acceleration and Qt support.

HMI/SCADA Development Resources

If you’re looking at getting started in developing your HMI or SCADA application, take a look at our getting started guides below.

Conclusion

In this getting started guide, we took a quick look at how to get everything connected, how to communicate with the board, and how to setup networking. You should be well on your way in developing your application.

Is there anything else you’d like to see added to this practical getting started guide for the TS-TPC-7990? Be sure to comment below, and we’ll get it added!

Author: Derek Hildreth

eBusiness Manager for Technologic Systems

Leave a Reply