Hopefully attached is a pdf that will likely be further updated as we go on. The word doc is in the usual project doc dir.: MoteOpsHints.pdf
METCRAXII “Mote” Hints
Contents
How-To Command/Interact with a Specific V2.4 Soil/Rad Xbee Radio Motes:1
METCRAXII: Rad/Soil Mote Commands V2.4:2
METCRAXII: Serial Forwarding Mote:3
METCRAXII: Power Monitor Mote:4
HOW-TO: Change Mote Xbee Radio’s.5
The Wisard ‘motes’ come in 3 flavors for MetcraxII: Soil/Rad-XbeeWireless data sampling; Serial-Forwarding for crater barometer/csat’s; Power Monitor. The basic command sets are shown below:
Mote Setting Defaults:
If the ‘eeinit’ command is used, the project defaults are reprogrammed into the eeprom which controls operating parameters.
Low Battery Voltage Monitor: disabled (vm=0).
GPS: disabled on the serial forwarding motes in crater (2baro’s and 2csats)
rad/soil gps sync rate=2hours (gr=7200), timeout=1min (gto=60), failed retry rate=30min (gfr=1800)
Primary Output Port pp=radio (pp=1)
Message Output wisard mode (mp=0) messages
Local Data Storage disabled (fsr=0)
Sampling Mode Self-Timed (md=0)…Don’t change this!
How-To Command/Interact with a Specific V2.4 Soil/Rad Xbee Radio Motes:
By default all commands are sent by a base station radio to all remotes. You can address a specific mote only by one of two ways:
1) Don’t Do This!: Reprogram the base Xbee radio (or equivalent) to only talk with your target.
2) Do This: #xxcmd where xx=moteID, and ‘cmd’ is one of the above commands.
For example: ‘#17dr’ or ‘#2xb=pl’ or ‘#4eeupdate’
FLR: >rs 2 ids = 1,2,17 Unless they’re changed!
NEAR: >rs 1 ids = 3,8,10
FAR: >rs 2 ids = 4,22
METCRAXII: Rad/Soil Mote Commands V2.4:
Note: Cmds with ‘=’ option can be reset with a new value
Note: All values are stored in eeprom and reloaded at runtime. If you change one or more and then ‘eeupdate’ they will be used both immediately and at any reboot. Exceptions are rxb,hb,st,jd and ‘on/off’
Sampling Rates: |
‘dr’ ‘dr=’ |
Data Sampling rate in seconds |
Operating Modes |
‘md’ ‘md=’ |
0=Self-Timed Mode (Default)1=Xbee-Sleep |
Local File |
fsON/OFF |
|
Batt Monitor |
‘vm’ ‘vm=’ |
vm=1 MonitoringON, vm=0 OFF |
EEPROM |
‘eecfg’ |
report current operating settings |
Xbee Radio: |
‘xb=’ |
Send specific command to xbee: such as ‘xb=pl’ for power. To reprogram a new value ex: ‘xb=pl2’ or ‘xb=dl12345678’ |
GPS / Timing: |
‘gpsON/OFF’ |
|
|
‘?’ ‘reset’ ‘reboot’ |
Print command list, reset cpu |
White-Button Use |
1 |
scan for any attached I2C sensors |
LEDs |
Startup |
Normally 3 blinks of either: green-led=output is radio, red=output is console; then 7 quick blinks before boot (sometimes other leds come on and when xbee is the output there is a delay period before ‘boot’) |
METCRAXII: Serial Forwarding Mote:
Note: Cmds with ‘=’ option can be reset with a new value
Note: All values are stored in eeprom and reloaded at runtime. Thus if you change one or more and then ‘eeupdate’ they will be used both immediately and at any reboot. Exceptions are rxb,hb and ‘on/off’
NOTE: by default ALL MOTE COMMANDS ARE DISABLED and it is in ‘pass-through’ mode. Thus when you connect, you’ll be talking with the serial sensor itself. To enable these commands use the hidden escape:
‘esc-esc-esc’ to toggle the command-mode on/off.
Sampling Rates: |
‘dr’ ‘dr=’ |
Data Sampling rate in seconds |
Operating Modes |
‘id’ ‘id=’ |
MoteID |
Local File |
fsON/OFF |
Any questions…? |
EEPROM |
‘eecfg’ |
report current operating settings |
Xbee Radio: |
‘xb=’ |
Send specific command to xbee: such as ‘xb=pl’ for power. To reprogram a new xbee value ex: ‘xb=pl2’ or ‘xb=dl12345678’ |
GPS / Timing: |
gpsON/OFF |
Any questions…? |
|
‘?’ |
Print command list |
White-Button Usage |
1 |
scan for any attache I2C sensors (limited use for forwarder!) |
LEDs |
Startup |
A long series of 1-sec blinks will last for the ‘delay’ time mentioned above. Then ‘roughly’ 7 blinks and the |
Because the Serial Forwarding Motes in MetcraxII are BlueTooth based radios, to talk with them individually, the command ‘#’ prefix shown above is superfluous. Instead the interaction is entirely up to the DSM virtual serial port connection. For that you must know what the friendly name of its BT-radio. With the DSM / Nidas software running, and logged into the DSM:
>rserial btspp:name This must be a known name in the config and in the radio.
METCRAXII: Power Monitor Mote:
The Power Monitor Board designed and built in 2013 was based upon a PIC18F2520, the same as used on the original Version 1 motes. For convenience the initial implementation of the command set was similar to V1 Motes, not the V2.4 soil/rad devices.
Note: Cmds with ‘=’ option can be reset with a new value
Sampling Rates: |
‘dr’ ‘dr=’ |
Data Sampling rate in seconds |
Operating Modes |
‘id’ ‘id=’ |
MoteID |
Calibration Offset/Gain Settings |
‘vbg’ ‘vbg=’ |
Battery Voltage circuit Gain, |
EEPROM |
‘ew’ |
write eeprom with current settings |
Xbee Radio: |
‘xb=’ |
Send command to xbee: ‘xb=pl’ for power |
Timing: |
‘st’ ‘st=’ |
Show/Set time of day ‘hhmmss’ |
|
‘?’ |
Print command list |
These motes in METCRAXII were initially setup with a wired link into a DSM port and are mounted in the battery boxes. They can be swapped over to Xbee radios by removing the rs232 module and swapping in a xbee radio pre-programmed to work with the base radio it will be interacting with.
FAR: >rs 7
NEAR: >rs 17 (low) >rs 18 (up)
RIM: >rs 14 (low) >rs 16 (up)
FLR: >rs 8
HOW-TO: Change Mote Xbee Radio’s
If a a radio goes bad, or more likely a mote/xbee need to be swapped in to a different BASE-Xbee receiver, then the xbee radio must be either swapped in or have its settings changed. In either case you need to know the Base Radio’s values (labeled on the box):
1) Serial number, low number: ‘sl’ in the base xbee, used in the ‘dl’ setting of the client xbee.
2) Channel number: ‘ch’
3) Node ID: ‘id’
All other parameters should be ready to go in our radios. The base broadcasts to all clients ‘dl=0000’ and the clients send messages to the base radio ‘dl=xxxxxxxx’.
If the radio is ok but the mote is bad: you can remove the xbee from the old mote and put it in the new one. If you do that the default eeprom ‘radio settings’ in the mote will probably be different but that is ok because the radio will already be setup correctly; just don’t use the ‘xv’ command!
Otherwise if you putting in a new mote with new radio (ie moving it) then you need to change the xbee and mote settings. This can be awkwardly done over the air but the best is to use the mote console port:
1) Connect console cable between Mote-PC. Start serial comm program (minicom,procomm,rserial): 38400bps = Rad/Soil Motes, 9600bps=SerialForwardingMote
2) Power Up Mote You should see 3 short green blinks indicating stdio is going to the xbee port.
3) 2x White Button Toggles stdio to the console port. You should see 2 quick org. blinks indicating it saw the 2 button presses.
4) md=2 If using minicom/procomm. This puts the mote in plain text mode so you can see the output. In rserial the md=0 ‘wisard’ mode is ok/best.
5) xbdl=xxxxxxxx where ‘xxxxxxxx’ is the BaseRadio’s low serial number (hex)
6) xbid=x where ‘x’ is the BaseRadio’s id.
7) xbch=xx where ‘xx’ is the BaseRadio’s channel number (hex)
8) xv The mote will reprogram the xbee radio with the above numbers and give you a status report.
9) id=xx Do this for the DSM injest if you’re swapping in a new mote. You must know the old mote number. The alternative when swapping is to change the dsm’s ‘xml’ for the new id, and all the associated adjustments in base, etc.
9) md=0 puts the mote in wisard output mode. If you leave the md=2 (or 1) then the next command will cause it to boot in the wrong mode and cause dsm problems.
9) eeupdate This stores the above values in the mote’s eeprom.
10) reboot Or press reboot button, or cycle power to restart with the new setting
11) Check the settings/results and that the dsm is still getting data, etc.
The xbee radio settings can be adjusted or viewed also by using the command ‘xb=yyy’ including ‘over the air.’ Be careful not to change one of the 3 values above over the air or else you will lose radio contact. Some examples
1) xb=pl shows xbee’s power level
2) xb=pl2 changes xbee’s power level.
3) sx reports various xbee status values
4) xb=sl shows xbee’s serial number
5) xb=dl shows xbee’s destination serial number
6) xb=xxxxxxxx changes xbee’s destination destination serial number (you can shoot yourself in the foot if using this over the air).<!-- /* Style Definitions */ table.MsoNormalTable
-->