MSP System Software
msb-server
- msp/src/msb/msb-main.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
The msb-server is a program which interfaces with the MSB via the serial port and handles logging of uwar files and transmission of the sensor data over IPC and other shared memory mechanisms. msb-server was written by Dirk Hähnel of Intel Research Seattle.
usage
Typical Usage
msb-server -ini msb.ini
where msb.ini will typically contain:
#Desktops should use the USB device #SERIAL_DEVICE /dev/ttyUSB1 #the iMote2 uses ttyS0 only SERIAL_DEVICE /dev/ttyS0 BAUD_RATE 921600 HARDWARE_FLOW_CONTROL 0 SOFTWARE_FLOW_CONTROL 0 USE_RTC 1 SCHEDULE_INTERRUPT_COUNT 5120 SCHEDULE_MIC 8192 SCHEDULE_ACCELEROMETER 5120 SCHEDULE_AMB_LIGHT 2560 SCHEDULE_BAROMETER 71 SCHEDULE_DALS 30 SCHEDULE_HUMIDITY 10 SCHEDULE_POWER 0 MIC_GAIN 64 LOG_FILE test.uwar LOG_START 1
Available Commands
-
In addition the msb-server also supports the following switch commands:
-ipc-publish-data publish the converted data via IPC -ipc-publish-raw publish the raw sensor data via IPC -ipc-publish-stream stream serial data via ipc -shm-publish-stream stream serial data via shared memory -ipc-publish-mic publish microphone packets -sync-rtc -show-rtc -set-rtc -use-rtc -log specify a file to log data to, see -max-size and -max-time for log rotation settings -log-type specify the type of data to log: uwar serial data is stored as packets in a uwar file stream serial data is written directly to a file -max-size maximum size of the uwar file before rotating the log file (in kilobytes) -max-time maximum time between file rotations
msb.ini
-
msb.ini specifies which serial port the MSB is attached to, the serial port settings, the schedule, and other miscellaneous options.
The schedule is set of sampling rates for each sensor, in number of samples per ten seconds. The microphone sampling rate is the one exception; it's specified in the number of samples per second. Setting a sensor to 0 samples per ten seconds causes the sensor to turn off. Each sensor has its own maximum sampling rate (and some have minimum sampling rates), but due to the tight timing constraints of the MSB, the sampling rate of one sensor can affect many others. To create a schedule that will work on the MSB, use this Excel spreadsheet. The MSB will reject any schedule it cannot meet and return the best schedule it can handle.
The available options you can set in msb.ini are:
Option | Description |
---|---|
SERIAL_DEVICE | Specifies the serial port the MSB is attached to. This should be /dev/ttyS0 on the MSP. |
BAUD_RATE | The baud rate the MSB communicates at. This should be 921600. |
HARDWARE_FLOW_CONTROL | If set to 1, enables hardware flow control. This should be enabled. |
SOFTWARE_FLOW_CONTROL | If set to 1, enables software flow control. This should not be set. |
SCHEDULE_INTERRUPT_COUNT | The number of timer interrupts per ten seconds on the MSB. This is effectively the upper sampling rate of every sensor except the microphone. This is usually set to maximum allowed value, 5120. |
SCHEDULE_AMB_LIGHT | The number of ambient light sensor samples per ten seconds. This is usually set to 1280. |
SCHEDULE_COMPASS | The number of compass samples per ten seconds. This should be set to 0 on all modern MSBs. |
SCHEDULE_BAROMETER | The number of barometer samples per ten seconds. This is usually set to 71. |
SCHEDULE_DALS | The number of dual ambient light sensor samples per ten seconds. This is usually set to 30. |
SCHEDULE_HUMIDITY | The number of humidity sensor samples per ten seconds. This is usually set to 10. |
SCHEDULE_POWER | The bit field of power-saving options. For a description of what each bit means, see Power Control Bits. Note: Enabling power-saving for a sensor will reduce the maximum sampling rate of that sensor. |
MIC_GAIN | The microphone gain. 0 is the least gain, and 255 is the most gain. This is usually set to 128. |
LOG_FILE | Specifies the initial log file name used when writing a log. Not used with logger. |
LOG_TYPE | Sets the log type. This can either be "uwar" or "stream". Not used with logger. |
LOG_START | If set to 1, enables log writing. Not used with logger. |
LOG_MAX_TIME | Maximum elapsed time per log file, in seconds. Not used with logger. |
LOG_MAX_TIME | Maximum log file size, in kilobytes. Not used with logger. |
EXEC_LOG_FILE | Specifies the initial execution log file name when writing an execution log (the output that's sent to the console). |
EXEC_LOG_START | If set to 1, writes an execution log. Not normally used, except when debugging. |
USE_IPC | If set to 1, enables IPC. By itself, this configures the msb-server to listen for all IPC messages and publish the schedule and calibration. This is usually enabled. |
IPC_PUBLISH_DATA | If set to 1, publishes sensor data over IPC. Not normally set. |
IPC_PUBLISH_RAW | If set to 1, publishes raw sensor data over IPC. Not normally set. |
IPC_PUBLISH_STREAM | If set to 1, publishes the raw serial port data stream over IPC. Not normally set. |
IPC_PUBLISH_MIC | If set to 1, publishes microphone samples over IPC. Not normally set. |
SHM_PUBLISH_STREAM | If set to 1, publishes the raw serial port data stream over shared memory. This should be set to 1 if using logger. |
USE_RTC | If set to 1, enables reading and setting of the MSB's real-time clock. Not normally set. |
CHANGE_SYSTEM_TIME | If set to 1, sets the system clock to the MSB's real-time clock. Not normally set. |
PACKET_INTERVAL_IN_MS | Time interval between IPC publications. Not normally set, but defaults to 100 internally. |
GPS_ENABLE | If set to 1, drives the GPS enable line high (pin 3 of P1). |
ACCEL_RANGE | Sets the accelerometer range to either +/-2g or +/-6g. Valid options are 2 or 6. Defaults to 2. |
example output
-
Typically the msb-server will output something similar to the following. Where the final received stats will continue until the program is terminated or an error occurs.
./msb-server -ini ./msb.ini -ipc-publish-data # INFO: ******************************** # INFO: *********** MSB ************ # INFO: ******************************** # INFO: read ini file ./msb.ini # INFO: initialize data structures # INFO: allocate data messages # INFO: IPC for Mobile Sensing Platform Toolkit (Ver. 1.0.0) # INFO: set device: # INFO: port = /dev/ttyUSB1 # INFO: baud = 921600 # INFO: params = 8N1 # INFO: send reset command # INFO: --------------------- # INFO: send cease command ... done # INFO: send rtc query command to MSB # INFO: current msb time = 2065-25-45 45:85:85! # INFO: change system time to RTC! # INFO: set system time failed! # INFO: send calibration query command to MSB # INFO: ---- calibration ---- # INFO: board nr = b # INFO: hardware version nr = 2 # INFO: major soft version = 1 # INFO: minor soft version = 1 # INFO: calibration word 1 = 48224 # INFO: calibration word 2 = 47962 # INFO: calibration word 3 = 28705 # INFO: calibration word 4 = 44956 # INFO: calibration val c1 = 24112 # INFO: calibration val c2 = 2140 # INFO: calibration val c3 = 702 # INFO: calibration val c4 = 448 # INFO: calibration val c5 = 749 # INFO: calibration val c6 = 26 # INFO: send schedule query command to MSB # INFO: --- USER REQUEST --- # INFO: ------ schedule ----- # INFO: interrupt count = 5120 # INFO: mic hz = 8192 # INFO: accelerometer hz = 512.0 # INFO: amb light hz = 256.0 # INFO: barometer hz = 7.1 # INFO: compass hz = 0.0 # INFO: dals hz = 3.0 # INFO: humidity hz = 1.0 # INFO: power = 0 # INFO: microphone gain = 255 # INFO: send schedule query command to MSB # INFO: --- NEW SETTINGS --- # INFO: ------ schedule ----- # INFO: interrupt count = 5120 # INFO: mic hz = 8192 # INFO: accelerometer hz = 512.0 # INFO: amb light hz = 256.0 # INFO: barometer hz = 7.1 # INFO: compass hz = 0.0 # INFO: dals hz = 3.0 # INFO: humidity hz = 1.0 # INFO: power = 0 # INFO: microphone gain = 255 # INFO: ------ schedule ----- # INFO: interrupt count = 5120 # INFO: mic hz = 8192 # INFO: accelerometer hz = 512.0 # INFO: amb light hz = 256.0 # INFO: barometer hz = 7.1 # INFO: compass hz = 0.0 # INFO: dals hz = 3.0 # INFO: humidity hz = 1.0 # INFO: power = 0 # INFO: microphone gain = 255 # INFO: ------- log ------- # INFO: open log-file file test-0002.uwar [test-0002.uwar] # INFO: write header to log file ... => 967903080 done # INFO: log-max-size: 4 Mbytes # INFO: log-max-time: 5.00 minutes # INFO: ------- start ------- # INFO: send init command to MSB # INFO: 2.40 kbits/sec (0 crc of 9 packets) # INFO: 234.95 kbits/sec (0 crc of 169 packets) # INFO: 221.89 kbits/sec (0 crc of 321 packets) # INFO: unknown packet type 0xb4 # INFO: 221.89 kbits/sec (0 crc of 473 packets) ...
msb-test
- msp/src/msb/msb-test.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
msb-test is a program that lets you exercise the various functions of the MSB, including reporting sensor data. IPC publishing must be enabled on the msb-server for msb-test to work. msb-test was written by Dirk Hähnel of Intel Research Seattle.
usage
Typical Usage
msb-test -show
Available Commands
-
msb-test supports the following switch commands:
-led <color> <on/off> set led with color 'blue, green, or red' to value 'on' or 'off' -triled <color> <on/off> set led in the tricolor LED with color 'blue, green, or red' to value 'on' or 'off' -lightshow start LED test -reset reset MSB -show-power show power messages -show show sensor readings -state <state> sets state, which can be 'cease', 'start', 'query-led', 'query-schedule', 'query-calib', or 'reconnect' -schedule-info print current schedule information -calibration-info print current calibration information -shm print SHM stream bytes -stream print IPC stream data rate
lsb-server
- msp/src/lsb/lsb-main.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
The lsb-server is a program which interfaces with the LSB via the serial port and handles transmission of the sensor data over IPC and other shared memory mechanisms. Unlike msb-server, it cannot write UWAR files directly.
usage
Typical Usage
lsb-server -ini lsb.ini
where lsb.ini will typically contain:
SERIAL_DEVICE /dev/ttyS2 BAUD_RATE 921600 HARDWARE_FLOW_CONTROL 0 SCHEDULE_INTERRUPT_COUNT 5120 SCHEDULE_GYRO 640 SCHEDULE_MAGNETOMETER 320 IPC_PUBLISH_STREAM 0 SHM_PUBLISH_STREAM 1
Available Commands
-
In addition the lsb-server also supports the following switch commands:
-sync-rtc Set the system time with the RTC on the LSB (LSB RTC --> System Time) -show-rtc Retrieve the RTC time from the LSB -set-to-rtc Set the LSB RTC with the time specified in the following format: year-month-day hour:min:seconds (e.g. 2007-1-1 2:32:01) -use-rtc
lsb.ini
-
lsb.ini specifies which serial port the LSB is attached to, the serial port settings, the schedule, and other miscellaneous options.
The schedule is set of sampling rates for each sensor, in number of samples per ten seconds. Setting a sensor to 0 samples per ten seconds causes the sensor to turn off. Each sensor has its own maximum sampling rate. The LSB will reject any schedule it cannot meet and return the best schedule it can handle.
The available options you can set in msb.ini are:
Option | Description |
---|---|
SERIAL_DEVICE | Specifies the serial port the LSB is attached to. This should be /dev/ttyS2 on the MSP. |
BAUD_RATE | The baud rate the LSB communicates at. This should be 921600. |
HARDWARE_FLOW_CONTROL | If set to 1, enables hardware flow control. This should be not be enabled, as there is no hardware support for it. |
SOFTWARE_FLOW_CONTROL | If set to 1, enables software flow control. This should not be set. |
UART1_BAUD_RATE | Sets the baud rate of the pass-through UART on the LSB. Used only when another serial device is attached to the LSB, such as a GPS module. |
UART1_CFGDATA_FILENAME | When set, lsb-server reads this file and sends the contents to the pass-through UART on the LSB. Used only when another serial device is attached to the LSB, such as a GPS module. Commonly this is used to send initialization commands to a GPS module or other serial device. |
SCHEDULE_INTERRUPT_COUNT | The number of timer interrupts per ten seconds on the LSB. This is effectively the upper sampling rate of every sensor. This is usually set to maximum allowed value, 5120. |
SCHEDULE_GYRO | The number of gyroscope samples per ten seconds. This is usually set to 640. |
SCHEDULE_MAGNETOMETER | The number of magnetometer samples per ten seconds. This is usually set to 320. |
SCHEDULE_POWER | The bit field of power-saving options. This is reserved for future use, and should not be set. |
IPC_PUBLISH_STREAM | If set to 1, publishes sensor data over IPC. Despite the name, this is not actually a byte stream, but individual sensor messages. Not normally set. |
SHM_PUBLISH_STREAM | If set to 1, publishes the sensor data stream over shared memory. The format of the data is identical to the LSB protocol. This should be set to 1 if using logger. |
SHM_PUBLISH_STREAM_SIRF_GPS | If set to 1, publishes the data sent to the pass-through UART over shared memory. This should be set to 1 if using logger and have another serial device connected to the LSB. |
PACKET_INTERVAL_IN_MS | Time interval between IPC publications. This should be set to 100 or smaller if using IPC. |
GPS_ENABLE | If set to 1, drives the GPS enable line high (pin 6 of P2). |
USB_ENABLE | If set to 1, enables +5v on the USB port. |
lsb-test
- msp/src/msb/lsb-test.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
lsb-test is a program that lets you exercise the various functions of the MSB, including reporting sensor data. IPC publishing must be enabled on the lsb-server for lsb-test to work. lsb-test was written by Dirk Hähnel of Intel Research Seattle.
usage
Typical Usage
lsb-test -show-gyro -show-magnetometer -show-power
Available Commands
-
lsb-test supports the following switch commands:
-led <color> <on/off> set led with color 'blue, green, or red' to value 'on' or 'off' -lightshow start LED test -reset reset LSB -show-power show power messages -show-gyro show gyro readings -show-magnetometer show magnetometer readings -show-stream show data stream statistics -show-uart show pass-through UART bytes received -state <state> sets state, which can be 'cease', 'start', 'query-led', 'query-schedule', 'query-calib', or 'reconnect'
cam-server
- msp/src/camera/cam-server.c
- linux download (xscale)
cam-server is a program that captures an image using an OV9650 CMOS camera attached to the LSB. Images are captured once a second and compressed using JPEG, using a quality setting of 80 (using the IJG's algorithm to modify the quantization tables, adjustable in the source), and then sent over shared memory to logger and/or cam-net-stream application.
/dev/camera must exist and point to the ov9650 driver for cam-server to work. To create /dev/camera, insmod ov9650.ko, cat /proc/devices to see which major device number it was assigned, and mknod /dev/camera c <major number> 0.
The time the image is captured is stored as a suggested file name in a comment in the JPEG data stream. The file name is <number of milliseconds since the UNIX epoch>.jpg.
usage
Command line format
cam-servercam-server has no options.
gps-server
- msp/src/new-gps/gps-server.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
The gps-server is a program which interfaces with a GPS unit via the serial port, optionally sends some initialization data to the GPS unit, and publishes the GPS data stream over shared memory. This program is designed to replace lsb-server when only a GPS unit is used instead of an LSB. This program produces no output.
usage
Command line format
gps-server <gps serial port> <baud rate> [initialization data file]
Typical Usage
gps-server /dev/ttyS0 38400 enableDGPS.bin
gps-debug
- msp/src/gps-debug/gps-debug.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
The gps-debug is a program monitors the GPS data stream, prints out verbose status information about the GPS unit, and sets the tri-color LED on the MSB to indicate the GPS status. This program only works with SiRF GPS modules using the binary protocol. The debugging output is useful only if you have some knowledge of the SiRF binary protocol and how GPS works.
usage
Command line format
gps-debuggps-debug has no options.
LED colors
Color | Status |
---|---|
Blinking Red | No recent communication with the GPS unit. |
Red | Communication OK, but no GPS lock |
Cyan | 2D GPS Lock |
Green | 3D GPS lock |
Blue | Dead-reckoning |
Example output
Measured Tracking Data: GPS Week: 416 ToW: 428330.00 s Chans: 12 SVid: 8 Azimuth: 99.0 Elev.: 69.0 Flags: ACQ-OK ICPV BITSYNC SUBSYNC PULLIN CODELOCK EPH-AVAIL SVid: 28 Azimuth: 276.0 Elev.: 80.5 Flags: ACQ-OK ICPV BITSYNC SUBSYNC PULLIN CODELOCK EPH-AVAIL SVid: 25 Azimuth: 118.5 Elev.: 22.0 Flags: ACQ-OK ICPV BITSYNC SUBSYNC PULLIN CODELOCK EPH-AVAIL SVid: 27 Azimuth: 115.5 Elev.: 44.5 Flags: ACQ-OK ICPV BITSYNC SUBSYNC PULLIN CODELOCK EPH-AVAIL SVid: 11 Azimuth: 99.0 Elev.: 17.5 Flags: ACQ-OK ICPV BITSYNC SUBSYNC PULLIN CODELOCK SVid: 17 Azimuth: 183.0 Elev.: 29.5 Flags: ACQ-OK ICPV BITSYNC SUBSYNC PULLIN CODELOCK EPH-AVAIL SVid: 19 Azimuth: 43.5 Elev.: 21.0 Flags: ACQ-OK ICPV BITSYNC SUBSYNC PULLIN CODELOCK SVid: 0 Azimuth: 0.0 Elev.: 0.0 Flags: SVid: 29 Azimuth: 289.5 Elev.: 47.5 Flags: ACQ-OK BITSYNC SUBSYNC CODELOCK SVid: 0 Azimuth: 0.0 Elev.: 0.0 Flags: SVid: 0 Azimuth: 0.0 Elev.: 0.0 Flags: SVid: 0 Azimuth: 0.0 Elev.: 0.0 Flags: Measured Navigation Data: X: -2300370 m Y: -3638057 m Z: 4691023 m X vel.: 8191.375 Y vel.: 0.000 Z vel.: 8191.625 Flags: ALTMODE0 GPS-ONLY-NAV VALIDATED ALTHOLD Pos. Mode: >3-SV solution (Kalman filter) HDOP: 4.4 GPS Week: 416 ToW: 428339.00 s SVs: 5 Clock Status GPS Week: 1440 ToW: 428339.00 s SVs: 5 Drift: 93940 Hz Bias: 4747521 ns Est. Time: 428338999 ms
cam-net-stream
- msp/src/cam-net-stream/cam-net-stream.c
- linux download (xscale)
cam-net-stream is a program that sends a stream of JPEG images captured by cam-server over any available TCP/IP connection with sufficient bandwidth, such as WiFi, Bluetooth, or USB. cam-net-stream listens for an incoming connection on a TCP port you specify, and begins sending JPEG images once connected. Only one connection may exist at a time.
Before each JPEG image, the image length is sent as a four-byte, little-endian integer. Thus, the data stream looks like:
Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 -- Length + 3 | Byte n | Byte n + 1 | Byte n + 2 | Byte n + 3 | Byte n + 4 -- Byte n + 3 + Length |
---|---|---|---|---|---|---|---|---|---|
Length | JPEG Data | Length | JPEG DATA |
usage
Command line format
cam-net-stream <port>
audio-stream
- msp/src/audio-stream/audio-stream.c
- linux download (xscale)
audio-stream is a program that sends a stream of audio samples captured by msb-server over any available TCP/IP connection with sufficient bandwidth, such as WiFi, Bluetooth, or USB. audio-stream listens for an incoming connection on a TCP port you specify, and begins sending samples once connected. Only one connection may exist at a time.
The audio data format is identical to the sample format in the MSB protocol.
usage
Command line format
audio-stream <port>
logger
- msp/src/logger/logger.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
The logger is a program which integrates MSB, LSB, GPS, and Camera data into a single UWAR stream. It must be used if you're collecting data in the UWAR format with anything but the MSB.
usage
Typical Usage
logger -ini logger.ini
where msb.ini will typically contain:
LOG_FILE /mnt/mmc/msp-data/log.uwar LOG_TYPE uwar # LOG_SIRF_GPS 1 LOG_LSB 1 LOG_MSB2 1 LOG_CAMERA 1 # LOG_MIC 1 # USE_SHM_MSB 1 USE_SHM_LSB 1 USE_SHM_SIRF_GPS 1 USE_IPC 0 # LOG_MAX_SIZE_KB 15000
Available Commands
-
In addition the msb-server also supports the following switch commands:
-ini specifies the configuration file to use
logger.ini
-
logger.ini specifies which sensor streams to log, what type of log to create, how big each log file should be, and other miscellaneous options.
The available options you can set in logger.ini are:
Option | Description |
---|---|
LOG_FILE | Specifies the initial log file name used when writing a log. Defaults to "msp-log-%d-%t". |
LOG_TYPE | Sets the log type. This can either be "uwar" or "stream". Defaults to uwar. |
LOG_ON_START | If set to 1, enables log writing on startup. Defaults to 1. |
LOG_MAX_TIME | Maximum elapsed time per log file, in seconds. Defaults to 3600. |
LOG_MAX_SIZE | Maximum log file size, in kilobytes. Defaults to 20 MB. |
USE_IPC | If set to 1, enables listening for IPC messages. Must be enabled if LOG_POWER, USE_POWER, USE_LEDS is enabled. |
LOG_MSB2 | If set to 1, logs MSB2 sensor data, excluding the microphone. If set, USE_SHM_MSB must also be set. |
LOG_MIC | If set to 1, logs micrphone data. If set, USE_SHM_MSB must also be set. |
LOG_LSB | If set to 1, logs LSB sensor data. If set, USE_SHM_LSB must also be set. |
LOG_SIRF_GPS | If set to 1, logs the GPS byte stream. If set, USE_SHM_GPS must also be set. |
LOG_CAMERA | If set to 1, logs the camera image stream. |
LOG_POWER | If set to 1, logs battery and system voltage levels, plus the charging status. If set, USE_IPC must also be set. |
USE_SHM_MSB | If set to 1, the MSB shared memory data stream is parsed. Must be set if LOG_MSB2 or LOG_MIC is set. |
USE_SHM_LSB | If set to 1, the LSB shared memory data stream is parsed. If set, LOG_LSB must be set. |
USE_LED | If set to 1, updates the MSB's LEDs to reflect the logging status. If set, USE_IPC must also be set. |
USE_POWER | If set to 1, logs data only when the unit is not charging. Do not use with two batteries. |
central
- msp/src/ipc/central.c
- linux download (xscale)
- linux download (x86)
- windows download
central is the server for the IPC (Inter Process Communications) package developed by Reid Simmons. IPC provides a simple means of communicating between applications on the same computer and other machines via TCP/IP. Central is used by the msb-server and several other applications to share information. More information about IPC can be found at the projects homepage.
usage
Typical Usage
-
Spawn central and send it to the background
central -u &
Note, that only 1 copy of central can be run at one time. If you want to run multiple central's (see the -p argument below) or access central running on another machine you will need to export the CENTRALHOST variable: <bash># If you want to use another port export CENTRALHOST=localhost:1234
- If you want to connect to another machine
export CENTRALHOST=othermachine </bash>
Available Commands
-
Various debugging/logging capabilities are also available if necessary. Remember to have a process cat the .log file that central creates.
The following are central commands: help: print this message display: display the active and pending messages status: display the known modules and their status memory: display total memory usage close <module>: close a connection to a module unlock <resource>: unlock a locked resource The following command line options can also be used as commands: -v: display server version information -l<option>: logging onto terminal. Options are: m (message traffic) s (status of IPC) t (time messages are received by central) d (data associated with messages) i (ignore logging certain internal messages) h (handle time summary of incoming messages) r (log the reference ID as well as the message name) p (log the reference ID of the message’s parent) x (no logging) -l (no options) is equivalent to -lmstdh; the default is –lmsi -L<option>: logging into file. Options are the same as above, with the addition of F (don’t flush file after each line) n (don’t prompt user for comments) The default is –Lx -f<filename>: filename to use for logging; If not specified, name is automatically generated. -p<port>: connect to central server on this port number. -c: Use direct (not via central) connections when possible -I<msgName>: Ignore logging this message (can occur multiple times). -I<filename>: File with names of messages to ignore logging -s: silent running; don’t print anything to terminal. -u: don’t run the user (tty) interface. -r: try resending non-completed messages when modules crash and then reconnect.
example output
-
central typically does not output anything to the console unless an error occurs.
proccontrol
- msp/src/proccontrol/proccontrol.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
proccontrol is a program which launches and monitors all of the other processes involved in the MSP data collection. proccontrol can be controlled via IPC to start and stop processes. Additionally, it can listen for heartbeat messages over IPC to detect hung processes, and publish a list of process states.
usage
Typical Usage
proccontrol process.ini
where process.ini will typically contain:
msb-server msb 1 0 /msp/msb-server -ini /msp/msb.ini #lsb-server lsb 1 0 /msp/lsb-server.loop #gps-server gps 1 0 /msp/gps-server /dev/ttyS2 38400 /msp/enableDGPS.bin logger logger 1 0 /msp/logger -ini /msp/logger.ini #gps-debug gps 1 0 /msp/gps-debug > /dev/null #cam-server camera 1 0 /msp/cam-server.loop
The file name is optional. If left unspecified, it will default to process.ini.
process.ini
-
process.ini specifies which processes to run and monitor. Each line of process.ini specifies a process, except for comments, which begin with #. The format of each line is:
<process name> <process group> <startup state> <heartbeat flag> <command line>
If the startup state is 1, the process will be started as soon as proccontrol does. Otherwise, the proccontrol will wait to start it until instructed to via IPC. If the heartbeat flag is non-zero, proccontrol will listen for heartbeat IPC messages from the process, and restart the process if a heartbeat hasn't been sent for two seconds.
sb-update
- msp/src/sb-update/sb-update.c
- linux download (xscale)
- linux download (x86)
- currently not available for windows
sb-update is a program which allows you to reflash, verify, and query the version of sensor board firmware. It works with either the MSB or LSB (provided that the bootloader is installed on them). sb-update accepts Intel HEX format firmware files. Note: The reflash and verify commands switch the sensor board to its bootloader mode. To switch back to regular operation, you must either power-cycle the board or issue the get-version command.
If you'd like to understand how sb-update works behind the scenes, see the bootloader protocol details.
usage
Typical Usage
sb-update /dev/ttyS0 get-version sb-update /dev/ttyS0 reflash firmware.hex sb-update /dev/ttyS0 verify firmware.hex
Available Commands
get-version queries the firmware for its version reflash <firmware.hex> reflashes the firmware on the sensor board with the specified hex file verify <firmware.hex> verifies that the firmware on the sensor board matches the specified hex file
example output
-
Typically the msb-server will output something similar to the following. Where the final recieved stats will continue until the program is terminated or an error occurs.
[root@imote2 /root]#./sb-update /dev/ttyS0 get-version Resetting firmware. OK! Querying sensor board for version... Failed. Trying to boot from bootloader... Querying sensor board for version... OK! Hardware version = 3, Firmware version = 1.6 [root@imote2 /root]#./sb-update /dev/ttyS0 reflash MSBv1.hex Switching to bootloader... OK! MSB/LSB Bootloader 0.71 Copyright 2006 University of Washington ........................................................ ........................................................ ........................................................ ................................. OK [root@imote2 /root]#./sb-update /dev/ttyS0 verify MSBv1.hex Switching to bootloader... OK! MSB/LSB Bootloader 0.71 Copyright 2006 University of Washington ........................................................ ........................................................ ........................................................ ................................. OK
buttonwatchdog
- msp/src/system-tools/buttonwatchdog.c
- MSB linux download (xscale)
- LSB linux download (xscale)
buttonwatchdog is a program that monitors the MSB/LSB's soft on/off button, and gracefully shuts down the system when pressed. Two versions are available: one for the MSB, and one for the LSB. Use the version for the sensor board that provides power to the system.
NOTE: The sensor boards are missing a pull-up resistor, which can cause buttonwatchdog to prematurely (or completely) shut down the logger. If you want to use buttonwatchdog with the MSB, attach a pull-up resistor to T10. With the LSB, attach a pull-up resistor to T1 (NOT TP1).
usage
Typical Usage
buttonwatchdog
buttonwatchdog has no parameters or options.