NeXTTool Documentation

NeXTTool - USB & Bluetooth NXT communication utility

C:\winapps\projects\BricxCC>nexttool -help
NeXTTool version 1.2 (, built Fri Mar 2 23:56:38 CST 2012)
     Copyright (c) 2006-2012 John Hansen
Usage: NeXTTool [options] [actions]
   /COM=port: specify port name (usb, resource string, or alias)
   /BluetoothSearchTimeout=<n>: Set Bluetooth search timeout
   /HEX: use hexadecimal for numeric output
   /Duration=<n>: specify the tone duration for the playtone action
   /Inbox=<n>: use inbox number n when sending a message
   /Loop: loop when playing sound files
   /Relative: reset output position relative
   /KeepMsg: do not empty mailbox when reading
   /Bin[=filename]: dump data output as binary to a file (nxt.bin)
   /Power=<n>: output power level (-100..100)
   /Mode=<n>: output mode (COAST=0, MOTORON=1, BRAKE=2, REGULATED=4)
   /RegMode=<n>: output regulation mode (IDLE=0, SPEED=1, SYNC=2)
   /RunState=<n>: output run state (IDLE=0, RAMPUP=16, RUNNING=32, RAMPDOWN=64)
   /TurnRatio=<n>: output turn ratio (-100..100)
   /TachoLimit=<n>: output tachometer limit (0..MaxInt)
   /SensorType=<n>: sensor type (0..17)
   /SensorMode=<n>: sensor mode (0, 32, 64, 96, 128, 160, 192, 224)
   /Iterations=<n>: repeat a command <n> times (1)
   /RefreshRate=<ms>: delay <ms> milliseconds between iterations (1000)
   -init[=0] : initialize nxt.dat (optionally turn off Bluetooth search)
   -update[=0] : update the nxt.dat file (ditto)
   -listbricks[=0] : list resource names of all found NXT bricks (ditto)
   -clear : erase all items on the brick
   -battery : return the battery level
   -input=<N> : read input N (0-3)
   -output=<N> : read the status of output N (0-2)
   -setinput=<N> : configure input N (0-3)
   -setoutput=<N> : configure output N (0-2)
   -mute : stop playing sounds
   -playtone=<frequency> : play a tone for the specified duration
   -run=<filename> : run the specified program
   -runningprogram : return the name of the currently running program
   -stop : stop the currently running program
   -playfile=<filename> : play the specified sound file
   -firmware=<filename> : download firmware
   -download=<filename> : download the specified file to the NXT
   -upload[=<pattern>] : upload the specified file(s) from the NXT (or *.*)
   -listfiles[=<pattern>] : list the files matching the pattern (or *.*)
   -listmodules[=<pattern>] : list the modules matching the pattern (or *.*)
   -delete=<filename> : delete the specified file from the NXT
   -memory=<n> | -memory_full: upload 128 bytes of memory (_full == all memory)
   -map: upload memory map
   -keepalive : return the current sleep time limit
   -sleep=<timeout> : set NXT sleep timeout (in minutes)
   -msg=<string> : send the specified message to the NXT
   -readmsg=<box> : read the message from the specified box
   -resetoutputposition=<port> : reset the position for the specified port
   -resetinputsv=<port> : reset the input scaled value for the specified port
   -setname=<new_name> : set the name of the NXT
   -getname : return the name of the NXT
   -versions : return the NXT firmware and protocol versions
   -deviceinfo : return all NXT device information
   -freemem : return the amount of free memory
   -i2cbytes=<data> : send/receive I2C data
   -lsstatus=<port> : return the low speed status for the specified port
   -sendraw=<cmd> : send a direct or system command (comma-separated hex bytes)
   -resetbtnstate=<btn> : reset the button state for the specified button
   -boot : reset the NXT into SAMBA mode
   -btreset : reset the NXT bluetooth to factory settings (usb only)
   -defrag : defragment the NXT filesystem
   -shutdown : turn off the NXT
   -motorson=<motorlist> : Turn on the specified motors
   -motorsoff=<motorlist> : Turn off the specified motors
   -motorsfloat=<motorlist> : Float the specified motors
   -setfwd=<motorlist> : Set the motor direction to forward
   -setrwd=<motorlist> : Set the motor direction to reverse
   -switchdir=<motorlist> : Switch the motor direction
   -setmotorpower=<motorlist,pwr> : Set the motor power
   -poll=<src,num> : Poll the specified src and number
   -getoutputstatus=<out> : Get the output status
   -getvariablevalue=<var> : Get the variable value
   -getinputvalue=<input> : Get the input value
   -gettimervalue=<num> : Get the timer value
   -polleeprom=<block> : Poll eeprom block
   -setvmstate=<state> : Set the VM state (enhanced firmware only)
   -getvmstate : Get the VM state (enhanced firmware only)
   -btdevcnt : Get the bluetooth device count
   -btnamecnt : Get the bluetooth device name count
   -btdevice=<idx> : Get the specified bluetooth device
   -btconnection=<idx> : Get the specified bluetooth connection
   -help : display command line options