Project journal

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.
VS

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.

08/04/12
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--

27/04/12
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.

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.

Setup

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:

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:

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:

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.

30/05/12

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.