Bits and Pieces for Developing with Fishnet
Instructional Linux Servers for Development
- blackbox02
- blackbox03
- blackbox04
- blackbox05
Basic Unix Information
There are two options for getting information about Unix programs and
standard C functions.
- man displays manual pages that describe the
functionality and usage of Unix programs and C functions. Type man
man to find out how to use man.
- info displays Information pages about Unix programs and
C functions. Type info info to learn how to use this tool.
Manipulating the Fishnet Distribution
The most recent Fishnet distribution can be found by following links
of the class webpage http://www.cs.washington.edu/461.
You can unpack the distribution using the tar command.
Compiling Your Code
Add your main file, e.g. hw1.c, into the same directory as the Fishnet
distribution.
- To compile for the Linux instructional machines, just type make
hw1.
- The provided makefile enables you to compile the same source tree for
the iPaq. To do this:
- Set the environment path in one of your xterms to:
export PATH=/usr/local/arm/2.95.3/bin:/usr/local/arm/2.95.3/arm-linux/bin:$PATH
- Type make ARM=1 hw1.
- To determine if an executable was compiled for Linux (x86) or the iPaq, run file (executable).
Working with the iPaqs
- It may be necessary to recalibrate your iPaq X configuration. Run:
xcalibrate -cal -94 337 -70 255 0.
- To learn the name of the iPaq, type hostname. This
should return mobile###.
- The iPaq networking runs in two different modes: adhoc and
managed. Adhoc mode causes iPaqs to talk directly to each other,
without the use of a base station; managed mode causes iPaqs to talk
through the base station and allows them to access the Internet.
- To switch to adhoc mode, type cardctl scheme adhoc.
- To switch to managed mode, type cardctl scheme managed.
- To get files to the iPaq, set the iPaq into managed mode and
scp the file to it.
From a Linux machine, run scp (file) root@mobile###.dyn.cs.washington.edu
and enter the root password when prompted.
To Talk to the iPaq using the Serial Connection
- In Windows, use hyperterminal.
- In Linux, use minicom.
- Set the configuration parameters to a speed of 1152000, parity 8N1,
and no hardware flow control.
- In minicom, be sure to change the 'Modem and dialing parameters' to be
empty; minicom should not send any string sequences to the iPaq.
Producing Sounds on iPAQ
- Use the system() function in <stdlib.h> to cat a dsp
file to /dev/dsp. (Use the man pages for more info.)
- For example, system("cat endoftheworld > /dev/dsp")
plays endoftheworld.
Getting Core Files when Segfaults Occur
- You should get core files when segfaults occur on the linux instructional
servers. However, if you don't, try the following commands:
- limit coredumpsize 4194303 # for csh/tcsh
- ulimit -c 4194303 # for bash/sh
Debugging your program
- You may also wish to use gdb to debug your program. To run it, type "gdb
<executable-name>".
- Type "man gdb" in a shell to get more info e.g. how to use gdb
with your core files.
Additional information
The system administrator, Brian Youngstrom, also maintains a FAQ for
the iPaqs. If you question isn't answered here, it might be there:
http://www.cs.washington.edu/homes/byoung/ipaq.html