Marks notes:

This is just a bag of information I had to spend time digging up or figuring out while building my robot Magellan entry that I wouldn't want to waste my time re-digging up.  If it helps others then thats cool too :)

Getting and building kermit: get the tarball, un-tar it do a make Linux, then a make install

C-kermit use with Gumstix:

C-Kermit>set modem type none
C-Kermit>set line /dev/ttyS0
C-Kermit>set carrier-watch off
C-Kermit>set speed 115200
C-Kermit>show comm
Communications Parameters:
Line: /dev/ttyS0, speed: 115200, mode: local, modem: none
Parity: none, stop-bits: (default) (8N1)
Duplex: full, flow: none, handshake: none
Carrier-watch: off, close-on-disconnect: off
Lockfile: /var/lock/LCK..ttyS0
Terminal bytesize: 8, escape character: 28 (^\)


Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.

era 1:2-31
loadb a2000000
^\ C
C-Kermit>send root_fs_arm
cp.b a2000000 40000 $filesize

$filesize seems to be set by the file transfer operation to equal the number of bytes copied.

Create a /root/.kermrc file with the following to make start up easyer:
set modem type none
set line /dev/ttyS0
set carrier-watch off
set speed 115200

yeah, I su to use kernit.  Its just too much bother to chmod /dev/ttyS0, and the /var/lock directory...

Getting Gumstix good image: I got the root_fs_arm.r162.gumstix-f file  
This version works ok as a baseline.

Following the directions on the page for loading a
new image, loadb a200000, era 1:2-31, cp.b a200000 40000 $filesize will load the image into the flash for use.

I2C bus voltage level translation.

I have gotten some samples of and MAX3372E for doing level conversion.

I'm going to connect them to my fat finger pin outs using boards from

Item Ref.   Price ea.   Qty.  Description

201-0006-01 $5.00 1 SOP, 4 - 72 Pins 0.65mm Pitch
, 2" X 2" Grid
201-0007-01 $5.00 1 SOP, 4 - 72 Pins 0.5mm Pitch,
2" X 2" Grid

Using kermit with USB 2 RS232 dongle and FC3

Use dmesg to see where the connection is going too
usb 2-2: new full speed USB device using ohci_hcd and address 2
drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic
usbcore: registered new driver usbserial_generic
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
drivers/usb/serial/usb-serial.c: USB Serial support registered for PL-2303
pl2303 2-2:1.0: PL-2303 converter detected
usb 2-2: PL-2303 converter now attached to ttyUSB0
usbcore: registered new driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver v0.12
[root@DayLite mgross]#

Set up the communications settings.
(/home/mgross/) C-Kermit>set modem type none
(/home/mgross/) C-Kermit>set line /dev/ttyUSB0
(/home/mgross/) C-Kermit>set carrier-watch off
(/home/mgross/) C-Kermit>set speed 11520
/dev/ttyUSB0, 115200 bps
(/home/mgross/) C-Kermit>show com

Communications Parameters:
Line: /dev/ttyUSB0, speed: 115200, mode: local, modem: none
Parity: none, stop-bits: (default) (8N1)
Duplex: full, flow: none, handshake: none
Carrier-watch: off, close-on-disconnect: off
Lockfile: /var/lock/LCK..ttyUSB0
Terminal bytesize: 8, escape character: 28 (^\)

Carrier Detect (CD): Off
Dataset Ready (DSR): Off
Clear To Send (CTS): Off
Ring Indicator (RI): Off
Data Terminal Ready (DTR): On
Request To Send (RTS): On

Accessing the MMC from the r307 build of gumstix linux.

First you need to know that noat all MMC's will work with the gumstix linux.  I have a 64MB MMC that works just fine with the u-boot loader but fails to work at all with the gumstix linux.  I also have a 128MB MMC that works well with both (SanDisk 128MB).

To mount the mmc I need to do all of the following modprobe opperations:
# modprobe mmc_block
# modprobe pxamci
# modprobe vfat
# modprobe nls_cp437
# modprobe nls_iso8859-1

# mount /mnt/mmc
# df
Filesystem Size Used Available Use% Mounted on
/dev/mtdblock2 3.8M 2.8M 992.0k 74% /
tmpfs 31.1M 36.0k 31.0M 0% /tmp
/dev/mmc/mmc0/part1 122.2M 14.2M 108.0M 12% /mnt/mmc

Using the USBNET from Fedora Core 3 and base gumstix root_fs.r162

First I needed to get the kernel SRPM and install, rpm -i kernel-2.6.10-1.737_FC3.src.rpm, build the kernel source tree rpmbuild -bp kernel-2.6.spec --target=i586, do make menuconfig and enable the USB Gadget + usbnet modules, then build and install the kernel and boot with it.

I also needed to install the DHCP package.

Next I needed to start with the SourceForge Gumstix base working load r162.

The following is from an email I got from the gumstix mailing list.  It works like a charm :)
From:  Darren Gibbs <>
Subject:  Re: [Gumstix-users] Looking for a using usbnet for dumbies how to.
Date:  Tue, 1 Feb 2005 09:30:20 -0800

These steps got DHCP working with USBNet:

1. plugged in the gumstix
2. Typed ifconfig -a to see if usb0 showed up — it did. The kernel
recognizes the gumstix. (sidenote: it was not necessary to "modprobe
usbnet" in order to get things going)
3. Typed ifconfig usb0 —  now we have an IP assigned to the
usb0 interface, which will allow dhcpd to use it.
4. Typed route add -host dev usb0 as required to set up
dhcpd for the usb0 interface.
5. Edited /etc/dhcpd.conf. All you really need to do is set up a range
or specific host IP for our new subnet (192.168.0.x) My dhcpd.conf
looks like this:
ddns-update-style ad-hoc;
option subnet-mask;
option broadcast-address;
option routers;
option domain-name-servers;
max-lease-time 120;
default-lease-time 120;

subnet netmask {
6. Turned on dhcpd with /usr/sbin/dhcpd -d -f which is the foreground
debug mode. This way you can see what DHCP requests are being made, and
what leases are being granted. At this point, the gumstix requested and
received a lease on an IP in the 192.168.0.x range. note that it can
take 60seconds or more for the gumstix to grab and address from the
DHCP server...
7. Typed ssh root@ and logged in to the gumstix.

I also found this helpful to reacquaint myself with Linux networking:

Building lots of different gumstix versions and saving on down load issues.

If you copy the gumstix_root/sources/dl directory to somewhere else, and replace the gumstix_root/sources/dl with a symbolic link, then you can collect all the versions of all the tarballs in one place and point to it from multiple root file system version builds.  

This also provides a nice work around to problems with the tarball URL's getting out of date as they do from time to time.  Just find the tarball and down load it by hand directly into the dl directory and you are good to go.

Building your own binaries for the gumstix.

To use the tool chain you and to build the gumstix kernel on the i386 platform I use the following script, modified to the specific directory where the gumstix build happend.
[mgross@DayLite gumstix_root.307]$ cat

export PATH=/home/mgross/dev/gumstix_root.307/build_arm/staging_dir/bin:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-linux-uclibc-

To build the 2.6.10 gumstix kernel that boots:

If its on then my gumstix crashes in random ways that look like JFFS2 failures sortly after freeing the init memory.

To add a device node for i2c into the root file system:

add the following line to sources/device_table.txt
/dev/i2c-      c       666     0       0       89      0       0       1       255

Change to make/ file to avoid rebuilding ulib every time you build the kerel.

Change line 76, by removing the $(LINUX_DIR)/include/linux/autoconf.h such that it looks like:

$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(UCLIBC_DIR)/.config

Getting I2C to send clock and data pulses over the gumstic i2c pins from user mode

  1. go into build_arm/linux-2.6.10gum and do make menuconfig (assuming CROSS_COMPILE, ARCH and PATH areset)
  2. set the I2C support, i2c device interface, i2c interface intel pxa2x0
  3. fix bug in i2c-pxa.c by adding the " #include <asm/arch/pxa-regs.h>"
  4. make kernel
  5. update device_table.txt as listed above.
  6. make root_fs_arm
  7. load new root fs on to the gumstix
  8. modprobe i2c-dev
  9. modprobe i2c-pxa (<-- if your scopeing the i2c lines you'll see some activity)
  10. cat /dev/i2c-0  (<-- makes i2c bus activity)
  11. echo 2 > /dev/i2c-0 (<-- makes i2c bus activity)

writing user mode i2c code .

  1. get the lm-sensor tarball from source forge.
  2. find the i2c-dev.h file that is made for usermode (note: there is one for kernel mode, don't use that one)
  3. with the corrrect header file you can follow (mostly) the out of date examples in the kernel Documtation directory.

Sample digital compas i2c code:
I haven't tried it yet, but I will eventualy.

Using the second serial port on the Waysmall gumstix board.

  1. edit the rc files to not load the blue tooth modules.
  2. load the gpio modules
  3. setup ttyS3 using stty (note the defaults will not work well for the Mark-iii serial port sample program.  The thing echoes inbound data back causing trouble.)
  4. RX,GND,TX are the 3 pins in the middle row of the mini-8 connectedor.  GND is the center pin.
  5. use /dev/ttyS3 to send or get data.
  6. note that a cr/lf gets sent out the ttyS3 port when its closed.
The following is a script I use to setup the serial port.

modprobe proc_gpio
echo AF1 in > /proc/gpio/GPIO49
echo AF1 out > /proc/gpio/GPIO48
cat /proc/gpio/GPIO4[89]

stty -F /dev/ttyS3 ixoff clocal ixany -ixon -echo -echonl ospeed 38400 ispeed 38400
stty -F /dev/ttyS3 ixoff clocal ixany -ixon -echo -echonl ospeed 38400 ispeed 38400