June 2012 Archives

Fake UPS Quantum View notifications

Wow, I got a pile of these today.

Fortunately, it was easy to filter them out using SpamAssassin. A real UPS message comes from a valid UPS server. While they don't DKIM sign their Quantum View messages (shame!) at least their servers are white-listed. I see this in a valid QuantumView message:

X-Spam-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE,
    RCVD_IN_DNSWL_HI autolearn=ham version=3.2.5

Note that other ups.com email is signed, but does not come from a whitelisted server, so we end up with something like this in local.cf:

header FROM_UPS From =~ /\@ups\.com/i

Problem solved!

TS-7500 Setup Continues

In the previous post I got the machine up and running, but when I got to using it I found a few easily fixed deficiencies.

The first thing you need to do is fix /etc/resolv.conf to point at your name server, or you won't be able to get to the Debian package sites.

Since the board runs Debian Lenny (, which is now in archive, you must also edit /etc/apt/sources.list. They took this into account and all you need to do is comment out the first line and uncomment the third line.

I got the version of the board without the real-time clock (RTC) so I needed to put something to set the clock.

First edit /etc/timezone with your timezone. Mine is, "America/New_York."

Then install ntp:

apt-get install ntp

The configuration should work as-is, but I added this near the top near driftfile:

logfile /var/log/ntp.log

Then I can just examine that file to make sure it works.

I figured I better update the existing packages. I have a backup of the machine if I need it.

apt-get update
apt-get upgrade

Now the machine is looking good. I also did an apt-get install emacs, because I'm a fan and I was getting tired of vi.

I also attempted to set up things for cross-compiling from Linux (Intel) to ARM. The toolchain available here and I copied it to my Linux virtual machine and extracted it in /usr/local. Unfortunately it did not work. At all. "No such file or directory?" Odd. I will need to investigate.

Local compilation works fine, however. I wrote a hello world app (in C) and that works fine.

I'd really like to be able to run Java on this machine, because I actually like writing in Java. And then I could easily write in Eclipse on my desktop, package it in a WAR file, and deploy it onto Apache Tomcat on the TS-7500.  Sadly, this is proving to be difficult. Sun doesn't make ARM JVM binaries and I'm having trouble finding pre-built alternative binaries (like OpenJDK) that work on Debian Lenny. Still investigating.

TS-7500 Embedded ARM Computer

I occasionally have a need for small, embedded processor boards for projects.

At the very low-end I use the PIC processors, including the tiny and dirt-cheap 8-bit, 8-pin PIC10F220.

I had been using the Digi (Rabbit Semiconductor) MiniCore RCM5700 which is a fine, and inexpensive, Ethernet-capable board, but I wanted something a little more substantial. The 50 MHz processor and 128K RAM were a bit limiting. And I'm not a huge fan of the proprietary Dynamic C environment you need to program in.

I decided to go with the Technologic Systems TS-7500. This runs a 250 MHz ARM9 processor, 64 MB RAM and runs Linux off a micro SD card. Much better.

While there are a plenty of embedded Linux solutions out there, and some that are cheaper, I selected this one because it has a user-programmable 5K LUT Lattice XP2 FPGA on the board. The provide the source to do things like serial ports in the FPGA, but since the FPGA pins are directly connected to the expansion connector, you can do pretty much anything you want with it!

Another selling point is the TS-ENC750 aluminum enclosure and baseboard. It includes RS-232, RS-485, 8 buffered inputs, 3 buffered outputs and 3 relays. And it can be powered by either 5V or power over Ethernet. It's a little expensive, but could be handy for all sorts of projects. It's surprisingly tiny!

One nice touch is that those screw terminals are on a detachable connector. So once you wire it up in place, you can detach the entire unit by pulling out three connectors instead of having to unscrew up to 26 different wires and then put them back when reinstalling!

Of course I had to open it up and see what's inside. Remove the screws from the side with the connector to open it up.


I also had a reason for doing this: I wanted to back up the SD card that came with it. Hint: when looking at the board with the connectors facing you, push the SD carrier to your right and it will pop up. The dev kit comes with a handy USB card reader. I plugged it into my Mac, but I attached the USB device to a Linux virtual machine. I followed the backup instructions in the manual and it worked great. I could also have done this directly on the Mac since it supports dd as well.

# dd if=/dev/sdb of=backup.dd bs=32k && sync

60352+0 records in

60352+0 records out

1977614336 bytes (2.0 GB) copied, 114.892 s, 17.2 MB/s

It appears that partition 1 is the master boot record, 2 is the kernel, 3 is the initrd and 4 is the Debian JFS file system.

Mounting it in Linux is easy:

# mkdir /mnt/sd
# mount /dev/sdb4 /mnt/sd

And when you're done to unmount:

# umount /mnt/sd

I used a Serial to USB converter for my Mac, since, well, no computers come with serial ports anymore. I had some trouble getting "screen" to work on the Mac, so I added the USB serial device to my Linux virtual machine and used picocom, which worked great.

picocom -b 115200 /dev/ttyUSB0

Note: To exit picocom, Ctrl-A then Ctrl-X.

The cable that comes with the development kit ("CB7-05") with a DB-9F to DB9-F is a null-modem cable, by the way.

And this is what I got on the serial port, neat!

>> TS-BOOTROM - built Dec  1 2010 10:19:10
>> Copyright (c) 2009, Technologic Systems
>> Booting from onboard flash...
>> Booted from: onboard flash           Booted in: 2.44 seconds
>> SBC Model number: TS-7500            SBC Sub-model number: 0
>> CPU clock rate: 250MHz               RAM size: 64MB
>> MAC number: 00:D0:69:45:54:BA        SBC FPGA Version: 5
>> Temperature Sensor: 26.1 degC        MODE1 bootstrap: OFF
>> RTC present: NO                      Date and Time: Jan  1 1970 00:00:03
>> MODE2 bootstrap: OFF                 SD card size: 1886MB
>> Onboard SPI flash type: Macronix     Onboard SPI flash size: 4MB
>> Offboard SPI flash type: Macronix    Offboard SPI flash size: 4MB
>> XUARTs detected: 8                   CAN present: NO
>> Linux kernel version:       Linux kernel date: Jun 8 2011
>> Bootrom date: Dec  1 2010            INITRD date: Nov 29 2011
>> ts7500ctl date: Jun  8 2011          sdctl date: Jun  8 2011
>> canctl date: Jun  8 2011             nandctl date: Aug 15 2011
>> spiflashctl date: Aug 15 2011        xuartctl date: Aug 15 2011
>> dioctl date: Feb 10 2011             spictl date: Jan 24 2011
>> dmxctl date: Jun  8 2011             busybox date: Jun 30 2010 (v1.14.2)
>> ts7500.subr date: Jun 10 2011        daqctl date: Aug 15 2011
>> linuxrc date: Aug 31 2011            rootfs date: not present
>> MBR date: Jul 14 2009

Type 'tshelp' for help

It's not particularly well documented, but when I got it from the factory the jumpers JP1 and JP2 were not installed. This causes the board to boot off the internal 4MB SPI flash. In order to use the full Linux distribution on the SD card you have to install JP1 then type "exit" at the prompt (unless you switch the start script, which I'll do shortly).

And sure enough, it boots right up and I got a login prompt! There is a root login with no password, need to fix that with a quick "passwd" command

I want to fix the IP address because the default of isn't helpful. It's a standard Debian install, so a quick edit of /etc/network/interfaces is all that was necessary. And a

ifdown eth0
ifup eth0

And sure enough, I can now ssh root@ and it works! Now it's time to go back and set things up so I can boot directly into the real Linux. Reboot into the busybox. Follow the instructions in the manual to do:

rm linuxrc; ln -s /linxrc-sdroot /linuxrc; save

The last thing to do is reboot to make sure we boot into the real Linux correctly. Also copy over the ssh key files into /root/.ssh/authorized_keys2 so I can log in using keys instead of having to type a password. It's safer to do this while you still have the serial port connected in case something goes wrong.

And that's it! It's a fully functioning tiny computer. You can now safely disconnect the serial port and put the cover back on the box!

About this Archive

This page is an archive of entries from June 2012 listed from newest to oldest.

March 2012 is the previous archive.

October 2012 is the next archive.

Find recent content on the main index or look in the archives to find all content.