Gumstix 2
Connecting
Initial set up
There were quite a few things that had to be done to get the gumstix to work on the dgc3 machine. Here is a list of how I did it.
Visit gumstix wiki
On the gumstix wiki (a.k.a., waysmall), there is an order of how you do it. First, you connect via the serial interface, using minicom, and then you configure the device so that it communicates via the USB gadget. Once that is set up, you can use SSH, etc.
Setting up the serial interface
Notes from http://docwiki.gumstix.org/Connecting_via_Serial_-_Linux#Connecting_with_Minicom
- First, configure Minicom
$ minicom -s
- Under "Serial Port Setup" choose the following
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 to 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 doesn't 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
rootand passwordgumstix
Using Serial interface to allow TCP/IP connectivity
Notes from http://docwiki.gumstix.org/Setting_up_USBnet
Since the dgc3 computer is fairly new, it has all the kernel modules we needed. Thus, we just had to type
$ modprobe usbnet
Since we want this to work again, we go ahead and add this module to the bootup script. dgc3 is a Debian/Kubuntu machine, so our strategy for that is
$ sudo su -
Password:
[root@dgc3.eecs.berkeley.edu]
$ sudo echo "usbnet" >> /etc/modules
$ exit
[sprinkle@dgc3.eecs.berkeley.edu]
$ grep usbnet /etc/modules
usbnet
$
Note that there's no substitute for becoming root to concat this to the end of the file, unless you sudo to add the content to the end. Your choice.
Next, we will test to ensure that the connection is really there.
$ ifconfig usb0 192.168.0.2
$ ifconfig usb0 192.168.0.1
$ ssh root@192.168.0.1
Password:
Welcome to Gumstix!
By default, this gumstix is configured for MMC support.
Unfortunately, this means Compact Flash support has to be
disabled out of the box. To turn off MMC and turn on CF,
edit the file /etc/modules and comment out or delete the MMC
lines; then rename /etc/init.d/s30pcmcia to /etc/init.d/S30pcmcia
and reboot.
Setting the IP address
OK, so, now we have a usb connection between the two machines, but how to keep this automatic and real? Well, first we preserve this IP address, since we are not running a dhcpd server on dgc3.
auto usb0
#iface usb0 inet dhcp
iface usb0 inet static
address 192.168.0.2
netmask 255.255.255.0
pre-up /sbin/modprobe g_ether;/sbin/modprobe af_packet
post-down /sbin/modprobe -r g_ether
...
Now, we make it easy to know who our 'host' is.
Meanwhile, back on the host computer,
auto usb0
#iface usb0 inet dhcp
iface usb0 inet static
address 192.168.0.1
# not sure whether we'll need these or not...
# netmask 255.255.255.0
# pre-up /sbin/modprobe usbnet
# post-down /sbin/modprobe -r usbnet
...
192.168.0.2 gumstix2
...