Name

erasePuck

Synopsis

erasePuck [-b baudHint] [-t triesPerBaud] port

Description

The erasePuck utility erases the PUCK datasheet as well as any payload content stored in PUCK memory.

Options

Option Description Values
-b baudHint Suggested baud rate will be tried first to save time. By default, the utility will try at different baud rates. 300, 2400, 4800, 9600, 19200, 38400, 57600, 115200
-t triesPerBaud Number of retries at each communication rate when trying to establish communication with the PUCK interface -
port Communications port to use for the PUCK connection. COM1, /dev/tty.KeySerial1, /dev/ttyS0

Example output:

					erasePuck 
					usage: erasePuck [-b baudHint][-t triesPerBaud]<port<
						adrift:utils headley$ erasePuck -b 115200 /dev/tty.KeySerial1 
						Experimental:  JNI_OnLoad called.
						Stable Library
						=========================================
						Native lib Version = RXTX-2.1-7
						Java lib Version   = RXTX-2.1-7
						RXTX Warning:  Removing stale lock file. /var/lock/LK.006.010.012
						Assuming PUCK v1.3 protocol
						
						0 INFO   Puck_1_3 [main]: Found PUCK mode at 115200 baud
						
						Datasheet:
						uuid = 00000001-0002-0003-0004-000000000005
						version = 2
						size = 96
						mfrID = 1
						mfrModel = 0
						mfrVersion = 0
						serialNumber = 12345
						instrument = MBARI Reference Design PUCK
						
						
						Payload capacity = 1081248 bytes
						
						[subsequent readDatasheet shows PUCK datasheet has been erased]
						
						readDatasheet -b 115200 /dev/tty.KeySerial1 
						Experimental:  JNI_OnLoad called.
						Stable Library
						=========================================
						Native lib Version = RXTX-2.1-7
						Java lib Version   = RXTX-2.1-7
						RXTX Warning:  Removing stale lock file. /var/lock/LK.006.010.012
						Assuming PUCK v1.3 protocol
						
						0 INFO   Puck_1_3 [main]: Found PUCK mode at 115200 baud
						Datasheet:
						uuid = ffffffff-ffff-ffff-ffff-ffffffffffff
						version = 65535
						size = 65535
						mfrID = 4294967295
						mfrModel = 65535
						mfrVersion = 65535
						serialNumber = 4294967295
						instrument = ????????????????????????????????????????????????????????????????
						
						PUCK datasheet size=65535 bytes
						PUCK payload capacity =1015809 bytes
						

Environment

The following environment variables must be set:

Variable Description Example
JAVA_HOME location of Java installation
/j9, /opt/java/jdk1.3.1, etc.
JAVA Path to JVM command For MMC
$JAVA_HOME/bin/j9

For Sun JVM (e.g. linux, win32, mac OS)
$JAVA_HOME/bin/java
SIAM_HOME top of the SIAM directory tree -
SIAM_CLASSPATH Path including all SIAM and supporting classes For MMC
$JAVA_HOME/lib/jclMax/classes.zip:$JAVA_HOME/lib/prsnlmot.jar:$JAVA_HOME/lib/RXTXcomm.jar:$SIAM_HOME/classes

For linux/win32
$SIAM_HOME/classes

See Also