Running processes with proccontrol

From University of Washington - Ubicomp Research Page
Revision as of 17:42, 23 July 2008 by Ryan Libby (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The MSB has a MiniSD card slot. The card in this slot is automatically mounted at /mnt/mmc when the MSP (MSB stacked on IMote2) is booted. An init script (/etc/init.d/S80msp) invokes /mnt/mmc/msp/central.loop and /mnt/mmc/msp/proccontrol.loop. The latter, together with /mnt/mmc/msp/process.ini is the hook for automatically running sensor-data-processing-related software.

process.ini describes which commands should be run automatically. Programs that crash or otherwise terminate will be restarted, ad infinitum.

process.ini format and example

The following is a typical process.ini. Note that there is a symlink from /msp to /mnt/mmc/msp.

# module_name group_name requested_state watch_heartbeats command_line
msb-server      msb     1 0 /msp/msb-server -ini /msp/msb.ini
lsb-server      lsb     1 0 /msp/lsb-server -ini /msp/lsb.ini
bt-listener     bt      1 0 /msp/bt-listener -channel 2
bt-commander    bt      1 0 /msp/bt-commander
#logger         msb     1 0 /msp/logger -ini /msp/logger.ini
servo-server    lsb     1 0 /msp/servo-server -ini /msp/servo.ini
gps-server      lsb     1 0 /msp/gps-server
#imu            imu     1 0 /msp/imu -ini /msp/imu.ini
inference       ai      1 0 /msp/inference -xml /msp/peak_detection.xml -bt2 60

Fields are whitespace-delimited. Lines are delimited by the line feed character ('\n', ASCII 0x0a). '#' starts a comment.

command_line is the critical piece. Unless you're actually using the remote proccontrol features, just make something up for the names and leave requested_state at 1 (running) and watch_heartbeats at 0 (no).

The minimum set of processes for step detection is msb-server, inference, and bt-listener.