Total Active Systems: 1994
 

Harvest SPE Command Reference

Version

This document applies to SPE software version SPE-X_1.00.12 and is current as of 4 February 2010. There are currently three variants of the SPE software to support the three variants of hardware. Due to hardware limitations not all commands work with all versions. Commands that only work with one or two of the variants are indicated by one or more of SPE, MIB and ITU in the header of the command description.

Command Format

SPE commands may be issued either as a string of characters sent from a DTE to the SPE (DCE) while the SPE is in command mode or as UDP packets sent to an SPE with an active PDP context. All commands start with the command prefix AT and end with a carriage return (decimal 13), line feed (decimal 10) or null character (decimal 0). Either a carriage return or new line character must precede commands issued from a DTE. Commands issued via UDP must form a single and complete packet.

Commands are not case sensitive and may be entered in upper, lower or mixed case. One or more space (decimal 32) or tab (decimal 9) characters may be entered between command parameters but must not appear within the command character sequence. The backspace character (decimal 8) may be used for editing but must not be used within the first three characters of an SPE command (AT^).

Command Echo

When in command mode the SPE micro intercepts all characters and buffers them until it is able to determine if it is an SPE command that is being entered. In order to provide echo without several characters delay the SPE does the echo. If the modem were set to provide echo then the user would see a double echo. To get around this the SPE turns off the modem's echo and intercepts the ATE command. If the user enters a multiple command string that includes echo control then there can be undesired results. If the command string starts with ATE then the SPE will process it and the modem won't get the rest of the command string. If the command string doesn't start with ATE then the modem will get the whole command string and the SPE won't catch the echo control change.

Auto-Connect Escape

Once an SPE has had auto-connect enabled (AT^HPOC=1) the user will no longer get a command mode so will not be able to make further setting changes. To get around this an escape mechanism is provided. After DTR is asserted the SPE will wait for up to five seconds for the start of the escape string. The wait is extended to five seconds after each correct escape string character. The escape string is AT^HESC and must be all upper case and entered without any errors or editing. The SPE responds with OK when the correct escape sequence is detected.

If you are using HyperTerminal then there is an easy way to enter the escape string correctly. First check that caps lock is off. Then click on the disconnect icon or select Call/Disconnect from the menu. This will drop DTR. Then hold down the shift key while typing the escape sequence with the other hand. As soon as you type the first character HyperTerminal will assert DTR before sending the character. This makes it easy to satisify the requirement of starting withing five seconds of asserting DTR. Then by using the shift key to enter the letters as capitals there is no need for a different action to type the caret key ('^').

Escaped Commands

There are times when it is desirable to execute SPE commands from the DTE but it is not desirable to terminate the active PDP context. Examples of this could be changing the destination IP address of packets being sent, reading inputs or setting outputs. The SPE includes a mechanism to allow this to be achieved although a good understanding of the packet assembly function is necessary. The user needs to send the SPE escape sequence, AT^HESC, immediately followed by the command to be executed in such as way that the SPE will assemble it all as a single complete packet. To ensure that they form a single complete packet the user needs to utilize either or both of the packet forwarding timeout and the packet forwarding character.

Example 1: The packet forwarding character has been set to the carriage return and the packet forwarding timeout has been disabled. A user, typing at their terminal, hits the enter key to send a carriage return character. That completes any packet in the process of assembly. They then type AT^HESCAT^HSO1=1 followed by enter. This then forms a single complete packet so the SPE processes the command AT^HSO1=1 and turns on output number one.

Example 2: The packet forwarding character has been disabled and the packet forwarding timeout has been set to 100ms. A programmer has written a terminal script file to wait for 200ms, send AT^HESCAT^HRIP="210.55.68.148",7777, and then wait for a response. The 200ms wait is longer than the 100ms packet forwarding timeout so ensures that the next character will start a new packet. The escaped command string is sent under program control so there is no significant inter-character delay. When the program stops sending and waits for a response the packet forwarding timeout will expire and the packet will be checked for the escape prefix and the command will be processed.

Note that an easy way to enter escaped commands from terminal software is to type them in another program such as notepad, and then copy and paste them into your terminal program. This way the characters are all send out the serial port without the normal typing delays so it gets packetized as a single packet.

Commands by Name

Commands by Type

Some commands are listed more than once where they are applicable to more than one category.

Session Establishment

PAD Operation

Session Announcement

Automatic Connection

Input/Output

Data Logging

Event Triggered Calling

Flash Code Downloading

Miscellaneous Commands

Command Descriptions

^HAFE - Enable Auto Forwarding

When enabled and a session is established all characters received by the SPE from the attached DTE are assembled into UDP packets and forwarded to the address and port specified by the ^HRIP command. When disabled any characters received while a session is active will be discarded.

This setting is intended for use with equipment that sends unsolicited data. By remotely turning forwarding on and off as required the data volume sent by the SPE can be controlled.

Set:AT^HAFE=forwarding_mode
Read:AT^HAFE?
Help:AT^HAFE=?
Default:AT^HAFE=1
forwarding_mode:
0 = Disable forwarding
1 = Enable forwarding

Introduced: g18_1.00.00

Top of page Command Index


^HAFS - Announcement Field Selection

This command allows selection of the fields that are to be included in the announcement message.

Set:AT^HAFS=field_selection_list
AT^HAFS=NONE
Read:AT^HAFS?
Help:AT^HAFS=?
Default:AT^HAFS=HSN
field_selection_list:
A comma separated list of field identifiers. The table below lists the available fields. Most options corresponds to an AT style command.
OptionDescription
CIMIIMSI = International Mobile Subscriber ID (SIM Card Number)
CGSNIMEI = Product Serial Number (modem serial number)
CGMRGPRS modem firmware revision number
CSQ Signal Quality
CREGNetwork Registration
HCCCCRC of configuration settings
HCNT1Value of input 1 counter
HCNT2Value of input 2 counter
HCNT3Value of input 3 counter
HCNT4Value of input 4 counter
HRA1Value of analog input 1
HRA2Value of analog input 2
HRA3Value of analog input 3
HRA4Value of analog input 4
HRA9Value of analog input 9
HRIStates of all digital inputs (as a hex value)
HRI1State of digital input 1
HRI2State of digital input 2
HRI3State of digital input 3
HRI4State of digital input 4
HRSVVoltage of power supply
HRTCReal time clock time
HSNSPE serial number
HTMP1Reading of temperature sensor 1
HTMP2Reading of temperature sensor 2
HNCThe new context flag
HWHYThe call reason

The Cxxx options (CIMI, CGSN, CGMR, CSQ and CREG) are read from the cell phone module and stored when the DTR line is asserted by the DTE. The other fields (the Hxxx fields) report their values at the time the announcement is sent. The selection of the Cxxx fields also affects the fields reported by the AT^HRID command.

Introduced: g18_1.01.05

Top of page Command Index


^HAG - Define Analog Input Groups

In order to simplify log and call option settings the SPE allows the user to define groups of inputs that are to be treated in the same way.

For each group there are three variables that can be used in the LOP and SCO expressions. For group one these are AG1T, AG1F and AG1C for true, false and change respectively.

For the AG1T term to be set all inputs included in the group one state mask must be above or below the corresponding level threshold according to the group one invert mask. For example, if the invert mask was set to 2 and the state mask to 3 then AG1T would be set if both analog input 1 was above its level threshold and analog input 2 was below its level threshold. The way this works is that the ITU sets a bit in a word corresponding to each input that is above its threshold level. We'll call this word the input state word for now. So if only input one was above its threshold then only bit zero of the input state word would be set and it would take the value 1. To evaluate the AG1T term the SPE first takes this input state word and exclusive ORs it with the group invert mask. So for our example this would mean exclusive ORing 1 with 2 which would result in 3. The SPE then ANDs this with the group state mask and compares the result to the same group state mask. So this would be 3 AND 3 which gives 3 which in turn equals the state mask of 3 so AG1T gets set.

The AG1F term is set whenever AG1T is not set. That is, AG1F is the inverse of AG1T (AG1F = NOT AG1T).

The AG1C term is set whenever any of the inputs corresponding to the bits set in the change mask change by more than their change threshold amount relative to the last log record recorded.

Refer to digital input groups when using the analog inputs as digital inputs.

Set:AT^HAGgroup=invert,state,change
Read:AT^HAGgroup?
Help:AT^HAG=?
AT^HAGgroup=?
Default:AT^HAG1=0,0,0
AT^HAG2=0,0,0

group:
1-2 specifies which of the groups the command applies to.
invert:
0-511 Bit mask selecting which inputs to invert when evaluating the group state flags.
state:
0-511 Bit mask selecting which inputs to include when evaluating the group state flags.
change:
0-511 Bit mask selecting which inputs will set the group change flag.

Note that values up to 511 (nine bits) can only be used with the ITU. For other versions only values up to 7 (three bits) can be used.

Introduced: g20_1.04.00

Top of page Command Index


^HAIF - Enable Analog Input Filter

The ^HAIF command allows the analog input filters to be enabled or disabled. For certain low power applications the analog inputs are sampled at a very low rate. For these applications the delay caused by the analog input filtering is too long so the filtering is undesirable.

When analog input filtering is enabled for an input the latest six reading for that input are held in memory and a filtered value is calculated by discarding the highest and lowest reading and averaging the remaining four.

Set:AT^HAIF=filter_inputs
Read:AT^HAIF?
Help:AT^HAIF=?
Default:AT^HAIF=0
filter_inputs:
0-511 Bit mask selecting which inputs to filter. Inputs with their corresponding bits set will be filtered.

Note that values up to 511 (nine bits) can only be used with the ITU. For other versions only values up to 7 (three bits) can be used.

Introduced: g20_1.04.06

Top of page Command Index


^HAIP - Set up IP Address Acceptance List

Set up IP address and sub-net masks for acceptance of IP packets. When an IP packet arrives at the SPE the source address is checked against each entry in the list of acceptable IP addresses. The sub-net mask is bit-wise ANDed with both the source address and the acceptance address. If the results match then the packet is accepted. If no match is found within the list then the packet is discarded.

Set:AT^HAIP=list_id,accept_addr,accept_subnet
Read:AT^HAIP?
Help:AT^HAIP=?
Default:AT^HAIP=1,"0.0.0.0","0.0.0.0"
AT^HAIP=2,"0.0.0.0","255.255.255.255"
AT^HAIP=3,"0.0.0.0","255.255.255.255"
AT^HAIP=4,"0.0.0.0","255.255.255.255"
AT^HAIP=5,"0.0.0.0","255.255.255.255"
AT^HAIP=6,"0.0.0.0","255.255.255.255"
AT^HAIP=7,"0.0.0.0","255.255.255.255"
AT^HAIP=8,"0.0.0.0","255.255.255.255"
list_id:
1-8 specifies which entry in table to modify
accept_addr:
Specifies a IP address
accept_subnet:
Specifies a subnet mask

Introduced: g18_1.00.00

Top of page Command Index


^HAPN - Set APN Name

Sets the APN name that the SPE should use when establishing a PDP context.

Set:AT^HAPN=apn_name
Read:AT^HAPN?
Help:AT^HAPN=?
Default:AT^HAPN=""
apn_name:
Specifies the name of the APN that you are going to use.

Introduced: g18_1.00.00

Top of page Command Index


^HART - Announcement Repeat Time

Sets the repeat time for announcement messages when announcement mode 2 or 3 is selected. Also used to select the DTR hold time for announcement modes 6 and 7.

Set:AT^HART=repeat_time
Read:AT^HART?
Help:AT^HART=?
Default:AT^HART=30
repeat_time:
15-3600 = Number of seconds that the SPE should wait before repeating the announcement.

Introduced: g18_1.01.06

Top of page Command Index


^HASD - Analog Sampling Delay

The command AT^HASD specifies the time in tenths of a second that the SPE should wait after turning on its ADC reference voltage before sampling the analog signal. This delay enables the SPE to be used with sensors that have a significant delay from power on until a valid output is available. This only applies when the reference voltage is used to turn on the external sensor.

Set:AT^HASD=sampling_delay
Read:AT^HASD?
Help:AT^HASD=?
Default:AT^HASD=0
sampling_delay:
0-255 = Delay time in tenths of seconds. The specified time is in addition to the 25ms that the SPE waits for the reference voltage to rise.

Introduced: g18_2.01.05

Top of page Command Index


^HASE - Enable Announcement of Session Establishment

Enables the sending of an identification message from the SPE to the specified remote IP address whenever the SPE establishes a GPRS context.

Set:AT^HASE=announce_mode
Read:AT^HASE?
Help:AT^HASE=?
Default:AT^HASE=0
announce_mode:
0 = Disable announcement of session establishment.
1-8 = Enable announcement of session establishment.

The eight announcement modes are divided into four behaviour types. For each behaviour the announcement may be selected to be sent on either the data port or the control port.

BehaviourData PortControl Port
Decreasing rate.41
Regular repeat.23
Retriggerable decreasing rate.85
One shot.67
  • Decreasing rate. Announcements are sent at increasing intervals until stopped by the receipt of data. The delay between announcements increases in the sequence 15, 30, 60, 120, 240, 450, 900, 1800 and 3600 seconds. Once the maximum 3600 seconds (1 hour) interval is reached the interval remains constant for further announcements.
  • Regular repeat. Announcements are sent at regular intervals as specified by the AT^HART command. Announcements continue without regard for received data.
  • Retriggerable decreasing rate. As for decreasing rate except that the announcements can be restarted by a new call event. Useful for always on scenarios so that announcements can be used to indicate new conditions.
  • One shot. A behaviour designed to allow a reduced data volume. A single announcement message is sent and the SPE then waits for the time specified by the AT^HART command before dropping the SoftDTR. If data is received within this time the call is extended until the DTR timeout occurs or AT^HDTR=0 is executed. The allows the server program to look at the announcement contents and request further information if necessary. Otherwise the session will be terminated without the need to send a data packet back to the SPE and hence reducing data costs. The one shot modes are also retriggerable and will extend the timeout however this would primarily be useful when using a long timout period of an "always on" configuration.

Introduced: g18_1.00.00

Top of page Command Index


^HASI - Analog Sampling Interval

This command was added to allow users to specify a longer interval between analog input measurements. The longer interval can then be used to reduce the average power used by the SPE and sensors. Note that the sampling interval is implemented as a check for a time of day that is a multiple of the specified time. This has the desirable consequence of taking samples at deterministic times. However when the the interval is not a factor of 86400 (the number of seconds in a day) the last sampling interval before midnight will be shorter.

If the sampling interval is set to less than the sampling delay then this will result in the reference being left turned on. This may be desirable for some sensors.

The optional WIND parameter tells the SPE to sample the wind direction input (analog input 2) every second even though the sampling interval may be set longer. No sampling delay is applied to such wind direction sampling and the DAC output is not enabled.

Set:AT^HASI=sampling_interval[,WIND]
Read:AT^HASI?
Help:AT^HASI=?
Default:AT^HASI=1
sampling_interval:
1-43200 = Sampling interval in seconds.

Introduced: g18_2.01.05, Updated: SPE-X_1.00.06

Top of page Command Index


^HATH - Set Analog Thresholds

This command sets the thresholds used by the SPE when evaluating the A1, A2 and A3 terms of the log options and call options expressions. The SPE sets each term to be true if the difference between the previously recorded analog value and the latest sampled value is greater than the applicable threshold. For example if the last log record had a value of 3578 recorded for the analog one input and this input was sampled as 3743 then if the threshold was set at 1024 (default) the A1 term would be false and would not trigger logging. If, however, the threshold was set at, say, 100 then the difference would be greater so A1 would be set to true and could trigger logging.

It is important to note that the reference for comparison is the value recorded in the last log entry. A consequence of this is that if you want to use an analog threshold to trigger a call then you should also record a log entry so that a new reference value is available for later comparisons. Failure to do so could result in multiple calls for no further change in input value. Also note that the last log entry might have been recorded for a reason other than a change in the analog value that you are currently considering.

Set:AT^HATH=input_number,count_diff[,level_threshold]
Read:AT^HATH?
Help:AT^HATH=?
Default:AT^HATH=1,1024,2048
AT^HATH=2,1024,2048
AT^HATH=n,25,1106

The last analog input (either 3 or 9) reads the SPE's supply voltage. The default settings for this input are 25 and 1106. All other inputs have default settings of 1024 and 2048, as per inputs one and two.

input_number:
1-9 specifies the applicable analog input. Range is 1-9 for ITUs but only 1-3 otherwise.
count_diff
1-4095 Normal noise related variation in the ADC result is likely to make values below about 10 or 20 unsuitable. For each application it will be necessary to determine what value represents a significant change.
level_threshold
0-4095 This specifies a threshold level above which the input is considered to be high when evaluating the analog input groups.

Introduced: g18_1.01.05

Top of page Command Index


^HBFG - Battery Fuel Gauge

This command reads the battery fuel gauge, if fitted, and returns readings of accumulated current, present current, and fuel gauge temperature in degrees Celsius. If no fuel gauge device is detected attached to the specified input then the SPE will return no results. If no sensor port is specified then both ports will be read.

  • AT^HBFG Read the status of a battery fuel gauge.
sensor_port:
1-2 = Select applicable 1-wire sensor port.

Introduced: SPE-X_1.00.12

Top of page Command Index


^HBPS - Set Bit Rate

Sets the bit rate and character format that the SPE will use to communicate with the DTE.

Set:AT^HBPS=bit_rate
AT^HBPS=bit_rate,character_format
Read:AT^HBPS?
Help:AT^HBPS=?
Default:AT^HBPS=9600,8N1
bit_rate:
The bit rate can be any of the standard bit rates (300, 1200, 9600, 19200 etc.) or most non-standard rates with some error. For example a requested bit rate of 8000 bps would result in an actual bit rate of about 8014 bps which is about 0.17% fast. Well under the 2% speed error that is normally acceptable for asychronous data. For further information on non-standard rates contact Harvest.
character_format:
The character format consists of three characters: the first specifies the the number of data bits (7 or 8), the second the parity option (O, E or N) and the third the number of stop bits (1 or 2).

Changes to the bit rate and character format settings take effect from the next time that DTR is asserted.

Introduced: g18_1.00.00

Top of page Command Index


^HBRK - Set Break Output

This command is used to force the SPE to output a continuous break signal on it's receive data line. This is sometimes used to signal connected devices to wake up. Note that this setting is volatile so will revert to the default at power on.

Set:AT^HBRK=break_mode
Read:AT^HBRK?
Help:AT^HBRK=?
Default:AT^HBRK=0
break_mode:
0 = The SPEs receive data line operates normally.
1 = The SPE output a continuous break signal on its receive data line.

Introduced: g18_1.01.04

Top of page Command Index


^HCAL - Calibrate Temperature Sensors SPE ITU

Sets the calibration offsets for all temperature sensors attached to sensor port one. The SPE firsts reads temperature sensor two (attached to port two) and then reads the temperature for each sensor attached to port one and records in the sensors EEPROM an error value. This error value is the difference in readings between the reference sensor (sensor two) and this particular sensor. This value is later used to correct the reading taked by this sensor.

Since only sensors with valid sensor numbers are corrected this command will set the sensor number to one for any sensor that doesn't have a valid sensor number.

  • AT^HCAL

This command is unavaliable on the MIB hardware version since there is only one Dallas temperature port available. However, the MIB still supports calibrated sensors by applying the stored correction offsets.

Introduced: g20_1.04.00

Top of page Command Index


^HCCC - Read Configuration CRC

Returns a CRC of the configuration settings plus the SPE software version. This is to allow server software to detect configuration changes in remote SPEs so that it can update its local copy using the show all settings command. The data that is included in the CRC calculation may change with different software version so server software should only look for changes in this value and not try to calculate it locally.

  • AT^HCCC Return a CRC of the SPE settings.

Introduced: g20_1.04.00

Top of page Command Index


^HCMD - Execute Modem Command

This command allows a user to execute a modem command remotely. The SPE will switch to command mode suspending the active PDP context, pass the command to the modem, retrieve the response, switch back to GPRS mode and send the modems response back to the remote IP address.

  • AT^HCMD command_string
command_string:
The modem command string to be executed. Note that this is a quoted string.

Example: AT^HCMD "AT+CSQ"

Returns the modems receive signal strength.

Introduced: g20_1.04.04

Top of page Command Index


^HCNT - Read Counter Value

These commands read and set the value of one of the counters that operate off the SPEs digital inputs. These counters count high to low transitions of the input signal. Filter times are used to debounce both edges of the input signal.

The counters are both 32 bits in size and are stored in RAM. At power on the values are retrieved from the last log entry recorded. If the count is required to be non-volatile it is necessary to configure the SPE to write a log entry at a suitable time. For slow counts (for example from a tipping bucket rain gauge) you are likely to want to record a log entry for every increment of the count. This might be achieved with a log option command like AT^HLOP=C1. For faster counts (for example the pulse output of a liquid flow rate transducer) you might want to record a log entry a regular time intervals. The command AT^HLOP=T15 would record a log entry every 15 minutes or you could use AT^HLOP=T15.C1 to record a log entry every 15 minutes but only if the count has increased. If the SPE is reset then any counts that happened after the last log entry was written will be lost so it is necessary to consider the significance of this lost to your application. Another factor that needs to be considered is the wearout of the flash memory that the log entries are written to. You should design for not more than 106 log entries to be written over the life of the product.

Set:AT^HCNT=count
AT^HCNTinput=count
Read:AT^HCNT
AT^HCNT?
AT^HCNTinput
AT^HCNTinput?
Help:AT^HCNT=?
AT^HCNTinput=?
Default:AT^HCNTinput=0
input:
1-4 = Digital input number (range is limited to 1-2 for SPE variant).
count:
0-4294967295 = Current counter value for specified input.

Introduced: g18_1.01.04

Top of page Command Index


^HCPD - Cellphone Power Off Delay

This command allows setting of a delay before the cellphone module is powered down. This command can be issused by the host end software to allow a circuit switched call to be made to an SPE within a time window (up to one hour) after the GPRS call. The power off delay is applied only once starting from when the command is issued but only decremented when DTR is inactive. If a delay of, say, one hour is selected then if DTR is asserted for, say, five minutes during this hour then the cellphone module will be powered down 65 minutes after the start of the hour.

Repeated use of this command can be used to extend or reduce a power off delay that is already in progress.

It is important to remember that in order to call the phone in circuit switched mode it is necesary to configure the phone to answer. This can be done with the command ATS0=1&W. Remember that this is a command of the cell phone so can't be executed remotely.

Set:AT^HCPD=timeout
Read:AT^HCPD
Help:AT^HCPD=?
Default:AT^HCPD=-1
timeout:
0-3600 = Cellphone power off delay in seconds.
-1 = Delay is currently in the expired state. This is a read only value.

Introduced: g20_1.04.04

Top of page Command Index


^HDAC - Set DAC voltage and Mode

The ITUs DAC output can be used to supply power to sensors. By setting the output level to correspond to the required power supply voltage of the sensor a wide variety of sensors can be catered for. There is also the option of having the output always on or only turned on when the ADC reference is turned on. This option allows sensors to be normally off to save power. For an always off option the level should be set to zero.

Set:AT^HDAC=level
AT^HDAC=level,mode
Read:AT^HDAC?
Help:AT^HDAC=?
Default:AT^HDAC=3277,ADC
level:
0-4095 = Analog output value. Full scale (4095) corresponds to 15V but since the ITU is designed for a nominal 12V power supply this level might not be available. The default value of 3277 corresponds to 12V.
mode:
ON = The DAC output is always on.
ADC = The DAC output is turned on only when the ADC reference is turned on.

Verion 1.04.26 changed the factory default value to zero.

Introduced: ITU_1.01.00

Top of page Command Index


^HDAL - Identify Temperature Sensors

This command is intended for factory use only. It is used to set the sensor number for all the temperature sensors that are attached to the specified sensor port.

The read form of this command enumerates all temperature sensors attached to the specified port and reports their sensor numbers as well as their calibration offsets.

This command can also be used to set the calibration offset for a temperature sensor when another type of temperature reference is being used.

Set:AT^HDAL=sensor_number
AT^HDAL=sensor_number,cal_offset
AT^HDALport_number=sensor_number
AT^HDALport_number=sensor_number,cal_offset
Read:AT^HDAL?
AT^HDALport_number?
Help:AT^HDAL=?
AT^HDALport_number=?
port_number:
1-2 = The physical sensor port number to be addressed by the commmand.
sensor_number:
1-2 = Sensor numbers one and two are defined by the port that they are connected to. However these numbers are treated as being valid so that the calibration value stored in the sensor will be used. For a sensor that doesn't have a valid sensor number the calibration offset is assumed by the SPE to be invalid also.
3-8 = The sensor number that the temperature sensors reading will be reported as.
cal_offset:
The difference between true temperature and this sensor's temperature reading in sixteenths of degrees Celsius. A negative number means this sensor reads low and a positive means it reads high.

Introduced: g20_1.04.00

Top of page Command Index


^HDG - Define Digital Input Groups

In order to simplify log and call option settings the SPE allows the user to define groups of inputs that are to be treated in the same way. See also analog input groups.

For each group there are three variables that can be used in the LOP and SCO expressions. For group one these are DG1T, DG1F and DG1C for true, false and change respectively.

For the DG1T term to be set all inputs included in the group one state mask must be logic one or zero according to the group one invert mask. For example, if the invert mask was set to 2 and the state mask to 3 then DG1T would be set if both digital input 1 was at a logic one state and digital input 2 was at a logic zero state. The way this works is that the SPE sets a bit in a word corresponding to each input that is at a logic one state. We'll call this word the input state word for now. So if only input one was at a logic one state then only bit zero of the input state word would be set and it would take the value 1. To evaluate the DG1T term the SPE first takes this input state word and exclusive ORs it with the group invert mask. So for our example this would mean exclusive ORing 1 with 2 which would result in 3. The SPE then ANDs this with the group state mask and compares the result to the same group state mask. So this would be 3 AND 3 which gives 3 which in turn equals the state mask of 3 so DG1T gets set.

The DG1F term is set whenever DG1T is not set. That is, DG1F is the inverse of DG1T (DG1F = NOT DG1T).

The DG1C term is set whenever any of the inputs corresponding to the bits set in the change mask change state.

Set:AT^HDGgroup=invert,state,change
Read:AT^HDGgroup?
Help:AT^HDG=?
AT^HDGgroup=?
Default:AT^HDG1=0,0,0
AT^HDG2=0,0,0
group:
1-2 specifies which of the groups the command applies to.
invert:
0-4095 Bit mask selecting which inputs to invert when evaluating the group state flags.
state:
0-4095 Bit mask selecting which inputs to include when evaluating the group state flags.
change:
0-4095 Bit mask selecting which inputs will set the group change flag.

For ITUs the bit masks may take values up to 65535 (16 bits) corresponding to the twelve inputs that can be used as digital inputs plus the four that may be on radio temperature sensors. For other variants only values up to 15 (4 bits) may be used.

Introduced: g20_1.01.00, Updated: SPE-X_1.00.06

Top of page Command Index


^HDIP - Read Most Recent Dynamic IP Address

This command can be used to configure the SPE to record the local, in many cases dynamic, IP address that the SPE is assigned when it establishes a new PDP context. This IP address is stored in non-volatile memory so may be inspected after the completion of the session or during the session by using the escape prefix.

If the automatic update mode is disabled this command can be used to store a non-volatile 32 bit user value.

Set:AT^HDIP=update_mode
AT^HDIP=update_mode,ip_address
Read:AT^HDIP?
Help:AT^HDIP=?
Default:AT^HDIP=0,"0.0.0.0"
update_mode:
0 = Automatic updates are disabled. The ip_address field can be used to store a 32 bit user value.
1 = The stored IP address will be updated every time a new PDP context is established.
ip_address:
The stored IP address.

Introduced: g18_1.01.16

Top of page Command Index


^HDTO - Set Soft DTR Timeout Period

See Set Soft DTR for an explaination of the soft DTR concept.

When the soft DTR is used there can be a couple of potential problems. If the SPE is unable to establish a PDP context it will keep trying and this can result in increased power consumption. Also if the SPE does establish a PDP context, send an announement to a server, get a response back (and hence cancel further announcements) but the not get its soft DTR value reset by the server then it will keep the PDP context active. If another event occurs that should cause another session to be established then this won't happen because the old session still exists. Therefore there will be no announcement and the unit might just about as well be dead.

To avoid these problems the SPE has a timeout value that can be used to limit the duration of the soft DTR. The DTR timeout is initialized to the value set by this command when the SPE sets soft DTR. When the timer expires soft DTR is cleared regardless of whether a PDP context has been established or not.

The second parameter may be used to specify a value that the DTR timeout is set to each time a valid packet is received. By using this parameter an active data exchange won't be interrupted by a DTR timeout and it's not necessary to have an excessively long initial timeout period.

Set:AT^HDTO=timeout_duration[,extend_time]
Read:AT^HDTO?
Help:AT^HDTO=?
Default:AT^HDTO=600,0
timeout_duration:
0 = Software DTR does not timeout.
60-1800 = Software DTR will timeout after the specified number of seconds.
extend_time:
0 = Use only the initial DTR timeout value.
30-1800 = Set (extend or reduce) the DTR timeout to this value each time a value packet is received.

Introduced: g18_1.01.16, Updated: g20_1.04.07

Top of page Command Index


^HDTR - Set Soft DTR

The SPE uses a virtual DTR (Data Terminal Ready) that is the logical OR of the physical DTR line and a software DTR value. This command allows setting and inspection of the state of the software DTR value. When the software DTR value is set to zero (AT^HDTR=0) the virtual DTR that the SPE uses is the same as the physical DTR.

The software DTR is useful when the SPE is used to read or set I/O lines without a data cable plugged into the RS232 port. An event selected by the set call options command (AT^HSCO) can be used to set the software DTR value. If the power on connect option has been enabled (AT^HPOC=1 or AT^HPOC=2) this will then cause the SPE to establish a PDP context. It would be useful at this point to have announcement enabled so that the host computer gets notified. When it's ready the host computer can then remotely issue an AT^HDTR=0 command to cause the SPE to terminate the PDP context and return to it's idle state.

The software DTR value is volatile and will reset to the default at power on.

Note that if the software DTR is true then the RTS signal is also considered to be true.

See also the soft DTR timeout command.

Set:AT^HDTR=dtr_mode
Read:AT^HDTR?
Help:AT^HDTR=?
Default:AT^HDTR=0
dtr_mode:
0 = DTR is as per the DTR line.
1 = DTR is considered asserted regardless of the state of the DTR line.

Introduced: g18_1.01.04

Top of page Command Index


^HESC - Set Escape Flag Value

The SPE has an escape flag that it uses to determine whether it is in command or data mode. If power on connect is disabled then the SPE starts out with its escape flag set. If you were to initiate a call then the escape flag would be cleared. In power on connect mode the escape flag would be clear unless you entered the escape sequence correctly follow asserting DTR. This command can be used to examine or modify the state of this flag. Changing the state of this flag can result in the termination or initiation of a PDP context.

This command should not be confused with the (very similar looking) escape sequence that is used to avoid establishing a PDP context when in auto connect mode or to prefix a command when in data mode. For example the command AT^HESCat^hesc=1 could be used to ensure that the SPE is in command mode by causing any PDP context to be terminated. In this example the upper case characters are the escape prefix and must be upper case but the lower case characters are the command and are not case sensitive.

Set:AT^HESC=escape_state
Read:AT^HESC?
Help:AT^HESC=?
Default:AT^HESC=1
escape_state:
0 = SPE is in data tranfer mode.
1 = SPE is in command mode.

Introduced: g18_1.02.07

Top of page Command Index


^HFBC - Flash Block CRC

This command returns the block CRC values for each of the 32 blocks of sector two of the DataFlash.

  • AT^HFBC

Introduced: g18_2.00.00

Top of page Command Index


^HFBUP - Flash Backup Code

Make a backup copy of the running code in the external DataFlash.

  • AT^HFBUP signature_string
signature_string:
The signature string from the runing copy of code (i.e. the one in the internal flash).

Introduced: g20_1.04.00

Top of page Command Index


^HFES - Flash Erase Sector

Erase a sector of the DataFlash chip. If no sector number is specified then sector 2 is erased. This is because at the time this command was introduced only sector 2 was being used.

The symbolic parameters are only supported on X-series SPEs.

  • AT^HFES
  • AT^HFES sector_number
  • AT^HFES symbolic
sector_number:
0: Erase the 2KB flash sector used to store configuration settings during a flash update. Once a flash update has been done and the settings have been written to this sector of the dataflash these settings become the default setting from then on (until another flash update). In some situations this may be undesirable so they can be erased by erasing sector 0.
1: This 62KB sector of the flash is currently not used.
2: Erase the 64KB code image sector of the dataflash in preparation to receive a new code download.
3-5: Erase one of the three 128KB sectors used to hold log records. To erase the log history of a unit all three sectors must be erased. Failure to do so may cause undesirable results.
symbolic:
ALL: Erase the entire DataFlash chip.
CODE: Erase the sectors of the DataFlash chip that are used to store the downloaded code image.
LOGS: Erase the sectors of the DataFlash chip that are used to store log records.

Introduced: g18_2.00.00, Updated: SPE-X_1.00.03

Top of page Command Index


^HFPC - Flash Page CRC

This command returns the page CRC values for each of the eight pages in the specified DataFlash block.

  • AT^HFPCblock_number
block_number:
0-31: The block number, within sector two of the DataFlash, that should have its page CRC values calculated.

Introduced: g18_2.00.00

Top of page Command Index


^HFRP - Flash Read Page (base-64 format)

Read a page from the DataFlash chip. The data is returned in base-64 format.

  • AT^HFRPpage_number
page_number:
0-2047: The flash page number to read.

Introduced: g18_2.00.00

Top of page Command Index


^HFRPA - Flash Read Page (ASCII format)

Read a page from the DataFlash chip. The data is returned in ASCII format.

  • AT^HFRPApage_number
page_number:
0-2047: The flash page number to read.

Introduced: g18_2.00.00

Top of page Command Index


^HFRPX - Flash Read Page (Hex format)

Read a page from the DataFlash chip. The data is returned in hex format.

  • AT^HFRPXpage_number
page_number:
0-2047: The flash page number to read.

Introduced: g18_2.00.00

Top of page Command Index


^HFUD - Flash Update Command

Attempt to update the running code with a version from the DataFlash. The update will fail if there is not a valid code image in the DataFlash.

Contact Harvest for assistance before attempting to implement an SPE flash download system.

  • AT^HFUDsignature_string
signature_string:
The signature string from the copy of code that is to be installed (i.e. the one in the DataFlash).

Introduced: g18_2.00.00

Top of page Command Index


^HFWP - Flash Write Page Command

Write a page of data to the DataFlash chip. Unspecified bits are assumed to be set. The page is erased before writing.

  • AT^HFWPpage_number,flash_data
page_number:
0-2047: The flash page number to write to. Pages 272 to 507 are used for code download.
flash_data:
Up to 264 bytes worth of base-64 encoded data.

Introduced: g18_2.00.00

Top of page Command Index


^HICT - Set Inter-Call Timeout Period

This command sets the maximum period, in minutes, after DTR is dropped before the ICT variable it set. This can be used to trigger logging or calling. It would normally be used to trigger a call if no other event has triggered a call for the specified length of time.

Set:AT^HICT=timeout_period
AT^HICTvariable=timeout_period
Read:AT^HICT?
AT^HICTvariable?
Help:AT^HICT=?
AT^HICTvariable=?
Default:AT^HICT1=0
AT^HICT2=0
variable:
1-2 = Option for which of the two ICT variables the command applies to.
timeout_period:
0 = Inter-call timeout is disabled.
1-1440 = Inter-call timeout period in minutes.

Introduced: g18_1.02.19

Top of page Command Index


^HIFT - Set Input Filter Times

This command sets the minimum periods that a digital input must remain in the same state before it is recognized as being in that state. These filter times can be useful for having the SPE ignore noise such as contact bounce on an input.

Set:AT^HIFT=input_number,minimum_low,minimum_high
Read:AT^HIFT?
Help:AT^HIFT=?
Default:AT^HIFT=1,3,3
AT^HIFT=2,3,3
AT^HIFT=3,3,3
AT^HIFT=4,3,3
input_number:
1-4 = The digital input number to which the filter times values apply. This is limited to two for the SPE.
minimum_low:
0-65535 = The minimum time (in milliseconds) that the specified input must remain in a steady low state before the SPE regards it as being low.
minimum_high:
0-65535 = The minimum time (in milliseconds) that the specified input must remain in a steady high state before the SPE regards it as being high.

Introduced: g18_2.02.04

Top of page Command Index


^HLBF - Read Log Records in Binary Format

Before the ITU there existed commands to read log records in both text and base64 formats. However the ITU extends the record size significantly and neither of the existing methods lent themselves to such an expansion. Therefore this new format was added. This command is intented for use by automated systems only. Implementors should contact Harvest for more information.

Read:AT^HLBF word_mask,record_count,time_range
AT^HLBF word_mask,record_count
AT^HLBF word_mask,,time_range
AT^HLBF word_mask
AT^HLBF ,record_count,time_range
AT^HLBF ,record_count
AT^HLBF ,,time_range
AT^HLBF
Help:AT^HLBF=?
word_mask:
Base 64 encoded mask value in which each bit corresponds to a word in the log record.
record_count:
1-20: The maximum number of records to read. Default value is ten.
time_range:
Base 64 encoded start and end time values.

Introduced: g20_1.04.00

Top of page Command Index


^HLCF - Read Log Records in Compact Format

The read log records command is the standard method of recalling records stored in the SPE's log. It uses human readable text commands and returns human readable text responses. This command is intended to complement the stardard command by providing a more data volume efficient method of log retrieval for automated applications. Contact Harvest for further information and sample C code for generation of the time_range parameter and decoding of the returned data.

Read:AT^HLCF mask,cnt,year/mth/day hour:min:sec
AT^HLCF mask,cnt,year/mth/day hour:min
AT^HLCF mask,cnt,,time_range
AT^HLCF mask,cnt
AT^HLCF mask
AT^HLCF
Help:AT^HLCF=?
mask:
-1, 0 Include all fields in output records.
1-1023 Include fields in output records corresponding to the bits set in this value.
cnt:
1-20 The maximum number of records to read. Default value is ten.
year:
0-99 or 2000-2099 The year of the maximum record time.
mth:
1-12 The month of the maximum record time.
day:
1-31 The day of month of the maximum record time. Note that only days that are valid for the year and month specified will be accepted.
hour:
0-23 The hour in 24 hour format of the maximum record time.
min:
0-59 The minute of the maximum record time.
sec:
0-59 The second of the maximum record time.
time_range:
Base 64 encoded start and end time values.

Introduced: g18_1.02.09

Top of page Command Index


^HLIP - Set Local IP Address

Sets the IP address that the SPE will request in the PPP negotiation. This is not necessarily the IP address that will be negotiated.

Set:AT^HLIP=local_ip_address
Read:AT^HLIP?
Help:AT^HLIP=?
Default:AT^HLIP="0.0.0.0"
local_ip_address:
The IP address to ask for. Normally "0.0.0.0" unless a fixed IP is associated with the SIM and APN that are being used. If you are using dynamic IP addresses you should use "0.0.0.0" unless told otherwise by your network operator. If you are using fixed IP addresses it can still be a good idea to set the local IP address to "0.0.0.0" since this will get you the IP address that is associated with the SIM your are using. If you were to specify an actual IP address then changing the SIM without changing the local IP address value will prevent your unit from working.

Introduced: g18_1.00.00

Top of page Command Index


^HLOG - Read Log Records

This command is used to recall records stored in the SPE's log. Up to the specified number of records are recalled with the most recent record being the newest record that is older than the specified time. If no time is specified then the current time is used. Records are presented most recent first.

Each log entry returned lists the date and time of the entry followed by the counts for inputs one and two, the analog reading for inputs one through three, the temperature readings for sensors one and two, a decimal value representing the digital input states, the three second wind gust and the vector average wind direction. The analog input three value comes from the power supply input voltage divider and reads approximately 102.4 counts per volt. The temperature reading are in 1/16 degree Celsius units. If no temperature sensor is attached then a reading of -880 is returned. This corresponds to -55.0°C, the minimum temperature for a DS18B20 sensor.

Read:AT^HLOG rec_cnt,year/month/day hour:minute:second
AT^HLOG rec_cnt,year/month/day hour:minute
AT^HLOG rec_cnt
AT^HLOG
Help:AT^HLOG=?
rec_cnt:
1-20 The maximum number of records to read. Default value is ten.
year:
0-99 or 2000-2099 The year of the maximum record time.
month:
1-12 The month of the maximum record time.
day:
1-31 The day of month of the maximum record time. Note that only days that are valid for the year and month specified will be accepted.
hour:
0-23 The hour in 24 hour format of the maximum record time.
minute:
0-59 The minute of the maximum record time.
second:
0-59 The second of the maximum record time.

Introduced: g18_1.01.04

Top of page Command Index


^HLOP - Set Log Options

This command is used to tell the SPE the conditions that should cause it to generate and store a log entry. Use of this command requires an understanding of Boolean algebra.

Set:AT^HLOP=a{.b}{+c{.d}}
AT^HLOP=FALSE
Read:AT^HLOP?
Help:AT^HLOP=?
Default:AT^HLOG=FALSE
a-d:
Boolean variables (from the set T1, T5, T10, T15, T30, T60, C1, C2, C3, C4, A1, A2, A3, AG1T, AG1F, AT2T, AG2F, AG1C, AG2C, SCT, RING, CALL, I1, I1L, I1H, I2, I2L, I2H, DG1T, DG1F, DG2T, DG2F, DG1C, DG2C, P1, P1L, P1H, P2, P2L, P2H, HOT, COLD, ICT, ICT2 and RST) used to form the sum of products expression.

There are fourty five Boolean variables available to use in log option expressions. Eight are time related: T1, T5, T10, T15, T30, T60, ICT and ICT2. The first six of these correspond to time intervals of 1, 5, 10, 15, 30 and 60 minutes respectively. These variables become true when the real time clock reaches a multiple of their time value. For example T1 becomes true every time the minutes changes but T15 only becomes true when the minutes changes to a value of 0, 15, 30 or 45. The last two time variables, ICT and ICT2, are set specified numbers of minutes after DTR is dropped. This is useful as a kind of fallback condition if nothing else has happened for a while. Four are count related variables, C1, C2, C3 and C4, which become true each time one of their corresponding counts is incremented. Three are simple analog related variables, A1, A2 and A3, which are set to true when a change of greater than the specified threshold value for the corresponding analog input is detected. Six are analog group variables, AG1T, AG1F, AT2T, AG2F, AG1C and AG2C. There are four special condition variables: SCT, RING, CALL and RST. These are set true at a scheduled call time, ring detect, call event, and reset respectively. A call event is when the ^HSCO expression is satisfied. For each of the first two digital inputs there are three conditions: I1 and I2 which get set on any change of state, I1L and I2L which are true when the input is in the zero state, and I1H and I2H which are true when the input is in the one state. There are six digital group variables, DG1T, DG1F, DG2T, DG2F, DG1C and DG2C. There are eight temperature related variables. The first two, P1 and P2, which are set to true when a change in temperature of greater than the applicable high or low threshold is detected. The next four temperature variables, P1L, P1H, P2, P2L and P2H are set to reflect the high or low status of the temperatures. The final two temperature variables, HOT and COLD, are set to indicate a temperature within a set a sensors is outside of specified bounds.

VariableSet condition
T1Every minute
T5Every multiple of 5 minutes
T10Every multiple of 10 minutes
T15Every multiple of 15 minutes
T30Every multiple of 30 minutes
T60Every hour
ICTSpecified number of minutes after DTR last dropped.
ICT2Specified number of minutes after DTR last dropped.
C1Every count of digital input 1
C2Every count of digital input 2
C3Every count of digital input 3
C4Every count of digital input 4
A1When analog 1 changes more than ^HATH 1
A2When analog 2 changes more than ^HATH 2
A3When analog 3 changes more than ^HATH 3
AG1TWhen analog inputs are in selected states
AG1FWhen analog inputs are not in selected states
AG2TWhen analog inputs are in selected states
AG2FWhen analog inputs are not in selected states
AG1CWhenever selected analog inputs change
AG2CWhenever selected analog inputs change
SCTAt any scheduled call time
RINGWhen the SPE detects ringing
CALLWhen ^HSCO evaluates to true
I1When digital input 1 changes state
I1LIf digital input 1 is low
I1HIf digital input 1 is high
I2When digital input 2 changes state
I2LIf digital input 2 is low
I2HIf digital input 2 is high
DG1TWhen digital inputs are in selected states
DG1FWhen digital inputs are not in selected states
DG2TWhen digital inputs are in selected states
DG2FWhen digital inputs are not in selected states
DG1CWhen selected digital inputs change state
DG2CWhen selected digital inputs change state
P1When temperature 1 changes more than ^HTDL 1 or ^HTDH 1
P1LIf temperature 1 is below ^HTLH 1 value
P1HIf temperature 1 is above ^HTLH 1 value
P2When temperature 2 changes more than ^HTDL 2 or ^HTDH 2
P2LIf temperature 2 is below ^HTLH 2 value
P2HIf temperature 2 is above ^HTLH 2 value
HOTIf a temperature is too hot
COLDIf a temperature is too cold
RSTPower on, Watchdog or Flash update reset

Note that the temperature values are only tested at each minute change or when a log writing condition occurs. Analog inputs are sampled according to the analog sampling interval.

The Boolean expression takes the form commonly known as a sum of products. This means it's a logically ORed combination of ANDed variables. Each ANDed combination is refered to as a product term. The log options command allows up to eight product terms. The number of variables that go to form each product term is only limited by the length of the total command string. A log entry is produced when the sum of products expression evaluates to true. This means that an entry will be produced whenever any one or more of the product terms evaluates to true.

The special case of AT^HLOP=FALSE (or NONE) disables all logging.

Example 1: AT^HLOP=C1

A log entry will be recorded whenever count one is incremented.

Example 2: AT^HLOP=T5

A log entry will be recorded whenever the real time clock reaches a multiple of five minutes (i.e. every five minutes).

Example 3: AT^HLOP=C2.T15

A log entry will be recorded whenever the real time clock reaches a multiple of fifteen minutes as long as count two has increased since the last log entry. This type of configuration is useful when the input is sometimes incrementing faster than log entries are wanted and yet at other times doesn't increment for significant periods.

Example 4: AT^HLOP=C1+C2.T5+T60+A1

A log entry will be recorded whenever any of the following conditions are true:

  • Count one is incremented. (C1)
  • The real time clock minute has reached a multiple of five and count two has incremented. (C2.T5)
  • The real time clock hour has incremented. (T60)
  • Analog input one, sampled every minute, has changed more than the threshold amount since the last record was recorded. (A1)

Introduced: g18_1.01.05, Updated: g20_1.04.15

Top of page Command Index


^HLPM - Enable Low Power Mode

This command can be use to enable the SPEs low power mode of operation. In low power mode the SPE turns off the g18 module when DTR is dropped and goes into a power saving mode. This mode is only useful in situations where communication is initiated from the SPE end.

Set:AT^HLPM=low_power_mode
Read:AT^HLPM?
Help:AT^HLPM=?
Default:AT^HLPM=0
low_power_mode:
0 = Disable low power mode.
1 = Enable low power mode.

Introduced: g18_1.02.07

Top of page Command Index


^HMCV - Set Minimum Call Voltage

The minimum call voltage setting can be used to prevent the SPE from making an auto-connect call when the supply voltage is too low. This is primarily for solar powered systems where a call attempt with a flat battery is likely to fail but cause further flattening of the battery.

Set:AT^HMCV=adc_threshold_reading
Read:AT^HMCV?
Help:AT^HMCV=?
Default:AT^HMCV=0
adc_threshold_reading:
The minimum analog input three reading required before the SPE will attempt an auto-connect. Refer to the read analog input command (AT^HRA3).

Introduced: g18_2.00.00

Top of page Command Index


^HOOT - Set Output Operate Time

The setting is used to specify the time that the relay outputs should operate for. This saves having to issue two commands to pulse a relay and prevents the relays being left on and running the battery flat (when the ITU is battry power). By setting the value to zero it is still possible to have the relay stay on so long as the unit is not in low power mode.

The relays can be turned on with the set output command.

Set:AT^HOOToutput_num=operate_time
Read:AT^HOOToutput_num?
Help:AT^HOOToutput_num=?
Default:AT^HOOT1=5
AT^HOOT2=5
output_num:
1-2: Selects which of the relays to control.
operate_time:
0: Leave output operated without a timeout. If low power mode is selected then setting the operate time to zero will result in a one second operation.
1-255: Operate output for this number of seconds before returning it to the off state.

Introduced: ITU_1.02.03

Top of page Command Index


^HPASS - Set Password for Authentication

Sets a password for authentication purposes when used in conjunction with a user name. Note that the user name must be non-zero in length in order to enable use of authentication.

Set:AT^HPASS=password
Read:AT^HPASS?
Help:AT^HPASS=?
Default:AT^HPASS=""
password:
Either blank or the password as advised by your network operator.

Introduced: g18_1.01.08

Top of page Command Index


^HPFC - Set PAD Data Forwarding Character

Sets a character that is to be interpreted as a data forwarding signal.

Set:AT^HPFC=data_forwarding_char
Read:AT^HPFC?
Help:AT^HPFC=?
Default:AT^HPFC=13
data_forwarding_char:
Either zero or the decimal ASCII code of the character to use. Zero is used to disable this mode of packet forwarding. Normally the data forwarding character would be set to the carriage return (decimal 13) or line feed (decimal 10) characters. Disabling is advisable when using binary protocols.

Introduced: g18_1.00.00

Top of page Command Index


^HPOC - Enable Auto-Connect

Enables the automatic connection mode of the SPE. When AT^HPOC=1 the SPE will establish a PDP context whenever DTR is asserted. Should the PDP context be terminated the SPE will continue trying to re-establish it.

In order to ensure that a PDP context remains active the SPE incorporates an optional ICMP echo (ping) test feature that can be used to help ensure continuity of GPRS connection. In situations where the PDP session is to stay up all the time use of this feature is strongly recommended.

Set:AT^HPOC=connect_mode
Read:AT^HPOC?
Help:AT^HPOC=?
Default:AT^HPOC=0
connect_mode:
0 = Disable auto-connect. The SPE will start in command mode.
1 = Enable auto-connect. The SPE will attempt to establish a PDP context when DTR is asserted.
2 = Enable SoftDTR only auto-connect. The SPE will attempt to establish a PDP context when the SoftDTR variable is set. This variable can be set as a result of the call options expression evaluating true or directly with the set soft DTR command (AT^HDTR).

Introduced: g18_1.00.00

Top of page Command Index


^HPPD - Set ICMP (PING) Echo Test Frequency

Sets the number of times per day that the SPE will perform an ICMP echo test. The echo test sends one or more ICMP echo request (ping) packets to the address specified as the remote IP address. If no response is received then the SPE will terminate the current PDP context. If auto-connect mode is enabled the SPE will attempt to establish a new context.

The test is intended to allow an unattended SPE to detect and correct a failed PDP context. There is a cost associated with the data of the ping packets so the rate at which they are done should be chosen in consideration of the cost and acceptable downtime.

When enabled the test is only performed if a PDP context is active. Care should be taken to ensure that the computer specified by the remote IP address is available and able to respond to ICMP echo requests at all times. Note that the SPE will send multiple requests if it doesn't get a response so this can further increase costs if the remote computer is unavailable.

The ping test is triggered by the real time clock matching a defined ping time. The ping times are at equal intervals throughout the day starting at midnight. When triggered the SPE will initiate a two minute timer and start sending ICMP echo requests at 30 second intervals until either a reply is received or the timer expires. If the timer expires before a reply is received then the SPE will terminate the current PDP context. A new PDP context will only be started automatically if power on connect is enabled.

Set:AT^HPPD=pings_per_day
AT^HPPD=pings_per_day,ping_size
Read:AT^HPPD?
Help:AT^HPPD=?
Default:AT^HPPD=0,32
pings_per_day:
0 = Disable ICMP echo test.
1, 2, 3, 4, 6, 8, 12, 24, 48, 96, 144, 288 = Perform ICMP echo test the specified number of times per day. This allows selection of between five minutes and 24 hours between tests.
ping_size:
1-512 = The number of data bytes to include in the ping packet. A small size will minimize data volume charages but for testing purposes it may be desirable to try larger data sizes.

Introduced: g18_1.01.02

Top of page Command Index


^HPTO - Set PAD Data Forwarding Timeout

Sets the maximum time that may elapse between the arrival of consecutive characters from the DTE before the SPE forwards those characters already in it's buffer. For packet based protocols this time would usually be set to a bit more that the inter-character time. For interactive applications this time may be set to something like a second as a compromise between the number of packets sent and the response time of the application. Alternatively a value a zero will disable the data forwarding timeout and a forwarding character will be needed.

Set:AT^HPTO=timeout
Read:AT^HPTO?
Help:AT^HPTO=?
Default:AT^HPTO=10
timeout:
0 = Disable data forwarding timeout.
1-255 = Timeout value in 10ms intervals (e.g. 100 = 1 second).

Introduced: g18_1.00.00

Top of page Command Index


^HPUC - Pull Up Control MIB

To enhance power savings the MIB version supports software control of the input pull ups.

Pull up control is divided into two groups: inputs 1 & 2 and inputs 3 & 4. Inputs 1 & 2 also have jumper selection of the pull up. To achieve the full power saving of pull up control it is necessary to turn off the pull up for all but the time when the input is being sampled. However, this would cause the input to count each time it was sampled. By using a count enable the SPE can leave the pull up on if it is needed for a counter but turn if off when it's not needed.

Set:AT^HPUC=pull_up_enable,count_enable
Read:AT^HPUC?
Help:AT^HPUC=?
Default:AT^HPUC=3,15
pull_up_enable:
0-3 = Bit mask selecting pull up for each of the two pull up groups.
count_enable:
0-15 = Bit mask enabling counting for each of the four inputs.

Introduced: MIB_1.04.04

Top of page Command Index


^HPWR - Control Modem Power

Turn on and off power to g18 modem module. This command is only useful in applications that use the SPE in command mode (not auto-connect) and have critical power usage requirements. This is a volatile setting so an SPE power on will turn on power to the g18 modem module. See also low power mode.

Set:AT^HPWR=power_mode
Read:AT^HPWR?
Help:AT^HPWR=?
Default:AT^HPWR=1
power_mode:
0 = Turn off g18 module. Note that the g18 will only respond to commands when turned on.
1 = Turn on g18 module.

Introduced: g18_1.00.01

Top of page Command Index


^HRA - Read Analog Input

Read the state of one of the analog inputs. A decimal value in the range 0 to 4095 is returned. This corresponds to the 0 to 2.5V input range (or other jumper selected input range).

  • AT^HRAinput
input:
1-9 = The analog input to read. The range is 1-9 for ITUs or 1-3 otherwise.

The last analog input (3 or 9) is connected to a voltage divider fed from the input power supply. The input power supply is divided by 16 so the 0 to 4095 analog to digital converter range represents 0 to 40V (16x2.5V). Therefore a supply voltage of 12V will give a reading of around 1229. Note that a 40V input would exceed the allowable input voltage limit. See also the read supply voltage command.

Introduced: g18_1.00.00

Top of page Command Index


^HREF - Select ADC Reference Source MIB ITU

The SPE's MSP430 microcontroller includes an internal voltage reference. MIB and ITU versions are also fitted with a more accurate external reference. This command allows selection of the reference to use on a per input basis.

Sensors that output an absolute voltage, or current, should use the more accurate external reference. However for sensors that use the 2.5V reference output from the ITU and have ratiometric outputs the internal reference should be used.

Set:AT^HREF=reference_map
Read:AT^HREF?
Help:AT^HREF=?
Default:AT^HREF=0
reference_map:
0-511: A bit mask value where each bit set tells the SPE to use the external reference for the corresponding analog input. Bit zero (1) corresponds to analog input one. Bit two (4) corresponds to analog input three. For the MIB the bit mask is limited to 7.

Introduced: g20_1.04.03

Top of page Command Index


^HRFG - Read RF Sensor Group ITU

The purpose of this command is to read the group setting of the radio temperature receiver. However, the group setting is not directly readable but is passed to the SPE with each temperature reading. So the value returned by this command is the group value from the most recent temperature reading that was received. This difference is important to remember when trying to diagnose a problem where radio sensors are not being received.

  • AT^HRFG Read RF sensor group.

Introduced: g20_1.04.15

Top of page Command Index


^HRI - Read Input

Read the state of one of the digital inputs. A zero represents a logic low level and a one represents a logic high level.

  • AT^HRI Read all digital inputs as a hex value.
  • AT^HRIinput Read specified digital input.

For an ITU the digital input number can be in the range 1-12; digital inputs 5-12 corresponding to analog inputs 1-8. For a MIB or SPE the range is 1-4. On the SPE inputs 3 and 4 correspond to the two analog inputs.

Introduced: g18_1.00.00

Top of page Command Index


^HRID - Report ID Information

Report the SPE identification information that was collected when DTR was asserted. This includes the IMSI, the GSN, the g18 software revision, the signal strength and the network registration status. The network registration contains a cell identity field that can be useful in determined the region that the SPE is located in. See also the announcement field selection command.

  • AT^HRID Report ID information.

Introduced: g18_1.00.00

Top of page Command Index


^HRIP - Set Remote IP Address and Port Number

This command is used to set the IP address and port number that outgoing UDP packets will be addressed to. The port number specified is used as the data port. The control port number is equal to the data port number plus one. The port numbers specified for the ^HRIP1 option are also used as the receive port numbers so must be set even if the remote IP address is not used.

A second remote IP address option may be specified. If a second, non-zero, IP address is specified then the ITU will use this for alternate announcements after the first three when decreasing rate announcements are selected. If a valid UDP packet is received from the second address then, for the duration of the PDP context or until a packet is received from the first IP address, it will be used as the destination for sebsequent packets sent by the ITU.

Set:AT^HRIP=remote_ip_addr[,port_number]
AT^HRIPoption=remote_ip_addr[,port_number]
Read:AT^HRIP?
AT^HRIPoption?
Help:AT^HRIP=?
AT^HRIPoption=?
Default:AT^HRIP1="210.55.246.26",7777
AT^HRIP2="0.0.0.0",7777
option:
1-2 The remote IP address option that the command applies to.
remote_ip_addr:
The IP address to initially send to.
port_number:
The UDP port number to send data packets to.

Introduced: g18_1.00.00

Top of page Command Index


^HRIT - Set Receive Idle Timeout

This feature is designed to provide either an alternative to, or an enhancement of, the ping feature. With this feature enabled the SPE will reset an idle timer each time it receives a qualifying packet. Should this idle timer expire then the SPE will terminate its current PDP context and power down the g20 module. If power on connect is enabled a new PDP context will be established.

This feature is particularly well suited to units that are being polled at a regular interval. The receive idle time should be set to a little longer than the poll interval. When the units are being polled this feature can be better than the ping feature since this doesn't add any extra data volume like the ping feature does.

This feature may be used in conjunction with the ping feature since ICMP echo replies are not qualifying packets from the point of view of the feature. However, ICMP echo requests are qualifying packets so pinging the SPE may be used to reset the receive idle timer.

Set:AT^HRIT=timeout_interval
Read:AT^HRIT?
Help:AT^HRIT=?
Default:AT^HRIT=0
timeout_interval:
0 = Disable the receive idle timout feature.
5-1500 = The maximum idle time in minutes.

Introduced: g20_1.04.03

Top of page Command Index


^HRST - Reset to Factory Defaults

This command resets all of the SPE's non-volatile settings to their factory default values.

  • AT^HRST

Introduced: g18_1.01.04

Top of page Command Index


^HRSV - Read Supply Voltage

This commands reads the supply voltage and returns the result in volts. Unlike the read analog input command it is not necessary to know either the input corresponding to the supply voltage or the divider ratio.

  • AT^HRSV

Introduced: g20_1.04.00

Top of page Command Index


^HRTC - Set Real Time Clock

This command is used to set the real time clock that is used for the scheduled call timing, the periodic ping test and the logger function. Note that the real time clock setting will be lost at power off if your SPE is not equipped with the battery backed clock option.

Set:AT^HRTC=year/month/day hour:minute:second
AT^HRTC=year/month/day hour:minute
AT^HRTC=year/month/day
AT^HRTC=hour:minute:second
AT^HRTC=hour:minute
Read:AT^HRTC?
Help:AT^HRTC=?
Default:AT^HRTC=2000/1/1 0:00:00
year:
0-99 or 2000-2099 The current year.
month:
1-12 The current month.
day:
1-31 The current day of month. Note that only days that are valid for the year and month specified will be accepted.
hour:
0-23 The current hour in 24 hour format.
minute:
0-59 The current minute.
second:
0-59 The current second.

Introduced: g18_1.01.04

Top of page Command Index


^HRTS - Enable Reply to Sender

Enables or disables the reply to sender mode. In reply to sender mode outgoing packets are at first addressed to the IP address specified by the ^HRIP command but every time an acceptable UDP packet is received the source address of this packet is used as the destination address for following outward packets. When reply to sender mode is disabled all outgoing packets are sent to the same initially specified IP address.

Set:AT^HRTS=reply_mode
Read:AT^HRTS?
Help:AT^HRTS=?
Default:AT^HRTS=0
reply_mode:
0 = Disable reply to sender mode.
1 = Enable reply to sender mode.

Introduced: g18_1.00.00

Top of page Command Index


^HSAS - Show All Settings

This command lists the current values of all of the SPE's non-volatile setting.

  • AT^HSAS

Introduced: g18_1.01.04

Top of page Command Index


^HSCO - Set Call Options

Specifies which, if any, events will cause the soft DTR state to be set. Setting of the soft DTR state will trigger the establishment of a PDP context if ^HPOC has been set to a non-zero value and there is not already an active PDP context. See also soft DTR timeout.

The call options command is closely related to the log options command. The syntax is the same and much of the functionality is shared. Some of the variables are based on changes since the last log entry. If for these variables a log entry is not generated at the same time as a call then a repeat call is likely to occur since the changes since the last log entry will remain. In most cases the call options expression should refer to a subset of the log options expression.

Set:AT^HSCO=a{.b}{+c{.d}}
AT^HSCO=FALSE
Read:AT^HSCO?
Help:AT^HSCO=?
Default:AT^HSCO=FALSE
a-h:
Boolean variables (from the set T1, T5, T10, T15, T30, T60, C1, C2, C3, C4, A1, A2, A3, AG1T, AG1F, AT2T, AG2F, AG1C, AG2C, SCT, RING, TRUE, I1, I1L, I1H, I2, I2L, I2H, DG1T, DG1F, DG2T, DG2F, DG1C, DG2C, P1, P1L, P1H, P2, P2L, P2H, HOT, COLD, ICT, ICT2 and RST) used to form the sum of products expression.

There are fourty five Boolean variables available to use in call option expressions. Eight are time related: T1, T5, T10, T15, T30, T60, ICT and ICT2. The first six of these correspond to time intervals of 1, 5, 10, 15, 30 and 60 minutes respectively. These variables become true when the real time clock reaches a multiple of their time value. For example T1 becomes true every time the minutes changes but T15 only becomes true when the minutes changes to a value of 0, 15, 30 or 45. The last two time variables, ICT and ICT2, are set specified numbers of minutes after DTR is dropped. This is useful as a kind of fallback condition if nothing else has happened for a while. Four are count related variables, C1, C2, C3 and C4, which become true each time one of their corresponding count is incremented. Three are simple analog related variables, A1, A2 and A3, which are set to true when a change of greater than the specified threshold value for the corresponding analog input is detected. Six are analog group variables, AG1T, AG1F, AT2T, AG2F, AG1C and AG2C. There are four special condition variables: SCT, RING, TRUE and RST. The SCT, RING and RST variables are set true at a scheduled call time, upon ring detect an at a reset respectively. The TRUE variable is always true and can be used in place of a hardware DSR/DTR/RTS loopback connection. For each of the first two digital inputs there are three conditions: I1 and I2 which get set on any change of state, I1L and I2L which are true when the input is in the zero state, and I1H and I2H which are true when the input is in the one state. There are six digital group variables, DG1T, DG1F, DG2T, DG2F, DG1C and DG2C. There are eight temperature related variables. The first two, P1 and P2, which are set to true when a change in temperature of greater than the applicable high or low threshold is detected. The next four temperature variables, P1L, P1H, P2, P2L and P2H are set to reflect the high or low status of the temperatures. The final two temperature variables, HOT and COLD, are set to indicate a temperature within a set a sensors is outside of specified bounds.

VariableSet condition
T1Every minute
T5Every multiple of 5 minutes
T10Every multiple of 10 minutes
T15Every multiple of 15 minutes
T30Every multiple of 30 minutes
T60Every hour
ICTSpecified number of minutes after DTR last dropped.
ICT2Specified number of minutes after DTR last dropped.
C1Every count of digital input 1
C2Every count of digital input 2
C3Every count of digital input 3
C4Every count of digital input 4
A1When analog 1 changes more than ^HATH 1
A2When analog 2 changes more than ^HATH 2
A3When analog 3 changes more than ^HATH 3
AG1TWhen analog inputs are in selected states
AG1FWhen analog inputs are not in selected states
AG2TWhen analog inputs are in selected states
AG2FWhen analog inputs are not in selected states
AG1CWhenever selected analog inputs change
AG2CWhenever selected analog inputs change
SCTAt any scheduled call time
RINGWhen the SPE detects ringing
TRUEAlways set
I1When digital input 1 changes state
I1LIf digital input 1 is low
I1HIf digital input 1 is high
I2When digital input 2 changes state
I2LIf digital input 2 is low
I2HIf digital input 2 is high
DG1TWhen digital inputs are in selected states
DG1FWhen digital inputs are not in selected states
DG2TWhen digital inputs are in selected states
DG2FWhen digital inputs are not in selected states
DG1CWhen selected digital inputs change state
DG2CWhen selected digital inputs change state
P1When temperature 1 changes more than ^HTDL 1 or ^HTDH 1
P1LIf temperature 1 is below ^HTLH 1 value
P1HIf temperature 1 is above ^HTLH 1 value
P2When temperature 2 changes more than ^HTDL 2 or ^HTDH 2
P2LIf temperature 2 is below ^HTLH 2 value
P2HIf temperature 2 is above ^HTLH 2 value
HOTIf a temperature is too hot
COLDIf a temperature is too cold
RSTPower on, Watchdog or Flash update reset

Note that the analog and temperature values are only tested at each minute change or when either of the counters is incremented.

The Boolean expression takes the form commonly known as a sum of products. This means it's a logically ORed combination of ANDed variables. Each ANDed combination is refered to as a product term. The call options command allows up to eight product terms. The number of variables that go to form each product term is only limited by the length of the total command string. The soft DTR value will be set when the sum of products expression evaluates to true. This means that soft DTR will be set whenever any one or more of the product terms evaluates to true.

The special case of AT^HSCO=FALSE (or NONE) disables all call events.

Example 1: AT^HSCO=C1

Soft DTR will be set whenever count one is incremented.

Example 2: AT^HSCO=T60

Soft DTR will be set whenever the real time clock hour changes.

Example 3: AT^HSCO=C2.T60

Soft DTR will be set whenever the real time clock hour changes as long as count two has increased since the last log entry.

Example 4: AT^HSCO=C1+C2.T30+SCT+A1

Soft DTR will be set whenever any of the following conditions are true:

  • Count one is incremented. (C1)
  • The real time clock minute has reached a multiple of thirty and count two has incremented. (C2.T30)
  • A scheduled call time has occurred. (SCT)
  • Analog input one has changed more than the threshold amount since the last log record was recorded. (A1)

Intruduced: g18_1.01.04, Updated: g20_1.04.15

Top of page Command Index


^HSCT - Set Scheduled Call Time

This command allows the user to set up to eight times of day that the SPE will make a scheduled call. This is useful when used in conjunction with the call options and auto-connect commands. Also the real time clock will need to be set to be meaningful.

Although it wasn't the intended purpose the schedules call times can be used to schedule log events to be recorded at specific times of day.

Set:AT^HSCT=list_id,hour:minute
Read:AT^HSCT?
Help:AT^HSCT=?
Default:AT^HSCT=1,24:00
AT^HSCT=2,24:00
AT^HSCT=3,24:00
AT^HSCT=4,24:00
AT^HSCT=5,24:00
AT^HSCT=6,24:00
AT^HSCT=7,24:00
AT^HSCT=8,24:00
list_id:
1-8 specifies which entry in table to modify.
hour
00-23 Hour of day to call.
24 Disable this table entry. Minute must be zero.
minute
00-59 Minute of hour of day to call.

Introduced: g18_1.01.04

Top of page Command Index


^HSN - Read SPE Serial Number

This command is used to read the serial number of the SPE. The serial number is stored as a 32 bit number so can have a maximum of 10 digits.

  • AT^HSN Read the SPE serial number.

Introduced: g18_2.00.00

Top of page Command Index


^HSO - Set Output

Sets the state of one of the digital outputs. Note that these outputs are open drain so a one state corresponds to the FET being turned on and the output pulled low.

Note that the outputs are used for connecting the DS18B20 temperature sensors so can not be used for both purposes at the same time. However, it is possible to use one output as an output and the other for a temperature sensor.

Set:AT^HSO1=output_state
AT^HSO2=output_state
Read:AT^HSO1?
AT^HSO2?
Help:AT^HSO1=?
AT^HSO2=?
Default:AT^HSO1=0
AT^HSO2=0
output_state:
0 = Turn off the output (must be off in order to use a temperature sensor).
1 = Turn on the output.

Introduced: g18_1.00.00

Top of page Command Index


^HSTM - Set Transparent Mode

Enables or disables the SPE's transparent mode. In transparent mode the SPE's IP functionality is bypassed. This allows an external PPP/IP stack to be used with the SPE. Note that transparent mode means that the SPE's microprocessor passes data transparently between the DTE port and the g18 GPRS module. This should not be confused with the type of end to end transparency that can be achieved using two SPEs operating in normal (non-transparent) mode.

Transparent mode can be useful to advanced developers for testing purposes. It is not expected to be used in applications since in order to use transparent mode the DTE must include an IP stack and if it does then only a GPRS modem is needed.

Set:AT^HSTM=transparent_mode
Read:AT^HSTM?
Help:AT^HSTM=?
Default:AT^HSTM=0
transparent_mode:
0 = Normal PAD mode.
1 = Transparent mode.

Introduced: g18_1.00.01

Top of page Command Index


^HTALK - Redirect Communication to New Server

Temporarily redirect communication to a new target port and send an introductory message. This allows a server to direct an SPE to communicate to a second server. In some situations the reply to sender function may be used to allow a second server to communicate with an SPE but in many situations network address translation (NAT) would prevent this. The ^HTALK command allow the server to direct the SPE to establish a path through the NAT to the second server. The first server is also able to pass some status information to the second server via the message parameter.

  • AT^HTALK
  • AT^HTALKtarget_ip_address[,target_port[C|D]][,message_text]
  • AT^HTALKtarget_port[C|D][,message_text]
  • AT^HTALKmessage_text
target_ip_address:
The IP address to talk to. The default is to use the current IP address.
target_port:
The UDP port number to talk to. An options C or D may be appended to the port number to indicate whether the target port number should be associated with the SPE's data or control port. The data port is the default.
message_text:
A quoted string to text to be sent to the specified target port. If no message text is specified then an announcement we be generated and sent to the target port.

Note that this command can only be executed remotely and not from the local DTE port. This is because it is meaningless to use this command except when talking to a remote server.

Introduced: MIB_1.04.23b

Top of page Command Index


^HTDH - Set High Temperature Step Size

This setting, along with the low temperature step size, is used to specify the changes in temperature that are necessary to trigger both a new log record and a call (via soft DTR and auto connect). The current temperature, along with the setting of the low/high threshold, determine whether the low temperature or high temperature thresholds will be used.

Set:AT^HTDH=sensor_number,log_step,call_step
Read:AT^HTDH?
Help:AT^HTDH=?
Default:AT^HTDH=1,40,80
AT^HTDH=2,40,80
sensor_number:
1-2 = Select applicable temperature sensor. Sensor one uses output one and sensor two uses output two.
log_step:
5-800 = The minimum change in temperature that will trigger generation of a new log record. The change in temperature is calculated relative to the corresponding temperature recorded in the most recent log record. The temperature change is in eigthieth degree Celsius units. The choice of eigthieth degree units was made to allow selection of step sizes that correspond to either the natural resolution of the sensor (sixteenth degree) and to decimal fractions.
call_step:
5-800 = The minimum change in temperature that will trigger setting of the soft DTR variable. The change in temperature is calculated relative to the corresponding last reported temperature (a volatile RAM variable). The temperature change is in eigthieth degree Celsius units.

Introduced: g18_1.01.16

Top of page Command Index


^HTDL - Set Low Temperature Step Size

This setting, along with the high temperature step size, is used to specify the changes in temperature that are necessary to trigger both a new log record and a call (via soft DTR and auto connect). The current temperature, along with the setting of the low/high threshold, determine whether the low temperature or high temperature thresholds will be used.

Set:AT^HTDL=sensor_number,log_step,call_step
Read:AT^HTDL?
Help:AT^HTDL=?
Default:AT^HTDL=1,40,80
AT^HTDL=2,40,80
sensor_number:
1-2 = Select applicable temperature sensor. Sensor one uses output one and sensor two uses output two.
log_step:
5-800 = The minimum change in temperature that will trigger generation of a new log record. The change in temperature is calculated relative to the corresponding temperature recorded in the most recent log record. The temperature change is in eigthieth degree Celsius units. The choice of eigthieth degree units was made to allow selection of step sizes that correspond to either the natural resolution of the sensor (sixteenth degree) and to decimal fractions.
call_step:
5-800 = The minimum change in temperature that will trigger setting of the soft DTR variable. The change in temperature is calculated relative to the corresponding last reported temperature (a volatile RAM variable). The temperature change is in eigthieth degree Celsius units.

Introduced: g18_1.01.16

Top of page Command Index


^HTHC - Set Temperature Hot & Cold Thresholds

This setting is used to configure the HOT and COLD variables. The three parameters specify the sensors to consider and the hot and cold thresholds. The HOT variable is set if any of the specified sensors are reporting a temperature greater than or equal to the hot threshold. The COLD variable is set if any sensor is reporting a temperature less than or equal to the cold threshold. This allows logging or calling when any sensor is outside of normal bounds. By specifying which sensors to consider, a sensor that is being used for a different purpose may be excluded. For example, a chiller could be monitored on sensor two (using the P2H variable) while sensors one, three and four could be monitoring for a frost (using the COLD variable).

Set:AT^HTHC=sensor_mask,hot_threshold,cold_threshold
Read:AT^HTHC?
Help:AT^HTHC=?
Default:AT^HTLH=207,50,3
sensor_mask:
0-255 = A bitmask to select applicable temperature sensors. Sensor one is included if bit zero is set etc. The default value of 207 includes sensors 1-4, 7 & 8. Sensors that are reporting errors are ignored so including sensors that are not fitted will not cause a problem.
hot_temperature:
-55-+125 = High temperature threshold in degrees Celsius (°C). Any selected sensor reading above or equal to this threshold will cause the HOT variable to be set.
cold_temperature:
-55-+125 = Low temperature threshold in degrees Celsius (°C). Any selected sensor reading below or equal to this threshold will cause the COLD variable to be set.

Introduced: g20_1.04.15

Top of page Command Index


^HTLH - Set Temperature Low/High Threshold

This setting is used to determine which of the low or high temperature step sizes will be used when checking the temperature change.

Set:AT^HTLH=sensor_number,threshold_temperature
Read:AT^HTLH?
Help:AT^HTLH=?
Default:AT^HTLH=1,64
AT^HTLH=2,64
sensor_number:
1-2 = Select applicable temperature sensor. Sensor one uses output one and sensor two uses output two.
threshold_temperature:
-880-+2000 = The temperature at which the SPE changes from using the low to the high temperature thresholds. The temperature change is in sixteenth degree Celsius units (the natural resolution of the sensor and the same as log entries are recorded). This range corresponds to -55°C-+125°C.

Introduced: g18_1.01.16

Top of page Command Index


^HTMP - Read Current Temperature

This command reads the current temperatures (an humidity if fitted) from sensors attached to the specified sensor port and returns the readings in degrees Celsius (and %RH). If no sensors are detected attached to the specified input then the SPE will return no results.

  • AT^HTMP
  • AT^HTMPsensor_port
sensor_port:
1-2 = Select applicable temperature sensor port (default 1). Only sensor port one may be used with the MIB version.

Introduced: g18_1.01.16

Top of page Command Index


^HUSER - Set User Name for Authentication

Sets a user name and enables authentication. By default the SPE skips the authentication phase of the PPP negotiation however this may be required by some networks. If this command is used to set the user name to a non blank value then the SPE will include the PAP authentication phase of the PPP negotiation. Note that the PAP authentication always succeeds but the user name and password are stored and are passed on to the network at the IPCP configuration phase of the PPP negotiation. This means that acceptance of the username and password says nothing about their correctness and they can still cause the context establishment to fail.

Set:AT^HUSER=user_name
Read:AT^HUSER?
Help:AT^HUSER=?
Default:AT^HUSER=""
user_name:
Either blank or the user name as advised by your network operator. A blank (zero length) user name will disable authentication.

Introduced: g18_1.01.08

Top of page Command Index


^HVER - Report SPE Software Version

Report SPE software version number.

  • AT^HVER

Introduced: g18_1.00.00

Top of page Command Index


^HWHY - Explain Call and Log Reasons

This command returns the reasons for the most reason log record and call. This is in the form of the lop option and call option product terms that first evaluated to true for the most recent evaluations that resulted in a true result.

  • AT^HWHY

Introduced: g20_1.04.00

Top of page Command Index


^HWTDG - Test Watchdog timer

This command was added for internal Harvest use to verify that the watchdog timer was functioning correctly. It can be used to force an SPE reset without having to remove the power.

  • AT^HWTDG

Introduced: g18_1.02.20

Top of page Command Index


ATD499 - Special Dial Command

This command initiates a GPRS call using the SPE's auto-connect functionality. In addition to issuing the ATD*99# dial command this command also sets the APN and local IP address using the AT+CGDCONT command.

The SPE checks that the g18 module is in command mode and responding by sending it the AT command. If it doesn't get the OK response then it will use the escape sequence and the hang-up command to attempt to get the g18 back to command mode. Once it has successfully confirmed command mode it will issue the command AT+CGATT=1 to ensure that the g18 is attached to the GPRS network. After this succeeds it will then issue the AT+CGDCONT command to define a PDP context. The APN and local IP address set by the user with the AT^HAPN and AT^HLIP commands are used as parameters. The SPE then dials using the ATD*99# command and proceeds with PPP negotiation.

There are various timeouts and retries that are used to try and maximize the chances of completing a successful context establishment. Right up until the completion of the IPCP phase of the PPP negotiation the SPE can still go right back to checking for command mode if it needs to. This means that using the ATD499 command can save the user a lot of programming effort by relieving them of much of the need for retry handling.

  • ATD499
  • ATDT499

Introduced: g18_1.01.00

Top of page Command Index