Telegesis ETRX2USB, ETRX2CF, ETRX2EAP, ETRX2RTR, ETRX351 Command Manual

...
Telegesis
TG-ETRXn-R305-AT-Commands
ETRX2 and ETRX3 series
AT-Command Dictionary 3.05
ETRX2 and ETRX3 Series ZigBee® Modules
AT-Command Dictionary
AT-Command Dictionary
Current Firmware R305
R305 AT Commands
Table of Contents
1 INTRODUCTION ................................................................................................................. 3
1.1 Document Overview ......................................................................................................... 3
1.2 Network topology ............................................................................................................. 4
1.3 A Note on ZigBee® Compliance ....................................................................................... 4
1.4 Important notes ................................................................................................................ 4
1.4.1 Hardware compatibility ..................................................................................................... 4
1.4.2 Unexpected start-up in bootloader mode .......................................................................... 4
1.4.3 Compatibility with other devices ....................................................................................... 5
1.4.4 Persistence of network parameters .................................................................................. 5
2 AT STYLE COMMAND CONVENTIONS ............................................................................ 5
2.1 Parameters ...................................................................................................................... 6
2.2 Prompt Overview.............................................................................................................. 7
2.3 Device Overview .............................................................................................................. 9
2.3.1 ZigBee types .................................................................................................................... 9
2.3.2 Non-ZigBee types ............................................................................................................ 9
2.4 AT Command Overview ................................................................................................. 10
2.5 Module Control & Configuration Commands .................................................................. 12
2.6 Network Control & Configuration Commands ................................................................. 18
2.7 Messaging...................................................................................................................... 33
3 LIST OF ERROR CODES ................................................................................................. 46
4 S-REGISTERS .................................................................................................................. 48
4.1 Recovery of the Factory Default Settings ....................................................................... 50
4.2 S-Registers for Network Setup ....................................................................................... 51
4.3 S-Registers for Module Setup ........................................................................................ 56
4.4 I/O related S-Registers ................................................................................................... 62
4.5 S-Registers Defining the Functionality of the Module ..................................................... 72
4.6 Advanced Settings ......................................................................................................... 85
5 BUILD IN FUNCTIONALITY ............................................................................................. 93
6 ETRX2 POWER CONSUMPTION ..................................................................................... 95
7 ETRX357 POWER CONSUMPTION (PROVISIONAL DATA) .......................................... 96
8 NOTES ON ENERGY LEVELS AND LQI ......................................................................... 97
8.1 Interpreting LQI .............................................................................................................. 97
8.2 Interpreting RSSI Energy Levels .................................................................................... 98
9 UPGRADING FROM R2XX TO R305 ON THE ETRX2 SERIES ....................................... 99
10 TRADEMARKS ............................................................................................................... 100
11 DISCLAIMER .................................................................................................................. 100
12 CONTACT INFORMATION ............................................................................................. 100
13 REFERENCES ................................................................................................................ 100
14 APPENDIX A. FORMING A SECURE NETWORK ........................................................ 101
©2011 Telegesis (UK) Ltd - 2 - AT Command Manual (Rev 3.05)
R305 AT Commands
1 Introduction
This document describes the AT-Command interface firmware of the ETRX2 and ETRX3 series ZigBee PRO wireless meshing modules. It applies to the R305 firmware, which can be loaded on to all products of the ETRX2 and ETRX3 module series, for example:
-ETRX2, ETRX2-PA, ETRX2HR, ETRX2HR-PA
-ETRX2USB
- ETRX2CF
- ETRX2EAP and ETRX2RTR
- ETRX351, ETRX357, ETRX351-LR, ETRX357-LR, ETRX351-LRS, ETRX357-LRS
- ETRX351HR, ETRX357HR, ETRX351HR-LR, ETRX357HR-LR, ETRX351HR-LRS, ETRX357HR-LRS The Telegesis ZigBee modules have been designed to be built into any device and provide a low
cost, low power ZigBee solution based on the industry leading EmberZNet ZigBee stack. Integration into a wide range of applications is made easy using a simple AT-style software interface and advanced hardware design.
No RF experience or expertise is required to add this powerful wireless networking capability to your products. Telegesis ZigBee Modules fast integration opportunities and the shortest possible time to market for your product.
Important note Using the AT-Command interface described in this document can shorten the time to market
significantly, however customers using the range of Telegesis modules also have the option of using Ember‟s EZSP interface firmware or of developing custom firmware using the Ember Development tools.
1.1 Document Overview
This document is meant as an AT-Command and S-Register reference for R3xx revisions of the firmware based on EmberZNet3.x and EmberZNet4.x. In order to learn how your products can benefit from wireless mesh networking please also refer to the following documents:
ETRX2/3 Product Manuals R3xx Firmware User Guide Migration guide for existing R2xx firmware customers ETRX2/3 Development Kit User Guides Application notes from www.telegesis.com The ETRX2/3 Product Manuals concentrate on the hardware specification of the modules. The
Development Kit Product Manuals contain all of the information required to set up your development kit and run firmware upgrades where necessary.
©2011 Telegesis (UK) Ltd - 3 - AT Command Manual (Rev 3.05)
R305 AT Commands
1.2 Network topology
A network consists of a ZigBee Coordinator (ZC) which started the network, ZigBee Routers (ZR) and ZigBee End Devices (ZED). There do not have to be any routers (other than the coordinator, which functions as a router) or end devices in any given network. Each router can support up to 16 end devices (32 on the ETRX3 series) in any combination of non-sleepy, sleepy and mobile End Devices. The network is always formed as a mesh according to the ZigBee PRO featureset of the ZigBee standard; the tree structure is not available.
By default the module joins a PAN as a router, but modifying register S0A allows you to define it as an end device. The coordinator is simply the device that first establishes the PAN, and it should not be allowed to leave the PAN as it is not possible for a node that is already joined to the PAN to take over the role of a coordinator or Trust Centre.
1.3 A Note on ZigBee® Compliance
The Telegesis R300 firmware has been tested and certified for MSP (manufacturer specific profile) compliance by a test house appointed by the ZigBee Alliance.
This certification includes tests guaranteeing that:
- Modules running the Telegesis AT-Command set will not interfere with existing ZigBee Networks in a malicious way
- Modules running the Telegesis AT-Command set can join a 3rd party ZigBee PRO network and use its routing capabilities
- Modules running the Telegesis AT-Command set can allow 3rd party nodes to join into a network consisting of Telegesis nodes and use its routing capabilities
In addition to implementing a manufacturer specific application profile the AT-Command set allows for transparency allowing communication with 3rd party nodes running any public application profile. In addition to this a transparent endpoint has been added allowing a host processor to implement any public application profile in fully transparent mode.
If you want to use the term ZigBee or the ZigBee Logo in your product documentation the current regulations state that you have to
(i) Be at least an adopting member of the ZigBee Alliance in the year you release your product (ii) Implement a public application profile
If you intend to get your product certified feel free to contact Telegesis for additional information. Also if you intend to build a product compliant to a public application profile (e.g. Home Automation, Smart Energy) feel free to contact us to discuss your options.
1.4 Important notes
1.4.1 Hardware compatibility
R305 firmware will now run on the STRX2 series of modules. R2xx firmware will not run on the ETRX3 series of modules.
1.4.2 Unexpected start-up in bootloader mode
The bootloader on the ETRX2 can be triggered using the command AT+BLOAD as described in Section 2, but it can also be triggered in hardware. If the A/D2 pin is pulled low during the boot-up of the module, the module will also enter the bootloader, so exercise caution when doing hardware
©2011 Telegesis (UK) Ltd - 4 - AT Command Manual (Rev 3.05)
R305 AT Commands
design and ensure that this pin is not grounded during start-up and reset. If unused the pad can be left floating and a pull-up is not required.
In analogy to this pulling down PA5 during a reset will cause an ETRX3 series module to enter the bootloader.
1.4.3 Compatibility with other devices
Most features of the R3xx Telegesis AT-Command line Interpreter are part of a Manufacturer Specific Profile using the ZigBee PRO feature set of ZigBee 2007. Interoperability with other devices that use the ZigBee PRO featureset is limited to a number of transparent commands.
R3xx is not compatible with earlier versions of ZigBee which are not implementing the ZigBee PRO featureset, including Telegesis R2xx firmware. Also, it is not compatible with the ZigBee Smart Energy profile as it lacks the required security key.
1.4.4 Persistence of network parameters
Once a device has joined a network as a coordinator, router or end device, it will retain its network parameters if it is powered off and on again. It will still be a member of its original PAN, assuming that PAN still exists, though an end device may need to find a new parent and it may have missed an update of the network key. Certain S-registers will have been reset to default values, though, which may change an end device‟s power mode for example.
2 AT Style Command Conventions
To simplify the communication with the modules, an AT-style command set, similar to the industry standard Hayes modem control language, is used.
Each command must be preceded by the "AT" or "at" prefix. To terminate a command enter <CR>. Any data not following this pattern is either not accepted by the module or will cause an error message in response. Every command must be terminated with a <CR>, they cannot be concatenated.
Commands are followed by an optional response that includes <CR><LF><Response><CR><LF> and/or a prompt <CR><LF><Prompt><CR><LF> where the prompt could also be an error message.
Example:
ATS00?<CR> <CR><LF>FFFF<CR><LF> <CR><LF>OK<CR><LF>
It is recommended to wait for an “OK” or “ERROR:XX” prompt before issuing the next command. Any data which is prompted to the user is delivered in the format <CR><LF><prompt><CR><LF>.
Unless disabled in S0E or S0F prompts may appear whenever the corresponding event occurs. Example:
<CR><LF><BCAST:000D6F000005A666,04=test><CR><LF>
A prompt intersecting a command being entered will not affect the command itself.
©2011 Telegesis (UK) Ltd - 5 - AT Command Manual (Rev 3.05)
R305 AT Commands
Read Command
ATXXX?
Commands ending with a „?‟ return the currently set value of the
parameter or parameters
Write Command
ATXXX=<…>
This command sets user-definable parameters as indicated by the „=‟ sign.
Execute Command
ATXXX
This command executes routines of the module and returns parameters
XX
8-bit hexadecimal number. Valid characters are 0-9, a-f and A-F
XXXX
16-bit hexadecimal number. Valid characters are 0-9, a-f and A-F
n
Number from 0-9
s
Sign
b
Bit (0 or 1)
c
character
<PID>
16-bit hexadecimal PAN ID (0000 to FFFF)
<EPID>
64-bit hexadecimal extended PAN ID
<channel>
decimal channel (802.15.4 channel 11-26)
<password>
8 character password
<EUI64>
64-bit IEEE 802.15.4 address in hexadecimal
<ioread>
32-bit hexadecimal number representing the reading of S1A
<data>
Custom Data
<ClusterList>
A list of 16 bit cluster identifiers in hexadecimal representation
<FirmwareRevision>
The Firmware Revision Number
Throughout this document, only the responses and prompts are presented, <CR><LF> are omitted intentionally. Sequences of AT commands in a single line are not supported.
The ETRX2 and ETRX357 feature a 128-byte FIFO to buffer incoming characters from the host processor, which is sufficient to hold even the longest possible command. The ETRX357 features a 256 byte FIFO buffer for incoming radio messages, which allows rapid reception of multiple messages without loss of characters. To prevent a buffer overflow XON/XOFF handshaking is used. Optional hardware handshaking can be enabled as described in the register description of S12 in section 4.
Table 1: Types of AT commands
When bit 7 of S12 is set each individual reply or prompt is additionally started with the STX and ended with the ETX character to aid the interpretation of the incoming strings on a host processor.
2.1 Parameters
Each parameter must be entered in the correct format for any of the AT commands to execute correctly. Optional parameters are marked with square brackets […].
Table 2: Different formats of parameters
©2011 Telegesis (UK) Ltd - 6 - AT Command Manual (Rev 3.05)
R305 AT Commands
Prompt Overview
OK
OK terminator
ERROR:XX
Error number XX occurred
ACK:XX
Acknowledgement for message XX was received
NACK:XX
Acknowledgement for message no XX was not received
SR:XX,<EUI64>,<NodeID>,…
Route Record Message received
BCAST:[<EUI64>,]XX=<data>
A Broadcast with XX characters has been received
MCAST:[<EUI64>,]XX=<data>
A Multicast with XX characters has been received
UCAST:[<EUI64>,]XX=<data>
A Unicast with XX characters has been received
SDATA:[<EUI64>,],<ioread>,<A/D1>,<A/D2>, <sequenceNo>,<Vcc>
A data message has been received at the sink. ADC data is A/D1 & A/D2 or ADC0 & ADC1
FN0130:[<EUI64>],<NodeID>,<ioread>, <sequence no>,<S46>,[<A/D1>],[<A/D2>], [<A/D3>],[<A/D4>]
A data message has been received at the sink. The number of ADC data fields depends on how many ADCs are activated at the sender
COO:<EUI64>,<NodeID>
A coordinator announcing itself
FFD:<EUI64>,<NodeID>
A router announcing itself
SED:<EUI64>,<NodeID>
A sleepy end device announcing itself
MED:<EUI64>,<NodeID>
A mobile sleepy end device announcing itself
ZED:<EUI64>,<NodeID>
An end device announcing itself
NEWNODE: <NodeID>,<EUI64>, <Parent NodeID>
Shown on Coordinator: New node has joined the PAN
LeftPAN
Local Node has left the PAN
LostPAN
End Device has lost contact with Parent
JPAN:<channel>,<PID>,<EPID>
Local Node has joined PAN with given parameters
SINK:<EUI64>,<NodeID>
Selected new Sink
ADSK:<EUI64>,<NodeID>
Received Sink Advertisement
SREAD:<NodeID>,<EUI64>,<Register>, <errorcode>[=<Data>]
Reply to a remote S Register Read operation
SWRITE:<NodeID>,<EUI64>,<errorcode>
Reply to a remote S Register Write operation
2.2 Prompt Overview
The following prompts can show up during the operation of the ETRXn modules. Most of the prompts can be disabled using register S0E and S0F.
©2011 Telegesis (UK) Ltd - 7 - AT Command Manual (Rev 3.05)
R305 AT Commands
Prompt Overview
DataMODE:<NodeID>,<EUI64>
Datamode has been opened remotely
DataMODE:<NodeID>,<EUI64>,<errorcode>
Response to an attempt to open data mode
OPEN
Data mode is open
CLOSED
Data mode is closed
TRACK:<EUI64 R>,<EUI64 S>,<RSSI>, <i/o read>,<AD1>,<AD2>,<Vcc>,<S46>
Tracking message: EUIs of receiver and sender, RSSI, input data, Vcc & S46 counter of sender
TRACK2:<EUI64 R>,<EUI64 S>,<RSSI>,<I/O read>,<S46>
Tracking message: EUIs of receiver and sender, RSSI, I/O data, and S46 counter of sender
PWRCHANGE:XXXX
Local node has changed Power Mode to XXXX
AddrResp:<errorcode>[,<NodeID>,<EUI64>]
Response to an address request (also triggered when finding source routes)
RX:<EUI64>,<NodeID>,<profileID>, <destinationEndpoint>,<SourceEndpoint>, <clusterID>,<length>:<payload>
An incoming message not addressed to the AT command endpoint. EUI64 is only shown if included in network frame header
NM:ES REPORT WARNING
More than 16 energy scan reports have been recently received by the network manager indicating high packet loss
ENTERING BLOAD
Passthrough bootloading has been initiated from another node
Table 3: Prompt Overview
©2011 Telegesis (UK) Ltd - 8 - AT Command Manual (Rev 3.05)
R305 AT Commands
Device Types
ZigBee Naming Convention
COO
Coordinator
ZigBee Coordinator (ZC)
FFD
Router
ZigBee Router (ZR)
ZED
End Device (non sleepy)
ZigBee End Device (ZED)
SED
Sleepy End Device
MED
Mobile Sleepy end Device
2.3 Device Overview
2.3.1 ZigBee types
Table 4 gives an overview of the ZigBee device types mentioned in this document.
Table 4: Device Overview
The terms Full Function device (FFD) and Reduced Function Device (RFD) are obsolete, but the
abbreviations are retained in the R302X firmware to avoid problems with users‟ legacy application
software. Each coordinator or router can support up to sixteen End Devices, in any combination of Sleepy
End Devices and Mobile End Devices. Only end devices should be put into a low-power state because routers and the coordinator must
always be powered up to maintain the network connectivity. ZigBee End Devices do not poll for data, instead their incoming messages are relayed immediately by their parent without being buffered. This means that ZEDs must not be put into a sleep mode.
2.3.2 Non-ZigBee types Sink. The sink is a Telegesis feature. When a node is defined as a sink by setting S10 bit 4, it
can broadcast its address to the rest of the network. Other nodes can then send messages to the sink node using AT+SCAST or various built-in functions. This simplifies the application software since it is not necessary to know the EUI64 of the sink in advance. Devices discover the sink when (1) they receive a regular advertisement broadcast from the sink (2) they are commanded to send a message without knowing the sink address and bit 8 of S10 is set (the first sink-cast message is therefore lost (3) the AT+SSINK command is used. To reduce traffic to end devices they do not receive the advertisement broadcasts, but will be informed of the sink address when they join the PAN. Otherwise, you should set bit 8 of S10 on end devices.
©2011 Telegesis (UK) Ltd - 9 - AT Command Manual (Rev 3.05)
R305 AT Commands
Command Overview
Module control and configuration
ATI
Display Product Identification Information
ATZ
Software Reset
AT&F
Restore Factory Defaults
AT+BLOAD
Enter The Bootloader Menu
AT+CLONE
Clone Local Node To Remote Node (ETRX2 Series Only)
AT+PASSTHROUGH
Pass new Firmware Image To Remote Node (ETRX3 Series Only)
AT+RECOVER
Recover From A Failed Clone Attempt
ATS
S-Register Access
ATREMS
Remote S-Register Access
ATSALL
Remote S-Register Access
AT+TOKDUMP
Display All S-Registers
Network control and configuration
AT+ESCAN
Scan The Energy Of All Channels
AT+PANSCAN
Scan For Active Pans
AT+EN
Establish Personal Area Network
AT+JN
Join Network
AT+JPAN
Join Specific Pan
AT+SJN
Silent Join
AT+DASSL
Disassociate Local Device From Pan
AT+DASSR
Disassociate Remote Node From PAN (ZDO)
AT+N
Display Network Information
AT+NTABLE
Display Neighbour Table (ZDO)
AT+RTABLE
Display Routing Table (ZDO)
AT+IDREQ
Request Node’s NodeID (ZDO)
AT+EUIREQ
Request Node’s EUI (ZDO)
AT+NODEDESC
Request Node’s Descriptor (ZDO)
AT+POWERDESC
Request Node’s Power Descriptor (ZDO)
AT+ACTEPDESC
Request Node’s Active Endpoint List (ZDO)
AT+SIMPLEDESC
Request Endpoint’s Simple Descriptor (ZDO)
AT+MATCHREQ
Find Nodes which Match a Specific Descriptor (ZDO)
AT+ANNCE
Announce Local Device in the Network (ZDO)
AT+SR
Set Source Route To Remote Device
AT+FNDSR
Find The Source Route To A Remote Device
AT+POLL
Poll For Data From Parent
AT+REJOIN
Rejoin The Network
AT+SN
Scan Network
AT+KEYUPD
Update the Network Key (ZDO)
AT+BECOMETC
Make Local Device the Trust Centre
AT+BECOMENM
Make the local device Network Manager
AT+CCHANGE
Change the networks channel
2.4 AT Command Overview
The following table gives a quick reference of all commands available.
©2011 Telegesis (UK) Ltd - 10 - AT Command Manual (Rev 3.05)
R305 AT Commands
Command Overview (continued)
Messaging
AT+ATABLE
Display Address Table
AT+ASET
Set Address Table Entry
AT+MTABLE
Display Multicast Table
AT+MSET
Set Multicast Table Entry
AT+BCAST
Transmit A Broadcast
AT+BCASTB
Transmit A Broadcast Of Binary Data
AT+UCAST
Transmit A Unicast
AT+UCASTB
Transmit A Unicast Of Binary Data
AT+SCAST
Transmit Data To The Sink
AT+SCASTB
Transmit Binary Data To The Sink
AT+SSINK
Search For A Sink
AT+MCAST
Transmit A Multicast
AT+MCASTB
Transmit A Multicast Of Binary Data
AT+DMODE
Enter Data Mode (Serial Link Mode)
+++
Leave Data Mode
AT+IDENT
Play A Tune On Remote Devboard
AT+RDATAB
Send Binary Raw Data
Table 5: Command Overview
©2011 Telegesis (UK) Ltd - 11 - AT Command Manual (Rev 3.05)
R305 AT Commands
I – Display Product Identification Information
Execute Command
ATI
Note
On modules manufactured before summer 2007 an invalid <DeviceName> is displayed. This does not affect the functionality of the module.
Response
Telegesis <DeviceName> R<Firmware Revision> <EUI64> OK
Where <DeviceName> is the order code of the device, <Firmware Revision> is the firmware
revision and <EUI64> is the Device‟s IEEE
802.15.4 identifier
SW release
R300
Z – Software Reset
Execute Command
ATZ
Response
Module Performs a software reset All non-volatile S Registers keep the user defined values, if the module was part of a PAN it will remain part of it.
SW release
R300
&F – Restore Factory Defaults
Execute Command
AT&F
Response
Module Performs a factory reset All non-volatile S Registers are updated with their factory defaults and the node leaves the network it is currently joined to.
SW release
R300
+BLOAD – Enter The Bootloader Menu
Execute Command
AT+BLOAD
Response
<entering bootloader>
The device leaves the AT command line and enters the bootloader menu for downloading new firmware. A description of the bootloading process can be found in the Development Kit Product Manual. Please note that the bootloader will run at a baudrate of 115k2, no parity, 8 data bits regardless of the current serial port settings.
SW release
R300
2.5 Module Control & Configuration Commands
©2011 Telegesis (UK) Ltd - 12 - AT Command Manual (Rev 3.05)
R305 AT Commands
+CLONE – Clone Local Node To Remote Node (ETRX2 Series only)
Execute Command
AT+CLONE:<EUI64>,<password>
Use on:
Source: FFD, COO Destination: All device types
Notes
The default password for R3xx nodes is “password”. A description of the cloning process can be found in the Development Kit Product Manual.
Response
Cloning…
Remote Response
ENTERING BLOAD
or
ERROR<errorcode>
Where <errorcode> represents the error code explained in section 3. This command clones the firmware of the local node to a remote node within the same PAN, whose address is given by <EUI64>. <password> represents the remote nodes 8-character password. After completion a soft reset is caused on the remote end.
SW release
R304
+PASSTHROUGH – Pass new Firmware Image To Remote Node (ETRX3 Series Only)
Execute Command
AT+PASSTHROUGH:<EUI64>,<password>
Use on:
Source: FFD, COO Destination: All device types
Notes
The default password for R3xx nodes is “password”. A description of the passthrough process can be found in the Development Kit Product Manual; it is the same procedure as cloning.
Response
PASSTHROUGH BLOAD... Please start .ebl upload image...
Remote Response
ENTERING BLOAD
or
ERROR<errorcode>
Where <errorcode> represents the error code explained in section 3.
<password> represents the remote node‟s
8-character password. After completion a soft reset is caused on the remote end.
SW release
R304
©2011 Telegesis (UK) Ltd - 13 - AT Command Manual (Rev 3.05)
R305 AT Commands
+RECOVER – Recover From A Failed Clone or Passthrough Attempt
Execute Command
AT+RECOVER
Use on:
Source: FFD, COO Destination: All device types
Note
Use this command in cases where the cloning (ETRX2 Series) or Passthrough Bootloading (ETRX3 Series) operation was interrupted and the target device therefore remains in the bootloader. In case the target device has been reset channel 13 must be used for recovering. For more information on over-the-air firmware upgrading please refer to the Development Kit Manual.
Response
Recovering…
or
ERROR<errorcode>
Where <errorcode> represents the error code explained in section 3. Enters clone (ETRX2 Series) or Passthrough (ETRX2 Series) mode to a remote node which is already in the bootloader.
SW release
R300
©2011 Telegesis (UK) Ltd - 14 - AT Command Manual (Rev 3.05)
R305 AT Commands
S – S-Register Access
Read Command
ATSXX[x[x]]?
Examples
ATS00? ATS0AE? ATS1812?
XX is the S-Register which is to be read. As an option for all 16 bit registers it is also possible to address an individual bit only by specifying the bit number [x]. For all 32 bit registers it is possible to address an individual bit by specifying the bit number in hexadecimal [xx]
Response
<data> OK
or ERROR:<errorcode> The module displays the contents of S-register xx
or an error message, where <errorcode> represents the error code explained in section 3. All 16- and 32-bit registers can also be accessed bit by bit. In order to do this [x[x]] may specify the bit which is to be read. The result when reading a single bit will always be 0 or 1.
Write Command
ATSXX[x[x]]=<data>[,<password>]
Examples
ATS00=3FFC ATS0AE=1:password
Notes
Some S-Registers require a password for write access. See S-Register description for details. The default password for R3xx is password”. Some S-Registers are read-only and will return an error if you are trying to write to them. When writing an individual bit by specifying [x[x]], <data> can only be either 0 or 1.
Response
OK or ERROR:<errorcode> The data is written to S-register number XX and if
applicable stored in non-volatile memory. The data format for each individual S Register is given in the S-Register description. <errorcode> represents the error code explained in section 3. For all 16- and 32-bit registers individual bits can also be set or cleared by specifying the bit using hexadecimal [x[x]] and setting it to either 0 or 1.
SW release
R300
©2011 Telegesis (UK) Ltd - 15 - AT Command Manual (Rev 3.05)
R305 AT Commands
REMS – Remote S-Register Access
Read Command
ATREMS:<address>,XX[X[x]]?
Examples
ATREMS:000D6F00000AAC93,00? ATREMS:000D6F00000AAC93,0AE? ATREMS:000D6F00000AAC93,1812?
Where <address> can be the remote node‟s EUI64, NodeID or address table index and XX is the S-Register which is to be read. As an option for all 16 bit registers it is also possible to address an individual bit only by specifying the bit number [X]. For all 32 bit registers it is possible to address an individual bit by specifying the bit number in hexadecimal [xx] The result when reading a single bit will always be 0 or 1.
Response
SEQ:XX OK
or ERROR:<errorcode> The module asks for the contents of the remote S-
register using a unicast. The sequence number of the unicast is displayed (an ACK or NACK prompt will follow). <errorcode> represents the error code explained in section 3.
Prompt
SREAD:<NodeID>,<EUI64>,<Register>, <errorcode>[=<Data>]
Where NodeID is the remote NodeID, EUI64 is the remote EUI64, Register is the S-Register which was read and <errorcode> is indicating the success (00) or failure of the read operation. The contents of the remote S-Register are following in case of a successful read only.
Write Command
ATREMS:<address>,XX[x[x]]=<data> [,<password>]
Examples
ATREMS:000D6F0000012345,00=3FFC ATREMS:000D6F0000012345,0AE=1:passw ord
Where <address> can be the remote node‟s
EUI64, NodeID or address table index and XX is the S-Register which is to be written. As an option for all 16- and 32-bit registers it is also possible to address an individual bit only by specifying the bit number [x[x]].
Notes
Some S-Registers require a password for write access. See S-Register description for details. The default password for R3xx is “password”. Some S-Registers are read-only and will return an error if you are trying to write to them. When writing an individual bit by specifying [x[x]], <data> can only be either 0 or 1.
Response
SEQ:XX OK
or ERROR:<errorcode> The data is written to the remote S-register number
XX and if applicable stored in non-volatile memory. The data format for each individual S Register is given in the S-Register description. The sequence number of the unicast is displayed (an ACK or NACK prompt will follow). <errorcode> represents the error code explained in section 3.
Prompt
SWRITE:<NodeID>,<EUI64>,<errorcode >
Where <NodeID> is the remote NodeID, <EUI64> is the remote EUI64. Only in case the errorcode is 00 the write operation has been completed successfully.
SW release
R302
©2011 Telegesis (UK) Ltd - 16 - AT Command Manual (Rev 3.05)
R305 AT Commands
SALL – Remote S-Register Access
Write Command
ATSALL:<group ID>,XX[x[x]]=<data> [,<password>]
Examples
ATSALL:FFFF,00=3FFC ATSALL:FFFC,0AE=1:password
Where group IDs are remote node‟s
multicast IDs or FFFF - Broadcast to all devices FFFD - Broadcast to all non-sleepy devices FFFC – Broadcast to all Routers
Notes
Some S-Registers require a password for write access. See S-Register description for details. The default password for R3xx is “password”. Some S-Registers are read-only and cannot be written to.
Response
OK or ERROR:<errorcode> The data is written to the remote S-register number
XX on all nodes addressed by the multicast group ID. The data format for each individual S Register is given in the S-Register description. <errorcode> represents the error code explained in section 3. For all 16- and 32-bit registers individual bits can also be set or cleared by specifying the bit using hexadecimal [x[x]] and setting it to either 0 or 1.
SW release
R300
+TOKDUMP – Display All S-Registers
Execute Command
AT+TOKDUMP
Notes
Only used on the local node. You cannot display all the registers of a remote device.
Response
<data> OK
The module displays the contents of all local S­Registers. The data format for each individual S Register is given in the S-Register description in section 4.
SW release
R300
©2011 Telegesis (UK) Ltd - 17 - AT Command Manual (Rev 3.05)
R305 AT Commands
+ESCAN – Scan The Energy Of All Channels
Execute Command
AT+ESCAN
Use on:
All nodes
Notes
Scanning all channels can take up to 16 seconds.
The results are the background radio power in each channel, not the RSSI of incoming ZigBee packets
Response
+ESCAN: 11:XX 12:XX 26:XX OK
or ERROR:<errorcode> <errorcode> represents the error code explained in
section 3. XX represents the average energy on the respective channel (see description in Section
8). Channels masked out in S00 are not scanned.
SW release
R300
+PANSCAN – Scan For Active PANs
Execute Command
AT+PANSCAN
Use on:
All nodes
Note
Scanning for active PANs can take up to 4 seconds.
Response
+PANSCAN:<channel>,<PID>,<EPID>,XX,b OK
or ERROR:<errorcode> <errorcode> represents the error code explained in
section 3. The node gives a list of all PANs found. <channel> represents the channel, <PID> the PAN ID, <EPID> the extended PAN ID, XX the ZigBee stack profile (00 = Custom, 01 = ZigBee, 02 = ZigBee PRO) and b indicates whether the network is allowing additional nodes to join (1 = joining permitted). The node does not join any of the PANs found.
SW release
R300
2.6 Network Control & Configuration Commands
©2011 Telegesis (UK) Ltd - 18 - AT Command Manual (Rev 3.05)
R305 AT Commands
+EN – Establish Personal Area Network
Execute Command
AT+EN
Use on:
All nodes which are not part of a PAN
Note
When issuing this command the local device becomes a Coordinator (and Trust Centre). Establishing a PAN can take up to 16 seconds. This command can only be executed if the local node is not part of a PAN already.
Response
JPAN:<channel>,<PID>,<EPID> OK
or ERROR:<errorcode>
<errorcode> represents the error code explained in section 3.
The local node becomes a coordinator and performs an energy scan on all channels selected in S00. It then starts a PAN with a random unused PAN ID and extended PAN ID on the quietest channel. If a PAN ID and/or extended PAN ID is specified in S02 or S03 the provided IDs are used instead of random ones, given the selected IDs are not already in use by other networks within range
SW release
R300
+JN – Join Network
Execute Command
AT+JN
Use on:
All nodes which are not part of a PAN
Note
Joining a PAN can take up to 4 seconds, depending on the number of channels which need scanning. This command can only be executed if the local node is not part of a PAN already.
Response
JPAN:<channel>,<PID>,<EPID>
OK
or ERROR:<errorcode>
<errorcode> represents the error code explained in section 3. The local node scans all channels selected in register S00 for the existence of a PAN. When finding any PAN which allows joining it will automatically join in via the remote node with the highest RSSI. In case registers S02 and S03 differ from the default value of all zeros the node will only join a PAN with the specified Pan ID and/or extended PAN ID.
Remote Action On the Trust Centre / Coordinator
Prompt
NEWNODE:<node EUI64>,<NodeID>,<parent EUI64>
SW release
R300
©2011 Telegesis (UK) Ltd - 19 - AT Command Manual (Rev 3.05)
R305 AT Commands
+JPAN – Join Specific PAN
Execute Command
AT+JPAN:<channel>,<PID or EPID>
Examples
AT+JPAN:20,1234 AT+JPAN:24,0793E14FFB220A38
Use on
All nodes which are not part of a PAN
Notes
This command can only be executed if the local node is not part of a PAN already. The JPAN command ignores the channel mask in register S00 and the PID and EPID settings in S02 and S03.
Response
JPAN:<channel>,<PID>,<EPID> OK
or ERROR:<errorcode>
<errorcode> represents the error code explained in section 3. The local node joins a particular PAN on <CHANNEL> with the specified <PID> or <EPID> via the remote node with the highest RSSI.
Remote Action On the Trust Centre / Coordinator
Prompt
NEWNODE:<node EUI64>,<NodeID>,<parent EUI64>
SW release
R300
+SJN – Silent Join
Execute Command
AT+SJN:<channel>,<TC EUI64>, <NM NodeID>,<nwk update ID>
“Silent” joining is joining via the commissioning method. All data required to enter the network is provided to the node, so that no joining procedure itself is required. The node will appear in the target network without any joining procedure given the supplied data is correct.
<channel> is a decimal number Other parameters are hexadecimal
Use on
All joining Devices
Example
AT+SJN:11,000D6F00000AAAD0,AFFE,00
Response
JPAN:<channel>,<PID>,<EPID> OK
or ERROR:<errorcode> >
<errorcode> represents the error code explained in section 3. The local node will become part of the network with the channel specified in <channel>, the trust centre EUI64 specified in <TC EUI64>, the NodeID of the network manager specified in <NM NodeID>, the 8 bit network update ID specified in <nwk update ID>, the network key provided in S08, the trust centre link key provided in S09, the PAN ID provided in S02 and the extended PAN ID provided in S03. It is assumed that the key-sequence­number of the network key is 0 when issuing this command.
SW release
R305
©2011 Telegesis (UK) Ltd - 20 - AT Command Manual (Rev 3.05)
R305 AT Commands
+DASSL – Disassociate Local Device From PAN
Execute Command
AT+DASSL
Use on
All Devices
Note
Use with care on a Coordinator. It will not be able to rejoin the PAN
Response
OK or ERROR<errorcode>
Prompt
LeftPAN
<errorcode> represents the error code explained in section 3. Instruct local device to leave the PAN.
SW release
R300
+DASSR – Disassociate Remote Node from PAN (ZDO)
Execute Command
AT+DASSR:<address>
Where <address> can be a node‟s EUI64,
NodeID or address table index
Use on
All Devices
Note
Use with care when targeting a Coordinator. It will not be able to rejoin the PAN
Response
SEQ:XX OK
or ERROR:<errorcode>
<errorcode> represents the error code explained in section 3. Instruct device to leave the PAN.
Remote Action
Node leaves PAN
Prompt
LeftPAN
SW release
R300
+N – Display Network Information
Read Command
AT+N?
Use on
All Devices
Response
+N=<devicetype>,<channel>,<power>,<PID>,<EPID>
or +N=NoPAN followed by
OK
<devicetype> represents the nodes functionality in the PAN (FFD,COO,ZED,SED,MED), <power> the node‟s output power in dBm, <channel> the IEEE 802.15.4 radio channel (11-26), <PID> the nodes PAN ID and <EPID> the node‟s extended PAN ID.
SW release
R302
©2011 Telegesis (UK) Ltd - 21 - AT Command Manual (Rev 3.05)
R305 AT Commands
+NTABLE – Display Neighbour Table (ZDO)
Read Command
AT+NTABLE:XX,<address>
Where XX is the start index of the remote LQI table and <address> can be the remote node‟s EUI64, NodeID or address table entry.
Note: Also the local node can be the target of this command (e.g. use address table entry FF as the address)
Use on
FFD, COO as the target device
Response
SEQ:XX OK or ERROR<errorcode>
This command requests the target node to respond by listing its neighbour table starting from the requested index. Can be used to find the identity of all ZigBee devices in the network including non-Telegesis devices.
Prompt (example)
NTable:<NodeID>,<errorcode> Length:03 No.| Type | EUI | ID | LQI
00.| FFD | 000D6F000015896B | BC04 | FF
01.| FFD | 000D6F00000B3E77 | 739D | FF
02.| FFD | 000D6F00000AAD11 | 75E3 | FF
In this example the neighbour table of the remote node with the short ID shown in <NodeID> contains three entries (hexadecimal), which are displayed. In case the table contains more than three entries it may be required to repeat this command and increase the index count until the full table is derived. In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode.
SW release
R302
©2011 Telegesis (UK) Ltd - 22 - AT Command Manual (Rev 3.05)
R305 AT Commands
+RTABLE – Display Routing Table (ZDO)
Read Command
AT+RTABLE:XX,<address>
Where XX is the start index of the remote Routing table and <address> can be the remote node‟s EUI64, NodeID or address table entry.
Note: Also the local node can be the target of this command (e.g. use address table entry FF as the address)
Use on
FFD, COO as the target device
Response
SEQ:XX OK or ERROR<errorcode>
This command requests the target node to respond by listing its routing table starting from the requested index.
Prompt (example)
RTable:<NodeID>,<errorcode> Length:40 No.| Dest | Next | Status
00.| 1234 | ABCD | 00
01.| 4321 | 739D | 00
02.| 0000 | 0000 | 03
In this example the routing table of the remote node with the short ID shown in <NodeID> contains 64 entries (hexadecimal 0x40), of which the first three are displayed. When the table contains more than the displayed entries it may be required to repeat this command and increase the index count until the full table is derived. The status shown is as described in table 2.128 of the ZigBee Specification. In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode.
SW release
R303
©2011 Telegesis (UK) Ltd - 23 - AT Command Manual (Rev 3.05)
R305 AT Commands
+IDREQ – Request Node’s NodeID (ZDO)
Execute Command
AT+IDREQ:<Address>[,XX]
Where <Address> can be a node‟s EUI64, or
address table entry and XX is an optional index number. In case an index number is provided, an extended response is requested asking the remote device to list its associated devices. Sends a broadcast to obtain the specified
Device‟s NodeID and optionally also
elements of its associated devices list.
Use on
All Devices
Note
Providing FF as an address table entry addresses the local node
Response
OK
or ERROR:<errorcode> <errorcode> represents the error code explained in
section 3.
Prompt
AddrResp:<errorcode>[,<NodeID>,<EUI64>] [nn. <NodeID>]
In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode.
<EUI64> is the Remote node‟s EUI64 and
<NodeID> is its NodeID. In case an extended response has been requested the requested NodeIDs from the associated devices list are listed as well.
SW release
R302
+EUIREQ – Request Node’s EUI64 (ZDO)
Execute Command
AT+EUIREQ:< Address>,<NodeID>[,XX]
Where <Address> is the EUI64, NodeID or address table entry of the node which is to be interrogated about the node with the NodeID specified in <NodeID>. XX is an optional index number. In case an index number is provided, an extended response is requested asking the remote device to list its associated devices.
Sends a unicast to obtain the specified
device‟s EUI64 and optionally also elements
of its associated devices list (extended response).
Use on
All Devices
Note
Providing FF as an address table entry addresses the local node
Response
SEQ:XX OK
or ERROR:<errorcode> <errorcode> represents the error code explained in
section 3.
Prompt
AddrResp:<errorcode>[,<NodeID>,<EUI64>] [dd. <NodeID>]
In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode. <EUI64> is the Remote node‟s EUI64 and <NodeID> is its NodeID. In case an extended response has been requested the requested NodeIDs from the associated devices list are listed.
As with all unicasts after successful transmission the sequence number of the unicast is stated using
the “SEQ:XX” prompt. When acknowledged (or not) the accompanying “ACK:XX” (or “NACK:XX”)
prompt is displayed.
SW release
R302
©2011 Telegesis (UK) Ltd - 24 - AT Command Manual (Rev 3.05)
R305 AT Commands
+NODEDESC – Request Node’s Descriptor (ZDO)
Execute Command
AT+NODEDESC:<Address>,<NodeID>
Where <Address> is the EUI64, NodeID or Address table entry of the node which is to be interrogated about the node with the NodeID specified in <NodeID>.
Sends a unicast to obtain the specified device‟s node descriptor.
Use on
All Devices
Note
Providing FF as an address table entry addresses the local node
Response
SEQ:XX OK
or ERROR:<errorcode>
<errorcode> represents the error code explained in section 3.
Prompt (example)
NodeDesc:<NodeID>,<errorcode> NodeDesc:0D57 Type:FFD ComplexDesc:No UserDesc:No APSFlags:00 FreqBand:40 MacCap:8E ManufCode:1010 MaxBufSize:52 MaxInSize:0080 SrvMask:0000 MaxOutSize:0080 DescCap:00
In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode.
<NodeID> is the Remote node‟s NodeID. In
addition the node descriptor is displayed. The individual fields of the Node Descriptor are described in section 2.3.2.3 of the ZigBee specification.
As with all unicasts after successful transmission the sequence number of the unicast is stated using
the “SEQ:XX” prompt. When acknowledged (or not) the accompanying “ACK:XX” (or “NACK:XX”)
prompt is displayed.
SW release
R302
©2011 Telegesis (UK) Ltd - 25 - AT Command Manual (Rev 3.05)
R305 AT Commands
+POWERDESC – Request Node’s Power Descriptor (ZDO)
Execute Command
AT+POWERDESC:<Address>,<NodeID>
Where <Address> is the EUI64, NodeID or Address table entry of the node which is to be interrogated about the node with the NodeID specified in <NodeID>.
Sends a unicast to obtain the specified device‟s power descriptor.
Use on
All Devices
Response
SEQ:XX OK
or ERROR:<errorcode> <errorcode> represents the error code explained in
section 3.
Prompt
PowerDesc:<NodeID>,<errorcode> [,<PowerDescriptor>]
In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode
<NodeID> is the Remote node‟s NodeID. In
addition the power descriptor is displayed as a 16 bit hexadecimal number as described in section
2.3.2.4. of the ZigBee specification. As with all unicasts after successful transmission
the sequence number of the unicast is stated using
the “SEQ:XX” prompt. When acknowledged (or
not) the accompanying “ACK:XX” (or “NACK:XX”) prompt is displayed.
SW release
R302
+ACTEPDESC – Request Node’s Active Endpoint List (ZDO)
Execute Command
AT+ACTEPDESC:<Address>,<NodeID>
Where <Address> is the EUI64, NodeID or Address table entry of the node which is to be interrogated about the node with the NodeID specified in <NodeID>.
Sends a unicast to obtain the specified device‟s active endpoint list.
Use on
All Devices
Response
SEQ:XX OK
or ERROR:<errorcode>
<errorcode> represents the error code explained in section 3.
Prompt
ActEpDesc:<NodeID>,<errorcode>[,XX,…]
In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode <NodeID> is the Remote node‟s NodeID. In addition all active endpoints are listed as 8-bit hexadecimal numbers separated by commas.
As with all unicasts after successful transmission the sequence number of the unicast is stated using
the “SEQ:XX” prompt. When acknowledged (or not) the accompanying “ACK:XX” (or “NACK:XX”)
prompt is displayed.
SW release
R302
©2011 Telegesis (UK) Ltd - 26 - AT Command Manual (Rev 3.05)
R305 AT Commands
+SIMPLEDESC – Request Endpoint’s Simple Descriptor (ZDO)
Execute Command
AT+SIMPLEDESC:<Address>,<NodeID>, <XX>
Where <Address> is the EUI64, NodeID or Address table entry of the node which is to be interrogated about the node with the NodeID specified in <NodeID> and XX is the number of the endpoint, which simple descriptor is to be read.
Sends a unicast to obtain the specified device‟s active endpoint list.
Use on
All Devices
Response
SEQ:XX OK
or ERROR:<errorcode>
<errorcode> represents the error code explained in section 3.
Prompt
SimpleDesc:<NodeID>,<errorcode> EP:XX ProfileID:XXXX DeviceID:XXXXvXX InCluster:<Cluster List> OutCluster:<Cluster List>
In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode <NodeID> is the Remote node‟s NodeID. In addition all active endpoints are listed as 8 bit hexadecimal numbers separated by commas.
As with all unicasts after successful transmission the sequence number of the unicast is stated using
the “SEQ:XX” prompt. When acknowledged (or
not) the accompanying “ACK:XX” (or “NACK:XX”)
prompt is displayed.
SW release
R302
©2011 Telegesis (UK) Ltd - 27 - AT Command Manual (Rev 3.05)
R305 AT Commands
+MATCHREQ – Find Nodes which Match a Specific Descriptor (ZDO)
Execute Command
AT+MATCHREQ: <ProfileID>, <NumInClusters> [,<InClusterList>], <NumOutClusters> [,OutClusterList]
Where <ProfileID> Required profile ID of the device being searched for followed by a specification of required input and output clusters.
If a remote node has a matching ProfileID and matches at least one of the specified clusters it will respond to this broadcast listing the matching endpoint(s).
<NumInClusters> and <NumOutClusters> must be 2 hexadecimal digits
Example
at+matchreq:C091,01,0002,02,0004,000B
Use on
All Devices
Response
SEQ:XX OK
or ERROR:<errorcode> <errorcode> represents the error code explained in
section 3.
Prompt
MatchDesc:<NodeID>,<errorcode>,XX,…
In case of an error an errorcode other than 00 will be displayed and the prompt will end after the errorcode. Where <NodeID> is the Remote node‟s NodeID. In addition all endpoints of this node matching the search criterion are listed as 8 bit hexadecimal numbers separated by commas.
SW release
R302
+ANNCE – Announce Local Device In The Network (ZDO)
Execute Command
AT+ANNCE
Send a ZigBee device announce Broadcast announcing the local node on the network.
Use on
All Devices
Response
OK or ERROR<errorcode> <errorcode> represents the error code explained in
section 3.
Remote Action
Prompt
FFD:<EUI64>,<NodeID> [,syy,zz] MED:<EUI64>,<NodeID> [,syy,zz] SED:<EUI64>,<NodeID> [,syy,zz] ZED:<EUI64>,<NodeID> [,syy,zz]
The prompt above will be displayed on all nodes which can hear the announcement. In case bit C of register S10 is set the RSSI level (syy dBm) and LQI (zz in hexadecimal) of the last hop are displayed. For a description of the LQI reading please see section 7. <EUI64> is the identifier and <NodeID> the NodeID of the sending device
SW release
R302
©2011 Telegesis (UK) Ltd - 28 - AT Command Manual (Rev 3.05)
R305 AT Commands
+SR – Set Source Route to Remote Device
Execute Command
AT+SR:<NodeID>,<NodeID>,…
Set the source route of a message sent to a remote device, starting with the NodeID of the remote device followed by all NodeIDs on the route from the remote node to the local node
Use on
All Devices Note: Setting up invalid routes may lead to
listed devices becoming unavailable. To confirm a route use AT+FNDSR.
Response
OK
or
ERROR<errorcode>
<errorcode> represents the error code explained in section 3. Stores route information for up to 30 hops which will be used when sending any message to a remote node, which is part of the listed devices.
SW release
R300
+FNDSR – Find the Source Route to a remote device
Execute Command
AT+FNDSR:<address>
Where <address> can be the remote node‟s
EUI64 or address table index Tries to find source route information to the
specified device by sending a ZDO request to the remote device and thus triggering a reply.
Use on
Sink, COO
Use on
A Sink
Response
OK
or
ERROR<errorcode>
Prompt
SR:XX,<EUI64>,<NodeID>,<NodeID>…
Where XX represents the number of hops to the remote node, EUI64 its EUI64 number followed by a list of NodeIDs starting with the remote node listing all nodes along the path to the local node
<errorcode> represents the error code explained in section 3.
SW release
R302
©2011 Telegesis (UK) Ltd - 29 - AT Command Manual (Rev 3.05)
R305 AT Commands
+POLL – Poll The Parent Device
Execute Command
AT+POLL
Poll the parent device for new data. Note: Action 0010/8010 is recommended for
periodic polling using the built-in timers.
Use on
SED, MED
Response
OK
or
ERROR<errorcode>
<errorcode> represents the error code explained in section 3.
SW release
R300
+REJOIN – Rejoin the network
Execute Command
AT+REJOIN:b
If b is set to 0 join without the known network key (unencrypted) and if b is set to 1 join encrypted.
Use on
SED,MED
Notes
Polling a parent on an end device that has lost its parent will automatically call AT+REJOIN:1. Furthermore functionality 0012 and 0013 make use of this command.
Response
OK
or
ERROR<errorcode>
If the contact with the network has been lost because an end device has lost its parent, the network has changed channel, or updated its encryption key the command AT+REJOIN can be used to rejoin the network.
<errorcode> represents the error code explained in section 3.
SW release
R300
©2011 Telegesis (UK) Ltd - 30 - AT Command Manual (Rev 3.05)
Loading...
+ 71 hidden pages