Project journal

Will begin research in to a cheaper alternative for putting this project together.

Started new account on the Arduino forum under the alias Knightmare.

Googled "ethernet port for breadboard", and have come across a arduino project that uses stand alone ethernet ports on a breadboard.
I can use a similar design, instead of purchasing a arduino Ethernet shield which would be more expensive.

Found the Ethernet port for the breadboard at Active Robots for 28.52 Inc. VAT.

Ethernet controller chip to drive port on breadboard.
The supplier of this chip is not one to the recommended by the university. Will need to talk to my supervisor to make sure there are no problems. You can purchase this chip for 2.30 Inc. VAT.

Next I will research code execution from external source.

Youtube example of code being run off a micro SD card using the Pyxis OS.

Mirco SD tutorial (USA). I have also found a UK distributor Oomlout, they sell the board for 11.26 Inc. VAT. The manufacturer also has code to drive the board with arduino.

Looking at the new components that I have to install the Arduino Uno might not be enough. I have now begun to look at the much larger Arduino ADK.

The choice to choose the ADK over the Mega2560 is because, in the future there may be the chance to create applications that will interface with my device and allow the user to make changes or receive data/alerts remotely.

Parts to be ordered by supervisor:
Two ENC28J60 Ethernet Module with SPI bus, PoE circuitry, 3.3V

Parts to be ordered by me:
Two Ethernet Controller Chip.
One Micro-SD Breakout Board

I finally have all the pieces to assemble my project. I will begin by getting the microsd board up, and running so that I can make sure that the snort program can be loaded and run from the microsd card.
I have currently run in to a problem with the initialisation of the microsd card, for some reason it is not being recognised.
I have checked the wiring, that the microsd was inserted properly. Research will have to be done to troubleshoot the issue.

After troubleshooting the problem, I have found that the connection from the pins to the microSD board was causing the problem. I managed to get a connection to the microSD. This was only temporary due to the connection issues, but now I know where the problem is.
--Current Configuration--

Due to limitations in the 8-bit Arduino platform, I have had to change to a new development environment with is based on a 32-bit architecture. The new platform Gumstix will allow me to install a lightweight linux distribution called Angstrom. This means that I can install Snort as I would, any other normal Linux program.
General Overview
COM Family Overo
Computing Requires any Gumstix Overo COM
LCD Signals  
Mounting Holes Four (4) x #0 mounting holes for extra secure mounting of any Overo COM
Four (4) x #4 mounting holes to secure this Palo35 inside a casing
Power 3.5V - 5V
Temperature Built with components rated -20< T <70C
Weight BRD30035 @ 28.3g
PKG30035 @ 63g (incl. shipping case)
Length 98.5 mm
Width 64 mm

Key Components
FT232RQ USB UART This converter provides a USB Console port from logic-level UART signals.
LIS33DE 3D Accelerometer from ST Micro.
Mating Connectors
2 x 70-pin connector 70-pin connector from AVX on Gumstix expansion board.
Other Connectors
Power Jack This power jack is the standard jack for all the 4.0V and 5.0V wall adapters sold at gumstix.com.
USB Mini-B Jack Overo series: USB console port for serial programming. Verdex Pro series: can be used as USB host or USB device.
USB Mini-AB Jack The Mini-AB USB connector allows either a USB mini-A or mini-B male plug. This lets allows a Gumstix system to operate in either Host or Device mode via USB OTG.
USB Mini-A Jack This Mini-A USB connector connects only with a USB mini-A male plug. This allows a Gumstix COM to operate as a USB Host.
2.0000X Low-profile, surface mount stereo audio jacks for 3.5mm plugs

Using this new platform will get rid of the need to use an external microSD card. The first step was to create a bootable microSD to run the OS from.


First, insert your microSd card into the development machine's flash card slot. You may need to use a microSD to SD card adapter or a USB card reader. Use the mount or df commands to determine the device name of SD card. Names such as /dev/mmcblk0p1 or /dev/sde1 are typical; /dev/sda is usually your computer's hard drive so be sure not to use this. A 2GB SD available at /dev/mmcblk0 is used as an example for this procedure; you'll need to adjust the commands to match your card. Unmount any mounted partitions of the attached device e.g.

$ sudo umount /dev/mmcblk0p1

Partitions versus Drives

In Linux, a physical block device such as a hard drive or an SD card appears in the '/dev' directory e.g. /dev/hda, /dev/sr0, or /dev/mmcblk1. This device file refers to the whole physical device. A single physical device can contain multiple individual partitions each with their own file system. These partitions also appear in the '/dev' directory under the same name but include a suffix e.g. /dev/mmcblk1p0 (partition #0 of physical device 'mmcblk1), /dev/sdf1 (partition #1 of physical device 'sdf'). Linux makes the file systems on these partitions available by 'mounting' them to a directory in the existing file system. For removable devices, such 'mount points' are traditionally found in the '/mnt' or '/media' directories.
Calculate Card Size

A special geometry is required to make best use of the underlying SD card memory and for data to be accessible by the Overo boot ROM. Calculate the required number of 'cylinders' for your particular card. Find the card size in first line of the response to this command:

$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 2016 MB, 2016411648 bytes

Divide the card size in bytes by 255 heads, 63 sectors and 512 bytes per sector and round down to the nearest integer. E.g. 2016411648/255/63/512 = 245.15 --> 245 cylinders.

Partition the Card

Gumstix COMs require at least two partitions: a FAT partition containing files needed to boot and a Linux partition on which the root file system for the operating system is stored. To start, we clean up any existing partition data e.g.

$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1024

The sfdisk tools can perform the required partitioning e.g.

$ sudo sfdisk --force -D -uS -H 255 -S 63 -C 245 /dev/mmcblk0

where the value of the -C parameter is the number of cylinders calculated in previous step. At the sfdisk, type 128,130944,0x0C,* and then press to set up a 64MB bootable FAT partition. Next, type 131072,,,- and press three more times to create the Linux partition and complete the partition table. When prompted to write this new partition table, type y to accept. An example session looks like this:

Checking that no-one is using this disk right now ...
Input in the following format; absent fields get a default value.
Usually you only need to specify  and  (and perhaps ).
/dev/mmcblk0p1 :128,130944,0x0C,*
/dev/mmcblk0p1   *       128    131071     130944   c  W95 FAT32 (LBA)
/dev/mmcblk0p2 :131072,,,-
/dev/mmcblk0p2        131072   3938303    3807232  83  Linux
/dev/mmcblk0p3 :
/dev/mmcblk0p3             0         -          0   0  Empty
/dev/mmcblk0p4 :
/dev/mmcblk0p4             0         -          0   0  Empty
New situation:
Units = sectors of 512 bytes, counting from 0
  Device Boot    Start       End   #sectors  Id  System
/dev/mmcblk0p1   *       128    131071     130944   c  W95 FAT32 (LBA)
/dev/mmcblk0p2        131072   3938303    3807232  83  Linux
/dev/mmcblk0p3             0         -          0   0  Empty
/dev/mmcblk0p4             0         -          0   0  Empty
Warning: partition 1 does not end at a cylinder boundary
Do you want to write this to disk? [ynq] y
Successfully wrote the new partition table


Formatting the New Partitions

Format the first partition as a FAT file system (the -n parameter gives it a label of boot).

$ sudo mkfs.vfat -F 32 /dev/mmcblk0p1 -n boot

Note: If your computer is missing the mkfs.vfat program, try installing the dosfsutils package and try again. E.g.

$ sudo apt-get install dosfsutils

Format the second partition for Linux (the -L parameter gives it a label of rootfs):

$ sudo mke2fs -j -L rootfs /dev/mmcblk0p2

Now, mount these partitions.

$ sudo mkdir /media/{boot,rootfs}
$ sudo mount -t vfat /dev/mmcblk0p1 /media/boot
$ sudo mount -t ext3 /dev/mmcblk0p2 /media/rootfs

Installing the Boot Files

The final step is to copy over the software that will run on your Gumstix COM. A matched set of the following files is required:

a root file system e.g. rootfs.tar.bz2
a kernel binary image e.g. uImage
a u-boot bootloader binary image e.g. u-boot.bin
a x-loader binary image e.g. MLO (Overo only) Use mlo-updated if using a STORM COM

Prebuilt image can be downloaded or found in the tmp/deploy directory of the OpenEmbedded build system.

Copy the binary files directly to the first partition: Note: Overo only. The x-loader binary must be copied first.

$ sudo cp MLO /media/boot/MLO overo only

For both Overo and verdex pro.

$ sudo cp u-boot.bin /media/boot/u-boot.bin
$ sudo cp uImage /media/boot/uImage

Expand the root file system archive on to the second partition:

$ sudo tar xaf roofs.tar.bz2 -C /media/rootfs
$ sync

Now, unmount these partitions and your card is ready to use:

$ sudo umount /media/boot
$ sudo umount /media/rootfs

After setting up the formatting for the microSD card, and adding the files for the Angstrom OS. I ran the OS to make sure that it all worked.



When I verified that the OS was running fine, I connected the board to my PC to make sure that I could connect over the console. To connect to the Gumstix console, you need a serial port, found on the tweener board or one of the console expansion boards. You will also need a null modem cable with appropriate connectors. Newer boards may have a built-in USB-to-serial chip and require only a USB cable.

Connecting with Kermit (Linux)

These directions are for the Kermit communications package (cKermit on Linux).

1. Connect a mini-B to standard-A cable between the CONSOLE port on the expansion board and a USB port on your PC (standard A). A green LED near the USB connector will illuminate. Do NOT connect power to the expansion board just yet.

If you have an older board, it may not have a direct USB connection. In this case connect the null-modem serial cable to the serial port on your computer and to the serial port on the Gumstix. For the console-vx board, use the middle port of the three present.

2. Launch kermit:

$ kermit -l /dev/ttyUSB0

where /dev/ttyUSB0 is the USB port you're using on the host computer. If you are using a serial cable, your serial port is likely /dev/ttyS0

3. Now set up the serial connection parameters and connect to the COM:

C-Kermit> take ~/gumstix/gumstix-oe/extras/kermit-setup
C-Kermit> connect

If you don't have the "kermit-setup" file, then you will need to set the serial settings manually:

$ kermit -l /dev/ttyUSB0
C-Kermit>set flow-control none
C-Kermit>set carrier-watch off 
C-Kermit>set speed 115200
Connecting to /dev/ttyUSB0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type 
the escape character followed by C to get back, or followed by ? to see other options.

If you want, you can put these commands in a file called .mykermrc in your home directory to have them run automatically each time.

set line /dev/ttyUSB0
set flow-control none
set carrier-watch off
set speed 115200

4. Connect to the port by typing connect

5. Plug the power adapter into any power jack on the Gumstix board stack. When connected and powered, you should see a message from U-boot followed by the normal Gumstix boot sequence:

Texas Instruments X-Loader 1.4.4ss (Oct 20 2010 - 10:10:28)
OMAP3530-GP ES3.1
Board revision: 0
Loading u-boot.bin from nand
U-Boot 2010.09 (Oct 20 2010 - 10:11:49)

OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 720 mHz
Gumstix Overo board + LPDDR/NAND
I2C:  ready
DRAM:  256 MiB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial Out:   serial Err:   serial Board revision: 0 Tranceiver detected on mmc2 No EEPROM on expansion board Die ID #6c7800040000000004037f680d02100c Net:   smc911x-0 Hit any key to stop autoboot:  0 I2C read: I/O error I2C read: I/O error No MMC card found Booting from nand ...
NAND read: device 0 offset 0x280000, size 0x400000 4194304 bytes read: OK ## Booting kernel from Legacy Image at 82000000 ...    Image Name:   Angstrom/2.6.34/overo    Image Type:   ARM Linux Kernel Image (uncompressed)    Data Size:    3160068 Bytes = 3 MiB    Load Address: 80008000    Entry Point:  80008000    Verifying Checksum ... OK    Loading Kernel Image ...

....More text here....

The Angstrom Distribution overo ttyS2 Angstrom 2008.1-test-20080911 overo ttyS2 overo login:

6. Log in for the first time with username root and password gumstix. If the password does not work, try leaving the password field blank. If that fails, try the password root. The password may differ from image to image.

7. When finished, you can return to the kermit prompt by typing [CTRL-\] then pressing c. Type quit to exit the program.

Note: If you see the boot messages, but are unable to enter the login info, it is very likely that you neglected to disable hardware flow control in your terminal emulator setup

Connecting with Minicom (Linux)

First, configure Minicom
As root, run minicom -s
Under "Serial Port Setup" choose the following
Serial Device: /dev/ttyS0 (edit to match your system as necessary)
Bps/Par/Bits: 115200 8N1
Hardware Flow Control: No (this is important)
Software Flow Control: No
Hit [ESC] until you return to the main configuration menu
Select "Save Setup as dfl" to save the default setup
Select "Exit from Minicom" to exit the program
Connect the serial cable to the serial port on your computer and the serial port on the Gumstix
Run Minicom again with minicom -o. This tells it to skip all the modem initialization strings, which are unnecessary when communicating with the Gumstix. You may need to do this as root if your normal login does not have permission to access the serial port.
Plug the power adapter into the power jack of the Gumstix. When connected and powered, you should see a message from U-boot followed by the normal Gumstix boot sequence in the minicom window.
Log in for the first time with username root and password gumstix
When finished, you can exit Minicom by typing [CTRL-A] then pressing Q. This exits without running the normal modem reset sequence, which will only send garbage to the Gumstix.

Connecting with Putty (windows)

1. First, plug in and power your Gumstix board (as above).

2. From Windows, you will need to find out which COM port on which your device will show. To do so, open the device manager. The fastest way to do this is via the Run dialog. Press Start->Run from your desktop or press Winkey->R from your keyboard. A small dialog box should pop up. Type in devmgmt.msc and then press enter.


3. Scroll through the device manager and expand the Ports section. When plugged in, your Gumstix board should show up. If unsure, you can unplug and replug the device.


4. Next, download Putty from here and run it. Set Putty to connect via Serial and set the speed to 115200. Make sure the COM port is set to exactly what you saw in the device manager.


5. Click on Open to connect to your device. You should now see a black box. Restart your Gumstix device by pressing the reset button. You should now see the bootup sequence.

6. Log in as in the Kermit tutorial.


After installing the Angstrom OS, found that the Ethernet jack was not being detected by the Linux OS. I will need to look in to this to find a solution.

According to the Gumstix wiki there are some known problems with the kernel and the Gumstix SPI interface.

I'm am going to look at getting the spidev generic drivers working, by modifying the Linux kernel.

Looking at the Gumstix cross compile guide

Attachment Timestamp Size