rm210 base station - ranch systemscontents warranty coverage.....2

75
RM210 Base Station Reference Manual June 2011 Rev. 2.11

Upload: others

Post on 27-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

RM210 Base StationReference Manual

June 2011Rev. 2.11

Page 2: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

CONTENTSWarranty Coverage................................................................................................................................2CHANGE LOG.......................................................................................................................................3ABOUT THIS GUIDE AND OTHER RESOURCES................................................................................4SYSTEM COMPONENTS.....................................................................................................................6INSTALLING AN RM210 BASE STATION.............................................................................................9POWER-UP.........................................................................................................................................10EXTERNAL CONNECTIONS..............................................................................................................11CONFIGURING THE RM210...............................................................................................................13

Sensor Configuration......................................................................................................................13Mesh Node Configuration................................................................................................................13Modem Configuration......................................................................................................................13Server Configuration.......................................................................................................................13Text Message Authorization............................................................................................................13Remote Device Configuration.........................................................................................................14System Logging Configuration........................................................................................................14

COMMAND LINE CONTROL..............................................................................................................15Command Line Instances................................................................................................................15Using the Command Line ...............................................................................................................16The RM210 File System..................................................................................................................16

COMMAND REFERENCE...................................................................................................................18CUSTOM SERVER SYNCHRONIZATION..........................................................................................43

Uplink SMTP Synchronization (syncmode 1)..................................................................................43Uplink FTP Synchronization (syncmode 4)......................................................................................44Downlink HTTP Synchronization (syncmode 1 or 4).......................................................................44SMS Gateway Implementation (SMSGW).......................................................................................45FGET Implementation.....................................................................................................................46Remote Command Line Implementation.........................................................................................47Summary.........................................................................................................................................48

SENSOR TYPES.................................................................................................................................50REMOTE CONNECTION TO RM210 UNITS......................................................................................56FIRMWARE UPGRADES....................................................................................................................58

Remote update of RS210 nodes.....................................................................................................59MODEM ACTIVATION.........................................................................................................................60

GSM................................................................................................................................................60CDMA Sprint...................................................................................................................................60CDMA Verizon................................................................................................................................61

VAISALA CONFIGURATION...............................................................................................................63HORTAU RECEIVER CONFIGURATION............................................................................................65PVPowered Inverter Connection..........................................................................................................66

Troubleshooting Suggestions..........................................................................................................66FURTHER HELP.................................................................................................................................68

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 1

Page 3: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Warranty Coverage.

Ranch Systems' warranty obligations are limited to the terms set forth below: Ranch Systems LLC ("RS") warrants hardware products manufactured and sold by RS against defects in materials and workmanship for a period of TWO (2) YEARS from the date of original purchase. If a defect exists, at its option RS will (1) repair the product at no charge, (2) exchange the product with a new product that is at least functionally equivalent to the original product, or (3) refund the purchase price of the product. A replacement product/part assumes the remaining warranty of the original product or ninety (90) days from the date of replacement or repair, whichever provides longer coverage. When a product or part is exchanged, any replacement item becomes customer's property and the replaced item becomes RS's property. When a refund is given, the defect product becomes RS's property.

It is the sole and exclusive responsibility of Customer to determine the suitability of any and all products for the Customer’s use. THERE ARE NO EXPRESS OR IMPLIED WARRANTIES OF RANCH SYSTEMS BEYOND THE WARRANTY SET FORTH IN THIS SECTION ABOVE. THIS EXCLUSION MEANS THERE IS NO IMPLIED WARRANTY OF MERCHANTABILITY AND NO IMPLIED WARRANTY OF FITNESS FOR ANY PARTICULAR PURPOSE. THIS EXCLUSION ALSO MEANS THAT RANCH SYSTEMS GRANTS NO IMPLIED WARRANTY ARISING BY USAGE OF TRADE, COURSE OF DEALING OR COURSE OF PERFORMANCE, AND NONE SHALL ARISE OUT OF ANY SALE UNDER THIS AGREEMENT OR OUT OF EITHER PARTIES' CONDUCT.

Obtaining Warranty Service. To obtain warranty service Customer must deliver the product to the nearest wholly-owned Ranch Systems facility at customer's expense. Ranch Systems will return repaired product at Ranch Systems' expense by common carrier – such as UPS or Fedex - to any return address within the United States as directed by customer. For return service outside the United States, Customer is responsible for costs in excess of the common carrier cost to ship to nearest major city inside the United States.

Limited Liability. Ranch Systems shall not be liable for direct, indirect, incidental or consequential damages, including, without limitation, damages or harm to business, lost profits or lost revenues (however arising, including negligence), whether or not Ranch Systems has been advised of the possibility of such damages. Ranch Systems shall not be liable for any damage that Customer may suffer arising out of the use, or inability to use, the services or products provided hereunder. The liability of Ranch Systems for any claim by any party arising out of or in connection with the services or products provided hereunder shall not exceed the amount paid to Ranch Systems by Customer with respect to the sale of the specific product or services cited in such claim. Customer shall indemnify and hold Ranch Systems harmless from and against any and all liabilities, losses, damages, costs, expenses awarded against Customer in connection with any third party claim, action, or right of action, at law or in equity, arising out of bodily injury, property damage, or any other damage or injury caused by Customers use of the Ranch Systems Solution.

2 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 4: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

CHANGE LOG

Date Version Changes0.0 Initial drafts

03/12/10 1.7 Added change log. New mesh command description.03/24/10 1.8 Terminal Server connection instructions06/13/10 1.9 Data command. Completed TCP server sync instructions10/31/10 2.0 Added sdata command. Added missing explanations in config

command.12/16/10 2.1 Updated Server Synchronization chapter. Semantic changes and

clarification around smtpxxx and syncxxx settings12/22/10 2.2b2 Data command updated with more detail on UNITEVENTS.01/05/11 2.2b3 Clarifications re. downlink sync format01/06/11 2.2b4 Further clarification and example added to downlink sync session.01/17/11 2.3 Added instructions for connecting to PV Powered Inverter

Added instructions related to SMSGW feature02/18/11 2.4 FGET documentation as part of server implementation03/07/11 2.5 Powermode documentation03/22/11 2.6 PVP config edits. Revised mesh command to conform to RM794B10

(routing)

03/27/11 2.7 Syncmode 4 / FTP documentation added04/19/11 2.8 Updated relay command (multi relay syntax and RL200)04/27/11 2.9 Detailed sensor type reference chapter05/31/11 2.10 Remote Command Line feature documentation06/07/11 2.11 Illustration added to data command documentation

Corrected RM210 solar connector part numberAdded description of sensor types 56, 190, 192.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 3

Page 5: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

ABOUT THIS GUIDE AND OTHER RESOURCES

This guide is intended as a technical reference manual for advanced uses of the RM210 base station. It covers internal technical details typically needed when performing advanced troubleshooting or customer integration projects. It is written by engineers for engineers.

This document is NOT intended or required reading for the end-users of a RanchMaster solution.

Other resources include:

✔ The RanchMaster Installation Guide. This document describes the steps necessary to install a RanchMaster system, including the RM210 base station.

✔ Ranch Systems Internet Software: Getting Started Guide. This documents covers the basics of using the Ranch Systems Internet software, and is the natural complement to the Installation Guide.

✔ On-line software help – each page in the on-line software contains help information right on the page, indicated by the help icon ( ). Note, that these are typically beneath the visible area – so you may need to scroll down to see them.

✔ Ranch Systems staff – we are available to respond to your questions directly as time permits. The best way to reach us and be sure of a comprehensive reply is to use email: support @ranchsystems.com .

4 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 6: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

“There are 10 types of people in the World:

Those who understand binary, and those who don't.”

- Anonymous

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 5

Page 7: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

SYSTEM COMPONENTS

The following is a list of typical, compatible components in the RanchMaster family of products:

Weather Station A package of a Base Station and the most common weather sensors.

Base Station A triple band wireless networking node. This is the main online link for all nodes.

RM200 3 Analog Sensor Ports, 2 Digital Counting Ports, 1 Digital BUS Port, 4 Relay Ports (Optional).

RM210 4 Analog Sensor Ports, 2 Digital Counting Ports, 2 Serial Ports, 4 Relay Ports (Optional).

Mesh Node A two-way communications node

RS200 4 Analog Sensor Ports, 1 Digital BUS Port, 1 RS485 Serial Port, 3 Relay Ports (Optional)

RS210 3 Analog Sensor Ports, 1 Analog or Digital Counting Port, 1 Analog or Digital BUS Port, 2 Serial Ports, 3 Relay Ports (Optional).

RSRF Node Transmit only node.

RS100 1 Analog Sensor Port, 1 Analog or Digital BUS Port

Digital Temperature Sensor

Connects to a Digital BUS Port

NTC-based Temperature Sensor

Connects to an Analog Sensor Port

Relative Humidity Sensor

Connects to an Analog Sensor Port

Wind Speed and Direction Sensors Connects to a WSD Port, or two Analog Sensor Ports

Rain Gauge

Connects to a Digital Counter Port

6 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 8: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

OVERVIEW OF RM210 BASE STATION

The RM210 is the latest in several generations of RanchMaster base stations from Ranch Systems LLC. The following diagram describes the overall architecture of a RanchMaster system, and how the the RM210 fits in:

As can be seen, the base station is the unit connecting a variety of nodes to the back-end Internet server, and as such is the most important single component in any RanchMaster field installation.

More specifically an RM210 has the following features:

1. It maintains a cellular or WiFi connection to a central server, synchronizes it's time from server and is “addressable” by the server for purposes of configuration and troubleshooting.

2. It regularly synchronizes data to the central server, typically every 15 minutes

3. It has a range of local I/O ports and is able to gather data in real-timer from sensors attached to these ports. The ports include: analog, digital and serial ports.

4. It may have one or more RL200 relay controllers attached via RS-485 with 12 relay ports each capable of controlling a variety of equipment, such as valves or pumps.

5. It can send and receive Text Message (SMS) commands and alerts.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 7

Page 9: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

6. It performs mesh management. In Ranch System terminology a “mesh” is a network of devices that are concentrated into one unit (in this case the RM210). The RM210 acts as a coordinator for nodes, which are typically RS210 nodes, but can also be Third-party systems providing gateway functionality to other sub-systems.

7. It has 5MB of flash memory organized into a general file system. 1MB is used for program executables and configuration (P:), while the rest is available for data storage (D:).

8. It comprises an integrated PWM solar charger that is software configurable.

8 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 10: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

INSTALLING AN RM210 BASE STATION

A Base Station is intended to mount to a standard 3” Pipe. Typically this is a 3” Black ABS Pipe, 10 feet long, available at most hardware stores or building supplies. For installations that need a height taller than 10 feet, a 3” Steel pipe is recommended. This is usually a 20 foot pipe cast into concrete 5 feet into the ground.

A detailed explanation of RM210 installation can be found in the RanchMaster Installation Guide.

Below are some images of typical installations.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 9

Illustration 2: RM200 Base Station on 20' Steel Pipe

Illustration 1: RM210 Base Station/Weather Station on 10' ABS Pipe

Page 11: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

POWER-UP

The Base Station ships with the main battery disconnected. The battery gets connected when either a solar panel or a wall chargers is inserted.

If you have ordered the wall charger, and you do not plan to deploy the Base Station immediately, it is a good idea to start by plugging in the wall charger at this point and charging the Base Station for 24 hours.

Alternatively, you may insert the solar panel immediately, which will prompt the Base Station to start – even if the solar panel is not exposed to sun. This is because the solar panel plug itself serves to connect the internal battery.

If you are a reseller or OEM customer you might find it handy for bench/lab use to have a special power plug, which only contains the necessary short for RM210 units to start. These plugs also work for RS210 units. To obtain, please contact Ranch Systems directly.

Note on using 3rd party solar panels, or solar panels sold before May 2007.If you are using a solar panel not manufactured by Ranch Systems you will need an adapter cable as shown in the picture below. This adapter is simply plugged in-line between solar panel and Base Station. This adapter is also required for Ranch Systems solar panels sold before May 2007 when upgrading to newer Base Stations.

Illustration 3: Ranch Systems Solar Panel Adapter

10 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 12: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

EXTERNAL CONNECTIONS

You will find the following connectors on the bottom off your RM210 Base Station:

Illustration 4: Base Station Connectors

1) Solar Panel or AC Adapter 6) Temperature (Analog) 11) Relay 12) RS232 Serial 7) Relative Humidity (Analog) 12) Relay 23) RS485 Serial 8) Rain Gauge (Counter) 13) Relay 34/5) Wind Speed and Direction (Analog/Digital) 9) Pyranometer (Analog) 14) Relay 4

Note 1: That these sensor assignments are the default assignments as the RM210 is shipped. However, each port can be reconfigured to meet your needs using the “configset” command in this manual. So for example, port 6 comes configured as temperature sensor (sensor type 25), but can be deconfigured (sensor type = 0) or changed to another sensor as need.

Note 2: Ports 11 through 14 are only avaliable on older RM200 models. RM210 models require the RL200 expansion box to perform control operations.

The pin-out for each type of port is shown in table below. These are seen from the wire-side of the plugs that fit into the box. If you are looking at the connectors on the box itself, these drawings show the configuration from the outside looking in.

Pinout Description Manufacturer and Part Number for plugs

Solar Panel, AC Adapter (port 1)+V = solar panel powerTwo GND Pins are connected in the plug to act as the power switch

SwitchCraft # EN3C3FX

Analog Sensor, Digital Counter (ports 6 through 9)+V = 5.0 VDCAnalog Signal = 0 – 5 VDCCounter Signal = 5 VDC PulseBUS Signal = 1-Wire® Bus

Conxall # 16282-3PG-315

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 11

Page 13: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Wind Speed and Direction (port 4 and 5 combined)+V = 5.0 VDCSpeed = Digital CounterDir = Analog SensorGnd = common ground

Conxall # 6282-5PG-3DC

Relays (on RL200)Power Output: 1 = +V ; 2 = GNDDC Latching : 1 = -V ; 2 = +VSwitch N.O. : 1,2 = Contact Closure

Conxall # 16282-2SG-315

RS485 Serial (port 3)+V = 9.0 VDC

Conxall # 6282-4PG-3DC

RS232 Serial (port 2)+V = 9.0 VDC

Conxall # 6282-6SG-3DC

RS485/RS232 Serial (RS200/210 only)+V = 9.0 VDC

Conxall # 6282-8SG-3DC

Power Output (configuration option on RL200)+V = 12.0 VDC

Conxall # 16282-2PG-315

Plugs can be ordered from RanchSystems, or online from Digikey or Allied Electronics.

Note that the last 3 digits of Conxall numbers refer to cap style and grommet size, which may be substituted.

12 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 14: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

CONFIGURING THE RM210

The RM210 has a large number of configurable parameters that may be modified depending on the tasks envisioned for the unit once deployed in the field.

While the RM210 ships from factory with default settings for most of these parameters, at least a few will always need to be configured by the installer.

The complete list of configurations can be found in the description of the CONFIGSET command in the command line chapter, however, below we review some of the most common types of settings and when to use.

Sensor ConfigurationThe most common configuration type is sensor configuration. For each port on the RM210 a specific sensor type may be configured. Before installation or when changing attached sensors, these setting must be adjusted accordingly. Please refer to the description of the CONFIGSET PORT command in the command line section.

Mesh Node ConfigurationThe second most common configuration is the mesh node configuration. This consists in setting the ID's of the RS210 mesh nodes (and any other nodes) that a given RM210 should be coordinator for. The RM210 will only pull data and relay control information to mesh nodes specifically configured. Refer to the MESH command in the command line reference for mesh node configuration.

Modem ConfigurationNormally RM210 units ship with cellular modem already activated. However, if you are providing your own activation via local cellular providers, or if you use a Wi-Fi modem, you may need to change certain modem parameters, specifically APNSERV, APNUN, APNPW for cellular GSM or WIFISSID and WIFIKEY for wifi modem (see CONFIGSET command). However, this is only required for GSM and WiFi modems; for CDMA modems no specific parameters are required.

Note: It is not necessary to configure the type of modem inserted: it is automatically detected at startup.

Server ConfigurationThe RM210 units ship configured to talk to the Ranch Systems server network. However, if you have your owner server installation, the relevant connection parameters must be changed. Most importantly this is the two IP addresses of primary and secondary servers. See CONFIGSET command for details.

Text Message AuthorizationThe RM210 units can respond directly to text messages – in fact the entire command line interface is available over text messaging. To avoid misuse this feature is protected by an ACL (access control list) of cellular phone numbers. The unit will only accept command from cellular phones included in this list. See CONFIGSET SMSACL for details.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 13

Page 15: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Remote Device ConfigurationIn certain situations new nodes can spontaneously appear around an RM210 station. This is the case with the RS100 type of sensor nodes, which do not need to be specifically configured (like mesh nodes) to have their data accepted by the RM210, since they are unidirectional. It is also the case with certain 3rd party products that can be integrated with the RM210.

By default, the RM210 will accept data from all such “remote” devices or nodes. However, it is possible to configure a specific list of authenticated IDs to accept. This can for example be used to avoid cross-talk between nearby properties.

To configure a device list, simply create a file named rm.dev in the P: partition of the file system, and place one ID on each line. The maximum capacity that RM210 will handle is 512 unique IDs.

See the FLOAD command for a simple way to create this file.

NOTE: the rm.dev file is only read during startup, so a soft reboot is required after changing this file.

System Logging ConfigurationThe RM210 generates system log information into the sys.log file in the D: partition (d:sys.log).

The standard tail command is typically used to inspect the end of this file, or the cat command may be used to stream the entire file (which may be captured by a terminal program to a file on the user's computer).

It is possible to adjust the logging information by adjusting the syslog configuration string (see the CONFIGSET SYSLOG command).

14 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 16: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

COMMAND LINE CONTROL

The advanced user will appreciate the capability to communicate with the RM210 through its command line shell, which is reminiscent of a Linux-style command shell.

The command line is most often use for configuration, but sometimes also for data monitoring and debugging field issues.

Since the RM210 firmware is multi-tasking, many command line shells can be active an any given time, all the while the normal functions of the unit (such as data sampling and synchronization) goes on as normal.

Command Line InstancesThe RM210 units support the following distinct command line instances, each of which are active concurrently:

STDIOThe STDIO command line shell is attached to a physical serial port on the unit. The CONFIGSET STDIO configuration setting control which port, but the default is port 2 (RS232), and the default communications parameters are 9600 N 8 1.

To connect to the stdio command line shell on a new unit, attach a serial cable to port 2, connected to a PC or similar with a terminal configured to asynchronous communications a 9600 baud, N81. A typical program is the Windows Hyper-terminal.

LOCAL WIRELESS NETWORKINGA command line instance is available over the local wireless networking normally used to talk to nodes.

This is accomplished using the RANCHMGR software provided by Ranch Systems in connection with a wireless modem that connects to your PC's USB port.

For more information and dowload of RANCHMGR software, visit this site:

www.ranchsystems.com/ranchmgr.htm

TEXT MESSAGINGA complete command line instance is also available via text messaging. To use this feature you need to make sure your mobile phone number is listed in SMSACL setting in the RM210 configurations. Once this is set, simply send a text message consisting of a valid commandline preceded by a dot (.) to the unit's built-in modem phone number (GSMNO setting, even for CDMA modems), and you will get the command line response as return message.

For example:

Sending the following text message to the RM210: .batt

Will cause a direct return reply with the current battery status.

The reason that a dot must be added is to distinguish from the SMS gateway feature which will forward any inbound message (without dot) via the synchronization framework to the server's SMSGW

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 15

Page 17: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

process for handling. See the custom server synchronization chapter for more information on the SMSGW feature.

Note that reply may be delayed if unit is using modem for other purposes, such as synchronization.

ONLINE TERMINAL SERVERPerhaps the most powerful and versatile instance of the command line is available via the Ranch Systems Terminal Server Software. This software makes it possible to connect by command line to an RM210 in real-time from a desktop anywhere in the World.

The Ranch Systems Terminal Server is available as standard if your unit is connecting via the Ranch Systems hosted server network. If you are running your own servers you may need to purchase and install the Terminal Server software separately.

For detailed instructions on connected via Terminal Server, see the separate chapter later in this manual.

Using the Command Line Immediately upon connection to a command line instance, you will be prompted for a password. This is the unit “PIN” as listed in the node configuration details in the on-line software.

Once logged in, you will see the command line prompt, like this:

You will notice that the prompt contains the unit ID as well as the absolute path into the file system.

At this point you may simply execute commands according the command reference.

To terminate the instance, type “quit”.

The RM210 File SystemThe RM210 comes with a built-in file system with two distinct partitions, D: and P:. Both partitions are implemented in flash and provide a total storage of around 5 MByte.

The D partition is used for data storage and system log. You will find the following system files in this partition:

rm.dat containing binary data records (use VDATA to read)

sys.log containing ASCII system event information (use CAT or TAIL to read)

The P partition is normally only used for program and configuration storage, and you will find the following system files:

RMxxxBy.BLZ the binary executable file (firmware). xxx is primary version number and y is the build revision

16 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 18: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

rm.cfg the system configuration setting (as set by CONFIGSET)

To change between partitions, simply type D: or P:.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 17

Page 19: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

COMMAND REFERENCE

ADCSyntax: adc

Description: Reads and displays the current voltage from all port equipped with A/D converter.

For RM210, external ports 5, 6, 7, and 9 have A/D converters. Ports 4 and 8 does not.

See Also: vref

BATTSyntax: batt

Description: Displays current main battery level, and charger status

See Also: charger

BEEPSyntax: beep

Description: Sounds the on-board buzzer.

This command is often used test port rules, since it generates a very distinct effect without any side effects.

See Also: configset

CATSyntax: cat

cat <filename>

Description: Prints the content of a text file to the current shell output.

CONFIGSyntax: config

config <parameter> config ports config port <portno>

Description: Displays the current value of one or more configuration attributes.

18 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 20: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Using config displays all basic settings.

Using config ports shows the settings for the various ports.

Using config <parameter> displays only a specific basic parameter setting.

Using config port <portno> displays only a specific port's setting.

The following basic settings are available:

Parameter Descriptionadmincellno Administrative phone number. This setting is used by unit to

send alerts regarding extraordinary conditions, such as prolonged ability to reach server.

apnserv APN server name. This setting is required for GPRS service with GSM modems only. For example, AT&T uses an APN server name of: WAP.CINGULAR.

apnun Username for APN server. This setting is required for GPRS service with GSM modems only. For example, AT&T uses an APN user name of: [email protected].

apnpw Password for APN server. This setting is required for GPRS service with GSM modems only. For example, AT&T uses an APN user name of: CINGULAR1.

baseid Base ID number of this unit. This id is used for mesh coordination only. Normally the same as rsuid setting.

bootalert If set to 1, the unit will send a text message to the admincellno number on each reboot reporting the boot event. Set to 0 (zero) to suppress.

cellband Used only with GSM modems to select band: 4 = US/Americas (850/1900 MHz), 5 = Global (900/1800 MHz)

chrglow Lower voltage setting for charger. Millivolt in 10 mv steps. For example 1380 = 13.8 V. This setting is automatically changed to recommended default when changing chrgmode setting.

chrghigh Upper voltage setting for charger. Millivolt in 10 mv steps. For example 1440 = 14.4 V. This setting is automatically changed to recommended default when changing chrgmode setting.

chrgmode Determines the charge control mode. For most cases this is auto-configured based on hardware on boot:0 = charger off (set to disable charging)1 = use on/off relay control (RM200 and early RM210 models)2 = use PWM transistor-based control (newer RM210 models)

csessionport TCP port where RS terminal server is running on server(s). If used.

dvrcomp DVR compression setting used when capturing images0 = low compression (best image quality)1 = medium compression2 = high compression (lowest image quality)

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 19

Page 21: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

dvrmask Controls which of attached cameras are captured during DVR image capture0 = no capture1 = video input 1 2 = video input 23 = video input 1 and 2

hiberon Determines the voltage level where unit should go into hibernation mode. While in hibernation, local sensors are sampled but all radio communication is suspended. Values are in 10mV step, e.g. 1100 for 11 Volt.

hiberoff Determines the voltage level where unit should exit from hibernation mode. This value should always be higher then hiberon setting. Values are in 10mV step, e.g. 1200 for 12 Volt. Note: The RM210 always exits hibernation with a full reboot to ensure a clean restart.

jobmask A string of characters controlling which of the base stations essential jobs are will be set to run upon reboot.

NOTE: Modifying this setting can render the base station non-functional, so use with care.

char JobI Stdio I/O shell processC Solar charge control processX Mesh coordination and synchronization

process.M Message queue command processor.S Synchronization manager.L Local sampling process. Samples the local

sensor ports on the RM210.G Low-level modem manager and text message

interchange manager.F File upload manager. Also responsible for

flushing data queue to file system.E Csession manager. Responsible for terminal

server communication with central server.

The following syntaxes are supported:

configset jobs -xyzRemoves a one or more jobs.

configset jobs +xyzAdds one or more jobs.

configset jobs *

20 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 22: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Reset jobs string to default

NOTE: changes only take effect upon reboot.meshtype Controls type of mesh modem to use. Must match the actual

modem inserted, so only change if changing mesh modem hardware. Supported values:900 = 900 Mhz XBEE XSC24 = 2.4 Ghz XBEE PRO (802.15)

meshbaud Baud rate to communicate with mesh modem.0 = 12001 = 24002 = 48003 = 96004 = 192005 = 38400 (default)6 = 576007 = 115200

meshch Default channel used to communicate with nodes. This setting is used as default when adding mesh nodes with mesh command, but if explicit channels are selected during mesh additions, those will prevail.

mesh... Various low-level mesh modem configuration. Do not modify.msgmode Messaging mode. If values > 0, the unit will do message

queue processing when synchronizing messages from server and with RS210 nodes. Normally always on.

password A 4-digit password of this unit. This password is necessary to enter the command line shell, and to execute some of the more invasive commands (such as reboot)

powermode A bit-mapped setting that controls how the RM210 manages battery consumption. If set to 0 no special power-saving functions are enabled. Each bit may be set to enable functions as follows:bit 0 – hibernation: RM210 will enter hibernation when the voltage drops below value configured by hiberon setting. In this mode only local ports are sampled, and no sync is attempted. Hibernation will be exited when hiberoff voltage is reached. bit 1 – modem off between syncs. In this mode RM210 will turn modem off when not actively syncing. This is mostly a good idea, except that reception of text messages will be delayed until next sync cycle.

Accordingly, the maximum battery endurance is accomplished with powermode set to 3.

rsuid ID number of the unit. Only change if unit is used stand-alone. If used on the Ranch Systems network, this ID must remain as configured during ship (matching label on side of RM210 enclosure)

serverip1 IP address of primary server

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 21

Page 23: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

serverip2 IP address of secondary server (if no secondary, repeat primary IP). The secondary server is attempted if communication with primary fails.NOTE: IP2 is used as the primary for TCP sync downlink, meaning this IP will be attempted first. That allows the SMTP uplink and HTTP downlink to be on different servers.

smsacl Text message access control list. Comma-separated list of phone numbers that are authorized on the unit's text message interface shell. To add a cellular phone number, use the following syntax:configset smsacl +14155557777Note the +<countrycode> and that no dashes or spaces are allowed.

smson Whether unit accepts SMS inbound commands (1), or not (0).smtpfrom Email address to use in SMTP sending (MAIL FROM). The

domain of this address will also be used in HELO command.smtpun Username for SMTP authentication (AUTH LOGIN). Leave

blank to skip authentication. smtppw Password for SMTP authentication.stdio Port number where the stdio shell is assigned. Default is port

2 (RS232). Other meaningful settings are 3 (RS485 port) and 10 (Internal TTL level RS232 port only accessible with open cover for lab use).

subchkrate Default minutes between synchronization with a mesh node. Can be overridden during mesh node addition (mesh command). Each node can have individual intervals.

syncmode Selects the overall mode of synchronization, as follows:

Syncmode Description0 No synchronization is performed via modem.

This is the correct setting in cases where data is pulled via the RS232 port or the Mesh interface.

1 Data upload is by SMTP (email) and download is via HTTP GET. The format of the interchanges are open and allows the user to implement their own server. See separate chapter.

2 A very efficient, binary compressed format using low-level UDP packets. Requires the Ranch Systems multi-threaded UDP server.

3 Reserved4 FTP synchronization. Upload of data is by FTP

put, while download is by HTTP GET (similar to syncmode 1)NOTE: Requires version 794B12 or later.

22 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 24: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

syncrate Minutes between server synchronization.syslog A string of characters controlling the level of logging to the

D:sys.log file. Each character in this string corresponds to a log group, and the following log groups are defined:

char Log Group/Information logged

I General system information (e.g. Startup)i System debug level informationE System errorsS High-level cellular connection and

synchronization informations Debug level cellular and synchronization

informationf File system operationse Data queue operationsq Message queue operationsM Text messaging high level informationR Sample rules informationX Mesh network informationx Mesh debug informationD DVR (RanchCam) informationd DVR (RanchCam) debug informationl

(lower case L)

Sampling debug information

W Vaisala information/errorsw Vaisala debug informationH Hortau information/errorsh Hortau debug informationc Charger control debug information

The following syntaxes are supported:

configset syslog -xyzRemoves a one or more chars from existing string

configset syslog +xyzAdds one or more chars from existing string

configset syslog *Reset syslog string to default

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 23

Page 25: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

tcpsyncemail1 Primary address of recipient of data emailstcpsyncemail2 Secondary recipient of data emailstcpsyncport Port on server to use for downlink HTTP GETtcpsyncurl URL to use for GET'ing downlink data from server, e.g.

/myapp/ping.jsp. The actual request will also have the parameter: ?RSUID=<unit-ID>

timesync Whether to synchronize time from server (1), or not (0). If not, local unit time can be set with date command.

udpsyncport UDP port on server where the Ranch Systems UDP server is running (Syncmode 2 only).

virtwd Virtual watchdog enable. If set to 1, the unit will catch hung process states and output detailed information to STDIO port. However, this mode is only to be used for debugging on STDIO, since it is not sufficiently robust for production operation. Leave as 0 normally. Requires reboot to take effect.

wdrate Rate of heart beat (blinking LED1 on main board) in milliseconds. Don't modify.

wifissid SSID of 802.11b access point. Required when using the WiFi modem option instead of cellular. Requires reboot to take effect.

wifikey WEP key for 802.11b WiFi modem option. This is an alphanumeric string. The length of the string determines the security type. If length in 10, WEP 64bit is used. If length is 26, WEP 128bit is used. Otherwise, no security is used. The same key is used for all 4 keys (key1-4). Requires reboot to take effect.

config port and config ports will generate a table format output of settings for the indicated port(s).

For explanation of config ports parameters, please see configset command.

Please see the following chapter for a detailed list of available sensor types.

CONFIGSETSyntax: configset <parameter> [ = ] <value>

configset port <portno> [ = ] <type> [ <samplerate> [ <subsamplerate>[ <excitationtime> [ <baud> [ <rule> [ <rule-rearm> ]]]]]]

NOTE: configset may be abbreviated as cs.

Description: Changes configuration settings.

The configset syntax (without ports) is used for basic settings. See the config command for descriptions of basic settings.

24 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 26: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

The configset ports syntax is used to set the sampling configuration for ports. Following the port number (and optional = sign), a number of parameters may be specified. Only the <type> is required - other parameters are optional. However, parameters must be given in the exact sequence listed in syntax, which means, for example, that to specify <excitationtime>, it will be required also to specify <samplerate> and <subsamplerate>, even if they are unchanged.

The following parameters are available for each port:

Parameter Descriptiontype Sensor type. See separate chapter for

detailed list of available sensor types.samplerate Seconds between each recorded sample.

For example 900 means that a data point is recorded each 15 minutes.

subsample rate Number of sub samples, viz the number of sample made between recorded samples. For example if sample rate is 900, a subsample rate of 3 means that the port will be physically sampled every 5 minutes and the average of these subsamples will be recorded as the final data point every 15 minutes.

excitation time Number of milliseconds to excite the port before sampling. Excitation refers to application of the 5V reference voltage. For certain actuation sensor types (such as latching DC valves), this value is the time the DC voltage is applied to valve.

baud For ports that have asynchronous serial capability, this is the baud rate that will be configured at boot time.

rule An optional text rule following the rules syntax discussed below.

rearm hours Number of hours before a rule is reactivated after firing.

Please see the following chapter for a detailed list of available sensor types.

COUNTSyntax: count

Description: Show the current status of all ports that have counting capability. Note that the only port that has both constant excitation and counting capability (which is often required, for example for rain gauges) is port 8.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 25

Page 27: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

CPSyntax: cp <sourcefile> <targetfile>

Description: Copy file on the internal flash file system. See flash file system chapter.

CHARGERSyntax: charger

charger [ on | off ]charger <dutycycle>

Description: Controls the on board charger. Used without parameter, the current charger state is displayed.

On/Off control simply turns charger fully on or fully off. <dutycycle> is a value between 0 and 100 and sets the duty cycle of the PWM charger (chrgmode 2 only).

Note that the charge control process also regularly adjusts these settings. If complete control is desired, that process must first be stopped with the job command.

CRCSyntax: crc <filename>

Description: Performs CRC check on a downloaded program file in the BLZ format. It will first list the CRC checksum stored in the file header, then calculate the actual CRC of the file. If the two CRCs match, the file is correct.

DATASyntax: data [ <records> ]

Description: Retrieves all (or specified number) of data records stored in the flash drive (D) waiting for upload to server. The specified number will determine the number of D-records included. S-records will be added as needed and M-records are always included.

This command is mostly needed for programmers looking to synchronize with the base station directly over the RS232 or RS485 ports. The format is also used in the data files emailed to server in sync mode 1.

The data digest syntax is simple ASCII text line, and each line is referred to as a “record”.

Each digest must have this form:

<I-record> { <S-record> }{ <D-record> }{ <M-record> }

26 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 28: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Each record is formatted as follows:

I-record:Defines the reference time stamp for this data digest:

I,<reftimestamp>

Where <reftimestamp> is the time in formatted like YYYYMMDDHHMMSS. All timestamps in D-records are simple relative integer number relative to this time, enabling the minimal data use for many D-records.

S-record:Defines a sensor used in subsequent D records:

S,<unitid>,<portno>,<sensorindex>,<sensortype>,<options>

Where:<unitid> is a unique unit identification number (32 bit integer). <portno> is the logical port number on unit of this sensor (8 bit integer)<sensorindex> is the index of this sub-sensor on the port (4 bit integer)<sensortype> is the sensor type as per Ranch Systems sensor type chapter below<options> is a reserved value (ignore)

D-record:Defines a specific data point:

D,<sensorref>,<timeref>,<rawvalue>

Where:<sensorref> is the 0-based sequence number of the sensor as per S-records – so a value of 0 means that the data is from the sensor defined by the first S-record, a value of 1 is the second S-record, etc. <timeref> is the timestamp of data relative to I record time. Positive number of seconds PAST the time in I-record. Negative would be ahead of reference time.<rawvalue> The binary value of the data point. This is a 32 bit hexadecimal number, with the following bit assignments (except sensor type 253, see below):

bit 0-23: Raw binary value (eg. output from ADC)bit 24-27: Used by some sensor types to encode sub-sensor indices. These

sensors include AquaSpy, AquaCheck, Decagon 5TE and Watermarks.

bit 28: Reservedbit 29-30: ADC mask: 0=10 bit ADC, 1=12 bit ADCbit 31: Error bit – if set, bit 0-15 is error code

In the case of sensor type 253 (UNITEVENTS type), the <rawvalue> is encoded differently, as follows:

bit 20-31: A UNITEVENTS code (see table below)bit 0-19: Numerical value of configuration/event. Numerical config/events

can be reported more space efficiently this way, while string type config/events use the M-record mechanism described below.

M-record:Defines an outbound message from expansion card to some other entity (user or unit):

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 27

Page 29: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

M,<sender>,<recipient>,<timeref>,'<message>'

Where:<sender> and <recipient> are user names (alpha) or unit id (numeric)<timeref> is the timestamp of data relative to I record time. Positive number of seconds PAST the time in I-record. Negative would be ahead of reference time.<message> is the message payload

M-records are the logical counterpart to the msgput command, and together these two mechanisms implement a versatile two-way messaging protocol across all units and sub-units associated with the same server system.

The server implements the special <recipient> UNITEVENTS, which will receive and post configuration/event messages from units. Units will generate M-records where the <message> is suffixed by a number in square brackets (see example and table of codes below), following by the configuration/event string.

Note that numerical config/events up to 20 bit wide are reported using the sensortype 253 as described above (for space efficiency reasons).

Example: I,101,20100111060101S,101,1,253,253,0S,2020,1,0,77,0S,2020,2,0,77,0...S,2023,0,0,23,0S,2023,5,0,23,0S,2023,10,0,103,0D,0,884,20972387D,0,874,31457622

28 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

10 Reboot 1030 Admin Cellular Number 1084 Excitation time (Latching)20 Successful Data Upload 1031 Cellular Band 1085 Power Mode22 Un-Successful Data Upload 1032 Unit Password 1086 Hibenation On Voltage30 Successful Server Ping 1036 Text Message ACL 1088 Hibernation Off Voltage32 Un-Successful Server Ping 1038 STDIO port 1089 SMTP Port40 Hibernation Begins 1040 Syslog Mask 1090 SMTP user name42 Hibernation Ends 1042 Job Run Mask 1092 SMTP password50 Text Message Sent 1044 WiFi Key (WEP) 1094 SMTP from address52 Text Message Received 1046 WiFi SSID 1096 TCP sync email1002 Unit type 1048 WatchDog rate 1098 TCP sync URL1004 Serial number 1050 Virtual WatchDog 1100 TCP sync port1006 Hardware version 1051 Server Time Sync 1102 UDP sync port1007 Modem firmware version 1052 Server Msg Mode 1104 SMS inbox1008 Bootloader version 1053 Sync Mode 1106 SMS outbox1010 Firmware version 1054 Sync Rate 1300 Node IDs1011 Firmware build 1056 Node check rate 1302 Mesh radio type1012 RSUID 1058 Texting enabled 1304 Mesh baud rate1014 Base ID 1059 Charge Mode (0 1306 Mesh ID1016 Base 1060 Charge level low/float 1308 Mesh CH1020 Primary Server IP 1062 Charger level high/bulk 1310 Mesh ST1022 Secondary Server IP 1063 Battery Type 1312 Mesh SP1023 APN server (GPRS) 1064 DVR mask 1314 Mesh DP1024 APN user (GPRS) 1066 DVR compression 1316 Mesh SM1025 APN password (GPRS) 1068 Reboot alerts enabled 1318 Mesh A11026 Terminal Server Port 1070 RSRF enabled 1320 Mesh A21027 Modem ESN/EMEI 1072 AGLNK mask1028 Modem Phone Number 1074 Debug code1029 Modem Card ID 1076 OSCTUNE setting

1078 BRGTUNE setting1079 REL4 Excitation (mins)1080 Default relay max on time1082 Excitation time (N.O.)

Page 30: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

D,1,959,4294967295D,2,957,4294967295...D,32,342,105D,33,339,103D,34,338,611M,101,UNITEVENTS,26,'[52]4159921478'M,101,UNITEVENTS,23,'[50]4159921478'

Example of response from data command (or upload to server):

DATESyntax: date

date [ YYYY-MM-DD HH:MM:SS ]

Description: Date without parameter shows the current date and time setting.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 29

Page 31: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Date with parameter updates the on-board real-time clock. Note that this change will require a reboot to take full effect.

DELETESyntax: delete

Description: Deletes all data currently buffered in the unit, i.e. any data that has not yet been synchronized.

The command is equivalent to rm d:rm200.dat, since buffered data is stored in the rm200.dat file on partition D:

ECHOSyntax: echo on

echo off

Description: Controls whether the current shell echoes typed characters. If typing to the shell and not seeing any characters, but commands are executing correctly, use echo on to get local echo.

FLOADSyntax: fload <filename>

fload <filename> hex

Description: Loads a file into the local file system via the shell.

If the hex parameter is not specified, the command will simply read from the command line until a QQ (double q) is encountered.

If the hex parameter is used, FLOAD will wait for the remote terminal to transmit a binary file in Intel Hex format, and will use control character ACK to control flow. The remote terminal must send one line at a time, waiting for the ACK or NAK control character before sending next line. If NAK is received, the same line must be resent.

FGETSyntax: fget <filename> [ <timeout> ]

Description: Downloads a file from the central server, typically a firmware program file. The download uses the modem (cellular or wifi) using a Ranch Systems packet data transfer protocol.

NOTE: this command will fail if the local file of the same name already exists. Also note that file names are case-sensitive.

The optional <timeout> parameter is the number of seconds to wait for the modem to

30 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 32: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

become available before timeout out with an error.

FPUTSyntax: fput <filename> [ <timeout> ]

Description: Uploads a local file to the central server. The download uses the modem (cellular or wifi) using a Ranch Systems packet data transfer protocol.

This command may, for example, be used to upload the d:sys.log file to the central server for inspection by Ranch Systems technical support, after prior arrangement.

The optional <timeout> parameter is the number of seconds to wait for the modem to become available before timeout out with an error.

FREQSyntax: freq

Description: Performs immediate frequency read on all capabile ports and displays results. Meaningful values will be displayed for all ports that have a digital square wave (0-5V) applied.

HALTSyntax: halt <password>

Description: Prepare unit for power off.

Un-mounts all file systems and stops all tasks, then enters into a loop with a continuous rhythmic buzzer tick, signaling that it is safe to shutdown unit.

HEXDUMPSyntax: hexdump <filename> [ <start> [ <length> ] ]

Description: Dump contents of binary file as hexadecimal data.

<filename> is the name of any file in the file system.

<start> is an optional decimal value, indicating the offset from start of file to start dump. Default is offset 0, start of file.

<length> is an optional decimal value, indicating the number of bytes to dump. Default is 256 bytes.

IOSyntax: io <port> read

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 31

Page 33: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

io <port> write <value>io <port> debug <mask>io <port> echo [ 1 | 0 ]

Description: Provides low level i/o control over individual hardware resources. Normally only used for testing and debugging purposes.

<port> is a virtual port number. To see a listing of port numbers and their attached resources, use the iostat command.

read syntax return the current value of data available at port, if port has input capability and data available.

write syntax writes the specified value to the port.

debug syntax sets the debug level on a port, causing debug information to be written to stdio whenever data moves to or from the port. The <mask> parameter is a decimal value representing a binary mask with the following bit meanings:

0 Report all byte data output to port1 Report all byte data input from port2 Report buffer level output (hexdump style)3 Report buffer level output (hexdump style)4 Report only summary level (byte count)5 Report only summary level (byte count)

echo syntax controls whether the specified virtual port echoes values received. This is a general low level mechanism that can be applied to any virtual port, but typically only makes sense for ports attached to human interfaces (such as serial ports).

IOSTATSyntax: iostat

iostat <portfrom> <portto>

Description: Outputs a current status all available virtual ports in the system.

<portfrom> and <portto> are optional range specification enabling display of status for a subset of ports.

JOBSyntax: job <jobno> pause

job <jobno> resume

Description: Changes run status of specified job.

pause syntax stops job, i.e. removes it from the multi-tasking execution queue.

resume syntax restarts job, i.e. Inserts it back into the multi-tasking execution queue.

32 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 34: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

JOBSSyntax: jobs

jobs pausjobs resume

Description: Lists current run status of all processes.

jobs pause syntax pauses execution of all tasks, except stdio and system watchdog.

jobs resume syntax resumes execution of all tasks currently paused. This is equivalent to job <jobno> resume on each job.

LSSyntax: ls

ls <filespec>

Description: Lists files in the file system.

<filespec> is a specification of files to list, and may include the wildcards * (asterisk) and ? (question mark). It may also use the partition specifiers D: and P:

For more information see the file system chapter.

MARKSyntax: mark <filename> primary

mark <filename> secondary

Description: Changes the boot status of binary executable files.

The primary syntax marks a file to be the primary file loaded during boot process. This file will be attempted first, before trying the secondary file.

The secondary syntax marks a file to be the secondary file loaded during boot process. This file will be attempted if primary file fails to execute.

MESHSyntax: mesh

mesh add <nodeid> <type> <vport> <channel <syncrate>mesh add <nodeid> remote <route-node-id>mesh <nodeid>mesh delete <nodeid>mesh -<nodeid>mesh sync [ <nodeid> ]mesh status

Description: Controls various high-level aspects of the mesh network. The mesh network is a more general term than network protocols like ZigBee or 802.11. In Ranch Systems

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 33

Page 35: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

terminology, mesh network refers to the base station and all the semi-autonomous nodes that it communicates with on a regular round-robin basis or by interrupt. Some of these nodes may in fact be accessed over a network layer like 802.11, but others may be via the expansion slot, yet others via serial ports.

The mesh syntax lists the current nodes in the round-robin queue, i.e. the nodes that are loosely attached to this base station. For each node the following information is displayed:

Column DescriptionID Node ID of entry. It is a unique number that identifies the node.

In the case of RS210 nodes, this number is printed on a label on the side of the enclosure.

Type The type of node. The following types are currently supported:

RS210/900 900MHz nodes

RS210/24 2.4GHz nodes

RF200 433MHZ RS100 receiver

REMOTE Remote node (not polled locally). Entries of this type are created automatically when a direct node reports data from a node that is remote from this RM210.

EXPHORTAU Hortau Expansion Board

Port The virtual port vis which the node is accessed. A list of all virtual ports are available with the iostat command. However, the common ports are 601 for RS210 nodes, 2 and 3 for the serial ports, and 710 and 720 for expansion boards.

Channel The channel used by the node. The allowed values are dependent on the type of node, and should match the channel configuratoin parameter of the node.

Rate The frequency of polling of each node in minutes (syncrate).Last The last polling expressed as minutes in the past from now.Next The next scheduled polling expressed as minutes in the future

from now.Status A status value which is a bit mask of the following values:

Bit Meaning if set

0 Comms OK, but too much data to complete sync

1 Poll complete, but some checksum retries during poll

2 (not used)

3 (not used)

4 Timeout during retries - sync incomplete

5 Error setting date

6 No response at all from node

7 No response from local mesh subsystem (local

34 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 36: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

mesh modem in RM210 defect or missing)

Signal For nodes on wireless links, this indicates link quality in dB as of most recent communication.

Example of mesh command output:

97 P:/>meshID Type Port Ch Rate Last Next Sts Signal----- --------- ---- -- ---- ---- ---- --- ------ 2000 RS210/24 601 12 10 1 3 02 -78DB 1000 EXPHORTAU 720 0 10 0 3 00 0DB 2001 REMOTE via:2000 1 00 2003 RS210/24 601 12 10 **** 3 40 0DB----- --------- ---- -- ---- ---- ---- --- ------

Notes to Example: Line 1 (2000) is an RS210 node that is current (last data is 1 minute ago) and although status shows checksum errors these are not fatal. The signal is good at -78dB. Line 2 (1000) is an expansion board, also current. Line 3 (2001) is a remote unit (probably an RS210 node) that is reporting via node 2000, and data was last received 1 minute ago. Line 4 (2003) is an RS210 node that has not yet reported as indicated by the asterisks in “Last” field and status of 40.

The mesh add syntax is used to add nodes to the list, the parameters are <nodeid>, <type>, <port>, <channel> and <syncrate> and match the parameters described above. The type can be specified as a case-insensitive substring (e.g. “900” for “RS210/900”, or “rf” for “RF200”).

Since the most common task is adding of RS210 nodes, the shorthand syntax of mesh <nodeid> is also supported. It will add the specified node with the default wireless port of 601, the default mesh type specified via configset meshtype, and default syncrate specified by configset subchkrate.

The mesh add <nodeid> remote syntax can be used to explicitly provide a route for reaching a remote node. However, in most cases this route information is created automatically as data is reported from node via the RM210.

The mesh delete syntax is used to remove nodes from the list. The shorthand of mesh -<nodeid> is also supported.

The mesh sync syntax forces an immediate polling of data from all nodes, or of a specific node if specified.

The mesh status syntax interrogates the wireless modem interface for current status parameters.

MSGPUTSyntax: msgput <recipient> <message>

Description: Enqueues a message to the indicated recipient. The sender id is set to SYSLOG, so in the case where recipient replies, the result will be written to syslog; this convention

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 35

Page 37: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

prevents eternal loops of messages bouncing between sender and recipient.

Recipient can be an RSUID, such as the number of a node or the id of the base station itself. It may also be a valid username of an administrative user on the online server, in which case the message will be visible in the admin page.

The message can contain quotes (“) without problem, since everything after recipient will be enqueued as message. The enables the easy enqueueing of messages containing quotes.

One important use of msgput command is to enqueue a message to the unit itself while communicating on the channel that is required for the command to execute. For example, if talking to the base station over the terminal server, a command to get a new program file like fget RM764B4.BLZ will not work because the modem is busy. In that case the following command can be used: msgput 245 “fget RM764B4.BLZ 120”, followed by “quit”. As long as the modem becomes available within 120 seconds, the unit will execute the command, even after we are logged off. We can then log back on and see the result of the command in the sys.log file.

MSGGETSyntax: msgget <recipient>

Description: Dequeues the next message pending for the indicated recipient. See msgput command for types of recipients.

This command can be used by two users talking to a base station by two different means, since any recipient is valid. One user could use: “msgput jim hello jim, how are you?”, and then the other user can use “msgget jim” and will receive the message.

Another typical usage is to cancel a msgput.

MSGLSTSyntax: msglst

Description: Lists all currently enqueued messages.

QUITSyntax: quit

Description: Terminates the current shell session.

REBOOTSyntax: reboot <pword>

reboot hard <pword>reboot erase <pword>reboot eraseall <pword>

36 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 38: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Description: Reboots the units with various levels of severity.

<pword> is the unit password as shown with config command.

The reboot syntax performs a soft reboot, keeping all configurations and miscellaneous process state information intact.

The reboot hard syntax performs reboot like soft reboot, with the exception the reset is forced via the hardware watchdog that will physically toggle the reset line on the CPU. This will take up to 2 minutes from time of command.

The reboot erase syntax performs a soft reboot, including deletion of miscellaneous process state information, but keeping configuration data intact.

The reboot eraseall syntax performs a complete reboot to a known, factory default configuration state. Note that this includes the RSUID, i.e the unit id which is reset to a value of 100.

RELAYSyntax: relay <relayno>

relay <relays> <on> [ <ontime> <onduration> ] relay <relayno> <off> relay <nodeid> <relayno> <on> [ <ontime> <onduration> ] relay <nodeid> <relayno> <off>

Description: Controls on-board and remote relays.

<relayno> must be a single relay number where 1 is always the first relay on a unit. <relays> can be a single relay number (e.g. 1) or a range (e.g. 1-3).<on> can be the text on or the number 1.<off> can be the text off or the number 0.

Note that relay numbers are different from port numbers. For example, relay 1 on a base station is physically port 11. So to configure the first relay using the configset command, you would refer to port 11. In the software, a transition on relay 1 will also be reported as port 11. However, to control the relay with this command the number 1 is used.

The relay <relayno> syntax returns the current state of the relay.

The relay <relayno> [ on | off ] syntax turns relay on and off respectively.

The relay <nodeid> <relayno> [ on | off ] syntax turns relay on and off respectively on a remote node. This does not happen immediately, but initiates a subsequent synchronization with the node that will cause the relay transition. The involved delay will depend on the number of nodes in the system.

The <ontime> and <onduration> are optional parameters that constrain the relay turn-on request to a specific time interval, after which the relay is automatically turned off. <ontime> is in the format: YYYY-MM-DD HH:MM:SS. <onduration> is in minutes. If the

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 37

Page 39: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

current time is already outside this window when command is executed, the command is ignored.

NOTE: RL200 relay expansion units are supported. Simply specify relay numbers 5 onwards, and the RM210 will attempt to access RL200(s) on port 3. As normal with RL200, the first RL200 must be ID 20, the next 21 etc. See service note on RL200 for more details.

NOTE: The multiple relay syntax is support from firmware version 794B16 onwards.

RMSyntax: rm <filename>

Description: Removes a file from the file system, freeing up the associated space.

The file is unrecoverable after this command.

SDATASyntax: sdata { <port#> | * | H | R | C }

Description: Scans requested ports for real-time data values and output results immediately. The output values are the same that would be reported via the regular sampling logic, but sdata command operates immediately and completely independently of the regular sampling logic.

The parameters is a list of port numbers (matching first column in config ports output) to be scanned. Data is sampled and converted according to the sensor type configured (see following chapter).

The following special characters can be used anywhere on the command line:

* Include all sensor ports configuredH Include a header row with sensor type descriptorsR Repeat scan until keypressC Format as CSV (rather than fixed with)

SENSESyntax: sense

sense <portno>

Description: Causes an immediate sensing of attached sensors, according to configuration.

The sense syntax forces immediate sensing of all ports.

The sense <portno> syntax on forces sensing on the specified port.

The result of the sensing will not be shown in the shell explicitly, but will show in subsequent vdata command results and be reported to the server like any other

38 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 40: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

sensing event.

SIGNALSyntax: signal

Description: Displays the current cellular signal strength and error rate.

Perfect signal is 100% and a bit error rate of 0. Marginal cellular reception is in the range 20-30%.

See Also: For latest mesh signal strengths per node, see the mesh command.

SMSSyntax: sms <phoneno> <message>

Description: Send a text message directly from the unit's embedded cellular modem.

<phoneno> is a fully qualified phone number in the format +1xxxyyyzzzz (in the US). Internationally the equivalent formats should be followed.

<message> is the message to send, enclosed in single-quotes (').

SYNC

Syntax: sync

Description: Force immediate synchronization with server.

TEMPSyntax: temp

Description: Immediately samples and displays temperature on all ports configured as temperature.

This command does not cause an actual data point to be generated.

See Also: sense

TERMSyntax: term <portno> [ <baud> ] -- version 795B4 or earlier

term <portno> [ <script> ] -- version 795B5 onwards

Description: Starts a terminal interface between the current shell and another port.

<portno> is the remote port to run terminal against. This must be a serial port, and is

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 39

Page 41: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

typically 2 or 3, although various internal ports are also possible, such as directly accessing the modem on port 605, or the internal pin-header debugging TTL-level serial port on 630. Use iostat to see available serial ports.

<baud> is the (optional) initial baud rate to set on remote port. If not specified the remote port baud rate is not changed. The other serial communications parameters are always: 8 data bits, 1 stop bit and no parity bit.

<script> is a sequence of characters to inject into terminal upon opening of the port. For example to open terminal to port 2, set baud rate to 9600, turn power on, wait 3 secs, then send the command query<CR>, use the following command:

term 2 ~b3~P~w3~~query~a13~~~q

Notice that the script is simply the character sequence a person could type in the interactive terminal with the exception of ~~ which is used to signify ENTER in cases where a ~ command take a line input.

Once the terminal interface is open, use the tilde character: ~ to access further 1-letter commands. For example. ~Q quits the terminal and ~? lists available commands.

VDATA

Syntax: vdatavdata <from> - <to>vdata <rsuid> [ <from> - <to> ]

Description: Displays data records currently stored on the device, i.e. data records not yet forwarded to server during a synchronization event.

<from> and <to> specify an optional range of records to list. Records are numbered from 0 upwards.

<rsuid> limits the display to data records from sensors on the specified unit.

The vdata output has the following layout (example):

Listing 0-29 of 29 data records

Rec# Sensor Type Last timestamp Raw Conv------ ---------------------- ---- ------------------- -------- -------- 1 12140:10.02:115 DB 2010-02-09 22:50:44 ffffb7 -73 dB 2 12141:00.00:23 TP 2010-02-09 22:49:36 40 39.2 F 3 12141:01.00:72 FL 2010-02-09 22:50:25 ffff 0.0 GPM 4 12141:02.00:72 FL 2010-02-09 22:50:27 ffff 0.0 GPM 5 12141:03.00:72 FL 2010-02-09 22:50:29 ffff 0.0 GPM 6 12141:10.02:115 DB 2010-02-09 22:50:59 ffffb4 -76 dB 7 12142:09.00:201 VL 2010-02-09 22:48:52 0 CLOSED 8 12142:09.00:201 VL 2010-02-09 22:48:53 1 OPEN 9 12142:06.01:60 SM 2010-02-09 22:49:02 1837b 99.0% 10 12142:06.02:60 SM 2010-02-09 22:49:02 16814 92.0% 11 12142:06.03:60 SM 2010-02-09 22:49:02 173d4 95.0% 12 12142:06.04:60 SM 2010-02-09 22:49:02 16225 90.0% 13 12142:06.05:60 SM 2010-02-09 22:49:02 159fc 88.0% 14 12142:06.06:60 SM 2010-02-09 22:49:02 157d5 88.0% 15 12142:06.07:60 SM 2010-02-09 22:49:02 15d44 89.0% 16 12142:06.08:60 SM 2010-02-09 22:49:02 1543e 87.0%

40 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 42: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

17 12142:06.09:60 SM 2010-02-09 22:49:02 15d97 89.0% 18 12142:06.10:60 SM 2010-02-09 22:49:02 15635 87.0% 19 12142:06.11:60 SM 2010-02-09 22:49:02 12b12 76.0% 20 12142:06.12:60 SM 2010-02-09 22:49:02 14119 82.0% 21 12142:06.13:60 SM 2010-02-09 22:49:02 14c40 85.0% 22 12142:06.14:60 SM 2010-02-09 22:49:02 15192 86.0% 23 12142:06.15:60 SM 2010-02-09 22:49:02 1507a 86.0% 24 12142:09.00:201 VL 2010-02-09 22:49:01 1 OPEN 25 12142:09.00:201 VL 2010-02-09 22:49:02 0 CLOSED 26 12142:10.00:103 VO 2010-02-09 22:49:03 2a2 10.8 V 27 12142:00.00:23 TP 2010-02-09 22:49:04 3b 38.6 F 28 12142:10.02:115 DB 2010-02-09 22:51:15 ffffc4 -60 dB 29 13153:10.02:115 DB 2010-02-09 22:51:25 ffffb4 -76 dB------ ---------------------- ---- ------------------- -------- --------

The columns have the following meanings:

Rec# is a simple sequential number for the data records included.

Sensor identifies the sensor where the data point originated. It has the format: <RSUID>:<port>.<subport>:<sensortype>. <RSUID> is the unit/node ID, the <port> is the port number where sensor is attached. <subport> is 0 for sensors with just one measurement, or 1...X where there are more sub sensors, such as on a soil probe. <sensortype> is a number according to the table given under the description of the configset command.

Type is a convenience field giving a textual indication of the sensor type.

Last timestamp is the actual timestamp of the data point.

Raw is a hexadecimal value reflecting the raw data received from the sensor.

Conv is the converted value. It is derived from the Raw value by a formula specific to the sensor type.

VP2

Syntax: vp2vp2 onvp2 off

Description: Displays and controls the power generator associated with port 2 (RS232). The power generator is a 9V overload protected generator capable of 0.25A-1A loads depending on duty cycle.

The vp2 syntax displays current state of generator (on or off).

The vp2 on/off syntax turns the generator on or off respectively.

VP3

Syntax: vp3vp3 onvp3 off

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 41

Page 43: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Description: Displays and controls the power generator associated with port 3 (RS485). The power generator is a 9V overload protected generator capable of 0.25A-1A loads depending on duty cycle

The vp3 syntax displays current state of generator (on or off).

The vp3 on/off syntax turns the generator on or off respectively.

VREF

Syntax: vrefvref onvref off

Description: Displays and controls the high precision reference voltage generator associated with sensor ports 4 through 9. This reference generator generates 5V with 0.15% accuracy while delivering up to 10mA. A maximum current of 100mA can be delivered, but with degrading precision.

The vref syntax displays current state of generator (on or off).

The vref on/off syntax turns the generator on or off respectively.

42 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 44: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

CUSTOM SERVER SYNCHRONIZATION

The RM210 base station offers a number of approaches to server synchronization, including an open interface for programmers to build their own server side implementation and even remote command line interface for remote management.

The methods are mutually exclusive and are selected with the configset syncmode command.

Mode Description0 No explicit synchronization performed. In this mode, data is

typically polled by an external program via the RS232 connection or via Mesh networking.

1 TCP/SMTP synchronization. Each sync event consists of sending an email with the digest of collected data to a designated email account, followed by an HTTP GET to retrieve any data from the server for the base station or nodes under its control. This mode is completely open and non-proprietary.

2 UDP synchronization. Each sync is a set of compressed, binary UDP packets in both directions. This mode is fast and very efficient in terms of data bandwidth usage, but requires the Ranch Systems UDP server installed on servers.

3 Reserved4 TCP/FTP synchronization. Each sync event consists of

uploading a file to a user-selected FTP server with the digest of collected data, followed by an HTTP GET to retrieve any data from the server for the base station or nodes under its control. This mode is completely open and non-proprietary.NOTE: Requires version 794B12 or later.

In addition, a "Remote Command Line" feature is possible, regardless of syncmode. This is always via TCP and also described below.

Uplink SMTP Synchronization (syncmode 1)For sync mode 1, setting the following parameters using configset command will allow uplink synchronization to your server of choice:

serverip1 IP address of primary SMTP server. Also backup for HTTP.serverip2 IP address of web server able to respond to the HTTP

request to TCPsyncurl (see below). Also backup for SMTP.smtpport SMTP port number (default is 25)smtpun Username for SMTP authentication (AUTH LOGIN)smtppw Password for SMTP authentication

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 43

Page 45: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

smtpfrom Email address used as sender in SMTP upload. Domain part is also used in SMTP HELO command.

tcpsyncemail1 Primary address of recipient of data emailstcpsyncemail2 Secondary/backup recipient of data emailstcpsyncurl URL to use for GET'ing downlink data from server, e.g.

/myapp/ping.jsp. The actual request will also have the parameter: ?RSUID=<unit-ID>

tcpsyncport Port on server to use for downlink HTTP GET

After setting these parameters, please reboot the unit.

You should now start receiving emails from the unit on the server designated. This will be the “uplink” synchronization. The format of the data files are CSV, and contains I, S, D and M records as described under the data command – please refer to command reference in this document.

Uplink FTP Synchronization (syncmode 4)For sync mode 4, setting the following parameters using configset command will allow uplink synchronization to your FTP server of choice:

serverip1 IP address of primary FTP server. Also backup for HTTP.serverip2 IP address of web server able to respond to the HTTP

request to TCPsyncurl (see below). Also backup for FTP.ftpport FTP port number (default is 21)ftpun Username for FTP authenticationftppw Password for FTP authenticationftppath Directory on server. Set to / to select root directory

After setting these parameters, please reboot the unit.

You should now start receiving files from the unit in the server directory designated. The files will have a name like: “rs-100-20110101-160000.asc”, where “rs” is constant and the three numbers are the unit ID, date and time. This will be the “uplink” synchronization. The format of the data files are CSV, and contains I, S, D and M records as described under the data command – please refer to command reference in this document.

Downlink HTTP Synchronization (syncmode 1 or 4)For downlink synchronization, the base station will issue an HTTP to the URL configured above. This will happen as the last action in each sync session. The reply from server may be formatted freely, i.e. in can be XML, HTML as long as it is ASCII characters. However the reply must have the text [EOF] at the end of the significant portion of the reply. The significant portion is the portion containing the records described below.

Lines of the following types will be parsed by the base station up to the [EOF] marker:

44 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 46: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

M-record:Defines an outbound message from server destined for base station a sub-station coordinated by base station:

M,<sender>,<recipient>,'<timeref>','<message>'

Where:<sender> and <recipient> are user names (alpha) or unit id (numeric)<timeref> is the timestamp of data in format YYYY-MM-DD HH:MM:DD.<message> is the message payload

T-record:Communicates the current server time to the base station, allowing the base station to keep in real-time state.

T,'<timeref>'

Where:<timeref> is the current time in format YYYY-MM-DD HH:MM:DD with an optional timezone suffix that will be ignored since the base is not timezone-aware.

NOTE: Be careful not to have any extra white-spaces in the records. Comma is the only separator. There are no space characters, except inside <message>.

The following is a typical example of a server reply to the base HTTP GET request:

T,'2011-01-06 19:02:51 -0500'M,testuser,100,'2011-01-04 12:29:54','beep'[EOF]

SMS Gateway Implementation (SMSGW)

Layered on top of the SMTP uplink and HTTP downlink synchronization, the RM210 has the capability to act as a gateway for text messaging from end users to and from the server. Since the base station is typically deployed in a user local area, this is a powerful feature that lets users use the RM210 as a gateway for "talking" to the server via text messages without incurring international text messaging fees. Any text message (except those starting with a dot, see below) are captured by the RM210 and carried back to the server via regular uplink synchronization.

No special configuration is required on the RM210 for this to work. The default behavior is as follows:

1. Any text message without a dot prefix sent to the cellular number of the RM210 will be forwarded as an M-record to the server with a recipient name of SMSGW and the sender cellular number in square brackets prefix. For example, if the message status was received from cellular number +14159997777, an M-record like the following would be generated (456 is the ID of the RM210):

M,456,SMSGW,'2011-01-01 12:00:00','[+14159997777]status'

2. The server handling of uplink HTTP synchronization will get the message payload and will

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 45

Page 47: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

perform some appropriate application specific query or function, and then generate a reply.

3. The reply can be propagated to the end user by means of the sms command in a downlink M-record, or even by text message to the RM210's cellular number, making sure to precede the sms command with a dot, forcing a local executing of the command.

Note the important convention that any inbound text message to the RM210 with a dot as first character will be processed as a local command, whereas any other message will be forwarded to the server.

Using the above mechanism, a local user in any country in the World can exchange messages with the central server without the need for any special messaging gateway, and using only local text messages.

FGET Implementation

In order for the base station to download new firmware files (or other files) from the server, the server must implement the FGET command.

In the RS server software,the FGET command is provided by the Terminal Server (default on port 8081), but the full Terminal Server functionality is not required to simply obtain the FGET functionality.

The following are the minimal elements required by a server process to implement FGET:

1. The process must serve TCP/IP sockets on a port matching the csessionport setting on the base station. The IP address is the same as used in synchronization.

2. On new socket open, must present a prompt ending with “ogin:” (allowing for lower or uppercase L). Base station will respond with unit ID followed by CR. Then present a response ending with “assword:” to which the base station will respond with unit password followed by CR.

3. The base will scan for the string “elcome” as confirmation that it has been authenticated.

4. Next the server must expect the fget command followed by a file name, followed by CR, and issue a reply containing the string “Sending xyz (xyz) bytes” where xyz is the exact number of bytes that will be transmitted. Repeating the size twice provides a simple yet human readable checksum. It is up to the server how to apply a path to the filename provided.

5. Next the server must listen for a reply from base station containing “OK OK” (two OK with a single space between).

6. At this point the server must start sending packets following the following syntax rules:

<header><header_chksum><data><data_chksum>

Where <header> is in the following format:

46 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 48: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

<startbyte><packno_msb><packno_lsb><packsize_msb><packsize_lsb>

Each item is defined as follows:

<startbyte> Hexadecimal byte 0xAA<packno_msb><packno_lsb>

16 bit packet number starting with zero

<packsize_msb><packsize_lsb>

16 bit packet size (maximum supported size is 2048). Dynamically changing packet size is supported and recommended if experiencing consecutive error packets.

<header_chksum> Simple 8 bit checksum of the 4 bytes following <startbyte>

<data> Binary payload – must be exactly <packsize> bytes

<data_chksum> Simple 8 bit checksum of all bytes following <startbyte> up until <data_chksum>

7. The base station will respond to packets with messages containing:

• “Packet x OK” - if packet x was received and accepted.

• “Error” - if packet was rejected. The actual message will be longer with human readable explanation of reason for rejection.

8. The FGET session will be concluded when the base station has acknowledged the last packet which both parties to the communication can precisely predict based on the original response from server containing the total number of bytes. In addition, the base station will send a final acknowledgment in the format: “xyz bytes written to file”.

Remote Command Line Implementation

The RM210 has the capability to present its command line interface to a TCP socket established via the modem. This capability can be used to create a telnet connectivity functionality similar to that provided by the Ranch Systems Terminal Server (part of the Ranch Systems online software suite).

The following sequence of events occur when the RM210 is to engage this the kind of communication:

1. The server must provide a TCP server that listens on port 8081 of the primary IP configured on the RM210.

2. The csession command must be invoked on the RM210. This can be achieved by sending a text message such as:

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 47

Page 49: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

.csession <4329>

where 4329 is the current unit password, or by enqueuing the csession command for download to unit via the downlink sync step (e.g. M-record in TCP GET for syncmode 1)

3. Upon execution of the csession command, the RM210 will open a TCP socket to port 8081 on its primary IP.

4. Once the socket is open and a welcome banner is received from server (not parsed), the RM210 will submit its unit ID as the login user name, followed by CRLF (carriage return line feed)

5. The TCP server must respond with prompt for password containing the string "password:"

6. The RM210 will submit its unit password, followed by CRLF (carriage return line feed).

7. The TCP Server will authenticate Unit ID and password, and if accepted, reply with a message containing the string: "elcome" (notice that W or w is not part of match).

8. The RM210 will immediately submit the command "listen" followed by CRLF.

9. The TCP server may now submit a response containing the string: "onnected", and the RM210 will proceed to send the shell greeting and prompt to the socket. At this point, the remote command line is in session.

10. If the TCP server sends any other response, the RM210 will close socket.

11. The remote command line will continue until the server sends the "quit" command, or no command sent for 60 seconds (timeout). At that point the RM210 will close the socket.

SummaryIn summary, the typical server implementation consists of the following steps:

• A server process (can be “headless”) that scans the relevant email inbox for new data messages and updates a database or generates user output in some other form directly.

• A hosted web server page that outputs current time as a T-record, and optionally also processes the M-records.

• Optionally implementing server processes listening for special inbound M-records, such as those addressed to UNITEVENTS and SMSGW.

• Optionally implementing the FGET command for facilitating download of new firmware files.

• Optionally the Remote Command Line feature can be implemented.

A typical “first cut” implementation of this can be accomplished in a few days by an experienced programmer.

Should you need any help understanding the above documentation, please feel free to send us an

48 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 50: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

email at [email protected].

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 49

Page 51: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

SENSOR TYPES

All ranch system units and online software rely on a single, unified list of sensor types. Each sensor type is identified by an 16 integer number.

Whenever a sensor data point is acquired, transmitted or stored, it is in a "raw" 32 bit integer format. The interpretation of these 32 bits depend on the sensor type.

The correct reporting of values from a physical sensor on a physical port demands that the correct sensor type be programmed using the "configset" command (see command reference).

Below is a list of current Ranch Systems sensor types, along with interpretations. For simplicity of implementing custom software, the conversion formulas are provided as C-code.

Note that some (but not all sensors) use the following encoding of 32 bit raw values:

Bits Interpretationbits 0-23 Data bits (rawValue)

bits 24-27 Sub index bits (allows encoding of sub sensor index of 0-16)

bit 28 Reservedbit 29 12 bits ADC (adcDivisor = 4095) If not set, 10 bit

ADC and adcDivisor = 1023bit 30 Reservedbit 31 Error bit - error reading sensor

The Enc column below indicates for each sensor type if the above encoding is used. Otherwise all 32 bits are used as rawValue.

Type ID

Description Enc Unit Conversion formula

23 Air temperature. 1-wire bus interface. Yes F return ((rawValue*1.0)/16)*1.8 + 32

24 Soil temperature. 1-wire bus interface.

Yes F return ((rawValue*1.0)/16)*1.8 + 32

25 Air temperature. RS NTC type analog interface.

Yes F #define RSNTC_A 0.0011164014655#define RSNTC_B 0.000237982973213#define RSNTC_C -0.000000372283234#define RSNTC_D 0.000000099063233

float V,R,TK;

V = (rawValue*5.0)/adcDivisor;R = (5.00-V)*10000/V;if (R<0.01) R=0.01;

50 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 52: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

TK = 1/(RSNTC_A + RSNTC_B*log(R) + RSNTC_C * pow(log(R),2) + RSNTC_D * pow(log(R),3));return (TK*9.0/5)-459.67;

26 Soil temperature. RS NTC type analog interface.

Yes F #define RSNTC_A 0.0011164014655#define RSNTC_B 0.000237982973213#define RSNTC_C -0.000000372283234#define RSNTC_D 0.000000099063233

float V,R,TK;

V = (rawValue*5.0)/adcDivisor;R = (5.00-V)*10000/V;if (R<0.01) R=0.01; TK = 1/(RSNTC_A + RSNTC_B*log(R) + RSNTC_C * pow(log(R),2) + RSNTC_D * pow(log(R),3));return (TK*9.0/5)-459.67;

27 NTC type temp sensor used as the internal temperature sensor in RM210 and RS210 unit, and reported by default on port 0.

Yes F float V,R,TC, R2;

V = (rawValue*5.0)/adcDivisor;R = ((5.00-V)*10000/V)/1000; R2 = R*R;TC = 0.00009564209875 * R2*R2;TC = TC - 0.009415584328 * R2*R;TC = TC + 0.3544349846 * R2;TC = TC - 6.874403236 * R + 66.72933652;return (TC*1.8) + 32;

30 Rain gauge. 0.01 inch per tip, tipping bucket type. Only allowed on port 8 on RM210 or port 5 on RS210 (constant excitation).

Yes Inch return rawValue*0.01;

31 Rain gauge. 1 mm per tip, tipping bucket type. Only allowed on port 8 on RM210 or port 5 on RS210 (constant excitation).

Yes Inch return rawValue*0.03937;

35 Wind speed sensor. Digital square wave, 1.25 MPH / HZ type.

Yes MPH if (rawValue==0) return 0.0;return (2000*1.25)/rawValue;

36 Wind speed sensor. Digital square wave, 2.25 MPH / HZ type. For example Davis Instruments wind speed sensors.

Yes MPH if (rawValue==0) return 0.0;return (2000*2.25)/rawValue;

40 Wind direction sensors. Linear analog voltage type. North is at crossing point between 0 and maximum voltage. For example Davis Instruments wind direction sensors.

Yes Degrees0-360

return (((adcDivisor-rawValue)*1.0)/adcDivisor) * 360;

52 Echo 20 soil moisture sensor. Yes VWC % return 100*(0.000415*((rawValue*5000L)/adcDivisor) - 0.335);

53 Echo 5 soil moisture sensor. Yes VWC % int mv = (rawValue*5000L)/adcDivisor;return 100*((-0.000000314*mv*mv) + (0.00116*mv) - 0.612);

54 Decagon 5TE sensor. This sensor type is used only for configset. The actual data is stored using 3 distinct sensor types 1200-1202 (see below)

n/a n/a n/a

56 Watermark SS sensor (single sensor). This type is never

Yes kPa const int watermarkTable[200] = { // watermark table of ohms for each CB ready 0-199 550,600,650,700,750,800,850,900,950,1000,110

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 51

Page 53: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

configured, but may be reported via an RX200 configured sensor type 190 (see 190 below).

0,1280,1460,1640,1820,2000,2200,2400,2600,2800,3000,3200,3400,3600,3800,4000,4200,4400,4600,4800,5000,5200 ,5400,5600,5800,6000,6160,6320,6480,6640,6800,6960,7120,7280,7440,7600,7760,7920,8080,8240,8400,8560,8720,8880,9040,9200,9350,9500,9650,9800,9950,10100 ,10250,10400,10550,10700,10850,11000,11150,11300,11450,11600,11750,11900,12050,12200,12335,12470,12605,12740,12875,13010,13145,13280,13415,13550,13685 ,13820,13955,14090,14225,14360,14495,14630,14765,14900,15035,15170,15305,15440,15575,15700,15825,15950,16075,16200,16325,16450,16575,16700,16825,16950 ,17075,17200,17325,17450,17575,17700,17825,17950,18075,18200,18325,18450,18575,18700,18825,18950,19075,19200,19325,19450,19575,19700,19825,19950,20075 ,20200,20325,20450,20575,20700,20825,20950,21075,21200,21325,21450,21575,21700,21825,21950,22075,22200,22325,22450,22575,22700,22825,22950,23075,23200 ,23325,23450,23575,23700,23825,23950,24075,24200,24325,24450,24575,24700,24825,24950,25075,25200,25325,25450,25575,25700,25825,25950,26075,26200,26325 ,26450,26575,26700,26825,26950,27075,27200,27325,27450,27575,27770,27825,27950 };

float V = (rawValue*5.0)/1023;float R = (V*18000)/(5.0-V);for (i=0; i<200; i++) { if (R<watermarkTable[i]) { if (i==0) return 0.0; j = watermarkTable[i-1] + ((watermarkTable[i]-watermarkTable[i-1])/2); if (R<j) return (float)i-1; return (float)i; } } return (float)199;

57 Irrometer Watermark 200SSV sensor.

Yes kPa return (float)(((rawValue*5.0)/adcDivisor)*239/2.8);

60 AquaSpy multilevel soil moisture sensor. Only allowed on RS232 and RS485 ports.

Yes Scale0-100

return (rawValue&0xffffff)/1000.0;

62 AquaCheck single multilevel soil moisture sensor. Only allowed on SDI-12 ports. For configuration only. Data is reported as type 1301 and 1302.

n/a n/a n/a

63 AquaCheck dual (using Y-cable) multilevel soil moisture sensor. Only allowed on SDI-12 ports. For configuration only. Data is reported as type 1301 and 1302.

n/a n/a n/a

52 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 54: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

72 GEMS 173933 Flow sensor. Digital square wave type, 287.5 HZ / GPM.

Yes GPM if (rawValue>=0xffff) return 0.0;if (rawValue==0) return 0.0;return (1000000.0/rawValue)*(4.0/1150);

75 General frequency counter type. Resulting value is Hertz. The underlying measurement is in microseconds, and designed for relatively fast frequencies (>100Hz).

Yes Hz if (rawValue>=0xffff) return 0.0; if (rawValue==0) return 0.0;return 1000000.0/rawValue;

76 General frequency counter type. Resulting value is Hertz. The underlying measurement is in milliseconds, and designed for relatively slow frequencies (<100Hz).

Yes Hz if (rawValue>=0xffff) return 0.0; if (rawValue==0) return 0.0;return 1000.0/rawValue;

77 Flow sensors. Gems Sensors RFO 0.25” type

Yes GPM if (rawValue==0xffffffff) return 0.0; if (rawValue==0) return 0.0;hz = (1000000.0/rawValue);return hz*hz/4815389+hz*0.02637+0.097083;

78 Flow sensors. Gems Sensors RFO 0.75” type

Yes GPM if (rawValue==0xffffffff) return 0.0; if (rawValue==0) return 0.0;hz = (1000000.0/rawValue);return hz*hz/54200+hz*0.1416+1.516;

79 Flow sensors. Gems Sensors RFO 1.00” type

Yes GPM if (rawValue==0xffffffff) return 0.0; if (rawValue==0) return 0.0;hz = (1000000.0/rawValue);return hz*hz/-36471+hz*0.3251+0.72315;

85 Apogee amplified 5V pyranometer. Yes W/m2 return ((rawValue*5.0)/adcDivisor) * 250;

80 Davis instruments UV sensor type 6490.

yes UV index

return ((rawValue*5.0)/adcDivisor) / 0.150;

90 Humirel HM1500 relative humidity sensor.

yes RH % return ((rawValue*5.0)/adcDivisor) * 39.0 - 44.5;

91 Honeywell relative humidity sensors - HIH40xx series.

yes RH % return ((rawValue*1.0/adcDivisor)-0.16)/0.0062;

95 Decacon leaf wetness sensor (LWS). Unit is a raw mV value that is normally around 400-500mV, but spikes higher when condensation starts on sensor.

yes mV return ((rawValue*5000.0)/adcDivisor) ;

106 Internal battery sensor for RM210 base stations. This sensor type can be used on external ports to measure DC voltages up to 165V by adding an external voltage divider with 5K6 resistor to ground and 180K to measured voltage.

yes Volt return (float)((rawValue*165.71)/adcDivisor);

110 General 0-5V sensor. RM210 or RS210 port is excited with 5V reference voltage, and this sensor type will return the corresponding voltage in range 0-5V on the port signal line.

Yes Volt return (rawValue*5.0)/adcDivisor;

112 Internal battery sensor for RS210 nodes. This sensor type can be used

Yes Volt return (float)((rawValue*165.71)/adcDivisor);

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 53

Page 55: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

on external ports to measure DC voltages up to 165V by adding an external voltage divider with 5K6 resistor to ground and 180K to measured voltage.

115 Signal strength in decibels. Used to report cellular, wifi and mesh networking signal strength internally on the RM210/RS210 units.

Yes dB return (rawValue*1.0);

124 Pressure sensor, 100psi, 5V analog type, reporting 0-100psi as 0.5-4.5V.

Yes PSI return ((rawValue*5.0)/adcDivisor - 0.5) * (100.0/4) * (235.0/100);

125 Water level pressure sensor. Reporting water level in feet as pressure of water column 0-15psi, reported as 0-4.5V.

Yes ft return (rawValue*5.0)/adcDivisor * (15.0/4.5) * (235.0/100);

140 Switch sensor. Senses simple switch between 0 and 5V on input and return 0 or 1 correspondingly.

Yes 1 = high 0 = low

return (float)rawValue;

150 Vaisala WXT510 or WXT520 composite weather station. Used to configure port. Data values returned as type 1100-1105.

n/a n/a n/a

180 Sensor type for Ranch Systems DVR unit 640x480 resolution. Acquires still images as sensor data.

Yes kBytes return (float)rawValue;

181 Sensor type for Ranch Systems DVR unit 720x576 resolution. Acquires still images as sensor data.

Yes kBytes return (float)rawValue;

190 RX200 configured to read 4 Watermarks. No data is return with this sensor type. Only used for configuration.

n/a n/a n/a

192 RX200 configured to read 4 analog sensors. The actual sensor types are configured via the RX200, and data will be reported according to those types.

n/a n/a n/a

195-198

RL200 type for RS485 port. Used to indicate to RM210 firmware that one or more RL200s have been connected. 195=1, 196=2, 197=3, and 198=4 RL200 respectively. Data from RL200 is returned as valve data (see types 200 - 203)

n/a n/a n/a

200 or 201

Normally Open (NO) relay/valve sensor/actuator type. All relay/valves report 0 or 1 as OPEN or CLOSED. However, the specific type will affect

Yes 1 = on0 = off

return (float)rawValue;

54 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 56: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

how the relay is actuated by control commands. Normally open is a quick ~50ms switch between on and off state, with no power provide to the relay connectors.

202 DC latching relay/valve sensor/actuator type. All relay/valves report 0 or 1 as OPEN or CLOSED. However, the specific type will affect how the relay is actuated by control command. DC latching is a slow (~100ms) switch between 0V/12V and -12v/0V output pins with power drive to the relay pins.

Yes 1 = on0 = off

return (float)rawValue;

203 Normally Open (NO) momentary relay/valve sensor/actuator type. Like 201 type, but not bi-stable. After being on for ½ sec, it will automatically turn back off. Used to make the corresponding relay act as a momentary push button.

Yes 1 = on0 = off

return (float)rawValue;

1100 Vaisala WXT510/520 Wind Direction No Degree0-360

return rawValue*1.0;

1101 Vaisala WXT510/520 Wind Speed No MPH return rawValue/100.0;

1102 Vaisala WXT510/520 Air Temperature

No F return rawValue/100.0;

1103 Vaisala WXT510/520 Relative Humidity

No % RH return rawValue/100.0;

1104 Vaisala WXT510/520 Atmospheric Pressure

No inch return rawValue/1000.0;

1105 Vaisala WXT510/520 Precipitation No inch return rawValue/1000.0;

1200 Decagon 5TE soil moisture. Used for reporting composite data from sensor port configred as type 54

Yes VWC % return (rawValue*1.0)/50;

1201 Decagon 5TE EC. Used for reporting composite data from sensor port configured as type 54

Yes dS/m return rawValue<=700?((rawValue*1.0)/100):((700.0+5*(rawValue-700))/100);

1202 Decagon 5TE soil temperature. Used for reporting composite data from sensor port configured as type 54

Yes F return (((rawValue-400.0)/10)*1.8)+32.0;

1301 AquaCheck Soil Moisture. Note that AquaCheck probes are configured using the 62 or 63 types.

Yes VWC % return (rawValue&0xffffff)/10000.0;

1302 AquaCheck Soil Temperature. Note that AquaCheck probes are configured using the 62 or 63 types.

Yes F return (rawValue&0xffffff)/10000.0;

1400 Solar Inverter voltage inbound (L1 to No Volt Raw IEEE float. I.e the 32-bits are simply cast to 4-byte IEEE float type.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 55

Page 57: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

N)1410 Solar Inverter voltage inbound (L2 to

N)No Volt Raw IEEE float. I.e the 32-bits are simply cast to

4-byte IEEE float type.

1420 Solar Inverter voltage inbound (L1 to L2)

No Volt Raw IEEE float. I.e the 32-bits are simply cast to 4-byte IEEE float type.

1430 Solar Inverter AC current No A Raw IEEE float. I.e the 32-bits are simply cast to 4-byte IEEE float type.

1440 Solar Inverter DC input voltage (array)

No Volt Raw IEEE float. I.e the 32-bits are simply cast to 4-byte IEEE float type.

1450 Solar Inverter line frequency No Hz Raw IEEE float. I.e the 32-bits are simply cast to 4-byte IEEE float type.

1460 Solar Inverter line kW No kW Raw IEEE float. I.e the 32-bits are simply cast to 4-byte IEEE float type.

1470 Solar Inverter total kWh delivered No kWh Raw IEEE float. I.e the 32-bits are simply cast to 4-byte IEEE float type.

1500 PVPowered Solar Inverter over MODBUS/IP. Requires the Ranch Systems TCP-IP hardwired expansion board. This is the type to configure, while data is reported via sensortypes 1400-1490.

n/a n/a n/a

56 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 58: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

REMOTE CONNECTION TO RM210 UNITS

The RM210 base stations have the unique capability of being remotely controllable from any Internet connected desktop anywhere in the world.

To make connections to RM210 units, you will first need to install and configure a telnet/SSH client program. We recommend the PUTTY client, which can be downloaded here:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

To configure PUTTY after you have downloaded the program file, you create a connect profile called “rsterm” as in the following screen shot on the left:

First, click on Connection->Data and make sure the auto-login username is set to “rsterm”. Next, click on the Connection->SSH->Auth link on the left, and set the parameters as shown in the screen shot on the right. Note that you must first load the rsterm.ppk onto your local harddisk for this to work. The rsterm.ppk file can be obtained by emailing Ranch Systems support at [email protected].

After saving the new profile, you can try and make the connection to the Terminal Server by clicking on the rsterm profile.

The process of logging in should look like the screen shot below. Notice that there are three levels of authentication you will need to go through:

1. SSH key Authentication. This is the first prompt you will see, and you respond with a pass phrase. This step ensures that you are at all allowed to connect to the terminal server. This pass phrase is given to you by Ranch Systems support along with the PPK key file that you installed in the PUTTY client.

2. Terminal Server Authentication. This is the second prompt and you respond with the same user name and password that you use to access the online Ranch Systems web application. This step will also determine your level of authorization in terms of what units you can connect with. Once you pass this step, you can connect to an RM210 by issuing the “connect”

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 57

Page 59: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

command followed by the base station RSUID.

58 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 60: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

3. RM210 Authentication. This is the final password prompt coming directly from the RM210 base station command line. This password can be found in the online application under Node Configuration (click on the RSUID of the base station). Or simply by clicking the square green icon of the base station on the real-time map.

Note that it will take a while from you type “connect” command until the base station comes online. This is because the base station first needs to be notified (by SMS), and even then it might first have to finish on-going synchronization activity, which takes priority.

After the final authentication on the RM210 base station you have access to a command line that is exactly like the one described elsewhere in this document.

However, please note that certain commands are NOT possible during a terminal server session, simply because the modem is in use. So for example, you cannot use the “sms” or the “fget” commands, since the modem is required for these commands.

When you wish to finish the command line session, you simply type “quit”, which will make the RM210 sign off. Then you type Ctrl-X on your local terminal and you will be back in the terminal server prompt from where you can connect to another unit.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 59

Page 61: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

FIRMWARE UPGRADES

The RM210 base station is capable of downloading new firmware versions over the cellular or wifi connection, providing a powerful way to stay current with new features.

To upgrade firmware, please gain access to a command line interface and follow these steps:

1. Determine the name of the firmware file required. All relevant firmware files are available to all base stations automatically via the central server, but you are required the specify the name of the firmware file. A example firmware file name is: RM764.BLZ. If you are not sure which firmware you need, please contact Ranch Systems support.

2. Check that there is enough space on the P: drive of the base station, using the ls command. If not, you will need to delete some older (program) files on the P: drive (using the rm command). Typically the P: drive can hold at least 2 versions of firmware – a primary and a secondary. It is a good practice to keep the most recent version before the upgrade and mark it as secondary as described below at the end.

3. Type the following command (substitute the actual firmware file required):

fget RM764.BLZ

This will work for command line access via XBEE/Mesh, Text messaging or serial port.

If you are using the terminal server to connect, you will have a problem since the modem is already in use, and you get the “Modem busy” reply. In this case you can use the built-in message queueing to effect the download, by typing the following two commands:

msgput 245 fget RM764.BLZ 120

quit

Where 245 is the ID of the base station, and 120 is an fget parameter that tells fget to wait as much as 120 seconds for the modem to be available. quit will exit the terminal server session, and the download will start shortly thereafter; you need to make sure you execute quit immediately after the fget. You will now have to wait a typical 10-15 minutes while it downloads, before logging back in via terminal server and then follow from step 5 below.

4. During the fget download of the program file you should see a packet count on the interface. On XBEE/Mesh you may need to type ENTER with regularity to prevent sleep state in the network from hiding the progress. About 150 packets need to be downloaded.

5. Once the fget is completed, you need to check the downloaded file, but using the following command, which should produce two identical CRC checksums.

crc RM764.BLZ

6. If the fget command did NOT succeed, or the CRC failed, you will now need to delete the partial file by using the command rm RM764.BLZ and start over again with fget.

60 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 62: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

7. You are now ready to mark the new file as the primary boot file. Typically you will also have an existing program file, that you want to retain as secondary boot file. Assuming the existing program file was RM751.BLZ (you can use ls command to check), the commands are as follows:

mark RM764.BLZ primary

mark RM751.BLZ secondary

8. Now you are ready to perform a hard reboot which will load the new software version:

reboot hard <password>

Where <password> is the unit password.

NOTE: If you are upgrading a base station running versions older than 761 (RM761), the configuration of the unit, including its ID will NOT survive the upgrade. In that case it will reboot as unit 100, and you need to manually log in and reconfigure to the correct unit ID. As of version 761, configurations survive firmware upgrades.

Remote update of RS210 nodes

The RM210 base is capable of remotely updating RS210 node firmware. The steps required are the following:

1. First get the desired RS210 firmware version on to the base, using fget. For example: fget RS249.HEX. The HEX files are large so be sure to be on D: drive when fgetting.

2. Next, connect to the node using the term 601 command. You may want to stop all jobs before doing so (jobs pause). You will need to manually address the node using AT commands: For 900 Mhz this would look like: +++ followed by ATDT7D0 (for node 2000), then ATCN to exit AT command mode.

3. Once you have the command prompt, issue the bootload xbee <checksum> command. You will need to know the checksum of the HEX file (ask Ranch Systems support or use the RsLoader without COM parameters).

4. You should then see the node reboot to bootloader. NOTE: verify that it is expecting the correct checksum – if not you can force a expected checksum change using the #<checksum><CR> sequence. It will force a new reboot with correct expected checksum.

5. Once the expected checksum is set correctly, you can use the ~S command in term to start sending the file. NOTE: It will take a while, 5+ minutes.

6. The new firmware should start automatically at the end of the bootload

REMEMBER: The new application will NOT start if the checksum does not match.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 61

Page 63: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

MODEM ACTIVATION

If you receive your RM210 without an activated modem, you will need to follow these instructions.

We use the Multi-Tech SocketModem standard to enable you to use a wide variety of modems in your RM210.

Each Multi-Tech wireless modem is pre-configured to operate on an AT&T or Sprint, Verizon or other wireless networks.

The activation procedure depends on the type of modem, as follows:

GSM

For GSM modems you simply need a SIM card with a valid active dataplan and text messaging plan. Insert the SIM card, configure the APNserv, APNun and APNpw setting (see configset command), and reboot the unit.

CDMA Sprint

● Obtain an account from Sprint, by providing them with modem's 8-character ESN number printed next to the bar code on the modem.

● Ask Sprint for the following three numbers for modem. Record these numbers — they are needed in order to use your modem:

MDN – Your 10-digit phone numberMSID – Another 10-digit numberOTKSL – Your 6-digit lock code, also known as SPC (Service Programming Code)

● Use the “term 605” command from the RM210 command line, and activate the modem by entering the following sequence of AT commands.:

Note: If your MDN and MSID numbers are identical, then you can skip Steps 4, 5, and 6.

Step Command Modem Response Comment1 AT+WSPC=1,xxxxxx<cr> OK “xxxxxx” is your programming

code (your MSL)2 AT+WMDN=nnnnnnnnnn<cr> OK “nnnnnnnnnn“ is your phone

number (MDN)3 AT+WCMT=1<cr> OK Modem commits the changes to

memoryNote: If your MDN and MSID numbers are identical, then you can skip Steps 4, 5, and 6.

Wait for 20 seconds before issuing next command.

4 AT+WSPC=1,xxxxxx<cr> OK “xxxxxx” is your programming code

62 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 64: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

5 AT+WIMI=31000ssssssssss<cr>

OK “ssssssssss” is your MSID

6 AT+WCMT=1<cr> OK Modem commits the changes to memory

Wait for 20 seconds before issuing next command

7 AT+WIOTA=4<cr> OK This command clears previous IOTA attempts

8 AT+WIOTA=1<cr> ;+WOAP:“Preparing DataServices”OK

This command initiates over-the-air activation.

You must have network reception for this step.

This process takes about 3 minutes to complete.

● When complete, the modem will respond with: +WOAR:”Please Retry”. This response indicates that you should please retry, but you do not need to do so. Your modem should now be ready for use.

If You Do Not Receive the "Please Retry" Response, Turn the unit power off and then on. Repeat Steps 7 and 8.

CDMA Verizon

● Obtain an account from Verizon, by providing them with modem's 8-character ESN number printed next to the bar code on the modem.

● Ask Verizon for the phone number for modem. Record this number — it is needed in order to use your modem.

● Use the “term 605” command from the RM210 command line, and activate the modem by entering the following sequence of AT commands.:

Step Command Modem Response Comment1 AT+WSPC=1,000000<cr> OK 000000 is your programming

code 2 AT+WMDN=nnnnnnnnnn<cr> OK “nnnnnnnnnn“ is your phone

number (MDN)3 AT+WCMT=1<cr> OK Modem commits the changes to

memoryNote: If your MDN and MSID numbers are identical, then you can skip Steps 4, 5, and 6.

Wait for 20 seconds before issuing next command.

4 ATD*22899; <cr> +WOT1: "Programming in Over-the-air programming..

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 63

Page 65: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Process"+WOTS: "SPL unlocked"+WOTP: "PRL download OK"+WOTM: "MDM download OK"+WOTC: "Commit successful"+WOT2: "Programming Successful"

If your modem in not listed, or you have any questions or problems, contact Multi-Tech Systems, Inc. Technical Support at 800-972-2439 or 763-717-5863.

64 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 66: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

VAISALA CONFIGURATION

To interface the RM210 to a Vaisala WXT510 or WXT520 weather station, the following configuration steps are necessary.

First – and before connecting to the RM210 - the Vaisala station needs to be configured according to instruction in the Vaisala manual.

PLEASE NOTE: The Vaisala station should always be configured to Imperial units (not metric), as this is the Ranch Systems internal storage format. If metric information is desired in the user interface, that can be selected later at the software level

Once connected directly from your PC to the serial port on the Vaisala (service cable), the following setting should be made:

Basic settings:

Set comm speed on data port to 96000XU,B=9600

Disable Automatic mode, if selected:0XU,M=P

Check current settings:0XU

Should show:0XU,A=0,M=P,T=0,C=2,I=0,B=9600,D=8,P=N,S=1,L=25,N=WXT520,V=2.13

Configure sensors:

Check settings:0WU

Should show:0WU,R=11111100&01001000,I=300,A=300,G=1,U=S,D=0,N=W,F=4

F=4 gives the highest current consumption, but is still<5ma at 12VU=S is mph for wind speed

Check settings:0TU

0TU,R=11010000&11010000,I=300,P=I,T=F

Check settings:0RU

Should show:0RU,R=11111100&10000000,I=60,U=I,S=I,M=T,Z=A

If not, change as needed

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 65

Page 67: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Disonnect service cable, and connect M16 cable:

Verify the polling works:0R

Should show:0R1,Dn=313D,Dm=111D,Dx=256D,Sn=0.1S,Sm=0.2S,Sx=0.5S0R2,Ta=74.8F,Ua=34.4P,Pa=30.13I0R3,Rc=0.000I,Rd=0s,Ri=0.00I,Hc=0I,Hd=0s,Hi=0I0R5,Th=74.1F,Vh=0.0#,Vs=7.7V,Vr=3.525V

Connect to RM210:

You are now ready to connect the Vaisala to the RM210. This can be to either Port 2 or 3, depending the model of Vaisala station (RS232 or RS485 respectively). You make the connection with the M16 connector option.

Test connection:

The easiest way to test that the Vaisala connection is working, is to have the RM210 shell open on another port and use the term command to try polling with the 0R code (as above). You could in fact do the whole configuration shown above from the RM210 with the term command.

Configure RM210 for sampling:

Once connection is verified, the final step is to configure the correct port parameters. Assuming the Vaisala is on port 2 running 9600 baud, the configuration command is simply:

configset port 2 150 900 1 0 9600

Where 150 is the Vaisala sensor type and 900 indicates sampling every 15 minutes.

Immediately following configset, the port should be sampled, and you can check that the first data batch is correct with vdata command.

66 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 68: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

HORTAU RECEIVER CONFIGURATION

Interfacing the RM210 to a Hortau WR receiver is simple since the WR receiver has a fixed reporting structure and baud rate, and always using RS232.

All that is required is plugging the WR receiver into port 2 and issuing the following configuration command:

configset port 2 65 -1 0 0 9600

Where 65 is the Hortau WR sensor type and -1 indicates sampling on demand. In this case the sampling occurs whenever data arrives, rather than on a particular schedule. 9600 is the baud rate required by WR receiver.

For testing connection, you may want to first use the term command to verify that data frames are arriving correctly. Be sure to have the regular sampling of the port disabled using configset port 2 0.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 67

Page 69: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

PVPowered Inverter Connection

Interfacing the RM210 to a PVPowered Inverter is possible using the RM210 Ethernet expansion board and the PVPowered PVM1010 Data Module. The RM210 will collect line voltage, current, kW and kWH data from the inverter and reporting in the Ranch Systems online application.

Configuring the interface involves the following steps:

1. Connecting the PVM1010 data module to a local network providing DCHP service, and using the router admin interface to discover the IP address (via the MAC address printed on the PVM1010 module). Alternatively, using the configuration tool of the PVM1010 to set a static IP address. Either way the PVM1010 IP address must be known, and set to not change.

2. Connecting the RM210 Ethernet Expansion board to a network with DHCP service and likewise discover its IP address. The expansion board uses the Digi Connect-Me module, and once the IP address in known, you can connect to the Connect-Me module by simply typing that IP address into a browser.

3. Using the Digi Connect-Me user guide (http://www.digi.com/pdf/prd_ds_digiconnectfamily_usersguide.pdf), refer to the section “Configuration through the default web interface” to gain access to the modules configuration pages. Default username/password is “root”/”dbps”.

4. Using the digi interface, configure the serial port of the module to communicate at 9600,N,8,1, no flow control. Next set the port to use TCP sockets, and set the IP address to the IP address of the PVM1010 module and the port number to 502 (Modbus). Select the option to maintain TCP connection, and in the advanced options automatic sending after 1000 ms.

5. Next, in the RM210 command line interface, configure the PVPowered Modbus sensor type 1500 on port 710 (expansion slot 1), and in this case 300 for sampling every 5 minutes (no subsamples):

configset port 710 1500 300 0

To test you can force immediate sampling with the command sense 710, and next use the vdata command to see the acquired data. If too much data is in memory for easy viewing, use the delete command to remove the current data file, and try again. Remember that up to 30 seconds can pass before sensed data is flushed to data file and visible with vdata.

Troubleshooting Suggestions

• Make sure the RM210 is running at least version 794B5.

• To isolate why the interface is not working, first test that the PVM1010 module is responding as expected on its IP address port 502 by using a free MODBUS tool such as: http://www. modbus tools.com/ modbus _poll.asp . The PVM1010 should respond as unit ID 1 and for example registers 1000-1001 interpreted as reverse floats should return the L1 voltage.

68 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 70: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

• After making the relevant configurations in the Digi config pages of the RM210 expansion board, reboot the module (reboot option in left sidebar) to have changes take effect.

• Observed the two lights on the RM210 expansion board next to the Digi module. When you type sense 710 you should see a short burst on TX, then a response on RX after ~1 second. If the RX is missing you will see TX a few more times (retries). If there is TX but no RX, and you have verified the PVM1010 with a Modbus tool, most likely the Digi Connect-Me config is not correct.

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 69

Page 71: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

FURTHER HELP

Please feel free to contact Ranch Systems support for further help.

Phone support: 415 898 5900 ext. 3

Ranch Systems email support: [email protected]

70 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 72: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Alphabetical Index

1-wire...................................................................................................................................................501-Wire..................................................................................................................................................11802.11b ...............................................................................................................................................24ADC.....................................................................................................................................................18Air temperature....................................................................................................................................50Air Temperature...................................................................................................................................54AquaCheck........................................................................................................................27, 52, 54, 55AquaSpy........................................................................................................................................27, 52Base Station..........................................................................................................................................6BATT...................................................................................................................................................18Battery sensor................................................................................................................................52, 53BEEP...................................................................................................................................................18CAT.....................................................................................................................................................18CDMA Sprint........................................................................................................................................60CDMA Verizon.....................................................................................................................................61CHARGER...........................................................................................................................................26Command Line Control............................................................................................................13, 15, 18CONFIG...............................................................................................................................................18CONFIGSET........................................................................................................................................24COUNT................................................................................................................................................25Counter....................................................................................................................6, 11, 12, 28, 30, 52CP.......................................................................................................................................................26CRC.....................................................................................................................................................26CUSTOM SERVER SYNCHRONIZATION..........................................................................................43DATA...................................................................................................................................................26DATE...................................................................................................................................................29Davis instruments................................................................................................................................52Davis Instruments................................................................................................................................51DC latching..........................................................................................................................................54DC Latching.........................................................................................................................................12Decagon..................................................................................................................................27, 51, 54DELETE...............................................................................................................................................29Downlink HTTP Synchronization (syncmode 1 or 4)............................................................................44Dvr.................................................................................................................................................19, 20DVR...................................................................................................................................19, 20, 23, 53ECHO..................................................................................................................................................29Email................................................................................................................................................4, 68External Connections...........................................................................................................................11FGET...................................................................................................................................................30FGET Implementation..........................................................................................................................46FIRMWARE UPGRADES....................................................................................................................58FLOAD.................................................................................................................................................30Flow sensor.........................................................................................................................................52Flow sensors.......................................................................................................................................52FPUT...................................................................................................................................................30FREQ...................................................................................................................................................30Getting Started Guide............................................................................................................................4GSM....................................................................................................................................................60HALT...................................................................................................................................................31Help.......................................................................................................................................................4

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 71

Page 73: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

HEXDUMP...........................................................................................................................................31Installation Guide...................................................................................................................................4Internet Software...................................................................................................................................4IO.........................................................................................................................................................31IOSTAT................................................................................................................................................32Irrometer..............................................................................................................................................51JOB.....................................................................................................................................................32JOBS...................................................................................................................................................32Leaf wetness.......................................................................................................................................52LOCAL WIRELESS NETWORKING....................................................................................................15LS........................................................................................................................................................32MARK..................................................................................................................................................33MESH..................................................................................................................................................33Mesh Node............................................................................................................................................6Mesh Node Configuration....................................................................................................................13Modbus..........................................................................................................................................66, 67MODBUS.......................................................................................................................................55, 66Modem Configuration..........................................................................................................................13MSGGET.............................................................................................................................................35MSGLST..............................................................................................................................................36MSGPUT.............................................................................................................................................35NTC.......................................................................................................................................................6ONLINE TERMINAL SERVER.............................................................................................................16Power-Up.............................................................................................................................................10Pressure sensor...................................................................................................................................53PVPowered....................................................................................................................................55, 66Pyranometer..................................................................................................................................11, 52QUIT....................................................................................................................................................36Rain gauge..........................................................................................................................................51Rain Gauge......................................................................................................................................6, 11REBOOT.............................................................................................................................................36Relative humidity.................................................................................................................................52Relative Humidity.......................................................................................................................6, 11, 54Relative Humidity Sensor.......................................................................................................................6Relay.........................................................................................................................................6, 11, 12RELAY.................................................................................................................................................36Remote Command Line Implementation..............................................................................................47REMOTE CONNECTION TO RM210 UNITS......................................................................................56Remote Device Configuration..............................................................................................................14Remote update of RS210 nodes..........................................................................................................59RL200........................................................................................................................3, 7, 11, 12, 37, 53RM.......................................................................................................................................................37RM200...................................................................................................................................................6RM210...................................................................................................................................................6RS100....................................................................................................................................................6RS200....................................................................................................................................................6RS210....................................................................................................................................................6RS232............................................................................................................................................11, 12RS485........................................................................................................................................6, 11, 12RSRF Node...........................................................................................................................................6SDATA.................................................................................................................................................37SENSE................................................................................................................................................38Sensor Configuration...........................................................................................................................13SENSOR TYPES.................................................................................................................................50

72 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.

Page 74: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Server Configuration............................................................................................................................13SIGNAL...............................................................................................................................................38Signal strength...............................................................................................................................38, 53SMS.....................................................................................................................................................38SMS Gateway Implementation (SMSGW)...........................................................................................45Soil moisture............................................................................................................................51, 52, 54Soil Moisture........................................................................................................................................54Soil temperature.......................................................................................................................50, 51, 54Soil Temperature.................................................................................................................................55Solar Inverter.......................................................................................................................................55Solar panel..........................................................................................................................................10STDIO..................................................................................................................................................15Summary.............................................................................................................................................48Support..................................................................................................................................................4Switch sensor......................................................................................................................................53SYNC...................................................................................................................................................39Syslog..................................................................................................................................................23System Logging Configuration.............................................................................................................14TEMP...................................................................................................................................................39Temperature........................................................................................................................................11Temperature Sensor..............................................................................................................................6TERM..................................................................................................................................................39Text Message Authorization................................................................................................................13TEXT MESSAGING.............................................................................................................................15Troubleshooting Suggestions..............................................................................................................66Uplink FTP Synchronization (syncmode 4)..........................................................................................44Uplink SMTP Synchronization (syncmode 1).......................................................................................43Vaisala.........................................................................................................................23, 53, 54, 63, 64VAISALA..............................................................................................................................................63VDATA.................................................................................................................................................40VP2......................................................................................................................................................41VP3......................................................................................................................................................41VREF...................................................................................................................................................41Watermark...........................................................................................................................................51Weather Station.....................................................................................................................................6WEP....................................................................................................................................................24WiFi.....................................................................................................................................................24Wifikey.................................................................................................................................................24Wifissid................................................................................................................................................24Wind direction......................................................................................................................................51Wind Direction.....................................................................................................................................54Wind speed....................................................................................................................................51, 63Wind Speed.........................................................................................................................6, 11, 12, 54Wind Speed and Direction Sensors.......................................................................................................6 ...........................................................................................................................................................55

© Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited. 73

Page 75: RM210 Base Station - Ranch SystemsCONTENTS Warranty Coverage.....2

Illustration IndexIllustration 1: RM210 Base Station/Weather Station on 10' ABS Pipe....................................................9Illustration 2: RM200 Base Station on 20' Steel Pipe.............................................................................9Illustration 3: Ranch Systems Solar Panel Adapter..............................................................................10Illustration 4: Base Station Connectors................................................................................................11

74 © Ranch Systems LLC, 2005-2008. All Rights Reserved. Reproduction without permission from Ranch Systems is prohibited.