Silicon Laboratories ZIGBEE ETRX357 User Manual

Page 1
Telegesis™
TG-APP-0024r3
ETRX357
Application note
©2016 Silicon Labs R3xx Firmware in a Home Automation Network
ETRX357 ZIGBEE® MODULES
Using R3xx Firmware in a Home Automation Network
Telegesi s™ is a tr ad em ar k o f Sil i con Laborator i es Inc.
Page 2
ETRX357
©2016 Silicon Labs - 2 - R3xx Firmware in an HA Network
Table of Contents
1 INTRODUCTION ................................................................................................................. 3
2 FORMAT OF COMMANDS AND DATA IN THIS NOTE ..................................................... 3
3 REGISTER SETTINGS AND COMMANDS ........................................................................ 3
3.1 Typical commands to start a PAN .................................................................................... 4
3.2 Typical received data ....................................................................................................... 5
Device joins the network .................................................................................................. 5
Temperature reading received ......................................................................................... 5
Humidity reading received ................................................................................................ 6
3.3 Send HA commands ........................................................................................................ 6
3.4 Intruder Alarm System devices ......................................................................................... 7
Page 3
ETRX357
©2016 Silicon Labs - 3 - R3xx Firmware in an HA Network
1 Introduction
The off-the-shelf Telegesis firmware that uses our manufacturer specific profile can also be used in a Home Automation network, but several registers must first be configured in order that it can join or form a network and present incoming data. Further registers can be set if it is necessary to send HA commands and to allow endpoint 2 to properly respond to queries from other devices such as requests for active endpoints. This note presents a minimal list of the register settings and some examples of data received from a temperature/humidity sensor. For more detailed information refer to:
R309 AT Command Manual (or the version that relates to your actual firmware) (SiLabs) Application Note on Interoperability (SiLabs) ZigBee Cluster Library Specification (ZigBee Alliance) ZigBee Home Automation Public Application Profile (ZigBee Alliance) Although the AT command set firmware that is normally supplied pre-loaded into the ETRX357
modules can send HA commands, it is necessary to assemble them at the byte level by reference to the ZigBee specifications, and incoming messages have to be handled by a host processor. If it is used as the coordinator in a network that includes Intruder Alarm System devices, the host also needs to supports a zone table. For these reasons it may be better to use the Telegesis HA Combined Interface firmware that has commands tailored to HA operations.
2 Format of commands and data in this note
Bold text: command to be typed in
Italic: example data received
3 Register settings and commands
The default setting of the ETRX357’s serial port is 19200 baud, 8 data bits, no parity, 1 stop bit. This can be changed by writing a new value into register S12.
The S-register settings only need to be entered once as they are mostly non-volatile. The volatile registers have an associated default setting which is applied when the device is reset. Follow the sequence of operations as given here until you are familiar with the effects of the various commands, because some of the registers must be set before the device starts or joins a network. Some of the commands are optional, such as allowing and blocking joining.
Page 4
ETRX357
©2016 Silicon Labs - 4 - R3xx Firmware in an HA Network
3.1 Typical commands to start a PAN
AT+DASSL
Disassociate from previous network if desired
AT&F
Restore to a known state if desired
ATI
Telegesis ETRX357-LRS R309C 000D6F0001B65311
Check firmware version. It ought to be R308 or higher
AT+N +N=NoPAN
Check network status
ATS00=6319
Home Automation channel mask
ATS0A=0114;password
Use predefined Link Key
ATS09=5A6967426565416C6C69616E63653039;password
Define HA Link Key
AT+EN
Establish network if necessary
ATS0A0=0;password
Allow joining (optional, this is the default setting)
ATS0A0=1;password
Disallow joining when all the sensors have joined
ATSALL:FFFD,0A0=0;password
Allow joining via all other devices in the PAN
ATSALL:FFFD,0A0=1;password
Block joining via any other device in the PAN
ATS0F=0104
Allow display of messages that arrive on endpoint 2
ATS0EA=1
Suppress display of “SR…” prompts
ATS0FC=1
Optional with R309. Data is shown in hexadecimal format instead of raw characters
Page 5
ETRX357
©2016 Silicon Labs - 5 - R3xx Firmware in an HA Network
RX:4B5C,0104,02,02,0402,08:••)û RX:4B5C,0104,02,02,0405,08:••!Ù RX:4B5C,0104,02,02,0402,08:18180A000029FC08 RX:4B5C,0104,02,02,0405,08:18190A000021B80E RX:4B5C,0104,02,02,0402,08:<18><03><0A><00><00>)<9F><08>
RX:4B5C,0104,02,02,0405,08:<18><04><0A><00><00>!W<0F>
Presentation of the raw binary characters will depend on the terminal software being used
3.2 Typical received data
These are examples of readings from a temperature and humidity sensor. The actual format depends on the terminal software you are using, except that bit C of register S0F turns raw characters into hexadecimal format (R309 only). Note that 16-bit data arrives low-byte first.
Device joins the network
MED:00124B00029ACA1C,21E6
MED A Mobile End Device has joined the
network. Can also be FFD or SED 00124B00029ACA1C EUI64 of new device 21E6 Network address of new device
Temperature reading received
RX:4B5C,0104,02,02,0402,08:<18><3B><0A><00><00><29><DD><08>
4B5C Source network address 0104 HA profile ID 02 Destination endpoint 02 Source endpoint 0402 Temperature cluster ID 08 Number of payload bytes
<18> Frame control <3B> Sequence no <0A> Cmd ID: report attributes <0000> Attribute ID: measured value <29> Type int16s <DD08> 08DD = 2269 = 22.69°
Page 6
ETRX357
©2016 Silicon Labs - 6 - R3xx Firmware in an HA Network
Humidity reading received
RX:4B5C,0104,02,02,0405,08:<18><3C><0A><00><00><21><35><0E>
4B5C Source network address 0104 HA profile ID 02 Destination endpoint 02 Source endpoint 0405 Relative humidity cluster ID 08 Number of payload bytes
<18> Frame control <3C> Sequence no <0A> Cmd ID: report attributes <0000> Attribute ID: measured value <21> Type int16s <350E> 0E35 = 3637 = 36.37%
3.3 Send HA commands
These are not needed if data is only to be received. You will need these settings to configure attribute reporting, though. Most sensors that report attributes from more than one cluster seem to use the same reporting interval for all clusters, but this may not always apply especially if you set a reportable change level.
ATS40=0202
Current source and destination endpoint
ATS41=0202
Default source and destination endpoint
ATS42=0402
Current cluster ID
ATS43=0402
Default cluster ID
ATS44=0104
Current profile ID
ATS45=0104
Default profile ID
Page 7
ETRX357
©2016 Silicon Labs - 7 - R3xx Firmware in an HA Network
Example: sent 14 bytes to network address 4B5C to configure reporting interval. The actual sequence number is not important. The characters after the ‘>’ indicate the value of each byte, not the format which will depend on the terminal application in use.
AT+UCASTB:0D,4B5C >00 03 06 00 00 00 29 00 00 0A 00 FF FF
00 Frame control 03 Sequence no 06 Cmd ID: configure reporting 00 Direction 0000 Attribute ID 29 Type int16s 0000 Minimum reporting interval (off) 000A Maximum reporting interval (10 secs) FFFF Reportable change (off)
This approach is suitable when the endpoint and cluster ID do not change often. The R309 firmware introduces a new set of commands such as AT+SENDUCAST; these commands take the endpoints, profile and cluster ID as parameters so they can be altered with each command. The registers and command in the example above then become
AT+SENDUCASTB:0D,4B5C,02,02,0104,0402 >00 03 06 00 00 00 29 00 00 0A 00 FF FF
and there is no longer any need to write new S-register values.
3.4 Intruder Alarm System devices
IAS Zone devices are typically encountered as motion sensors, door/window sensors and similar products. They need to be assigned to zones when they join the network and may leave quite quickly if they do not receive suitable responses to their queries. IAS devices must enrol with the Control and Indicating Equipment (CIE) that is implemented with the R3xx firmware, so the latter needs to be configured correctly in order that the IAS device can find it. A typical sequence of operations is:
CIE
IAS
Join network
Send Match Description Request to find IAS Zone cluster client
Send Zone Enroll Request
Send Zone Enroll Response
Send IAS_CIE_address attribute
In order that the CIE device can respond automatically to the Match Description Request the user must first set three S-registers:
ATS0AB=1;password
Allow Endpoint 2 to reply to ZDO endpoint queries
ATS48=0104
Set endpoint 2 Profile ID to Home Automation
ATS4C=0500
Add IAS Zone cluster to endpoint 2 Output Cluster List
Page 8
ETRX357
©2016 Silicon Labs - 8 - R3xx Firmware in an HA Network
The user’s application must recognise the Zone Enroll Request (cluster 0x0500, command 0x01, server to client) and reply with a Zone Enroll Response (command 0x00, client to server) with the user’s choice of zone ID. Finally the CIE must write its own EUI64 to the IAS_CIE_address attribute of the IAS Zone device.
Page 9
Smart. Connected. Energy-Friendly
Products
www.silabs.com/products
Disclaimer
Silicon Laboratories intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Laboratories products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Laboratories reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Laboratories shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Laboratories products are not designed or authorized for military applications. Silicon Laboratories products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons.
Trademark Information
Silicon Laboratories Inc.® , Silicon Laboratories®, Silicon Labs®, SiLabs® and the Silicon Labs logo®, Bluegiga®, Bluegiga Logo®, Clockbuilder®, CMEMS®, DSPLL®, EFM®, EFM32®, EFR, Ember®, Energy Micro, Energy Micro logo and combinations thereof, "the world’s most energy friendly microcontrollers", Ember®, EZLink®, EZRadio®, EZRadioPRO®, Gecko®, ISOmodem®, Precision32®, ProSLIC®, Simplicity Studio®, SiPHY®, Telegesis, the Telegesis Logo®, USBXpress® and others are trademarks or registered trademarks of Silicon Laborato­ries Inc. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders.
Silicon Laboratories Inc. 400 West Cesar Chavez Austin, TX 78701 USA
Quality
www.silabs.com/quality
Support and Community
community.silabs.com
http://www.silabs.com
Loading...