ITU G2 Command Reference
Version
This document applies to ITU_G2 software version ITU_G2_0.04.01 and is current as of 28 October 2011.
ITU commands may be issued either as a string of characters sent from a DTE to the ITU (DCE) while the ITU is in command mode or as UDP packets sent to an ITU 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 locally issued commands but must not be used within the first three characters of an ITU command (AT^).
Command Echo
When in command mode the ITU micro intercepts all characters and buffers them until it is able to determine if it is an ITU command that is being entered. In order to provide echo without several characters delay the ITU does the echo. If the modem were set to provide echo then the user would see a double echo. To get around this the ITU 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 ITU 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 ITU won't catch the echo control change.
Auto-Connect Escape
Once an ITU has had auto-connect enabled (AT^HPOC=1) the user will no longer get to command mode when DTR is asserted, so this complicate further setting changes. To get around this an escape mechanism is provided. After DTR is asserted the ITU 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 may be either AT^HESC (all upper case) or +++ and must be entered without any errors or editing. The ITU responds with OK when a 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 ITU 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 ITU 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 ITU escape sequence, AT^HESC or +++, immediately followed by the command to be executed in such as way that the ITU 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^HRA followed by enter. This then forms a single complete packet so the ITU processes the command AT^HRA and returns the analog input levels.
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^HRIP = "210.55.246.26",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.
Numbered commands
When issuing commands programmatically there can be problems arise with correct identification of responses. This is particually a problem when commands are issued remotely and hence responses are delayed and when the expected responses don't provide sufficient clues to the command (such as an OK response). To mitigate this problem ITU commands may optionaly be numbered. This is done by inserting a number, in the range 0 to 255, enclosed in parenthesis, after the AT^H part of the command. For example: AT^H(74)VER. The response to a numbered command will be proceeded by the number given in the command enclosed in parenthesis and on a line by itself. Although there is no constraint on the sequencing of the numbers, the programmer would typically use successive numbers for successive commands that are issued.
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
SD Card Access
Miscellaneous Commands
Command Descriptions
^HAFE - Enable Auto Forwarding
When enabled and a session is established all characters received by the ITU 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 ITU 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
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=CSQ,HSN,HNC,HWHY,HRTC |
- field_selection_list:
- A comma separated list of field identifiers. The available field identifiers all correspond to AT style commands and fall into two categories: modem commands and ITU commands.
There is six modem commands available and these are listed in the table below.
| Option | Description |
| CIMI | IMSI = International Mobile Subscriber ID (SIM Card Number) |
| CGSN | IMEI = Product Serial Number (modem serial number) |
| CGMR | GPRS modem firmware revision number |
| CSQ | Signal Quality |
| CREG | Network Registration |
| COPS | Network Operator Selection |
These modem command options are read from the cell phone module when DTR is asserted and stored for later use in the announcement. As a consequence of this, changes made to the selection of these fields will not take effect until after DTR is next asserted.
In addition to the modem commands up to six qualifying ITU commands may be included in the announcement. Qualifing ITU commands are all those commands that query a setting or perform an action and take no parameters. Commands that have a numeric option as part of the command (i.e. to the left of any equals sign) may be specified either with or without such a numeric option. For example both HCNT and HCNT2 are valid; the first list all counts and the second just the count for digital input two.
Qualifying basic ITU commands:
HAFE,
HAFS,
HAIC,
HAIP,
HAPN,
HART,
HASE,
HATH,
HBFG,
HBPS,
HBRK,
HCAL,
HCCC,
HCLOSE,
HCNT,
HCPD,
HDAL,
HDIP,
HDTO,
HDTR,
HESC,
HEXC,
HICT,
HIFT,
HIMG,
HLF,
HLIGHT,
HLIP,
HLM,
HLMX,
HLOC,
HLOP,
HLPM,
HLS,
HMCV,
HMOV,
HNC,
HNI,
HPASS,
HPFC,
HPOC,
HPPD,
HPTO,
HPWR,
HRA,
HRI,
HRID,
HRIP,
HRIT,
HROFF,
HRON,
HROT,
HRST,
HRSV,
HRTC,
HRTS,
HSAS,
HSCO,
HSCT,
HSDIM,
HSN,
HSNAP,
HSO,
HSPM,
HTMP,
HTOD,
HTOY,
HUPDE,
HUPDV,
HUSER,
HVER,
HWHY,
HWND,
HWTDG,
HX. Commands are in this list because they meet the qualifying criteria. That does not necessarily mean that it is sensible to use them.
Top of page Command Index
^HAIC - Analog Input Control
Configure analog input range, sampling rate, excition, and filtering.
| Set: | AT^HICinput=[range][,[rate|excitation][,[filter]]] |
| Read: | AT^HAIC[input]? |
| Help: | AT^HAIC=? |
| Default: | AT^HAICinput=40V,60,NONE |
- input:
- 1-8 specifies which of the analog inputs the setting applies to.
- range:
- 4-20mA, 2V, 10V or 40V specifies the input range to use. The ITU uses this setting to control the switching of input divider resistors.
- rate:
- 1-43200 specifies the number of seconds between samples. Inputs that are configured with a sampling rate rather than an excitation are assumed to be constantly powered and therefore not require a delay before sampling.
- excitation:
- V1-V4 Specifies one of the four excitation outputs to associate with this input. The sampling rate and delay are according to the configuration of the excitation source.
- filter:
- NONE No filtering is applied to this input.
- LIN The linear filter option is applied to this input. This filter looks at the last six reading, excludes the highest and lowest, and then takes the mean of the remaining four. A step change in the input signal will result in a linear change in the filter output.
- EXP The exponential filter option is applided to this input. This filter performs a weighted average of the most recent six samples. A step change in the input signal will result in an approximately exponential change in the filter output. Where Fn is the filter output at the time of sample n, and Sn-x is the sample taken x samples earlier, Fn = (16Sn + 8Sn-1 + 4Sn-2 + 2Sn-3 + Sn-4 + Sn-5)/32.
- BURST At each sample time a burst of six samples are taken at 10ms intervals. The highest and lowest readings are discarded and the mean of the remaining four is calculated (like the LIN filter option).
Top of page Command Index
^HAIP - Accept IP Address
Set up IP address and sub-net masks for acceptance of IP packets. When an IP packet arrives at the ITU 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^HAIPlist_entry=accept_addr,accept_subnet |
| Read: | AT^HAIP[list_entry]? |
| Help: | AT^HAIP=? |
| Default: | AT^HAIP1="0.0.0.0","0.0.0.0" |
- list_entry:
- 1-8 specifies which entry in table to modify
- accept_addr:
- Specifies a IP address
- accept_subnet:
- Specifies a subnet mask
Top of page Command Index
^HAPN - Set APN Name
Sets the APN name that the ITU 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.
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 ITU should wait before repeating the announcement.
Top of page Command Index
^HASE - Announce Session Establishment
Enables the sending of an identification message from the ITU to the specified remote IP address whenever the ITU 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.
| Behaviour | Data Port | Control Port |
| Decreasing rate. | 4 | 1 |
| Regular repeat. | 2 | 3 |
| Retriggerable decreasing rate. | 8 | 5 |
| One shot. | 6 | 7 |
- 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 ITU 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 ITU 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.
Top of page Command Index
^HASR - Absolute Sector Read
This command exists for debugging purposes only. It reads one sector from the SD card and displays the contents in hexadecimal and ASCII formats.
- sector:
- Specifies the absolute sector number on the SD card. Sector zero is the primary boot sector and partition table.
Top of page Command Index
^HATH - Analog Threshold
The ITU_G2 allows threshold sets to be defined independantly of the inputs that the relate to. Each threshold set consists of low and high level thresholds plus a change threshold. This command is used to define those thresholds which can then be associated with inputs using the log map settings. This allows a threshold set to be applied to a number of inputs.
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 a 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 value that you are currently considering.
| Set: | AT^HATHnumber[name]=[low_level][,[high_level][,[change_threshold]]] |
| AT^HATHnumber=NONE|FREE |
| Read: | AT^HATH[number]? |
| Help: | AT^HATH=? |
| Default: | AT^HATH1"TEMP"=3,50,2 |
- number:
- 1-12 specifies the threshold set.
- name:
- An optional alpha-numeric name for the threshold set (seven characters maximum, starting with a letter). The name is used when displaying log map entries and may optionally be used when setting a log map setting. Although the name is purely documentative, its use is recommended to help avoid configuration errors and to aid in understanding the configuration when it is reviewed at a later date.
- low_level:
- The level below which an input associated with this threshold set is to be considered by the ITU_G2 to be low.
- high_level:
- The level above which an input associated with this threshold set is to be considered by the ITU_G2 to be high.
- change_threshold
- For an input associated with this threshold set, if the absolute value of the difference between the current value of that input and its value as recorded in the last log record exceeds this threshold then the input is considered to have changed.
Note that the three threshold values are all floating point numbers.
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 ITU will return no results. If no sensor port is specified then both ports will be read.
| Execute: | AT^HBFG[sensor_port] |
- sensor_port:
- 1-2 = Select applicable 1-wire sensor port (1=A, 2=B).
Top of page Command Index
^HBPS - Bits Per Second
Sets the bit rate and character format that the ITU will use to communicate with the DTE.
| Set: | 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 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.
Top of page Command Index
^HBRK - Break Output
This command is used to force the ITU to output a continuous break signal on its 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 ITUs receive data line operates normally.
- 1 = The ITU outputs a continuous break signal on its receive data line.
Top of page Command Index
^HCAL - Calibrate Temperature Sensors
Sets the calibration offsets for all temperature sensors attached to sensor port A. The ITU first reads the temperature sensor attached to port B, then reads the temperature for each sensor attached to port A and records in the sensors EEPROM an error value. This error value is the difference in readings between the reference (port B) sensor and this particular sensor. This value is later used to correct the reading taked by this sensor.
Since only sensors with valid sensor numbers will have their temperatures corrected by the ITU, this command will set the sensor number to one for any sensor that doesn't have a valid sensor number.
Top of page Command Index
^HCCC - Read Configuration CRC
Returns a CRC of the configuration settings plus the ITU software version. This is to allow server software to detect configuration changes in remote ITUs 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 versions so server software should only look for changes in this value and not try to calculate it locally.
Top of page Command Index
^HCDR - Code Download Read
Reads back a block of data from the downloaded code image file that is on the SD card.
| Execute: | AT^HCDR block_addr,read_size |
- block_addr:
- The address in the ITUs address space, expressed as a decimal number, at which this block of data is to eventually reside. Note that this is not the offset into the image file.
- read_size:
- The number of bytes to be read. If more than 1024 bytes are requested then the data will be returned as multiple responses.
Top of page Command Index
^HCDS - Code Download Start
The first stage of a code download is to create an empty file on the SD card of the required size. This command performs that function. The name of the code download file is always ITU_CODE.BIN. If a file of this name already exists it will be erased. A new image file is created and filled with 0xFF bytes.
| Execute: | AT^HCDS image_size |
- image_size:
- The size, in bytes, expressed as a decimal number, of the code download image file.
The code image file starts at address 0x05C00. The downloaded vector table ends at address 0x0F7FF, so the minimum image size is 39936 bytes. The flash memory in the ITU_G2 ends at address 0x45BFF, so the maximum image size is 262144 bytes.
Top of page Command Index
^HCDW - Code Download Write
Write a block of data to a, previous prepared, download image file.
| Execute: | AT^HCDW block_addr:flash_data: |
- block_addr:
- The address in the ITUs address space, expressed as a decimal number, at which this block of data is to eventually reside. Note that this is not the offset into the image file.
- flash_data:
- A block of up to 1024 data bytes plus byte stuffing. The data block is delimited by the two colon (':') characters.
Top of page Command Index
^HCLOSE - Close Currently Open File
Closes the currently open file on the SD card.
Top of page Command Index
^HCMD - Execute Modem Command
This command allows a user to execute a modem command remotely. The ITU 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.
| Execute: | 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.
Top of page Command Index
^HCNT - Counter Value
These commands read and set the value of one of the counters that operate off the ITUs digital inputs. These counters count high to low transitions of the input signal. Inputs one to four have filters that are used to debounce both edges of the input signal. Inputs five through eight have counting ability but without debounce timers so should only be used to count signals from bounce free sources.
The counters are 32 bits in size and are stored in RAM. Each time a log entry is written the count values are also written to the battery backed SRAM in the RTC. It is from here that they are retrieved following a power up. If the count is required to be non-volatile it is necessary to configure the ITU to write a log entry at a suitable time. If the ITU 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.
Even though the counts are 32 in length, when count values are written to log records only the least significant 23 bits are recorded. This is to allow log processing software to distinguish between integer and floating point log records.
| Set: | AT^HCNTinput=count |
| Read: | AT^HCNT[input][?] |
| Help: | AT^HCNT=? |
| Default: | AT^HCNTinput=0 |
- input:
- 0-8 = Digital input number. Counter zero is represents the wind speed input.
- count:
- 0-4294967295 = Current counter value for specified input.
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 ITU 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.
| 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.
Top of page Command Index
^HDAL - Identify Dallas 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 1-Wire 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^HDALport_number=sensor_number[,cal_offset] |
| Read: | AT^HDAL[port_number]? |
| Help: | AT^HDAL=? |
- port_number:
- 1-2 = The physical sensor port to be addressed by the commmand (1=A, 2=B).
- 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 ITU 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.
Top of page Command Index
^HDEL - Delete File
Delete a file on the SD card. The ITU only supports short (8.3) file names in the root directory so this command also has those limitations.
| Execute: | AT^HDEL file_name |
- file_name:
- The name of the file to delete. Only short (8.3) file names are supported.
Top of page Command Index
^HDIP - Read Most Recent Dynamic IP Address
This command can be used to retrieve the most recent local IP address assigned to the ITU. The ITU is assigned a local IP address when it establishes a PDP context. In many cases this is a dynamic IP address and will differ each time a PDP context is established. This IP address is stored in non-volatile memory so may be inspected during the session or after its completion.
Top of page Command Index
^HDTO - 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 ITU is unable to establish a PDP context it will keep trying and this can result in increased power consumption. Also if the ITU does establish a PDP context, send an announement to a server, get a response back (and hence cancel further announcements) but does 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 (unless a retriggerable announcement mode is used) and the unit might just about as well be dead.
To avoid these problems the ITU 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 ITU 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 valid packet is received.
Top of page Command Index
^HDTR - Soft DTR
The ITU 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 ITU uses is the same as the physical DTR.
Collecting data from an ITU via GPRS can be by done by keeping a GPRS session up all the time and polling from a central server or by having the ITU establish a GPRS session as required. The software DTR is a fundamental part of making the ITU establish a GPRS session as required. An event selected by the set call options expression can be used to set the software DTR value. If the power on connect option has been enabled this will then cause the ITU to establish a PDP context. At this point, an announcement can be used to notify the host computer. When it's ready the host computer can then remotely issue an AT^HDTR=0 command to cause the ITU to terminate the PDP context and return to its 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.
Top of page Command Index
^HESC - Escape Flag Value
The ITU 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 ITU 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 ITU 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 = ITU is in data tranfer mode.
- 1 = ITU is in command mode.
Top of page Command Index
^HEXC - Excitation Control
The ITU has four excitation outputs that can be used to provide excitation to analog output sensors. Outputs V1 and V2 are DAC controlled, output V3 is a switched supply voltage, and output V4 is a 15V supply from a boost converter.
| Set: | AT^HEXCdac_output=[interval][,[delay][,[voltage]]] |
| AT^HEXCfixed_output=[interval][,[delay]] |
| Read: | AT^HEXC[dac_output]? |
| AT^HEXC[fixed_output]? |
| Help: | AT^HEXC=? |
| Default: | AT^HEXC[dac_output]=60,0,0 |
| AT^HEXC[fixed_output]=60,0 |
- dac_output:
- 1-2 = ITU variable excitation output to config.
- fixed_output:
- 3-4 = ITU fixed excitation output to config.
- interval:
- 1-43200 = Sampling interval in seconds.
- delay:
- 0-600 = Delay, in 100ms units, from turning on excitation output until sampling associated analog inputs. This should be longer than the sensor settling time. If set to longer than the sampling interval then the excitation output will be left on.
- voltage:
- 0-12.288 = Voltage output for DAC outputs. If there is insufficient headroom between the supply voltage and the specified DAC output voltage then the voltage may not be regulated. Setting resolution is 3mV so the setting read back may not exactly match the value specified in the setting command. It will be rounded to a 3mV multiple.
Top of page Command Index
^HFREQ - Read digital input frequency
Read the frequency of the digital input signals. The returned value is in hertz and may be less than one for slow changing inputs.
The maximum recommended input frequency is about 1kHz. For digital inputs 1-4 this can only be measured if the input filter times are set to zero. The default filter times (3ms) set a limit of about 166Hz. Digital inputs 5-8 do not have filters so care must be taken to ensure that only bounce free signals are used. Very slow inputs can also be measured down to one cycle per hour (about 0.28mHz).
- input:
- 1-8 = The digital input frequency to read.
Top of page Command Index
^HFUD - Flash Update Command
Attempt to update the running code with a version from the SD card. The update will fail if there is not a valid code image on the SD card.
| Execute: | AT^HFUD signature_string |
- signature_string:
- The signature string from the copy of code that is to be installed (i.e. the one on the SD card). This must also match that of the running code.
Top of page Command Index
^HICT - Inter-Call Timeout Period
This command sets the maximum period, in minutes, after DTR is dropped before the corresponding 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^HICTvariable=timeout_period |
| Read: | AT^HICT[variable]? |
| Help: | AT^HICT=? |
| Default: | AT^HICT[variable]=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.
Top of page Command Index
^HIFT - Digital 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 ITU ignore noise such as contact bounce on an input.
| Set: | AT^HIFTinput_number=minimum_low,minimum_high |
|---|
| Read: | AT^HIFT[input_number]? |
| Help: | AT^HIFT=? |
| Default: | AT^HIFT0=1,1 |
| AT^HIFTinput_number=3,3 |
- input_number:
- 0-4 = The digital input number to which the filter times values apply. Input zero is the wind speed input.
- minimum_low:
- 0-65535 = The minimum time (in milliseconds) that the specified input must remain in a steady low state before the ITU 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 ITU regards it as being high.
Top of page Command Index
^HIMG - Define Image Capture Conditions
This command is used to tell the ITU the conditions that should cause it to capture an image using the accessory camera. An understanding of Boolean algebra is helpful when using this command.
| Set: | AT^HIMG=expression |
| Read: | AT^HIMG? |
| Help: | AT^HIMG=? |
| Default: | AT^HIMG=FALSE |
- expression:
- An expression that is to define the image capture behavoiur. ITU_G2 expressions are used for several commands so are described on their own page.
Top of page Command Index
^HLF - Log Field
The ITU maintains a record in RAM of what would be written should the log options expression be satisfied. This record is used to check data dependant terms when evaluating expressions. This command can be used to read fields from this record. The command was added to allow any data item to be included in an announcement but can also be useful for diagnostic purposes.
| Execute: | AT^HLF field_number |
- input_number:
- 0-63 = Log field number to read.
Top of page Command Index
^HLGX - Read Log Records
Use this command to read log records from the ITU. Records are read most recent first. A time may be specified such that the most recent records older than the specified time a retrieved. If a time range is specified then record times returned must be less than the end time and greater than or equal to the start time.
By default, the records returned are encoded in a form of Huffman compression. Specifying the B (binary) or T (text) options will return records in the chosen alternate format.
| Execute: | AT^HLGX[B|T] [count][,time_range] | | AT^HLGX[B|T] [count][,year/month/day hour:minute[:second]] |
- count:
- 0 = The ITU will determine the maximum number of records to read based on the size of the response that will be generated. This maximum number will vary with the number of fields used and, for the compressed response option, the compressibility of the data.
- 1-20 = The maximum number of records to read. Default value is ten.
- time_range:
- Base 64 encoded start and end time values.
- year:
- 0-99, 2000-2099 = Year of most recent log to retrieve.
- month:
- 1-12 = Month of most recent log to retrieve.
- day:
- 1-31 = Day of most recent log to retrieve.
- hour:
- 0-23 = Hour of most recent log to retrieve.
- minute:
- 0-59 = Minute of most recent log to retrieve.
- second:
- 0-59 = Second of most recent log to retrieve.
Top of page Command Index
^HLIGHT - Check Daylight Times
The command returns the current sunrise and sunset time estimates. note that these are expressed in the time that the ITU is using and that this does not correspond to local time at the ITUs location. This can result in times that at first might appear to be nonsense.
Top of page Command Index
^HLIP - Local IP Address
Sets the IP address that the ITU 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.
Top of page Command Index
^HLM - Log Map
Each log record stored by the ITU_G2 consists of 64 fields. What gets stored as each of these fields is controlled by a log map. The log map maps data, sourced from various inputs and external sensors, into the log record. A field in the log record typically holds one value, but for some data sources it may hold more than one value. For example, the state of each input within a group of digital inputs may be represented as a bit within a larger value.
The log map itself consists of 64 entries; one for each log field. Each entry consists of identifiers for the source device, the data point within the device, and the threshold set (if any) to be used for this field.
Log map entries may be inspected and edited individually or as a set. The set editing method takes a long string of hexidecimal characters and is quite cumbersome for a user but makes it easier to automate management of the log table.
| Set: | AT^HLMfield_number=device,data_point[/data_set][,threshold_set] |
| AT^HLMfield_number=NONE|FREE |
| AT^HLMX={field_specifier} |
| Read: | AT^HLM[field_number]? |
| AT^HLMX? |
| Help: | AT^HLM[X]=? |
- field_number:
- 0-63 = The number of the log field that is to be configured or read. This corresponds to the index into the array of fields that is a log record.
- device:
- 0-9999 = The address of the source device. This can be an attached SDI-12 device (addresses 0-9), one of the ITU_G2s built in virtual devices, or an external numbered device.
- A-Z = The address of one of the ITU_G2s build in virtual devices. The alphabetic device identifiers are the same as the numeric device identifiers whose value is the ASCII code value of the alphabetic identifier. That is, for example, device 'A' is the same as device 65. When alphabetic device identifiers are used the comma following the device identifier becomes optional. Therefore 65,2 may be replaced by A,2 or just A2.
- data_point:
- 1-63 = The data point to use from the specified device. Many sensors report multiple readings corresponding to different inputs or parameters. The data point selects which of these readings to use for this log field.
- data_set:
- 0-9 = For SDI-12 sensors using continuous measurement mode (^HSDIMn=R) this parameter specifies which of the R commands (aR0! - aR9!) to use. For SDI-12 sensors configured to use the M or C commands this parameter specifies which of the D command responses to take the result from. It does not specify which of the M or C commands (aM0! - aM9!, aC0! - aC9!) to use. Only the unnumbered, aM! and aC!, commands are currently supported.
- threshold_set:
- 1-12 = Specifies which of the defined threshold sets to associate with this log field.
- NONE = No thresholds are to be associated with this log field.
- field_specifier:
- A list of log map entries as a continuous string of hexadecimal characters. Each log map entry consists of eight hexadecimal characters. The field_specifier must contain an exact multiple of eight characters. Log map entries not specified are set to unused. The first four characters specify the device, the next two the data point, the second of last the data set, and the final character specifies the threshold set.
Top of page Command Index
^HLOC - Define Location for Daylight Estimation
To allow the option of capturing images only during daylight hours the ITU includes a system variable LIGHT. This is similar to the time of day variables but the limits are based on estimations of the sunrise and sutset times. The sunrise and sunset times are calculated daily based on the date and the location. This command is used to tell the ITU the location to use for these estimates.
| Set: | AT^HLOC=signed_lat,signed_lon[,tzofs_hour[:tzofs_min]] |
| AT^HLOC=unsigned_lat[N|S],unsigned_lon[E|W][,tzofs_hour[:tzofs_min]] |
| Read: | AT^HLOC? |
| Help: | AT^HLOC=? |
| Default: | AT^HLOC=-40.9568,175.6218,+12 |
- signed_lat:
- -90 - +90: The latitude to the ITUs location expressed as a signed number with positive being north.
- unsigned_lat:
- 0 - 90: The latitude to the ITUs location expressed as an unsigned number accompanied by a direction letter (N or S). The default is north.
- signed_lon:
- -180 - +180: The longitude to the ITUs location expressed as a signed number with positive being east.
- unsigned_lon:
- 0 - 180: The longitude to the ITUs location expressed as an unsigned number accompanied by a direction letter (E or W). The default is east.
- tzofs_hour:
- -12 - +14: The hour component of the offset of the ITUs clock from UTC. Note that this does not mean local time at the ITU since the ITU may be using a different time zone to the local time at the location.
- tzofs_min:
- 0 - 59: The minute component of the offset of the ITUs clock from UTC. This will typically be zero and not shown but there are a few time zones that are not a whole number of hours offset from UTC.
Top of page Command Index
^HLOP - Log Options
This command is used to tell the ITU the conditions that should cause it to generate and store a log entry. An understanding of Boolean algebra is helpful when using this command.
| Set: | AT^HLOP=expression |
| Read: | AT^HLOP? |
| Help: | AT^HLOP=? |
| Default: | AT^HLOP=FALSE |
- expression:
- An expression that is to define the logging behavoiur. ITU_G2 expressions are used for several commands so are described on their own page.
Top of page Command Index
^HLPM - Enable Low Power Mode
This command can be use to enable the ITU's low power mode of operation. In low power mode the ITU turns off the cellphone module when DTR is dropped and goes into a power saving mode.
| 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.
Top of page Command Index
^HLS - List Directory
This command, which is intended principally for debugging purposes, lists the files in the root directory of the SD card.
Top of page Command Index
^HMCV - Minimum Call Voltage
The minimum call voltage setting can be used to prevent the ITU 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. By not calling the battery is given a chance to recover.
| Set: | AT^HMCV=minimum_supply_voltage |
| Read: | AT^HMCV? |
| Help: | AT^HMCV=? |
| Default: | AT^HMCV=0 |
- minimum_supply_voltage:
- The minimum supply voltage level (expressed in volts) that should be present before the ITU attempts to make a GPRS connection.
Top of page Command Index
^HMOV - Minimum Operate Voltage
The minimum operate voltage setting can be used to try to prevent the ITU from over-discharging a battery by putting it into a, low power, non-operational mode until the battery is replced or recharged. This is primarily for units that have a significant non-call power loading such as a power hungry sensor.
Once shut down, the ITU will restart with a reset once the supply voltage rises above the minimum supply voltage.
At the time of writing, the dual mode receiver add-on does not support any low power shutdown mode. Therefore, when this add-on is fitted, allowing the ITU to enter its, low power, non-operational mode is essentially pointless.
| Set: | AT^HMOV=minimum_supply_voltage[,shutdown_delay] |
| Read: | AT^HMOV? |
| Help: | AT^HMOV=? |
| Default: | AT^HMOV=0,60 |
- minimum_supply_voltage:
- The minimum supply voltage level (expressed in volts) that should be present for the ITU to remain in operation mode.
- shutdown_delay:
- The period of time (expressed in minutes) that the ITU supply must remain below the minimum_supply_voltage before it enters the, low power, non-operational mode.
Top of page Command Index
^HNC - Read New Context Flag
This command returns the current state of the new context flag. The new context flag is set each time the ITU establishes a new GPRS session and cleared when the ITU receives a valid UDP packet. The command was added so that the flag could be included in an announcement.
Top of page Command Index
^HNI - Read New Image Flag
This command returns the state of the new image flag. The purpose of the command is to allow the new image flag to be included in announcements.
The new image flag is set on the successful completion of an image capture sequence. It is cleared when a file having the ".JPG" extension is closed. This, of course, requires that such a file was first opened. It does not require that the file actually be read. If such a file is opened and the session is ended (by DTR dropping) before the file is closed then the file is closed automatically but the new image flag is not cleared.
Top of page Command Index
^HOPEN - Open File on SD Card
Selects a file on the SD card for read and write access. The ITU only supports short (8.3) file names in the root directory so this command has those limitations.
| Execute: | AT^HOPEN file_name[,CREAT[E]][,TRUNC[ATE]] |
- file_name:
- The name of the file to open. The file name should be enclosed in double quotes (").
If the CREAT option is included then the file will be created if it does not already exist. If not included then an error will be returned if the files does not exist. If the TRUNC option is included then the file will be truncated to a length of zero bytes when opened.
When successful the open command returns the file length of the newly opened file.
Top of page Command Index
^HPASS - 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.
Top of page Command Index
^HPFC - 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.
Top of page Command Index
^HPOC - Power On Connect
Enables the automatic connection mode of the ITU. When AT^HPOC=1 the ITU will establish a PDP context whenever DTR is asserted. Should the PDP context be terminated, while DTR remains asserted, the ITU will continue trying to establish a new context.
In order to ensure that a PDP context remains active the ITU incorporates optional ICMP echo (ping) test and receive-idle-timeout features 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 one of these features 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 ITU will start in command mode.
- 1 = Enable auto-connect. The ITU will attempt to establish a PDP context when DTR is asserted.
- 2 = Enable SoftDTR only auto-connect. The ITU 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).
Top of page Command Index
^HPPD - Pings Per Day
Sets the number of times per day that the ITU 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 ITU will terminate the current PDP context. If auto-connect mode is enabled the ITU will attempt to establish a new context.
The test is intended to allow an unattended ITU 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 ITU 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 ITU 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 ITU 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.
Top of page Command Index
^HPTO - PAD Data Forwarding Timeout
Sets the maximum time that may elapse between the arrival of consecutive characters from the DTE before the ITU forwards those characters already in its 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).
Top of page Command Index
^HPWR - Modem Power
Turn on or off power to the cellphone module. This command is primarily used for diagnostic purposes but could be used in an application where it was desirable for the DTE to manage power usage. 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 cellphone module. Note that the cellphone module will only respond to commands when turned on.
- 1 = Turn on cellphone module.
Top of page Command Index
^HQUAL - Set Camera Quality Options
This command allows the user to configure the quality and sizes of images captured with an attached camera. The JPEG quality can be configured to trade off file size and image quality. Up to four different image sizes may be selected.
| Set: | AT^HQUAL=quality[,image_sizes] |
| Read: | AT^HQUAL? |
| Help: | AT^HQUAL=? |
| Default: | AT^HQUAL=60,M |
- quality:
- 1-100 = Quality setting used by the camera to determine compression of JPEG images. Larger numbers result in higher quality images and larger file sizes.
- image_sizes:
- List of image sizes that should be captured.
- T = 160 x 120 pixel image (tiny).
- S = 320 x 240 pixel image (small).
- M = 640 x 480 pixel image (medium).
- L = 1280 x 1024 pixel image (large).
Top of page Command Index
^HRA - Read Analogue Input
Reads the state of analog inputs. For inputs configured to read voltage, a decimal value in the range 0.000 to 40.950 is returned. This is the voltage as read. There is no need to apply any scaling since the ITU has already taken into account the selected voltage range.
For inputs configured for 4-20mA input, the reading is reported as a decimal fraction of full scale. This results in a value from -0.250 to 1.013. Readings of 0.000 and 1.000 correspond to 4mA and 20mA respectively. The reading can be multiplied by the full scale range of the sensor to give a reading in the sensor's units. For some sensors it may still be necessary to apply an offset due to the sensor or its mounting position.
- input:
- 1-9 = The analog input to read. Input 9 reads the ITU's power supply volage sense whereas inputs 1-8 read the corresponding analog inputs.
Top of page Command Index
^HRAM - Read ITU Memory
This command exists for debugging purposes only. It reads a block of ITU memory and displays the contents in hexadecimal and ASCII formats.
| Execute: | AT^HRAM[start_addr][,size] |
- start_addr:
- Specifies the start address in hexadecimal.
- size:
- 0-1000 = The number, in hexadecimal, of bytes to display. This is rounded up to the next multiple of 16 bytes. The default size is 0x400 (1024) bytes. This parameter was added in version 0.02.01.
Top of page Command Index
^HREAD - Read from SD Card File
Reads a block of data from an open file on the SD card.
| Execute: | AT^HREAD file_offset,read_size |
- file_offset:
- The offset into the file, expressed as a decimal number, at which the first byte is to be read from.
- read_size:
- The number of byte to be read. If more than 1024 bytes are requested then the data will be returned as multiple responses.
Top of page Command Index
^HRI - Read Digital Input
Read the state the digital inputs. A zero represents an open input and a one represents a closed input.
- input:
- 1-8 = The digital input to read.
If an input number is specified then the state of that input is reported as a 0 (open) or 1 (closed). If no input number is specified then the state of all digital inputs is reported as a two digit hexadecimal number with bit 0 representing digital input 1 through to bit 7 representing input 8. A bit set corresponds to a closed input.
Top of page Command Index
^HRID - Read ID Information
Report the ITU identification information that was collected when DTR was asserted. This can include the IMSI, the GSN, the cellphone software revision, the signal strength, the network registration status, and the network operator selection. The network registration contains a cell identity field that can be useful in determined the region that the ITU is located in. See also the announcement field selection command.
Top of page Command Index
^HRIP - 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^HRIPoption=remote_ip_addr[,port_number] |
| Read: | AT^HRIP[option]? |
| Help: | AT^HRIP=? |
| Default: | AT^HRIP1="202.74.38.6",7777 |
| AT^HRIP2="202.174.172.236",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.
Top of page Command Index
^HRIT - 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 ITU will reset an idle timer each time it receives a qualifying packet. Should this idle timer expire then the ITU will terminate its current PDP context and power down the cellphone module. If power on connect is enabled, after a few seconds delay the ITU will power up the cellphone module again and establish a new PDP context.
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. For units that are being polled this feature can be better than the ping feature since it doesn't add the extra data volume that the ping feature does.
This feature may also 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 ITU 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.
Top of page Command Index
^HROFF - Relay Off Conditions
This command defines the conditions that will turn off one of the relays, or virtual relays, on the ITU. When a relay is turned off the associated relay operate timer will be cleared.
| Set: | AT^HROFFrelay_num=expression |
| Read: | AT^HROFF[relay_num]? |
| Help: | AT^HROFF=? |
| Default: | AT^HROFFrelay_num=FALSE |
- relay_num:
- 1-4: Selects which of the relay turn-off expressions to configure. Relays 1 and 2 are physical relays and realys 3 and 4 are virtual relays that may be used as state variables or timers.
- expression:
- An expression that is to define the conditions that will turn off the specified relay. ITU_G2 expressions are used for several commands so are described on their own page.
Top of page Command Index
^HRON - Relay On Conditions
This command defines the conditions that will turn on one of the relays, or virtual relays, on the ITU. When a relay is turned on the associated relay operate timer may be started.
| Set: | AT^HRONrelay_num=expression |
| Read: | AT^HRON[relay_num]? |
| Help: | AT^HRON=? |
| Default: | AT^HRONrelay_num=FALSE |
- relay_num:
- 1-4: Selects which of the relay turn-on expressions to configure. Relays 1 and 2 are physical relays and realys 3 and 4 are virtual relays that may be used as state variables or timers.
- expression:
- An expression that is to define the conditions that will turn on the specified relay. ITU_G2 expressions are used for several commands so are described on their own page.
Top of page Command Index
^HROT - Relay Operate Times
Each of the relay outputs has associated with it a timer. These timers are started (or restarted) whenever the associated relay is turned on and cleared when the associated relay is turned off. The turning on and off of the relays can be by satisfaction of their RON and ROFF expressions respectively or by the set output command. This command is used to specify the duration of these timers.
On the expiry of one of these output timers the associated ROT expression term will be set. In typical usage this would be used to turn off the relay by including the ROT term in the ROFF expression. However, since the ROT terms can be used in any expression, the timers can be used for other purposes.
Querying the set output command will show the state of any operational timers.
| Set: | AT^HROTrelay_num=operate_time |
| Read: | AT^HROT[relay_num]? |
| Help: | AT^HROT=? |
| Default: | AT^HROTrelay_num=5 |
- relay_num:
- 1-4: Selects which of the relay timers to configure. Relays 1 and 2 are physical relays and realys 3 and 4 are virtual relays that may be used as state variables or timers.
- operate_time:
- 0: Disable this output timer.
- 1-255: Operate output timer for this number of seconds before setting the associate ROT term.
Top of page Command Index
^HRST - Reset to Factory Defaults
This command resets all of the ITU's non-volatile settings to their factory default values. Since remote execution of this command is likely to prevent further communication with the ITU, this command can only be executed locally (from the DTE port).
Top of page Command Index
^HRSV - Read Supply Voltage
This commands reads the supply voltage and returns the result in volts. For the ITU_G2 this is identical to the ^HRA9 command.
Top of page Command Index
^HRTC - 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.
| 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.
Top of page Command Index
^HRTS - 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.
Top of page Command Index
^HSAS - Show All Settings
This command lists the current values of all of the ITU's non-volatile settings. Some commands that have multiple settings, for example the log map command, will only show settings that are used.
Top of page Command Index
^HSCO - Set Call Options
This command is used to tell the ITU the conditions that should cause it to set the soft DTR state to true. 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.
| Set: | AT^HSCO=expression |
| Read: | AT^HSCO? |
| Help: | AT^HSCO=? |
| Default: | AT^HSCO=TEST |
- expression:
- An expression that is to define the calling behavoiur. ITU_G2 expressions are used for several commands so are described on their own page.
Top of page Command Index
^HSCT - Scheduled Call Time
This command allows the user to set up to eight times of day that the ITU 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 correctly to be meaningful.
Although it wasn't the intended purpose the scheduled call times can be used to schedule log events or relay operation at specific times of day.
| Set: | AT^HSCTlist_id=hour:minute |
| Read: | AT^HSCT[list_id]? |
| Help: | AT^HSCT=? |
| Default: | AT^HSCTlist_id=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.
Top of page Command Index
^HSDI - Issue SDI-12 Command
This command provides a means by which an operator can issue arbitary commands to an attached SDI-12 device. This is particularly useful for configuring and testing SDI-12 sensors. Be aware that performing one-off measurements with this command can be troublesome if the sensor is listed in the log map. This is because the ITU may talk to the device while the measurement is in progress and hence cause the measurement to be aborted.
| Execute: | AT^HSDI command_string |
- command_string:
- The SDI-12 command string to be executed. Note that this is a quoted string and needs to include both the device address and the command terminator (!).
Top of page Command Index
^HSDIM - Configure SDI-12 Measurement Mode
The basic method of reading an SDI-12 sensor is to issue it a start measurement command (aM!). The sensor responds straight away with a value indicating the time that it might take to complete the measurement. The logger must then wait that time period or until it gets a service request from the sensor before it can read the results of the measurement. During this time the SDI-12 bus is unavailable for communication with other sensors. The service request is used to tell the logger when data is available sooner that the time specified in the immediate response. This is particularly helpful for sensors that have a maximum measurement time that is significantly longer than their typical measurement time.
Version 1.2 of the SDI-12 specification added a concurrent measurement command (aC!). This is used like the start measurement command but without the service request. By not supporting the service request the bus is available for communication with other sensors during the measurement period. This is quite helpful when multiple sensors are used and one has a quite long measurement time.
The nature of some sensors is such that they require no measurement time. This is often due to their needing to continuously monitor their input. A shaft encoder is a typical example of such a sensor. SDI-12 has a continuous measurement read command (aRn!) for use with these sensors.
The ^HSDIM command is used to select, on a per sensor basis, the measurement mode to be used .
| Set: | AT^HSDIMdevice=mode |
| Read: | AT^HSDIM[device]? |
| Help: | AT^HSDIM=? |
| Default: | AT^HSDIMdevice=R |
- device:
- 0-9 = SDI-12 device address.
- mode:
- C = Use concurrent measurement mode.
- M = Use standard measurement mode.
- R = Use continuous measurement mode.
Top of page Command Index
^HSDINF - Read SD-Card Information
This command reads the Card Identification (CID) and Card Specific Data (CSD) registers from the installed SD-Card. It is intended as a tool to help diagnose any card related problems that may show up in the future.
Top of page Command Index
^HSN - Read Harvest Serial Number
This command is used to read the serial number of the ITU. The serial number is stored as a 32 bit number so can have a maximum of 10 digits.
Top of page Command Index
^HSNAP - Capture Image Now
This command enables the user to initaite an immediate image capture sequence. Note that although the sequence is started immediately there is a delay before the image capture actually occurs due to the camera start-up delay.
Top of page Command Index
^HSO - Set Output
Sets the state of one of the relay outputs or virtual relays. Setting a relays state to 1 also initiates the corresponding relay operate timer. Setting the state to zero cancels this timer.
Relay states are saved in non-volatile memory and restored at power on. Because the relays are latching types the relay will not change state at power off but the ITU could loose track to the state it is in. It is for this reason that the state is saved.
When reading the relay state, if an operate timer is running then its remaining time will be shown.
| Set: | AT^HSOrelay=output_state |
| Read: | AT^HSO[relay]? |
| Help: | AT^HSO=? |
- relay:
- 1-4 specifies which relay to control. Relays 1 and 2 are physical relays and realys 3 and 4 are virtual relays that may be used as state variables or timers.
- output_state:
- 0 = Turn off the relay.
- 1 = Turn on the relay.
Top of page Command Index
^HSPM - Special Mode Option
The ITU currently supports two special modes for communication with data loggers. Data loggers are frequently operated off batteries and therefore power saving is important. A significant power saving can be achieved by sleeping the serial ports. This does, however, introduce a requirement to wake up the unit when needed and to allow it to return to its sleep mode afterwards. The procedures for this differ with the different loggers.
Further information can be found on the ITU special mode page.
| Set: | AT^HSPM=mode |
| Read: | AT^HSPM? |
| Help: | AT^HSPM=? |
| Default: | AT^HSPM=0 |
- mode:
- 0 = Normal mode.
- 1 = Campbell Scientific Inc. (CR10X) mode.
- 2 = Unidata Australia (Starlogger) mode.
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 ITU 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 ITU but in many situations network address translation (NAT) would prevent this. The ^HTALK command allow the server to direct the ITU 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.
This command can also be used to establish a TCP connection, although the message_text parameter is not supported for TCP connections.
| Execute: | AT^HTALK |
| AT^HTALKtarget_ip_address[,target_port[C|D]][,message_text] |
| AT^HTALKtarget_port[C|D][,message_text] |
| AT^HTALKmessage_text |
| AT^HTALK[target_ip_address,]target_portT |
- target_ip_address:
- The IP address to talk to. The default is to use the current IP address.
- target_port:
- The UDP or TCP 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 ITU's data or control port. The data port is the default. If the T option is used a TCP connection will be attempted to the IP address and port number specified.
- 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. This parameter is not supported for TCP connections.
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.
Top of page Command Index
^HTFIN - Close TCP Connection
This command will close any existing TCP connection.
Top of page Command Index
^HTKA - TCP Keep Alive Interval
It is fairly normal for GPRS devices to be assigned private IP addresses and connections to be port mapped. The problem users face is that the port mappings are discarded by the routers involved after some inactivity timeout interval. Mapping for UDP ports are typically discarded after 60 seconds or less. For TCP the timeouts are typically quite a bit longer with periods of 15 to 60 minutes being typical. For a UDP packet sent from a GPRS device after the mapping has been discarded a new mapping will be created and the packet will be delivered, although the receiver might not know where it came from. However, for a TCP packet any new port mapping spells the end of the connection and the packet will be lost.
To ensure that connections remain valid it is necessary to send some traffic once in a while. This command is used to specify a maximum idle time after which the ITU will send an announcement for the purpose of maintaining the connection. The ITU uses the ACK of this announcement as confirmation that the connection is still functional. Up to four announcements will be sent at 15 second intervals and if none are acknowledged then the ITU will close the TCP connection.
| Set: | AT^HTKA=interval |
| Read: | AT^HTKA? |
| Help: | AT^HTKA=? |
| Default: | AT^HTKA=600 |
- interval:
- 60-1800 = Inactivity time, in seconds, before the ITU will send a TCP announcement.
Top of page Command Index
^HTMP - Read Current Temperature
This command reads the current temperatures (and humidity and pressure 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 ITU will return no results. If multiple sensors are attached to the port then all temperatures will be reported.
| Execute: | AT^HTMP[sensor_port] |
- sensor_port:
- 1-2 = Select applicable temperature sensor port (1=A, 2=B). If no sensor port is specified only the temperature readings will be returned. If a sensor port is specified then applicable humidity and pressure readings will also be reported.
Top of page Command Index
^HTOD - Time of Day Range
There are two time of day variables that may be used in expressions. They are defined using this command. The corresponding TOD variable is true for any time of day after the start time and before the end time.
| Set: | AT^HTODvariable=start_hour[:start_min]-end_hour[:end_min] |
| Read: | AT^HTOD[variable]? |
| Help: | AT^HTOD=? |
| Default: | AT^HTOD[variable]=0:00-0:00 |
- variable:
- 1-2 = Option for which of the two TOD variables the command applies to.
- start_hour:
- 0-23 = The hour part of the start time.
- start_min:
- 0-59 = The minute part of the start time (default is 0).
- end_hour:
- 0-23 = The hour part of the end time.
- end_min:
- 0-59 = The minute part of the end time (default is 0).
Top of page Command Index
^HTOY - Time of Year Range
There are two time of year variables that may be used in expressions. They are defined using this command. The corresponding TOY variable is true for any time of year after, and including, the start date and before the end date.
| Set: | AT^HTOYvariable=start_month[/start_day]-end_month[/end_day] |
| Read: | AT^HTOY[variable]? |
| Help: | AT^HTOY=? |
| Default: | AT^HTOY[variable]=1/1-1/1 |
- variable:
- 1-2 = Option for which of the two TOY variables the command applies to.
- start_month:
- 1-12 = The month part of the start date.
- start_day:
- 1-31 = The day part of the start date (default is 1). The upper limit for the day depends on the month selected. Leap days may not be used in the time of year definition.
- end_month:
- 1-12 = The month part of the end date.
- end_day:
- 1-31 = The day part of the end date (default is 1). The same restrictions apply as they do to the start day.
Top of page Command Index
^HUPDE - Updater Erase
Erases the region of flash memory that contains the updater code. This must be done before starting a updater download. Once the updater has been erased it will not be possible to install download code in the ITU although the code itself may still be downloaded to the SD card. It can be installed once the updater has been replaced.
Top of page Command Index
^HUPDV - Updater Verify
Verifies the installed updater code by performing a CRC calculation over the updater code region and comparing the result with the stored CRC value. This action is always performed as part of the code update process but is available as an explicit command for validating newly downloaded updater code.
Top of page Command Index
^HUPDW - Updater Write
This command is used to download new updater code to the ITU_G2. New updater code is written directly to the internal flash memory. Before starting an updater download the flash memory region must first be erased using the AT^HUPDE command. After completion of the download it should be verified using the AT^HUPDV command.
| Execute: | AT^HUPDW file_offset:file_data: |
- file_offset:
- The offset into the updater code region, expressed as a decimal number, at which the first byte the the specified data is to be written. The offset must be a word address, i.e. an even number.
- file_data:
- A block of up to 512 data bytes plus byte stuffing. The data block is delimited by the two colon (':') characters. The number of data bytes must be even. The write operation must not cross a 512 byte page boundry. So the maximum number of data bytes is reduced if the start address is offset from a page boundry.
Top of page Command Index
^HUSER - Set User Name for Authentication
Sets a user name and enables authentication. By default the ITU 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 ITU 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.
Top of page Command Index
^HVER - Report ITU Software Version
Report ITU software version number.
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. If these product terms included other expressions then the relevant product terms from these expressions will also be shown.
Top of page Command Index
^HWND - Read Wind Values
Reads the state of the wind input. Average wind direction, average wind speed and peak gust are returned. The averages and peak are for the time since the last log record was written. The direction is the angle of the vector sum of one second readings over the averaging period. The gust is the maximum three second gust over the averaging period.
Since many cup anemometers produce only one pulse per revolution the number of pulses within a three second window can be quite small at lower wind speeds. To improve gust resolution the ITU_G2 records the times of pulses so that it can calculate the gust as the number of intervals divided by the length of these intervals. A minimum of two pulses (one interval) within a four second window is required. If only a single pulse is recorded within the four second window a gust of 0.25 pulses per second is reported. With increasing wind speed, as sufficient pulses are recorded, the gust averaging interval becomes closer to the standard three seconds.
Wind direction is reported in degrees from the zero point of the sensor and in the direction of increasing voltage. This equates to a compass bearing if the sensor zero is aligned north and the wiper voltage increases with clockwise rotation.
Wind speed and gust are reported in pulses per second. Translation into standard units requires knowledge of the anemometer.
Top of page Command Index
^HWRITE - Write to SD Card File
Write a block of data to an open file on the SD card.
| Execute: | AT^HWRITE file_offset:file_data: |
- file_offset:
- The offset into the file, expressed as a decimal number, at which the first byte the the specified data is to be written.
- file_data:
- A block of up to 1024 data bytes plus byte stuffing. The data block is delimited by the two colon (':') characters.
Top of page Command Index
^HWRL - Wireless Receive List
This command lists the most recently heard from wireless remotes and their signal strengths. Up to 64 remotes may be in the list. Units are dropped from the list after about 4¼ minutes. The reported signal strength is for the most recent reception and is in dBm. Ths list is sorted with the most recent unit first.
Top of page Command Index
^HWTDG - Test Watchdog Timer
This command was added for debugging purposes to verify that the watchdog timer was functioning correctly. It can also be used as a means of forcing an ITU to reset without having to remove the power.
Top of page Command Index
^HX - User Defined Expression
Since it is possible for some expressions used to define the ^HLOP, ^HSCO, and relay control settings to get quite complicated, the ITU_G2 includes a set of user expressions that can be used as terms in these other expressions.
| Set: | AT^HXexp_number[exp_name]=expression |
| Read: | AT^HX[exp_number]? |
| Help: | AT^HX=? |
| Default: | AT^HXexp_number=FALSE |
- exp_number:
- 1-8 specifies which of the users expression is to be defined.
- exp_name:
- A quoted string of up to seven characters that can be used as a name for this expression. User expressions can be referenced by either name or number when used as terms in other expressions. The use of names can aid in comprehension when reviewing an expression at a later date.
- expression:
- An expression that is to define this expression term. ITU_G2 expressions are used for several commands so are described on their own page.
Top of page Command Index
ATD499 - Special Dial Command
This command initiates a GPRS call using the ITU'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 ITU checks that the cellphone 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 cellphone back to command mode. Once it has successfully confirmed command mode it will issue the command AT+CGATT=1 to ensure that the cellphone 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 ITU 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 ITU 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.
Top of page Command Index
|