[MyHosting.com]   [KO4BB Home Page]   [Manuals Home Page]   [KO4BB Wiki]
 

What is the TS-7553?

The TS-7553 is a Single Board Computer based on a 250MHz ARM9 CPU. It is made by Technologic Systems: http://www.embeddedarm.com/products/board-detail.php?product=TS-7553

It has 64MB of RAM, 256MB of on-board flash loaded with a lean Debian distribution running busybox.

It has three USB ports (one internal, for a WiFi dongle), a serial connector (RS-232 or RS-485) and a number of goodies, including a built-in XBee socket and a micro-SD socket.

Setting up the TS-7553 SBC

The following steps are presented in a logical sequence so that it will minimize the number of keystrokes and play nice together.
You do not have to follow the sequence, or you may skip a step, but if you do so, don't be surprised if things don't turn out so well.
You have been warned :)

These instructions assume that you have a micro-SD card with Linux pre-installed. You can buy the card from Technologic Systems but you don't have to, they kindly make the distribution available on their web site so that you can burn it yourself on a card you bought elsewhere.

For the latest micro-SD card image for the TS-7553, check this link:
ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7553-linux/binaries/ts-images/2gbsd-noeclipse-latest.dd.bz2
and copy instructions (for Linux) are there:
http://wiki.embeddedarm.com/wiki/Ts75xx_sd_image

(as of November 18, 2012, the most recent archive is dated September 2011)

The instructions on the Technologic web site assume that you have a Linux machine (or a Linux distro running in a VirtualBox under Windows) to format and copy the image to the SD card so that it can boot under Linux.
If you do not have a Linux box handy, Image Writer for Windows, https://launchpad.net/win32-image-writer/+download is a tool that can write an image file containing a Linux partition to an SD card, and conversely can save a Linux formatted SD card as an image file.

Boot from SD card

  1. boot from SD card: type exit when first booting from busybox. This boots a second version of busybox from the SD card. Alternately, remove the SD Card jumper behind the power connector to always boot directly to the SD card.
  2. by default (as configured when I bought the SD card from Technologic Systems), when booting from the SD card, you get another instance of busybox. To boot the full Debian distro from the micro SD card, once booted into the SD card busybox, change the linuxrc symlink to boot from the Debian install on the SD card. The “save” command saves the change to flash, so you only have to enter this command once.
# cd /
# rm linuxrc
# ln -s linuxrc-sdroot linuxrc
# save
WARNING: do NOT power-down while saving/copying!
Saving [initrd] to NAND ... done
# 

Note the message from the console indicating the flash has been updated.

When you get the “done”, type “exit” to boot from SD card.

Enable DHCP Client

If necessary, enable dhcp client by adding dhcp to the file “interfaces” in /etc/network and commenting out the static IP setting.
Alternately, you can set a fixed IP address as needed.
You will need to use the vi editor at this point since that is all that is available until you have internet access and can install other software.
Good luck…
For the vi challenged among us (that means pretty much everybody), check this page: http://www.lagmonster.org/docs/vi.html

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
#iface eth0 inet static
        #address 192.168.0.50
        #network 192.168.0.0
        #netmask 255.255.255.0
        #broadcast 192.168.0.255
        #gateway 192.168.0.1

#auto eth1
#iface eth1 inet dhcp

Update distribution and fix GPG key problem

When updating the Debian based system with apt-get update, it may happens that the apt-get displays an error message like:

W: GPG error: ftp://ftp.debian.org/ testing Release:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F    

W: There is no public key available for the following key IDs:    
010908312D230C5F

This is a new feature of the apt-get system that guarantee the authenticity of servers for updating Debian.

Solution: Simply type the following commands, taking care to replace the number of the key that displayed in the error message:

gpg --keyserver pgpkeys.mit.edu --recv-key  010908312D230C5F    
gpg -a --export 010908312D230C5F | sudo apt-key add -

Install much needed software

Once your TS-7553 is connected to the internet, you can install many pieces of software.
The first thing you need is a decent text editor. I recommend Joe's editor.

# apt-get install joe

This will take a minute or two.
Joe's editor is based on the old Wordstar commands. To display the help from within Joe's editor, simply press Ctrl-K then H.

You can similarly install the php5 module for the Apache web server.

Some packages have dependencies, so that you may have to install other packages before installing the package you want, but the apt-get installer will tell you.

To find which packages are already installed, use dpkg –get-selections

Here is an example of what I have on my TS-7553 at the moment:

ts7500:~# dpkg --get-selections
adduser						install
alsa-base					install
alsa-utils					install
apache2						install
apache2-mpm-prefork				install
apache2-utils					install
apache2.2-common				install
apt						install
apt-utils					install
aptitude					install
avahi-daemon					install
base-files					install
base-passwd					install
bash						install
bind9-host					install
binutils					install
bluetooth					install
bluez-audio					install
bluez-utils					install
bsdmainutils					install
bsdutils					install
[...]
g++						install
g++-4.3						install
gcc						install
gcc-4.2-base					install
gcc-4.3						install
gcc-4.3-base					install
gdb						install
[...]
ts7500:~# 

Mount Flash Drive

This is optional, but very convenient. You do not need to do this now.

ts7500:/var/www# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 008: ID 05dc:a720 Lexar Media, Inc.
Bus 001 Device 002: ID 0b05:1723 ASUSTek Computer, Inc. WL-167G v2 802.11g Adapt
er [ralink]
Bus 001 Device 001: ID 0000:0000
ts7500:/var/www#
ts7500:/var/www# dmesg|grep -i SCSI
[82843.010000] sd 3:0:0:0: [sda] Attached SCSI removable disk
ts7500:/var/www#

or

ts7500:/var/www# dmesg|tail -15
[84705.160000] scsi5 : SCSI emulation for USB Mass Storage devices
[84705.160000] usb-storage: device found at 13
[84705.160000] usb-storage: waiting for device to settle before scanning
[84710.160000] scsi 5:0:0:0: Direct-Access     Kingston DataTraveler 2.0 1.00 PQ
: 0 ANSI: 2
[84710.190000] sd 5:0:0:0: [sda] 3913664 512-byte hardware sectors (2004 MB)
[84710.200000] sd 5:0:0:0: [sda] Write Protect is off
[84710.200000] sd 5:0:0:0: [sda] Mode Sense: 03 00 00 00
[84710.200000] sd 5:0:0:0: [sda] Assuming drive cache: write through
[84710.220000] sd 5:0:0:0: [sda] 3913664 512-byte hardware sectors (2004 MB)
[84710.220000] sd 5:0:0:0: [sda] Write Protect is off
[84710.220000] sd 5:0:0:0: [sda] Mode Sense: 03 00 00 00
[84710.220000] sd 5:0:0:0: [sda] Assuming drive cache: write through
[84710.220000]  sda: sda1 sda2 sda3 sda4
[84710.230000] sd 5:0:0:0: [sda] Attached SCSI removable disk
[84710.240000] usb-storage: device scan complete

As you can see, this flash drive is actually formatted as 4 partitions, so mounting it will be a little different than it would be for a drive with a single partition since you do not know beforehand which partition has the data you are interested in.
The fdisk command tells you how big each partition is, which may help you.

ts7500:/var/www# fdisk -l /dev/sda

Disk /dev/sda: 2003 MB, 2003795968 bytes
1 heads, 62 sectors/track, 63123 cylinders
Units = cylinders of 62 * 512 = 31744 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               5       42282     1310592    c  W95 FAT32 (LBA)
/dev/sda2           42282       42348        2048   da  Non-FS data
/dev/sda3           42348       42414        2048   da  Non-FS data
/dev/sda4           42414       59326      524288   83  Linux

The biggest partition is 1,310,592 blocks and formatted FAT32, that's the one we want here.

Note that there is a sizable Linux partition also.
This flash drive is the one sold by Technologic Systems with the development tools.

This command mounts the FAT32 partition of the flash drive under /mnt/usb

ts7500:/var/www# mount -t vfat /dev/sda1 /mnt/usb
ts7500:/var/www#

Let's make sure we can read the directory of the flash drive:

ts7500:/var/www# ls -l /mnt/usb
total 262188
-rwxr-xr-x  1 root root      3736 Aug  4  2010 README.txt
-rwxr-xr-x  1 root root       116 Oct  5  2007 Technologic Systems website.URL
drwxr-xr-x  7 root root      4096 Aug 10  2009 binaries
drwxr-xr-x  2 root root      4096 Aug 10  2009 cross-toolchains
drwxr-xr-x 10 root root      4096 Jun 30  2010 devel-tools
drwxr-xr-x  2 root root      4096 Aug  4  2010 distributions
-rwxr-xr-x  1 root root       517 Jul  8  2008 runEclipse-Win-DiskC.bat
-rwxr-xr-x  1 root root       507 Jul  8  2008 runEclipse-Win.bat
drwxr-xr-x  6 root root      4096 Aug  5  2010 samples
drwxr-xr-x  2 root root      4096 Aug  6  2010 sources
-rwxr-xr-x  1 root root 268435456 May 18  2010 usb_storage_file
drwxr-xr-x  7 root root      4096 Jun 30  2010 workspace
ts7500:/var/www#

Enable the WiFi-G Wireless USB Dongle

You may not need the WiFi interface, but if you do, here is how to set it up.

Here is the official page, which is useful but not exactly right for my configuration.

http://wiki.embeddedarm.com/wiki/WIFI-N-USB

Here is what I had to do:

Find the name of the card with iwconfig:

ts7500:/# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

rausb2    RT73 WLAN  ESSID:off/any  Nickname:""
          Mode:Auto  Frequency=2.412 GHz
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=0/100  Signal level:-121 dBm  Noise level:-111 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

usb0      no wireless extensions.

ts7500:/#

It is rausb2

Enable the card with ifconfig:

ts7500:/# ifconfig rausb2 up
ts7500:/#

Configure it with iwconfig (this is for a WEP network):

ts7500:/# iwconfig rausb2 essid "KO4BB-3" key "xxxxxxxxxx"
ts7500:/# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

rausb2    RT73 WLAN  ESSID:"KO4BB-3"  Nickname:""
          Mode:Managed  Frequency=2.452 GHz  Access Point: 00:1F:33:4C:EC:A0
          Bit Rate=54 Mb/s
          RTS thr:off   Fragment thr:off
          Encryption key:7914-6AA4-32   Security mode:open
          Link Quality=100/100  Signal level:-30 dBm  Noise level:-79 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

usb0      no wireless extensions.

ts7500:/#

Verify the configuration with ifconfig:

ts7500:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:d0:69:43:8a:0c
          inet addr:10.0.3.9  Bcast:10.0.3.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1834 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:326317 (318.6 KiB)  TX bytes:5731 (5.5 KiB)
          Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:10899 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10899 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:31573204 (30.1 MiB)  TX bytes:31573204 (30.1 MiB)

rausb2    Link encap:Ethernet  HWaddr e0:cb:4e:a6:5a:ba
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1511 errors:0 dropped:0 overruns:0 frame:0
          TX packets:218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:243923 (238.2 KiB)  TX bytes:14350 (14.0 KiB)
ts7500:/#

Set an IP address (fixed):

ts7500:/# ifconfig rausb2 10.0.3.100
ts7500:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:d0:69:43:8a:0c
          inet addr:10.0.3.9  Bcast:10.0.3.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1955 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:346825 (338.6 KiB)  TX bytes:5731 (5.5 KiB)
          Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:10922 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10922 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:31589088 (30.1 MiB)  TX bytes:31589088 (30.1 MiB)

rausb2    Link encap:Ethernet  HWaddr e0:cb:4e:a6:5a:ba
          inet addr:10.0.3.100  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3265 errors:0 dropped:0 overruns:0 frame:0
          TX packets:244 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:443884 (433.4 KiB)  TX bytes:17138 (16.7 KiB)

ts7500:/#

Here is an example script to mount and start the WiFi dongle:

#!/bin/bash

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"

USB=`iwconfig 2>&1 | grep rausb | cut -b 1-6`
echo $USB
ifconfig $USB up
iwconfig $USB essid "XXXXXX" key "xxxxxxxxx"
#ifconfig $USB 10.0.3.100
dhclient $USB

The symbols enclosing the iwconfig command are backticks, not regular quote marks.

The script finds the name of the USB WiFi adapter, saves it to the variable USB and uses that variable for the following commands. Note this setup works for WEP, not for WPA or WPA2.

Replace XXXXXX and xxxxxxxx as appropriate for your network settings.
I named this script “mountwifi” and I put it in my home directory.

Done!

Note: you may notice that the eth0 interface is always enabled by default. This may confuse the board in some situations. If you are having difficulties pinging your access point from the TS-7553, try to disconnect eth0 by using the following command:

ts7500:/# ifconfig eth0 down. 

Enable the DHCP Server

This will be required if your TS-7553 is used as a gateway or server.

You need to install the dhcpd daemon package.

root# apt-get install isc-dhcp-server

Answer the questions and the installation will complete.

Mount the root filesystem with -noatime option to speed up and reduce Flash wear

From Technologic Systems customer support:

The root filesystem is mounted from the initrd.

On the sd card this is /dev/nbd8, or /dev/nbd2 for the XNAND.

In the linuxrc script you can look for the calls to mount /mnt/root/ which can be modified to include “-o noatime”.

Eye Candy: set ls to use colors by default

Open ~/.bashrc with a text editor and add: alias ls=“ls –color=always”

#joe ~/.bashrc

add

alias ls="ls --color=always"

Example Configuration

Here is what I get when booting from SD card:

INIT: version 2.86 booting

Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Activating swap...done.
Cleaning up ifupdown....
Loading kernel modules...done.
Checking file systems...fsck 1.41.3 (12-Oct-2008)
done.
Setting kernel variables (/etc/sysctl.conf)...done.
Mounting local filesystems...done.
Activating swapfile swap...done.
Setting up networking....
Configuring network interfaces...done.
Starting portmap daemon....
Starting NFS common utilities: statd.

INIT: Entering runlevel: 2

Starting enhanced syslogd: rsyslogd.
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd.
Starting NFS common utilities: statd.
Starting internet superserver: inetd.
Starting bluetooth: hcid.
Starting periodic command scheduler: crond.
No apache MPM package installed

Debian GNU/Linux 5.0 ts7500 ttyS0

ts7500 login:

You can notice that the apache server has not started. So we reboot again, this time by recycling power:

INIT: version 2.86 booting

Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Activating swap...done.
Cleaning up ifupdown....
Loading kernel modules...done.
Checking file systems...fsck 1.41.3 (12-Oct-2008)
done.
Setting kernel variables (/etc/sysctl.conf)...done.
Mounting local filesystems...done.
Activating swapfile swap...done.
Setting up networking....
Configuring network interfaces...Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:d0:69:42:d4:e0
Sending on   LPF/eth0/00:d0:69:42:d4:e0
Sending on   Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER from 10.168.101.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 10.168.101.1
bound to 10.168.101.20 -- renewal in 289462 seconds.
done.
Starting portmap daemon....
Starting NFS common utilities: statd.
Setting up ALSA...done (none loaded).

INIT: Entering runlevel: 2

Starting enhanced syslogd: rsyslogd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting OpenBSD Secure Shell server: sshd.
Starting NFS common utilities: statd.
Starting internet superserver: inetd.
Starting bluetooth: hcid.
Starting periodic command scheduler: crond.
Starting web server: apache2.

Debian GNU/Linux 5.0 ts7500 ttyS0

ts7500 login: 

This time, Apache has started and DHCP got an IP address.

TIPs

How to tell which partition you booted from

The directory structure looks alike with all the boot devices, so it is not readily easy to tell if you booted from NAND Flash or from the SD card.

Simply look at the /proc/mounts file:

ts7500:~# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root /initrd ext2 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /initrd/mnt/root/lib/modules tmpfs rw 0 0
/dev/nbd3 / ext3 rw,data=ordered 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid 0 0
tmpfs /dev tmpfs rw 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0
ts7500:~#

From the /dev/ndb3 line, we can tell the root partition is on the NAND flash (the built-in flash on the TS-7553)

In another case:

ts7500:~# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root /initrd ext2 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /initrd/mnt/root/lib/modules tmpfs rw 0 0
/dev/nbd3 /initrd/mnt/root ext3 ro,data=ordered 0 0
/dev/nbd9 / ext3 rw,data=ordered 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid 0 0
tmpfs /dev tmpfs rw 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0
ts7500:~#

Here we booted from sd card /dev/nbd9

 
random/setting_up_the_ts-7553_sbc.txt · Last modified: 2013/02/25 19:00 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Except as noted, this entire site Copyright © 2002-2017. KO4BB All rights reserved.