RoboticsPrimer

0) Introductions	In addition to the Gumstix Connex 200xm, Robostix, Wifistix you get 		from gumstix I suggest you get the wall powersupply and the packet 		of screws and spacers. The power supply is only $10 and it will probably save you that in batterys.

The power connectors on Wifistix and Robostix take the connector DIGI-KEY part number CP-012-ND. When you hook up the power supply connector remember the negative goes to the outer part and the positive goes to the inner part. Radio shack part number 2700391 can be easily soldered to CP-012-ND making a nice battery pack. You can also get power from the D25 connector on the iCreate, via a regulator, for the gumstix. For me this was not a good option as my iCreate is powered by batteries, this would be robbing peter twice to pay paul once! Your situation may be different. The three board gumstax we use should have the power supplied to the Robostix, the larger board on the bottom.

Sometimes while scp'ing large files the gumstix will reboot. This annoying problem is power related and the simplest solution is to provide power to the Wifistix in addition to the power supplied to the robostix.

The instructions for building the cables are quite good. I suggest you get multiple Mini DIN Plug (275-1032-ND) and power connector (CP-012-ND) as they are quite small and you may need some practice. Also as DIGI-KEY adds $5 handling charges to every order less than $25, it is best to make one order as large as you can.

I did not manage to get the instructions to fix the inet addr of the gumstix to work, so sometimes when gumstix reboots it gets assigned a	different inet addr. I have to connect the USB/serial connector sign in and ifconfig to see the new one and then change the references to the inet addr

There are a number of web pages on different parts of this process some better than others. I have tried to give references to the good ones.

1) first you need to download and build buildroot	Use the latest version we will be Flashing the gumstix 	instructions are at http://docwiki.gumstix.org/Buildroot

I activated "build/install c++ compiler and libstdc++", "wpa_supplicant" and "libtool" and deactivated "gpsd"

2) Connect to the gumstix	power up gumstix	connect the USB to serial (RS232) cable to your build computer

ls -l /dev/ttyUSB0

if you don't see ttyUSB0 you may have to load a driver

make a file called .kermrc

set line /dev/ttyUSB0 set flow-control none set carrier-watch off set speed 115200 set reliable fast set prefixing all set file type bin set rec pack 4096 set send pack 4096 set window 5 set handshake none

kermit

at the kermit prompt type connect

you should see a part of the gumstix boot sequence if you don't the press enter a few times if that doesn't work try turning around the way the four pin serial plug goes into the gumstix

at the Linux signin as root password gumstix

look around the system for a while then

reboot

gumstix goes through its shutdown/restart sequence at a certain point it gives you a few seconds to press enter to stop it booting Linux, press enter It may take a few times before you get it right but thats ok	just sing in and reboot untill you get it right

When you get it right you will be at the GUM> prompt

GUM> version

this will tell you the version of U-boot and the filesystem

if u-boot is not version 1.2.0 you need to update it instructions are here http://docwiki.gumstix.org/U-Boot in section "loading new stuff	into flash". Be carefull with this step!

now you need to load the file system and kernel instructions are here http://docwiki.gumstix.org/Replacing_the_filesystem_image in section "Flashing over serial" --> Verdex --> U-Boot version 1.2.0

now you can reboot login and examine your new system

once in Linux enter

ifconfig

it should respond

mwlan0   Link encap:Ethernet  HWaddr 00:0B:6B:0C:D7:98 inet addr:192.168.1.102 Bcast:0.0.0.0  Mask:255.255.255.0 inet6 addr: fe80::20b:6bff:fe0c:d798/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500  Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1180 (1.1 KiB) TX bytes:4476 (4.3 KiB) Interrupt:49

remember your inet addr 3) Download and cross compiler player	Download latest player from sourceforge	There are a number of tutorials on this all of which seem out of 		date.	This is what worked for me	first add directory

/home/john/gumstix-buildroot/build_arm_nofpu/staging_dir/bin

to your Path

(/home/john is my home directory you will need to change this here	and in the following for your system)

you will probably need to download some packages to get this to work. See Appendix A for some of the packages I loaded during this process.

cd player*

$ ./configure --build=x86-linux --host=arm-linux --disable-shared --disable-alldrivers --enable-roomba --prefix=/home/john/gumstix-buildroot/build_arm_nofpu/root/usr/local

make

when this succeeds then

arm-linux-strip server/player

make install

now copy server/player to your gumstix

cd server

scp player root@192.168.1.102:/root you will replace the 192.168.1.102 with the inet addr of your gumstix

once that succeeds you can sign on to the gumstix build a roomba.cfg using vi

4) Downloading and compiling roboticsprimer*

4.1) download roboticsprimer*	go to https://sourceforge.net/projects/roboticsprimer	and download the current version of roboticsprimer	mine was loaded into roboticsprimer-0.1	version 0.1 hopefully yours is bigger

4.2) Compile roboticsprimer*/player	cd roboticsprimer*	cd player	scons install

Most likely scons install will not work. Your job is to figure out why it didn't work, fix it and try again. Good Luck! Here is a list of some of the things I had to do to fix problems. 1) Most commonly it fails because some package it requires is not on 		your system. You have to find out which package it needs, where it 		is, download it and try again. A list of the packages I had to 		download is in Appendix A. You might like to download them all now.	2) Sometimes it fails because it can't find a package it needs but you have downloaded it. Generally this is fixed by adjusting some environment variables. Appendix B is the list of the environment variables their values that I found it necessary to set. 3) copy some filename.H to filename.h so the compiler would find 		them. There may be an environment variable for this.	4)Edit some c and c++ files to fix obvious compiler errors. 5)copy cr8.pc from roboticsprimer*/create to	roboticsprimer*/player. Change its name to roombaDev.pc. Edit 		roombaDev.pc and remove the -lcr8 reference in the Libs line.	This fix is one of the strangest I have done, and hopefully you 	won't have to use it. You need to use it if scons says can't find 	roombaDev.pc and a search of your system indicates it is, in fact, 	not there. The last thing scons install does is create the correct 		roombaDev.pc, so if you use this HACK after the first time scons 		install works you need to run it again.

Once you've got through this you need to compile the first exercise

cd /home/john/roboticsprimer-0.1/exercises/01_introduction/gumstix scons

5) running	connect gumstix to iCreate serial port and	powering on iCreate

on the gumstix computer

./player roomba.cfg

on the build computer edit client.xml and change the intr addr to the gumstix intr addr

./intro client.xml

Appendix A. List of some packages I needed to load on my system during this project. This is not a complete list but its a good place to start.

librtk pkg-config imlib2 gsl fltk ftgl avr avrdude ckermit xdr pthread ltdl boost gdk_pixbuf boost_signals_dev