Connecting via Serial - Linux

Before programming anything else, let's connect the Gumstix to your existing Linux machine. You need a terminal program such as Minicom or Kermit.

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. You don't need a serial adapter to communicate with one of the following expansion boards: tweener, console-st, console-hw. For more detailed information about serial connections, see the Serial adapters and Serial voltages pages.



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

1. 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 with kermit -l /dev/ttyS0 where /dev/ttyS0 is the serial port you're using on the host computer. You may need to do this as root if regular users can't access the serial port. (Use kermit -l /dev/ttyUSB0, if you are using a USB-serial converter.)

3. The following configuration works when logging into the serial console: set speed 115200 set reliable fast set carrier-watch off set flow-control none set prefixing all Add the following if you need to transfer files to the Gumstix (for example, when Replacing the filesystem image) set file type bin set rec pack 4096 set send pack 4096 set window 5 If you are using a USB-serial converter you might need to add the following line in order to make the file transfer work: set transfer protocol zmodem {rz} {rz} {sz -w 10000 %s} {sz -w 10000 - a %s} {rz} {rz} Maybe you want to add all the lines in a file called .kermrc in order to avoid typing it everytime you access the gumstix.

You can add set line /dev/ttyS0 to .kermrc, but be warned that set line may fail silently. If kermit reports an error of "?SET SPEED has no effect without prior SET LINE" but .kermrc sets the line with set line /dev/ttyUSB0, the cause could be that the line is invalid. For example, if your Gumstix appears at /dev/ttyUSB0, but you connect to /dev/ttyUSB1, "set line" fails silently, and you get the error above. "Set line' may also fail because the device doesn't exist yet; USB devices are created when the device is plugged in.

4. Connect to the port by typing connect</tt>

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

6. Log in for the first time with username root and password gumstix

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

Kermit Connection script - MissPiggy
Put the following in a text document and save it. kermit -l /dev/ttyS1 set speed 115200 set reliable fast set carrier-watch off set flow-control none set prefixing all set file type bin set rec pack 4096 set send pack 4096 set window 5 connect
 * 1) !/usr/bin/kermit +

Next, use the following to make the MissPiggy script executable: chmod +x MissPiggy

Lastly, use the following command to automatically connect using the script: ./MissPiggy

Connecting with Minicom

 * 1) First, configure Minicom
 * 2) As root, run minicom -s</tt>
 * 3) Under "Serial Port Setup" choose the following
 * 4) * Serial Device: /dev/ttyS0 (edit to match your system as necessary)
 * 5) * Bps/Par/Bits: 115200 8N1
 * 6) * Hardware Flow Control: No (this is important)
 * 7) * Software Flow Control: No
 * 8) Hit [ESC] until you return to the main configuration menu
 * 9) Select "Save Setup as dfl" to save the default setup
 * 10) Select "Exit from Minicom" to exit the program
 * 11) Connect the serial cable to the serial port on your computer and to the serial port on the Gumstix
 * 12) Run Minicom again with minicom -o</tt>.  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.
 * 13) 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.
 * 14) Log in for the first time with username root and password gumstix
 * 15) 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

Transferring files
To send a file to the Gumstix:
 * 1) Run 'rz' on the Gumstix. No parameters are needed, generally.
 * 2) From the terminal, send a file using ZModem. In Minicom, this is done with [Ctrl-A] and then S, which brings up a file selection dialog.

To receive a file from the Gumstix:
 * 1) Transmit the file(s) using 'sz', specifying them as arguments.
 * 2) The terminal, ideally, will detect and accept the transfer automatically.

If the transfer does nothing, or if you encounter a "Failure executing protocol" error, while trying to send a file with Zmodem under minicom, you should install a Y/Z modem. On debian based systems, such as ubuntu, run the following command
 * 1) apt-get install lrzsz