Вы находитесь на странице: 1из 18

Hacking the Spy Video Trakr

by KRA5H

22 Steps

Favorite I Made it! Collection

The Trakr is a remote controlled robot equipped with a microphone and color
video camera, speaker, a near infrared LED for night vision, an SD memory card
slot for recording audio/video and 8MB of on board memory for storing
downloadable and user designed programs. The remote control unit has control
levers to drive the robot, a speaker and color video display so you can hear the
audio picked up by the microphone and display the video transmitted by the
camera, and several function buttons that can be used to control additional
program functions of user designed programs. In this article we will demonstrate
how to hack the Trakr. We will show you how to download and install the C
language compiler for the Trakr. Next well explain how to compile a simple
program and install it on the Trakr and then run this simple program. Finally, we
will demonstrate how to open up the Trakr, attach jumper pins to the GPIO
connections on the mainboard of the Trakr and compile a simple program to flash
an LED connected to the GPIO pins. You will be able to confidently call yourself
an elite Trakr Hacker.

Step 1: Download and Install the C Language

Compiler for the Trakr
What's a compiler? Have you seen those geeky T-shirts that say "there are only
10 types of people in the world: those who understand binary, and those who
don't?" If you find yourself scratching your head instead of laughing hysterically,
then you don't understand binary. Computers, on the other hand, understand only
binary. 1s and 0s. On and off.
I have heard of some people who can do binary code, or machine language in
their heads, but the rest of us normal people would have a difficult time writing a
computer program out of nothing but 1s and 0s. Instead we use a higher level
language like C language to write software.
Have you ever been to a foreign country and didn't know the language? You can
hire a translator to translate what you say into the language that the locals can
understand. That's what a compiler does. Computers can't understand C language
so, a compiler translates the software you write in C language into machine code,
or the 1s and 0s that computers can understand.

You'll need to download and install the C language compiler so that you can
write programs for the Trakr and compile your software into machine language
that the Trakr can understand. The C Language compiler is included in a fairly
complete software development kit (SDK) that the folks at Wild Planet call the
"Primer." So, download the Primer and save it on your computer where it'll be
easy to find by clicking the following link:

Step 2: Download and Install the C Language

Compiler for the Trakr (continued)
Make a new folder in the root directory of your hard drive (usually the C: drive)
called C:\trakr. Then open the Trakr Primer zip file you downloaded from the
Trakr web site and copy all the files and folders from the Trakr Primer zip file
into your C:\trakr folder.

Step 3: Download and Install the C Language

Compiler for the Trakr (continued)
Next you'll need to update the environment variables to include the path to the
Primer's compiler and tools. If you don't know what environment variables are,
don't worry, you're just telling your computer where to find the compiler and the
tools it needs to compile your Trakr programs.
Open a command prompt, which is a Windows text based interface. Go to Start>Programs->Accessories->Command prompt. You will see a flashing cursor after
the ">" and you can type text based commands. When you're done typing a
command press the Enter key on your keyboard to execute the command. At the
command prompt, type the following commands:
cd trakr
cd Internals

Step 4: Download and Install the C Language

Compiler for the Trakr (continued)
The compiler runs when you type "make" at the command prompt so you need to
make sure you navigate to the folder where the makefile you want to run is
located. The compiler then follows any instructions in that "makefile" to convert

the "app.c" file (the text file containing the source code) into a TRAKR program.
The compiler only looks for the "app.c" file in the current folder so always name
your source code app.c. Save your programs in separate folders with names
which make sense. This helps to keep all the various "app.c" files organized. As
shown in the screen shot, you'll want to run "make clean" in the
C:\Trakr\Internals folder. It reports all the files it is removing before returning the
prompt to you. Then type "make" at the command prompt and the compiler will
use the "makefile" to assemble all the parts of your program (which may include
many libraries, images and files specified by your code) into a .bin file to write to
the TRAKR hardware.
At the "C:\Trakr\Internals>" prompt type:
make clean
Your newly compiled program or app for the Trakr is called "Test.bin" and the
file will need to be copied to the Trakr. Make sure the Trakr is switched off and
connect it to your computer using the yellow USB cable that came with the Trakr.
Copy Test.bin to the APPS folder inside the Trakr folder. Disconnect the Trakr
from your computer and switch the Trakr on. Switch the Trakr remote on, click
the home button, and select Test from the menu. It's just a little app that tests all
the various functions that your Trakr can do such as motor tests, screen functions
and so on.

Step 5: Installing the Jumper Pins on the

In this section elite Trakr Hacker CPT_hans demonstrates how to install male
header pins on the Trakr circuit board:
In this section, I'm going to briefly explain (with the aid of several photos) how I
disassembled the Trakr and installed the headers. Please note that this project is
not difficult, but it does require some patience and some soldering skill. If you
are inexperienced or uncomfortable soldering on a printed circuit board, you can
follow the instructions to disassemble the Trakr, and then take it to someone who
can solder it for you.
The GPIOs and the A-to-D converter are inputs and outputs that can be used to
control things. They share a .1" pitch header. The JTAG is a programming/testing
port that uses a 2mm header. I plan on exploring the JTAG port, to see if I can
access some capabilities there...but not everyone may be interested in doing that.

I'm going to show both, but you can do just the GPIO if you want.
I ordered part # PRT-10112 ($0.95) from Sparkfun http://www.sparkfun.com for
the JTAG header. It's 10 pins; we only need 7, so we can just snip off the extras.
For the GPIO, I ordered part # PRT-00116 ($1.50). It is a 40-pin header. Since we
only need 9 pins, that one part is enough for 4 Trakrs!

Step 6: Installing the Jumper Pins on the

Mainboard (continued)
You'll need these additional items for this project:
- Trakr (duh!)
- #1 Phillips screwdriver
- Fingernail polish remover
- Cotton swabs
- Exacto knife (or similar hobby knife)
- Soldering iron
- Solder
- Vacuum desoldering tool (aka 'solder sucker'...hey, nobody's perfect, and you
may have to fix a mistake!)

Step 7: Installing the Jumper Pins on the

Mainboard (continued)
Start by removing the two screws for the back cover. Throughout this project, be
mindful of the antenna, and don't break it!

Step 8: Installing the Jumper Pins on the

Mainboard (continued)
When that's done, you can look in at the mainboard, and see where we're going to
install the headers.

Step 9: Installing the Jumper Pins on the

Mainboard (continued)
You'll want to fold the antenna over and then flip the Trakr over so you can get at
the screws that fasten the Trakr case together. Use a philips screwdriver to
remove all the case screws (you can ignore the battery and reset compartment
screws). There are a total of 12 screws to remove. Note that the screw marked
with a star is shorter than the other 11, so keep track of it.

Step 10: Installing the Jumper Pins on the

Mainboard (continued)
Once the cover screws are removed, you can pull the upper and lower housings
apart. When you do, the emblem on the front will fall out. No worries. There's
also another piece behind it that will now be loose. Set them both aside, and
remember to replace them when reassembling the Trakr.

Step 11: Installing the Jumper Pins on the

Mainboard (continued)
With the upper housing moved aside, you can see the shiny screws holding in the
mainboard. Resist the temptation and don't remove them yet!

Step 12: Installing the Jumper Pins on the

Mainboard (continued)
Once the cover screws are removed it's easy to lift the cover enough to see most
of the main board. When opening up the cover remember to be careful. There are
a number of wires that are connected between the cover and the mainboard. The
connectors for the wires are modular, but to make the Trakr more rugged, the
connectors have been glued together. I don't know what kind of glue Wild Planet
used, but it must be UFO technology from Area 51! It's tough stuff! This is where
the fingernail polish remover and patience are employed.

Step 13: Installing the Jumper Pins on the

Mainboard (continued)
With a cotton swab, apply fingernail polish remover to the glue to soften it up. It
will probably take more than one application. Allow the polish remover time to
soak into the glue. Use the hobby knife to trace along the connector joints, and to
peel the glue away from the connectors. Note that the connectors also have two
tabs molded into the plastic so they'll latch together. I used the knife to release
the tabs, once the glue was cleaned away.

Step 14: Installing the Jumper Pins on the

Mainboard (continued)
With the connectors unglued and separated, you can now set aside the upper
housing. If while trying to separate the connectors, you end up pulling the whole
thing off the board, don't fret. The pins on the board will still be okay. If you look
at the pic below, you'll notice that I accidentally pulled the whole connector for

the speaker off of the left front leaving the pins sticking up from the board. It was
easy to reattach the connectors to the naked pins once I got the connector
separated. I just used a hot glue gun to reattach it to the mainboard.
A quick note. Gelfling6 commented on this instructable and pointed out the
"The connectors for the speaker, and the push button, are not critical, since both
are non-polar. The MIC connector, however, IS! Make sure you put the socket
back exactly the same direction, or you could (a) fry the MIC element, and (b,
Obviously) the MIC will not pick up anything!"
If you accidently remove the whole connector, try to reconnect it back in its
original orientation on the circuit board.
The Trakr Hakr community are interested in improving their Instructables. If you
notice an error or something they've forgotten, let them know in the comments

Step 15: Installing the Jumper Pins on the

Mainboard (continued)
Before you take the mainboard screws out, there's another connector to unhook.
This flat white ribbon cable is on the right front of the Trakr, and is for the
camera assembly. It's a pressure-type connector that holds the ribbon cable
against the contacts of the socket. To release, slide the little brown tabs (they're
actually connected and run underneath the ribbon cable) forward about 1/8"...the
cable will slide right out.

Step 16: Installing the Jumper Pins on the

Mainboard (continued)
Remove the five mainboard screws, and unhook the connector to the USB port
from the bottom. I left the power leads from the battery pack soldered on, since I
had enough freedom of movement even with them connected.

Step 17: Installing the Jumper Pins on the

Mainboard (continued)
At this point, it's a simple matter to insert the headers into the holes on the
mainboard, and solder them in. Good solder joints are smooth and shiny like
these. Ensure that none of them are soldered to their neighbor (solder bridge).

Step 18: Installing the Jumper Pins on the

Mainboard (continued)
At this point, it's a simple matter to insert the headers into the holes on the
mainboard, and solder them in. Good solder joints are smooth and shiny like
these. Ensure that none of them are soldered to their neighbor (solder bridge).
You can also use Wire Glue http://www.wireglue.us/ as an alternative to
Now reverse the disassembly process to put your Trakr back together!

Step 19: Installing the Jumper Pins on the

Mainboard (continued)
So you ask, "I have pins, now what do I use for plugs?" You can order connectors
online to fit the headers, although Sparkfun doesn't carry any. I did some
scrounging in my parts box and found that various cables from old computers
will connect to the headers. The connector on the left is an audio connector used
to hook CDROM drives to sound cards or motherboards. It fits the GPIO
spacing. The connector on the right is the type used for internal audio
connections, like video capture cards to sound cards, etc. This will fit the JTAG

Step 20: Installing the Jumper Pins on the

Mainboard (continued)
I'm not saying these connectors will meet all your needs, but it at least you can
modify them, and it gives you an idea of what to look for in your junk box. In the
pic below, I have two CDROM audio cables on the GPIO...this would give me Ato-D and five GPIO connections; certainly enough to play around with. Other .1"
connectors from an old computer case or motherboard (e.g. front panel switches,
USB headers, chassis fans) should be of compatible spacing as well.

Step 21: Use the GPIO Pins to Flash LEDs

(Light Emitting Diodes)
The test to control a device using the GPIO connections is to switch LEDs on and
off by pressing buttons on the TRAKR remote. I used one of the CDROM audio
cables that I mentioned above. I wired the components directly to the cable; I
didn't really think it was worth a circuit board. The 100ohm resistor drops the
voltage to 1.6...perfect for the LEDs.

You can see how it was soldered in the upper left portion of the picture. When
you run the trakrmotorcontrol app and no button is pressed, nothing illuminates.
When button A is pressed, the green LED lights up; when button B is pressed, the
red LED lights up.
C Language code:
//LED flash program for Spy Video TRAKR
//Program scans to see if button A was
//pressed on TRAKR remote and sets GPC0 high
//and GPC1 low to send current through LED
//in forward bias direction (switched on).
//If button B is pressed, it sets GPC0 low
//and GPC1 high to send current through
//LED in reverse direction (switched off).
#include "svt.h"
#include "JAPI.h"
#define GPC0 (1<<0)
#define GPC1 (1<<1)
#define GPC2 (1<<2)
#define GPC3 (1<<3)
#define GPC4 (1<<4)
#define GPC5 (1<<5)
#define GPC6 (1<<6)
#define GPC7 (1<<7)
int keyState;

//include Official API

//include "Secret sauce" API
//bitmask for pin GPC0 = 00000001
//bitmask for pin GPC1 = 00000010
//bitmask for pin GPC2 = 00000100
//bitmask for pin GPC3 = 00001000
//bitmask for pin GPC4 = 00010000
//bitmask for pin GPC5 = 00100000
//bitmask for pin GPC6 = 01000000
//bitmask for pin GPC7 = 10000000
//define "keystate" as integer

void Start()
JAPI_SetIoOutputMode(GPC0+GPC1);//Set output mode for pins GPC0 and
bool Run()
keyState=GetRemoteKeys(); //TRAKR remote control key pressed
//assign to keystate
if (keyState > 0)

//if keystate is greater than 0

//Button A pressed (motor forward)
JAPI_SetIoHigh(GPC0);//Set GPC0 pin high (3.3v)
} else {
JAPI_SetIoLow(GPC0); //Switch off pin GPC0
//Button B pressed (motor reverse)
JAPI_SetIoHigh(GPC1);//Set GPC1 pin high (3.3v)
} else {
JAPI_SetIoLow(GPC1); //Switch off pin GPC1
//if Home button pressed
return false;
//this will end the loop

return true;

//loop will repeat until false

void End()
//Program end - switch off both pins

Make file:
# Makefile for TRAKR Toy
# Trakr Project
PROGRAM_NAME = trakrmotorcontrol
PRETTY_NAME = trakrmotorcontrol
OUTPUT_PATH = ./Intermediate
INTERNALS_PATH = ../Internals
SOURCES = app.c

SHELL = sh
CC = arm-elf-gcc
AS = arm-elf-as
BIN = arm-elf-ld
LD = arm-elf-ld
CFLAGS = -O0 -I../Internals/Include -I../Internals -Wall -gstabs+
TARGET_FLAG = -mcpu=arm926ejs -mapcs-32 -mlittle-endian
LDFLAGS = -T ../Internals/WJ_APP_8M.ld -Wl,--defsym -Wl,__stack_base=$
(TOPMEMORY) -Wl,-Map -Wl,$(basename $@).map -nostartfiles -static
all: prebuild $(OUTPUT_NAME) postbuild
@echo "Linking... "
@echo "Creating file $@..."
@$(CC) -u _start -o $@ $(INTERNALS_PATH)/trakr_start.a $(OBJECTS) $
$(OUTPUT_PATH)/app.o:app.c Makefile
@echo "Compiling $<"
@$(CC) -c -o "$@" "$<" $(TARGET_FLAG) $(CFLAGS)
.PHONY: clean prebuild postbuild
$(RM) -f $(PROGRAM_NAME).bin
$(RM) -f "$(PRETTY_NAME).bin"
$(RM) -f $(OUTPUT_PATH)/app.o
arm-elf-objcopy -O binary $(OUTPUT_NAME) "$(PRETTY_NAME).bin"
@if [ -d "E:/" ] ; then \
cp "$(PRETTY_NAME).bin" e:/APPS/ ; \

# End of Makefile

When you compile the above code with the above make file, this will create a
Trakr App file called "trakrmotorcontrol.bin" and the file will need to be copied
to the Trakr. Make sure the Trakr is switched off and connect it to your computer
using the yellow USB cable that came with the Trakr. Copy trakrmotorcontrol.bin
to the APPS folder inside the Trakr folder. Disconnect the Trakr from your
computer and switch the Trakr on. Switch the Trakr remote on, click the home
button, and select trakrmotorcontrol from the menu.
You can use the trakrmotorcontrol app to control many different types of
electrical devices...motors, lights, relays, etc.

Step 22: You're an Elite TRAKR Hacker!

Congratulations! You may now call yourself an elite Trakr Hacker. You now
know how to download and install the C language compiler for the Trakr. You
can use the compiler to compile programs for the Trakr. You can install custom
programs on the Trakr and run them. For you more daring Trakr Hackers, weve
shown you how to open up the Trakr and connect external devices to the GPIO
connections on the mainboard such as an LED and control them using software
you have written, compiled, and installed on the Trakr. Happy hacking!

We have a be nice comment policy.

Please be positive and constructive.

I Made it! Add Images Post Comment

MillenniumReplya year ago

so if this instructable is missing the apps and the code....Can I use Arduino and code
from scratch assuming I Pin In to GPC0-GPC6. I simple want to interface a servo into
the camera to tilt up and down.

henryw1Replya year ago

i like it your site is just awesome....

KRA5H (author)Reply2 years ago

Here's some trakr resources that are still available:

McGrude KRA5HReply2 years ago

What are the chances that there's an archive somewhere of what was on the Wiki? I've
recently been given a Trakr and want to start messing around with it and it seems almost
everything regarding it has evaporated. Archive.org doesn't have any of the above wiki
except the main page. I've found the dev tools ( dev.spygear.net/help/files/ ) but not
much else, and the gnu arm linux tool chain there is an incomplete file ( but it looks like
it may be the same binary package as available at the gnuarm.org site)

KRA5H (author) McGrudeReply2 years ago

Sadly, that's the only resource I have left too. I did download rorschachUKs bigtrakr app
to my PC, but otherwise I don't think I have any of the other apps or source code. You
might be able to contact wild planet: http://www.spygear.net/support.

JRMN KRA5HReply2 years ago

Kra5h, can I get a copy of the bigtrakr app? I was late to the party and missed out on all
the fun stuff. Thanks

dnicol1Reply3 years ago

Hi. I need someone who can help me with software / hardware for capturing movement
on a mini camera. Will pay top dollar with help.

Spy_ChickensReply3 years ago

Could you post the Trakr_App_Primer_V1.2.zip on media fire or another download
system. the spygear.net website is down. The setup looks cool but i can't do anything
until I have the app. Thanks!

VirtualBoxerReply3 years ago

I never understood that shirt either!

eriedReply3 years ago

Pretty cool! there is some way to control the Trakr thru wifi? or anything besides the

KRA5H (author) eriedReply3 years ago

Unfortunately no, there is no wifi module for the Wild Planet Spy Video Trakr. I posted
svereal resources for the trakr in this instructable:
Hoping someday someone will figure out how to control it using wifi.

KRA5H (author) KRA5HReply3 years ago

here's the link for the Brookstone trakr:
...you can find the external photos and internal photos.
You can drive the brookstone robot with wifi but it's not so hackable as the trakr.


coolzzz9Reply4 years ago

I am wondering if you can have the remote as a wireless out put but control from you pc
because if you go to where the batteries are at there are 2 screws to the right (when you
open the battery cover) and there is a mini usb and a switch from spi to usb

KRA5H (author) coolzzz9Reply4 years ago

Unfortunately, the SPI port is only for firmware upgrades and fixes.
Some folks have been trying to write their own/building their own apps for the trakr
bypassing the compiler for the trakr. You can take a look at one of the discussions on the
trakr forum here:
...and there's some additional information here:
click the links titled "Hardware reference material" and "Bootstrapping"

Musicman41Reply4 years ago

Rather than using two of the external ports to run the led, could you use one to supply
voltage, then attach the other side to the negative side of the battery? I am thinking of
making a terminal that attaches directly to ground, doubling the port capacity.

KRA5H (author) Musicman41Reply4 years ago

You certainly can. The app I wrote was originally designed to turn a motor in forward
and reverse directions--if you read my comments in the source for the app you'll notice
that I fogot to change them from "motor forward" and "motor reverse." lol. I only
changed the comments at the beginning becuase the same app works for driving a single
motor in forward or reverse direction or flashing two LEDs. In this instructable I
demonstrated how to flash LEDs as a simple introduction to writing apps since LEDs
are more readily available and cheaper. If you want to see want the app was written for
originally, click the link at the end of this post.
Anyway, you can edit the code to set pins GPC0 thru GPC6 to high or low depending on
what you want the program to do and what kind of external devices you want to drive

such as LEDs, relays, motors and so on.

Click the link below to see waht my app was originally written for:

KRA5H (author) KRA5HReply4 years ago

if, for some reason you can't view the video, you can use this link:

Gelfling6Reply4 years ago

This glue struck me as a variant or Goodyear Plio-Bond. (a rubber cement.) I
accidentally tore my speaker wires from the connector, took awhile to find something
else (a cordless phone handset) to replace the connector, and later the speaker back into
the TRAKR. I also replaced the MIC element with another, from the same cordless
phone, an the pick-up was massive! (and so was the feedback if I had it too close to the

KRA5H (author) Gelfling6Reply4 years ago

This is a pretty cool suggestion! I'll check my old phones and see if I have a mic that
will fit my Trakr. Your suggestion also serves as a reminder that before we recycle our
old electronics it's a good idea to salvage the useful bits from them first.

Gelfling6 KRA5HReply4 years ago

Anytime.. Actually, any 2-wire electret element mic will do, as long as you keep the
polarity (in and gnd) straight. the Mic from the phone was a lucky find. Still couldn't
understand why the stock mic element was so weak. The new element had more than
4X volume, roughly same size. (5/16" dia.) fitted in perfectly.
I picked-up a set of 20x IR LED's similar to the single one (for $1.00 off Ebay)..
Someone on the spygear forum, found provisions on the camera board, for 2 more
LED's, and 2 chip resistors.. Haven't gotten adventurous enough to add them. (the
battery draw is bad enough!) Mine's been sitting off to the side, as a arduino project has
been taking more time, as well as life/work.

Gelfling6Reply4 years ago

The connectors for the speaker, and the push button, are not critical, since both are nopolar.. the MIC connector, however, IS! Make sure you put the socket back exactly the
same direction, or you could (a) fry the MIC element, and (b, Obviously) the MIC will
not pick up anything!.
One more side hack, invert the drive belts. If you take them off the wheels, You'll notice
the inside has deep teeth that match the drive wheels. Ironic, so does the small ribs on
the outside.. Need serious traction grip? remove the track belts, invert them so the
deeper teeth are outside, and replace them on the wheels, with the smaller ribs inside.

Gelfling6Reply4 years ago

Although not noted, Inside the reset button panel, if you remove the cover, You might or
might not see a flat piece between the screw hole, and the button. If you do, you
SHOULD be able to lift the flat piece out, and it'll reveal two trim POTs. These are for
balancing the H-Bridge output of the two drive motors. (standard DC permanent magnet

Musicman41Reply4 years ago

I got one of these two weeks ago and planned on writing an instructable, but you beat
me to it. I look forward to using your information!!

KRA5H (author) Musicman41Reply4 years ago

Outstanding! I'm looking forward to reading your instructable about how you hacked
your Trakr.

Musicman41 KRA5HReply4 years ago

I don't know if it will be soon. I am but a poor college student with little money for an

KRA5H (author) Musicman41Reply4 years ago

Not sure why you would need an external microcontroller. The ARM processor on the
trakr is decent for many prgramming solutions. If you want to drive motors, use an hbridge. If you want to log data, GPC8 is an ADC pin. If you must use an external
microcontroller, you might consider the TI Launchpad:

The cost is $4.30 USD.

Musicman41 KRA5HReply4 years ago

I am thinking xbee or wifi to facilitate remote control via computer (internet if possible)

cubeberg Musicman41Reply4 years ago

You might consider a cheap Bluetooth module like
Not sure if the TRAKR supports Serial or not, but there are ways to handle that in
software. They're cheap and work great.

KRA5H (author) Musicman41Reply4 years ago

Sounds like a cool idea!
I'll tell you what: my next Instructable will be about interfacing variuos external devices
to the Trakr like the Lego Mindstorms NXT, the TI Launcpad, Snap Circuits 08m
microcontroller, and so on.

Musicman41 KRA5HReply4 years ago

I am looking forward to it!

jbaker22Reply4 years ago

Can I use the program you used on my arduino?

KRA5H (author) jbaker22Reply4 years ago

Could you load it into your arduino's program memory and run it? No.
If you want to connect the Trakr's GPC0 and GPC1 pins to your arduino and

program it to do something when your arduino detects GPC0 and GPC1 are set
to high or low depending on which buttons are pressed on the Trakr remote,
then very probably yes.