Thursday, November 23, 2006

Camera mounted on robot chassis

Compiling spcacat

Turns out the spca5xxx people also have a program called spcacat that can be used to do framegrabbing with their driver. I tried compiling it but it complained that it couldn't find libSDL (, which is a multimedia porting layer. So, grabbed the latest SDL sources (SDL-1.2.11.tar.gz from the above site), set my PATH to find my trusted arm cross tools, and, after some trial and error, determined this would get me a copy of libSDL:

$ ./configure --host arm-linux --disable-esd --disable-alsa --disable-video-x11
$ make

Will continue trying to get the spcacat program cross-compiled at a later time, but looking good so far...

Success with the QuickCam and the spca5xxx driver!

Some minor tweeks to the spca5xxx driver makefile to point to my ARM crosstool chain, and I got a build. Copied over the driver, added to my bash script that brings up the USB world and insmods the drivers, and:

Using spca5xx.o
usb.c: registered new driver spca5xx
drivers/usb/spca5xx.c: USB SPCA5XX camera found. Logitech QC for Notebooks
drivers/usb/spca5xx.c: [spca5xx_probe:8435] Camera type JPEG
drivers/usb/zc3xx.h: [zc3xx_config:426] Find Sensor PAS106
drivers/usb/spca5xx.c: [spca5xx_getcapability:2217] maxw 352 maxh 288 minw 176 minh 144
drivers/usb/spca5xx.c: spca5xx driver 00.57.08 registered

$ lsmod
Module Size Used by Tainted: P
spca5xx 607288 0
videodev 6552 1 [spca5xx]
zd 277100 0 (unused)
usb-storage 55912 0 (unused)
sd_mod 11100 0 (unused)
scsi_mod 53816 1 [usb-storage sd_mod]
usb-ohci-ep93xx 888 0 (unused)
usb-ohci 15584 0 [usb-ohci-ep93xx]
pcipool 2072 1 [usb-ohci-ep93xx usb-ohci]
usbcore 55944 0 [spca5xx zd usb-storage usb-ohci]
af_packet 9448 0
tsuart7260 1628 0 (unused)
tsuart0 8880 0 [tsuart7260]
vfat 10140 0 (unused)
fat 29608 0 [vfat]


Next step is to find some software that can grab images from the camera and cross-compile that, too.

Wednesday, November 15, 2006

QuickCam Notebook - strike one

Purchased a QuickCam notebook web camera for about $30 tonight. quickcam.o didn't recognize the device (usb vend/prod 0x46d/0x8a3). Worse yet, the qc.o driver supporting the wireless USB ethernet device, when loaded, reacts violently when the camera is inserted into the usb slot, causing the TS-7260 to hard reset. But only if there is a wireless USB ethernet device previously installed and recognized (by the wireless driver).

Tried out an old labtec camera that I have, which is supposed to be supported by the driver as well (0x46d/0x870), but it wasn't recognized either.

Next weekend, I'm going to try to cross-compile the spca5xxx driver for the TS-7260 kernel, which states it supports the QC notebook. Perhaps that will work.

Saturday, November 11, 2006

Cross-compiling the QuickCam web cam module

Here are the steps needed to build the QuickCam web cam module for the TS-7260. Cross-compilation occurred on a stock 32-bit Fedora Core 4 system. These steps are also useful for those wanting to compile a kernel for the TS-7260.

1) Download the ARM crosstools hosted at technologics. Links are available here:

Documentation I used to build the kernel, excellent I might add, was found here:

Section 6 of the above manual describes how to build the kernel.

I downloaded

2) Unpack the thing, and copy it, as root, to /

3) Grab the Linux kernel sources, also from technologics. I grabbed ts11, because running uname on the board indicated the kernel version is 2.4.26-ts11. Here is the link:

I placed this in my home directory, under ~/TS7260/ksrc, and then unpacked

4) cd linux24

5) Edit the Makefile in linux24, comment out the line starting with CROSS_COMPILE, and add a new line below it to point at the crosstools installed in steps 1 and 2:

CROSS_COMPILE = $(shell cd /usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/bin/ && pwd)/arm-linux-

6) Type make ts7260_config

Answer no (n) to all questions.

7) Type make oldconfig

Answer no (n) to all questions.

8) Type make menuconfig

A UI will display, this can be used to set configuration parameters needed to build the videodev.o kernel module.

In this UI, traverse down to the Multimedia devices section, open it up by hitting return, and then configure Video For Linux as shown in the figures (make sure a M is displayed). See the figures for details.

Exit, and save menuconfig

9) Type make dep

10) Type make vmlinux

11) Type make modules

12) If all goes well, you can then do a "find . -name videodev.o -print" and locate the videodev.o module. FTP it over to the 7260, and then run insmod:

$ insmod videodev.o

If successful, the videodev module, needed by QuickCam, will be installed.

Next step is to get the sources for the quickcam module, and compile them:

13) Go to

14) Download the sources, and follow the instructions for building.

15) Copy the file quickcam.o to the 7260, and install the module:

$ insmod quickcam.o

ts7200:/home/quickcam/qc-usb-0.6.5# insmod quickcam.o
usb.c: registered new driver quickcam

16) Run lsmod, and you should see something like the following:

ts7200:/home/quickcam/qc-usb-0.6.5# lsmod
Module Size Used by Tainted: P
quickcam 62544 0 (unused)
videodev 6616 0 [quickcam]
usb-storage 55912 1
sd_mod 11100 2
scsi_mod 53816 2 [usb-storage sd_mod]
usb-ohci-ep93xx 888 0 (unused)
usb-ohci 15584 0 [usb-ohci-ep93xx]
pcipool 2072 1 [usb-ohci-ep93xx usb-ohci]
usbcore 55944 1 [quickcam usb-storage usb-ohci]
af_packet 9448 0
tsuart7260 1628 0 (unused)
tsuart0 8880 0 [tsuart7260]
vfat 10140 0 (unused)
fat 29608 0 [vfat]

Note, if you don't insmod videodev.o before doing the insmod quickcam.o, the QuickCam module will fail and complain that it can't resolve videodev.o

Friday, November 10, 2006

Battery is DOA

The Battery (previous post) seems to be DOA, so returning it for analysis and a replacement next week.

In the meantime, going to look into drivers for web cams, starting with source code found here:

Ultimate goal is to write some software that gets images from the camera, and view them from the robot via the embedded web server. A robotic digital camera of sorts, which I can use to investigate hazards around the home from a safe distance.

Thursday, November 09, 2006

PC-104 battery

Closeup of the PC-104 battery. This is a new product from Technologics, and the instructions are a bit ambiguous. Probably need to buy a power supply before I can use it; e-mail has been sent to them for assistance. It is claimed this thing will drive the 7260, which is a low-power design, for days, though I would expect that might not be the case if wireless is enabled.

TS-7260 Mounted to Modified Squarebot

Picture of a modified VEX "squarebot" with the 7260 mounted to it using 4-40 standoffs (the holes drilled on the 7260 required 4-40, which was a problem because I had a hard time finding 4-40x1/4" screws that worked with the standoffs and had a wide enough head not to fall thru the holes in the squarebot chassis). Note the wireless USB card and the 9-pin RS-232 cable. Behind the bot, not visible in the picture, is a Linux box running minicom which allows me to log into the 7260 over the serial connection.

In this configuration, with the wireless USB network enabled, I am able to log in from a web browser and view a static web page hosted on the robot using apache.

USB Wireless

From the technologics guys:

We provide a precompiled driver for USB wifi devices that use the Zydas
zd1211 chipset.

A wireless enet card that uses this chipset:

USB iogear GWU523


zd.o (downloadable from technologics at

The magic that gets me an IP address:

$ ifconfig wlan0 up
$ /sbin/udhcpc -H ts7200 -b -i wlan0
info, udhcpc (v0.9.9-pre) started
debug, Sending discover...
debug, Sending select for
info, Lease of obtained, lease time 172800
deleting routers
adding dns
adding dns
$ ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=150 time=10.0 ms
64 bytes from icmp_seq=1 ttl=150 time=0.0 ms
64 bytes from icmp_seq=2 ttl=150 time=0.0 ms

--- ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.0/3.3/10.0 ms

Now, if only getting a date for Saturday night were this easy!