XBee®/XBee-PRO® SE (Smart Energy) RF Modules ZigBee SE (Smart Energy) RF Modules by Digi International Firmware Versions: - 31xx Coordinator - API Operation - 33xx Router - API Operation - 39xx End Device - API Operation Digi International Inc. 11001 Bren Road East Minnetonka, MN 55343 877 912-3444 or 952 912-3444 http://www.digi.
XBee®/XBee‐PRO® SE RF Modules © 2009 Digi International, Inc. All rights reserved No part of the contents of this manual may be transmitted or reproduced in any form or by any means without the written permission of Digi International, Inc. ZigBee® is a registered trademark of the ZigBee Alliance. XBee® and XBee‐PRO® are registered trademarks of Digi International, Inc. Technical Support: Phone: (866) 765-9885 toll-free U.S.A. & Canada (801) 765-9885 Worldwide 8:00 am - 5:00 pm [U.S.
XBee®/XBee‐PRO® SE RF Modules Contents Overview 6 Security Policy 25 Persistent Data 25 Key Features 6 Key Establishment 25 Worldwide Acceptance 7 XBee Smart Energy Coordinator Startup 26 Specifications 8 Permit Joining 26 Mechanical Drawings 9 XBee Device Registration 26 SIF Header Interface 10 Resetting the Coordinator 28 Mounting Considerations 10 Leaving a Network 28 Pin Signals 11 Example: Starting a Coordinator 28 EM250 Pin Mappings 12 Router Operation 29 Design Notes 12 Discoverin
XBee®/XBee‐PRO® SE RF Modules Contents Application Layer Addressing 43 (pre-configured link keys) 66 Data Transmission 43 Example 2: Forming a network with security (obtaining keys during joining) 67 Broadcast Transmissions 43 Managing End Devices 68 Unicast Transmissions 44 Data Transmission Examples 46 End Device Operation 68 RF Packet Routing 46 Parent Operation 68 Link Status Transmission 47 End Device Poll Timeouts 69 AODV Mesh Routing 48 Packet Buffer Usage 69 Many-to-One Routing 50 No
XBee®/XBee‐PRO® SE RF Modules Contents AT Command - Queue Parameter Value 88 Explicit Addressing ZigBee Command Frame 88 ZigBee Create Source Route 91 ZigBee Register Joining Device 92 AT Command Response 93 Modem Status 93 ZigBee Transmit Status 94 ZigBee Explicit Rx Indicator 95 Route Record Indicator 96 ZigBee Device Authenticated Indicator 97 ZigBee Many-to-One Route Request Indicator 98 ZigBee Register Joining Device Status 99 Sending ZigBee Device Objects (ZDO) Commands with the API 100 Sending ZigBe
1. Overview The XBee/XBee-PRO Smart Energy RF Modules are designed to support the implementation of Smart Energy Devices which operate within the ZigBee Smart Energy Application Profile. The modules require minimal power and provide reliable delivery of data between remote devices. The XBee/XBee-PRO SE firmware release can be installed on XBee series 2 modules. The SE firmware is a firmware upgrade to XBee ZB or ZNet modules. The XBee SE firmware is based on the EmberZNet 3.
XBee®/XBee‐PRO® SE RF Modules Worldwide Acceptance FCC Approval (USA) Refer to Appendix A for FCC Requirements. Systems that contain XBee®/XBee-PRO® SE RF Modules inherit Digi Certifications. ISM (Industrial, Scientific & Medical) 2.4 GHz frequency band Manufactured under ISO 9001:2000 registered standards XBee®/XBee-PRO® Smart Energy RF Modules are optimized for use in US, Canada, Europe, Australia, and Japan (contact Digi for complete list of agency approvals). © 2009 Digi International, Inc.
XBee®/XBee‐PRO® SE RF Modules Specifications Specifications of the XBee®/XBee‐PRO® SE RF Module Specification XBee XBee-PRO Indoor/Urban Range up to 133 ft. (40 m) Up to 300 ft. (90 m), up to 200 ft (60 m) international variant Outdoor RF line-of-sight Range up to 400 ft. (120 m) Up to 1 mile (1600 m), up to 2500 ft (750 m) international variant Transmit Power Output 2mW (+3dBm), boost mode enabled 1.
XBee®/XBee‐PRO® SE RF Modules Mechanical Drawings Mechanical drawings of the XBee®/XBee‐PRO® SE RF Modules (antenna options not shown) . Mechanical Drawings for the RPSMA Variant © 2009 Digi International, Inc.
XBee®/XBee‐PRO® SE RF Modules SIF Header Interface The XBee/XBee-PRO Smart Energy modules include a SIF programming header that can be used with Ember's programming tools to upload custom firmware images onto the XBee module. The SIF header orientation and pinout are shown below. Pin Number 8 9 2 1 8 9 2 1 This figure shows the orientation of the insight port header .
XBee®/XBee‐PRO® SE RF Modules • Surface-mount single-row receptacles Samtec P/N: SMM-110-02-SM-S Digi also recommends printing an outline of the module on the board to indicate the orientation the module should be mounted. Pin Signals XBee®/XBee‐PRO® SE RF Module Pin Number (top sides shown ‐ shields on bottom) Pin Assignments for the XBee‐PRO Modules (Low‐asserted signals are distinguished with a horizontal line above signal name.
XBee®/XBee‐PRO® SE RF Modules EM250 Pin Mappings The following table shows how the EM250 pins are used on the XBee. EM250 Pin Number XBee Pin Number 13 (Reset) 5 19 (GPIO 11) 16 20 (GPIO 12) 12 21 (GPIO 0) 15 Other Usage Connected to pin 8 on 2x5 SIF header. 22 (GPIO 1) XBee Tied to ground (module identification) XBee-PRO Low-asserting shutdown line for output power compensation circuitry. 24 (GPIO 2) XBee Not connected. Configured as output low.
XBee®/XBee‐PRO® SE RF Modules 20 can enable various join functions without having to send UART commands. Please see the commissioning pushbutton and associate LED section in chapter 7 for more details. The source and sink capabilities are limited to 4mA for all pins on the module. The VREF pin (pin 14) is not used on this module. For compatibility with other XBee modules, we recommend connecting this pin to a voltage reference if analog sampling is desired. Otherwise, connect to GND.
2. Module Operation Serial Communications The XBee modules interface to a host device through a logic-level asynchronous serial port. Through its serial port, the module can communicate with any logic and voltage compatible UART; or through a level translator to any serial device (for example: through a proprietary RS-232 or USB interface board). UART Data Flow Devices that have a UART interface can connect directly to the pins of the RF module as shown in the figure below.
XBee®/XBee‐PRO® SE RF Modules Serial Receive Buffer When serial data enters the RF module through the DIN Pin (pin 3), the data is stored in the serial receive buffer until it can be processed. Under certain conditions, the module may not be able to process data in the serial receive buffer immediately. If large amounts of serial data are sent to the module, CTS flow control may be required to avoid overflowing the serial receive buffer.
XBee®/XBee‐PRO® SE RF Modules payload information instead of using command mode to modify addresses. The module will send data frames to the application containing status packets; as well as source, and payload information from received data packets.
XBee®/XBee‐PRO® SE RF Modules Transmit Mode Sequence Successful Transmission Idle Mode New Transmission 16-bit Network Address Known? Route Known? Transmit Data No No 16-bit Network Address Discovery 16-bit Network Address Discovered? Yes Yes Route Discovery Yes No Route Discovered? Yes No Data Discarded © 2009 Digi International, Inc.
XBee®/XBee‐PRO® SE RF Modules When data is transmitted from one node to another, a network-level acknowledgement is transmitted back across the established route to the source node. This acknowledgement packet indicates to the source node that the data packet was received by the destination node. If a network acknowledgement is not received, the source node will re-transmit the data.
3. XBee ZigBee Networks Introduction to ZigBee ZigBee is an open global standard built on the IEEE 802.15.4 MAC/PHY. ZigBee defines a network layer above the 802.15.4 layers to support advanced mesh routing capabilities. The ZigBee specification is developed by a growing consortium of companies that make up the ZigBee Alliance. The Alliance is made up of over 300 members, including semiconductor, module, stack, and software developers.
XBee®/XBee‐PRO® SE RF Modules • After joining, can assist in routing data • Cannot sleep--should be mains powered. An end device has the following characteristics: it • Must join a ZigBee PAN before it can transmit or receive data • Cannot allow devices to join the network • Must always transmit and receive RF data through its parent. Cannot route data. • Can enter low power modes to conserve power and can be battery-powered.
XBee®/XBee‐PRO® SE RF Modules IDs) are operating on the same 16-bit PAN ID. If such a conflict is detected, the ZigBee stack can perform PAN ID conflict resolution to change the 16-bit PAN ID of the network in order to resolve the conflict. See the ZigBee specification for details. To summarize, ZigBee routers and end devices should be configured with the 64-bit PAN ID of the network they want to join. They typically acquire the 16-bit PAN ID when they join a network.
XBee®/XBee‐PRO® SE RF Modules profile. In addition, the API can be used to send or receive messages on any cluster ID (and profile ID or endpoint). See the Explicit Addressing ZigBee Command API frame in chapter 9 for details. Endpoints The APS layer includes supports for endpoints. An endpoint can be thought of as a running application, similar to a TCP/IP port. A single device can support one or more endpoints. Each application endpoint is identified by a 1-byte value, ranging from 1 to 240.
XBee®/XBee‐PRO® SE RF Modules Energy Service Portal The Energy Service Portal (ESP) acts as a ZigBee Coordinator and Trust Center to form and manage a Smart Energy (SE) network. The ESP acts as a router to convey wireless messages among the other devices in the network. The ESP may physically reside within another SE device (like a metering device) or exist as a standalone device. The ESP provides a backhaul or gateway connection to the utility company.
XBee®/XBee‐PRO® SE RF Modules implement these clusters (except for the Key Establishment cluster) in the external coprocessor, communicating with the Smart Energy Module across the serial UART port. Implementation details on each cluster can be found in either the ZigBee Cluster Library (ZCL) or ZigBee Smart Energy profile specification. The following sections elaborate briefly on smart energy clusters, and their cluster identifier values.
XBee®/XBee‐PRO® SE RF Modules network, it can allow new devices to join the network. It can also route data packets and communicate with other devices on the network. In a smart energy network, the coordinator is typically the trust center. To ensure the coordinator starts on a good channel and unused PAN ID, the coordinator performs a series of scans to discover any RF activity on different channels (energy scan) and to discover any nearby operating PANs (PAN scan).
XBee®/XBee‐PRO® SE RF Modules XBee Smart Energy Coordinator Startup The following commands control the coordinator network formation process. Network formation commands used by the coordinator to form a network. Command Description ID Used to determine the 64-bit PAN ID. If set to 0 (default), a random 64-bit PAN ID will be selected. SC Determines the scan channels bitmask (up to 16 channels) used by the coordinator when forming a network.
XBee®/XBee‐PRO® SE RF Modules the network should likewise be de-registered or removed from the trust center using the same API frame. Example 1 - Registering a Device A router with a 64-bit address of 0x0013A200404C15A6 wants to join the network with a link key of 0x1. The following API frame can be sent to the XBee coordinator (trust center) to register the device.
XBee®/XBee‐PRO® SE RF Modules 0x0034 Cluster Id 0x0000 Profile Id (ZDO) 0x00 Broadcast radius - use maximum hops 0x00 Options 0xA5154C4000A21300 Device Address in little endian 0x00 Do not remove child devices (if any) 0xC6 Checksum Then, to remove the router from the trust center's key table, the following Register Joining Device API frame can be sent: Raw: 7E 00 0D 24 01 0013A200 404C15 A5 FFFE 00 E2 Decoded: 0x7E Start delimiter 0x000 Length (number of bytes after length, excluding checksum) 0x24 API f
XBee®/XBee‐PRO® SE RF Modules 4. The Associate LED will start blinking once the coordinator has selected a channel and PAN ID. 5. The API Modem Status frame ("Coordinator Started") is sent out the UART (API firmware only). 6. Reading the AI command (association status) will return a value of 0, indicating a successful startup. 7. Reading the MY command (16-bit address) will return a value of 0, the ZigBee-defined 16-bit address of the coordinator.
XBee®/XBee‐PRO® SE RF Modules Persistent Data Once a router has joined a network, it retains the following information through power cycle or reset events: • PAN ID • Operating channel • Security policy and frame counter values • Child table (end device children that are joined to the coordinator) • A new 16 bit addr will be assigned upon rejoining the network. The router will retain this information indefinitely until it leaves the network.
XBee®/XBee‐PRO® SE RF Modules The following commands control the router joining process. Command Description ID Sets the 64-bit PAN ID to join. Setting ID=0 allows the router to join any 64-bit PAN ID. SC Set the scan channels bitmask that determines which channels a router will scan to find a valid network. SC on the router should be set to match SC on the coordinator. For example, setting SC to 0x281 enables scanning on channels 0x0B, 0x12, and 0x14, in that order.
XBee®/XBee‐PRO® SE RF Modules These behaviors are configurable using the following commands: Command Description NJ Sets the permit-join time on the router, or the time that it will allow new devices to join the network, measured in seconds. LT Sets the Associate LED blink time when joined. Default is 2 blinks per second (router).
XBee®/XBee‐PRO® SE RF Modules Scan SC channels for a valid network Valid network found? Yes Join network No Successfully joined? AI set to 0x30 Yes No Receive network key Transmit device announce broadcast Discover key establishment on trust center Key establishment endpoint found? Yes “Associated” modem status sent out UART Yes Initiate and perform key establishment No Key establishment enabled? Yes No AI set to 0 AI set to 0 Associate LED starts blinking Associate LED starts blinking Succ
XBee®/XBee‐PRO® SE RF Modules Permit Joining The permit joining attribute on the router is configurable with the NJ command. Joining cannot be permanently enabled in a smart energy network. Joining Temporarily Enabled If NJ < 0xFF, joining will be enabled only for a number of seconds, based on the NJ parameter. The timer is started once the XBee joins a network. Joining will not be re-enabled if the module is power cycled or reset.
XBee®/XBee‐PRO® SE RF Modules 3. If SC or ID is changed from the default, apply changes (make SC and ID changes take effect) by issuing the AC or CN command. 4. The Associate LED will start blinking once the router has joined a PAN. 5. If the Associate LED is not blinking, the AI command can be read to determine the cause of join failure. 6. Once the router has joined, the OP and CH commands will indicate the operating 64-bit PAN ID and channel the router joined. 7.
XBee®/XBee‐PRO® SE RF Modules Parent Child Relationship Since an end device may enter low power sleep modes and not be immediately responsive, the end device relies on the device that allowed the join to receive and buffer incoming messages on its behalf until it is able to wake and receive those messages. The device that allowed an end device to join becomes the parent of the end device, and the end device becomes a child of the device that allowed the join.
XBee®/XBee‐PRO® SE RF Modules Orphan Scans When an end device comes up from a power cycle, it performs an orphan scan to verify it still has a valid parent. The orphan scan is sent as a broadcast transmission and contains the 64-bit address of the end device. Nearby routers and coordinator devices that receive the broadcast check their child tables for an entry that contains the end device's 64-bit address.
XBee®/XBee‐PRO® SE RF Modules Command Description LT Sets the Associate LED blink time when joined. Default is 2 blinks per second (end devices). SM, SP, ST, SN, SO Parameters that configure the sleep mode characteristics. (See Managing End Devices chapter for details.) Parent Connectivity The XBee Smart Energy end device sends regular poll transmissions to its parent when it is awake. These poll transmissions query the parent for any new received data packets.
XBee®/XBee‐PRO® SE RF Modules 5. If the Associate LED is not blinking, the AI command can be read to determine the cause of join failure. 6. Once the end device has joined, the OP and CH commands will indicate the operating 64-bit PAN ID and channel the end device joined. 7. The MY command will reflect the 16-bit address the end device received when it joined. 8. The API Modem Status frame ("Associated") is sent out the UART (API firmware only). 9.
XBee®/XBee‐PRO® SE RF Modules The response will be the ZigBee Register Joining Device Status (0xA4) API frame which will indicate success or failure. This is the preferred method, because it limits access to the network to pre-approved MAC addresses. Second Method Configure the joining device with the Trust Center Link Key. This is done by using the KY command on the joining device to match the Trust Center Link Key.
XBee®/XBee‐PRO® SE RF Modules Discovery After a device has joined and been authenticated, typically service discovery follows. The following example describes the hierarchy and order of discovery among nodes, endpoints, and clusters. Node Endpoint(s) Profile Id SE Device Id Cluster(s) Attributes(s) Command(s) A node has an extended 64-bit MAC address and a short 16-bit NWK address. A node may support one or more endpoints.
XBee®/XBee‐PRO® SE RF Modules Simple Descriptor Example One can obtain the simple descriptor for an endpoint on a node by uncasting a Simple_Desc_req command. It is addressed to cluster 0x0004, and carries a 16-bit NWK address and endpoint value as payload. In response one would receive a Simple_Desc_rsp response. It is addressed as cluster 0x8004, and carries as payload: Status (1), 16-bit NWK address (2), Length (1) of the simple descriptor which follows, and a Simple Descriptor.
4. Data Transmission, Addressing, and Rout‐ ing Addressing All ZigBee devices have two different addresses, a 64-bit and a 16-bit address. The characteristics of each are described below. 64-bit Device Addresses The 64-bit address is a unique device address assigned during manufacturing. This address is unique to each physical device. The 64-bit address includes a 3-byte Organizationally Unique Identifier (OUI) assigned by the IEEE. The 64-bit address is also called the extended address.
XBee®/XBee‐PRO® SE RF Modules Broadcast Data Transmission E E E R R R C R E R Legend C=Coordinator R=Router E=End Device E R E Each node that transmits the broadcast will also create an entry in a local broadcast transmission table. This entry is used to keep track of each received broadcast packet to ensure the packets are not endlessly transmitted. Each entry persists for 8 seconds. The broadcast transmission table holds 8 entries.
XBee®/XBee‐PRO® SE RF Modules transmission check the 64-bit address in the payload and compare it to their own 64-bit address. If the addresses match, the device sends a response packet back to the initiator. This response includes the remote's 16-bit address. When the discovery response is received, the initiator will then transmit the data. Address Table Each ZigBee device maintains an address table that maps a 64-bit address to a 16-bit address.
XBee®/XBee‐PRO® SE RF Modules The API transmit frame can include up to 128 bytes of data, which will be broken up into multiple transmissions and reassembled on the receiving side. If one or more of the fragmented messages are not received by the receiving device, the receiver will drop the entire message, and the sender will indicate a transmission failure in the Tx Status API frame.
XBee®/XBee‐PRO® SE RF Modules Routing Approach Description When to Use Ad hoc On-demand Routing paths are created between source and Use in networks that will not scale beyond about Distance Vector (AODV) destination, possibly traversing multiple nodes 40 destination devices. Mesh Routing (“hops”).
XBee®/XBee‐PRO® SE RF Modules AODV Mesh Routing ZigBee employs mesh routing to establish a route between the source device and the destination. Mesh routing allows data packets to traverse multiple nodes (hops) in a network to route data from a source to a destination. Routers and coordinators can participate in establishing routes between source and destination devices using a process called route discovery.
XBee®/XBee‐PRO® SE RF Modules Sample Route Request (Broadcast) Transmission Where R3 is Trying to Discover a Route to R6 When the destination node receives a route request, it compares the ‘path cost’ field against previously received route request commands. If the path cost stored in the route request is better than any previously received, the destination node will transmit a route reply packet to the node that originated the route request.
XBee®/XBee‐PRO® SE RF Modules the data, up to 2 times until an ACK is received. This ACK is called the ZigBee APS layer acknowledgment. Refer to the ZigBee specification for more details. Many-to-One Routing In networks where many devices must send data to a central collector or gateway device, AODV mesh routing requires significant overhead.
XBee®/XBee‐PRO® SE RF Modules © 2009 Digi International, Inc.
XBee®/XBee‐PRO® SE RF Modules Acquiring Source Routes Acquiring source routes requires the remote device to send a unicast transmission to a data collector (device that sends many-to-one route request broadcasts). There are several ways to force remotes to send route record transmissions. 1. If the application on remote devices periodically sends data to the data collector, each transmission will force a route record to occur. 2.
XBee®/XBee‐PRO® SE RF Modules To send a source-routed packet to R3, the application must send a Create Source Route API frame (0x21) to the XBee, with a destination of R3, and 2 hops (R1 and R2).
XBee®/XBee‐PRO® SE RF Modules Encrypted Transmissions Encrypted transmissions are routed similar to non-encrypted transmissions with one exception. As an encrypted packet propagates from one device to another, each device decrypts the packet using the network key, and authenticates the packet by verifying packet integrity. It then reencrypts the packet with its own source address and frame counter values, and sends the message to the next hop.
XBee®/XBee‐PRO® SE RF Modules Data Throughput* Configuration Data Throughput 1 hop, RR, SD 35kbps 1 hop, RR, SE 19kbps 1 hop, RE, SD 25kbps 1 hop, RE, SE 16kbps 1 hop, ER, SD 21kbps 1 hop, ER, SE 16kbps 4 hops, RR, SD 10kbps 4 hops, RR, SE 5kbps RR = router to router, RE = router to end device (non-sleeping), ER = end device (non-sleeping) to router, SE = security enabled.
XBee®/XBee‐PRO® SE RF Modules Cluster Name Cluster ID Description LQI Response 0x8031 Response that includes neighbor table data from a remote device. Routing Table Response 0x8032 Response that includes routing table entry data from a remote device. Refer to the ZigBee specification for a detailed description of all ZigBee Device Profile services. Sending a ZDO Command To send a ZDO command, an explicit transmit API frame must be used and formatted correctly.
XBee®/XBee‐PRO® SE RF Modules 0x00 - Required payload for LQI request command 0xCE - Checksum (0xFF - SUM (all bytes after length)) Description: This API frame sends a ZDO LQI request (neighbor table request) to a remote device to obtain data from its neighbor table. Recall that the AO command must be set correctly on an API device to enable the explicit API receive frames in order to receive the ZDO response. Example 2: Send a ZDO Network Address Request to discover the 16-bit address of a remote.
XBee®/XBee‐PRO® SE RF Modules The ZigBee stack includes some provisions for a device to detect if the destination is an end device or not. The ZigBee stack uses the unicast timeout unless it knows the destination is an end device. The XBee API includes a transmit options bit that can be set to specify if the extended timeout should be used for a given transmission. If this bit is set, the extended timeout will be used when sending RF data to the specified destination.
XBee®/XBee‐PRO® SE RF Modules 40.5 seconds. Transmission Examples Example 1: Send a unicast API data transmission to the coordinator using 64-bit address 0, with payload "TxData".
XBee®/XBee‐PRO® SE RF Modules Description: This transmission sends the string "TxData" as a broadcast transmission. Since the destinationaddress is set to 0xFFFF, all devices, including sleeping end devices can receive this broadcast. Because receiver application addressing is enabled by default, the XBee will report all received data frames in the explicit format (0x91) to indicate the source and destination endpoints, cluster ID, and profile ID that each packet was received on.
5. Security ZigBee supports various levels of security that can be configured depending on the needs of the application. Security provisions include: • 128-bit AES encryption • Two security keys that can be preconfigured or obtained during joining • Support for a trust center • Provisions to ensure message integrity, confidentiality, and authentication.
XBee®/XBee‐PRO® SE RF Modules Frame Counter The network header of encrypted packets includes a 32-bit frame counter. Each device in the network maintains a 32-bit frame counter that is incremented for every transmission. In addition, devices track the last known 32-bit frame counter for each of its neighbors. If a device receives a packet from a neighbor with a smaller frame counter than it has previously seen, the packet is discarded. The frame counter is used to protect against replay attacks.
XBee®/XBee‐PRO® SE RF Modules Since network encryption is performed at each hop, packet latency is slightly longer in an encrypted network than in a non-encrypted network. Also, security requires 18 bytes of overhead to include a 32-bit frame counter, an 8-byte source address, 4-byte MIC, and 2 other bytes. This reduces the number of payload bytes that can be sent in a data packet. Network Key Updates ZigBee supports a mechanism for changing the network key in a network.
XBee®/XBee‐PRO® SE RF Modules APS Layer Encryption and Decryption Packets with APS layer encryption are encrypted at the source and only decrypted by the destination. Since APS encryption appends a 4 byte MIC and other fields, the maximum data payload is reduced by 9 bytes when APS encryption is used. Network and APS Layer Encryption Network and APS layer encryption can both be applied to data.
XBee®/XBee‐PRO® SE RF Modules that are not pre-configured with the link key. Sending the network key unencrypted is not recommended as it can open a security hole in the network. To maximize security, devices should be pre-configured with the correct link key. Implementing Security on the XBee If security is enabled in the XBee SE firmware, devices acquire the network key when they join a network.
XBee®/XBee‐PRO® SE RF Modules is only decrypted by the destination device. The XBee must be configured with security enabled (EE set to 1) to use APS encryption. APS encryption can be enabled in API firmware on a per-packet basis. To enable APS encryption for a given transmission, the "enable APS encryption" transmit options bit should be set in the API transmit frame. Enabling APS encryption decreases the maximum payload size by 9 bytes.
XBee®/XBee‐PRO® SE RF Modules Example 2: Forming a network with security (obtaining keys during joining) 1. Start a coordinator with the following settings: a. ID=2235 b. EE=1 c. NK=0 d. KY=0 e. WR (save networking parameters to preserve them through power cycle) 2. Configure one or more routers or end devices with the following settings: a. ID=2235 b. EE=1 c. KY=0 d. WR (save networking parameters to preserve them through power cycle) 3.
6. Managing End Devices ZigBee end devices are intended to be battery-powered devices capable of sleeping for extended periods of time. Since end devices may not be awake to receive RF data at a given time, routers and coordinators are equipped with additional capabilities (including packet buffering and extended transmission timeouts) to ensure reliable data delivery to end devices.
XBee®/XBee‐PRO® SE RF Modules Since the end device children are not guaranteed to be awake at a given time, the parent is responsible for managing incoming data packets in behalf of its end device children. If a parent receives an RF data transmission destined for one of its end device children, and if the parent has enough unused buffer space, it will buffer the packet. The data packet will remain buffered until a timeout expires, or until the end device sends a poll request to retrieve the data.
XBee®/XBee‐PRO® SE RF Modules Non-Parent Device Operation Devices in the ZigBee network treat data transmissions to end devices differently than transmissions to other routers and coordinators. Recall that when a unicast transmission is sent, if a network acknowledgment is not received within a timeout, the device resends the transmission. When transmitting data to remote coordinator or router devices, the transmission timeout is relatively short since these devices are powered and responsive.
XBee®/XBee‐PRO® SE RF Modules In the figure above, t1, t2, and t3 represent the following events: • T1 - Time when Sleep_RQ is asserted (high) • T2 - Time when the XBee enters sleep (CTS state change only if hardware flow control is enabled) • T3 - Time when Sleep_RQ is de-asserted (low) and the module wakes. The time between T1 and T2 varies depending on the state of the module.
XBee®/XBee‐PRO® SE RF Modules Demonstration of Pin Sleep Parent and remote devices must be configured to buffer data correctly and to utilize adequate transmission timeouts. See the XBee Router / Coordinator Configuration section in this chapter for details. Cyclic Sleep Cyclic sleep allows the module to sleep for a specified time and wake for a short time to poll its parent for any buffered data messages before returning to sleep again. Cyclic sleep mode is enabled by setting the SM command to 4 or 5.
XBee®/XBee‐PRO® SE RF Modules In the figure above, t1, t2, and t3 represent the following events: • T1 - Time when the module wakes from cyclic sleep • T2 - Time when the module returns to sleep • T3 - Later time when the module wakes from cyclic sleep. The wake time and sleep time are configurable with software commands as described in the sections below. Wake Time (Until Sleep) In cyclic sleep mode (SM=4 or 5), if serial or RF data is received, the module will start a sleep timer (time until sleep).
XBee®/XBee‐PRO® SE RF Modules DIN ST = Time Awake On/Sleep A cyclic sleep end device enters sleep mode when no serial or RF data is received for ST time . Legend On/Sleep Transmitting Poll Request Sleep Period The sleep period is configured based on the SP, SN, and SO commands. The following table lists the behavior of these commands. Command Range Description SP 0x20 - 0xAF0 (x 10 ms) (320 - 28,000 ms) Configures the sleep period of the module.
XBee®/XBee‐PRO® SE RF Modules a number of sleep periods have expired (SN sleep periods). This mechanism allows the XBee to wake at regular intervals to poll its parent for data without waking an external device for an extended time (SP * SN time). This is shown in the figure below.
XBee®/XBee‐PRO® SE RF Modules asserted (low). In cyclic sleep mode, the end device will only poll once before returning to sleep unless the sleep timer (ST) is started (serial or RF data is received). If the sleep timer is started, the end device will continue to poll every 100ms until the sleep timer expires. If an end device receives RF data from its parent, it sends another poll after a very short delay to check for more data.
XBee®/XBee‐PRO® SE RF Modules RF Packet Buffering Timeout When a router or coordinator receives an RF data packet intended for one of its end device children, it buffers the packet until the end device wakes and polls for the data, or until a packet buffering timeout occurs. This timeout is settable using the SP command. The actual timeout is (1.2 * SP), with a minimum timeout of 1.2 seconds and a maximum of 30 seconds.
XBee®/XBee‐PRO® SE RF Modules devices in a network have more than one SP setting, SP on the routers and coordinators should be set to match the largest SP setting of any end device. This will ensure the RF packet buffering, poll timeout, and transmission timeouts are set correctly. Extended Sleep Periods Pin and cyclic sleep devices that might sleep longer than 30 seconds cannot receive data transmissions reliably unless certain design approaches are taken.
XBee®/XBee‐PRO® SE RF Modules ST = 0x7D0 (2 second wake time) SO = 0x06 (enable extended sleep and wake for ST time) SP and SN should be set to the same values on all routers and coordinators that could allow the end device to join. This will ensure the parent does not timeout the end device from its child table too quickly. The SI command can optionally be sent to the end device to cause it to sleep before the sleep timer expires. © 2009 Digi International, Inc.
7. Network Commissioning and Diagnostics Network commissioning is the process whereby devices in a mesh network are discovered and configured for operation. The XBee modules include several features to support device discovery and configuration. In addition to configuring devices, a strategy must be developed to place devices to ensure reliable routes. To accommodate these requirements, the XBee modules include various features to aid in device discovery and network diagnostics.
XBee®/XBee‐PRO® SE RF Modules Commissioning Pushbutton The commissioning pushbutton definitions provide a variety of simple functions to aid in deploying devices in a network. The commissioning button functionality on pin 20 is enabled by default on Smart Energy devices.
XBee®/XBee‐PRO® SE RF Modules Associate Device Not Joined Δt Device has joined a network The associate pin can indicate the joined status of a device . Once the device has joined a network, the associate pin toggles state at a regular interval (Δt). The time can be set by using the LT command. once, and the device has not joined a network, the Associate pin blinks a numeric error code to indicate the cause of join failure. The number of blinks is equal to (AI value – 0x20).
8. API Operation API (Application Programming Interface) Operations are available for communicating with an external processor through its UART port. API operation requires that communication with the module be done through a structured interface (data is communicated in frames in a defined order). The API specifies how commands, command responses and module status messages are sent and received from the module using a UART Data Frame.
XBee®/XBee‐PRO® SE RF Modules Data bytes that need to be escaped: • 0x7E – Frame Delimiter • 0x7D – Escape • 0x11 – XON • 0x13 – XOFF Example - Raw UART Data Frame (before escaping interfering bytes): 0x7E 0x00 0x02 0x23 0x11 0xCB 0x11 needs to be escaped which results in the following frame: 0x7E 0x00 0x02 0x23 0x7D 0x31 0xCB Note: In the above example, the length of the raw data (excluding the checksum) is 0x0002 and the checksum of the non-escaped data (excluding frame delimiter and length) is calculated
XBee®/XBee‐PRO® SE RF Modules Checksum To test data integrity, a checksum is calculated and verified on non-escaped data. To calculate: Not including frame delimiters and length, add all bytes keeping only the lowest 8 bits of the result and subtract the result from 0xFF. To verify: Add all bytes (include checksum, but not the delimiter and length). If the checksum is correct, the sum will equal 0xFF.
XBee®/XBee‐PRO® SE RF Modules Source Routing The following image shows the API frame exchanges that take place at the UART when sending a source routed transmission. Supporting the API Applications that support the API should make provisions to deal with new API frames that may be introduced in future releases. For example, a section of code on a host microprocessor that handles received serial API frames (sent out the module's DOUT pin) might look like this: © 2009 Digi International, Inc.
XBee®/XBee‐PRO® SE RF Modules case 0x11: Parse_ExplicitAddressingZigBeeCommandFrame (papiFrame); break; case 0x17: Parse_ZigBeeRemoteATCommand(papiFrame ); break; case 0x24: Parse_ZigBeeRegisterJoiningDevice (papiFrame ); break; case 0x8B: Parse_ZigBeeTxStatus(papiFrame ); break; case 0x90: Parse_ZigBeeRxIndicator (papiFrame); break; case 0x21: Parse_ZigBeeCreateSourceRoute (papiFrame); break; case 0x91: Parse_ZigBeeExplicitRxIndicator (papiFrame); break; case 0xA1: Parse_ZigBeeRouteRecordIndicator (papiFr
XBee®/XBee‐PRO® SE RF Modules Frame Fields Start Delimiter Offset Example Description 0 0x7E Length MSB 1 0x00 A P Frame-specific Data Frame Type I Frame ID P a c k e t AT Command Parameter Value Checksum LSB 2 0x05 Number of bytes between the length and the checksum 3 0x08 4 0x52 (R) 5 0x4E (N) 6 0x4A (J) Identifies the UART data frame for the host to correlate with a subsequent ACK (acknowledgement). If set to 0, no response is sent.
XBee®/XBee‐PRO® SE RF Modules The 64-bit destination address should be set to 0x000000000000FFFF for a broadcast transmission (to all devices). The coordinator can be addressed by either setting the 64-bit address to all 0x00s and the 16-bit address to 0xFFFE, OR by setting the 64-bit address to the coordinator's 64-bit address and the 16-bit address to 0x0000.
XBee®/XBee‐PRO® SE RF Modules Example: Send a data transmission to the coordinator (64-bit address of 0x00s) using a source endpoint of 0xA0, destination endpoint 0xA1, cluster ID =0x1554, and profile ID 0xC105. Payload will be "TxData". © 2009 Digi International, Inc.
XBee®/XBee‐PRO® SE RF Modules ZigBee Create Source Route Frame Type: 0x21 This frame creates a source route in the module. A source route specifies the complete route a packet should traverse to get from source to destination. Source routing should be used with many-to-one routing for best results. Note: Both the 64-bit and 16-bit destination addresses are required when creating a source route. These are obtained when a Route Record Indicator (0xA1) frame is received.
XBee®/XBee‐PRO® SE RF Modules ZigBee Register Joining Device Frame Type: 0x24 A KY command can be used to set the new device's initial link key." as "A KY command can be used on a new device to set its initial link key." Registers a new device into the trust center's key table. A KY command can be used to set the new device’s initial link key.
XBee®/XBee‐PRO® SE RF Modules AT Command Response Frame Type: 0x88 In response to an AT Command message, the module will send an AT Command Response message. Some commands will send back multiple frames. Frame Fields Start Delimiter Offset Example Description 0 0x7E Length MSB 1 0x00 LSB 2 0x05 A P I Frame Type 3 0x88 Frame ID 4 0x01 P a Frame-specific Data AT Command c k e Command Status t 5 ‘B’ = 0x42 6 ‘D’ = 0x44 7 0x00 Identifies the UART data frame being reported.
XBee®/XBee‐PRO® SE RF Modules ZigBee Transmit Status Frame Type: 0x8B When a TX Request is completed, the module sends a TX Status message. This message will indicate if the packet was transmitted successfully or if there was a failure. Frame Fields Start Delimiter Offset Example Length MSB 1 0x00 LSB 2 0x07 Frame Type 3 0x8B Frame ID 4 0x01 5 0x7D A P I Description 0 0x7E Number of bytes between the length and the checksum Identifies the UART data frame being reported.
XBee®/XBee‐PRO® SE RF Modules ZigBee Explicit Rx Indicator Frame Type:0x91 When the modem receives a ZigBee RF packet it is sent out the UART using this message type (when AO=1 or 3). Frame Fields Offset Start Delimiter Example Description 0 0x7E Length MSB 1 0x00 Frame-specific Data LSB 2 0x18 Frame Type 64-bit Source Address Number of bytes between the length and the checksum 3 0x91 MSB 4 0x00 5 0x13 6 0xA2 7 0x00 8 0x40 64-bit address of sender.
XBee®/XBee‐PRO® SE RF Modules Route Record Indicator Frame Type: 0xA1 The route record indicator is received whenever a device sends a ZigBee route record command. This is used with many-to-one routing to create source routes for devices in a network.
XBee®/XBee‐PRO® SE RF Modules ZigBee Device Authenticated Indicator Frame Type: 0xA2 This frame is sent out the UART of the Trust Center when a new device is authenticated on a Smart Energy network.
XBee®/XBee‐PRO® SE RF Modules ZigBee Many-to-One Route Request Indicator Frame Type: 0xA3 This message is sent out the UART when a device receives a many-to-one route request. It is only supported on routers and coordinator type devices. End devices will not receive this API frame.
XBee®/XBee‐PRO® SE RF Modules ZigBee Register Joining Device Status Frame Type: 0xA4 This frame is sent out the UART of the Trust Center when a new device is authenticated on a Smart Energy network. Frame Fields Offset Example Description A P I P a Start Delimiter c k e t 0 0x7E MSB 1 0x00 Length LSB 2 0x03 Frame-specific Data Frame Type Number of bytes between the length and the checksum 3 0xA4 Frame ID 4 0x04 Identifies the UART data frame for the host to match with a subsequent TX Status.
XBee®/XBee‐PRO® SE RF Modules Sending ZigBee Device Objects (ZDO) Commands with the API ZigBee Device Objects (ZDOs) are defined in the ZigBee Specification as part of the ZigBee Device Profile. These objects provide functionality to manage and map out the ZigBee network and to discover services on ZigBee devices.
XBee®/XBee‐PRO® SE RF Modules Frame Fields Offset Start Delimiter Example Description 0 0x7E Length MSB 1 0x00 LSB 2 0x17 Frame Type 3 0x11 Frame ID 4 0x01 Number of bytes between the length and the checksum Identifies the UART data frame for the host to correlate with a subsequent transmit status. If set to 0, no transmit status frame will be sent out the UART.
XBee®/XBee‐PRO® SE RF Modules Sending ZigBee Cluster Library (ZCL) Commands with the API The ZigBee Cluster Library defines a set of attributes and commands (clusters) that can be supported in multiple ZigBee profiles. The ZCL commands are typically required when developing a ZigBee product that will interoperate in a public profile such as home automation or Smart Energy, or when communicating with ZigBee devices from other vendors.
XBee®/XBee‐PRO® SE RF Modules Note: When sending ZCL commands, the AO command should be set to 1 to enable the explicit receive API frame. This will provide indication of the source 64- and 16-bit addresses, cluster ID, profile ID, and endpoint information for each received packet. This information is required to properly decode received data.
XBee®/XBee‐PRO® SE RF Modules In the above example, the Frame Control was constructed as follows: Name Bits Example Value Description Frame Type 0-1 00 - Command acts across the entire profile Manufacturer Specific 2 0 - The manufacturer code field is omitted from the ZCL Frame Header. Direction 3 0 - The command is being sent from the client side to the server side. Disable Default Response 4 0 - Default response not disabled Reserved 5-7 Set to 0.
XBee®/XBee‐PRO® SE RF Modules Frame Fields Offset Start Delimiter Example Description 0 0x7E Length MSB 1 0x00 LSB 2 0x19 Frame Type 3 0x11 Frame ID 4 0x01 Number of bytes between the length and the checksum Identifies the UART data frame for the host to correlate with a subsequent transmit status. If set to 0, no transmit status frame will be sent out the UART.
XBee®/XBee‐PRO® SE RF Modules Frame Fields Offset Example 26 0x78 4-byte unique identifier. Note the 4-byte ID is sent in little endian byte order (0x78563412). The event ID in this example (0x12345678) was arbitrarily selected. 27 0x56 Issuer Event ID 28 0x34 29 0x12 30 0x14 Device Class Utility Enrollment Group Description to apply the load control event. A bit value of 0x0014 enables smart appliances and water heaters. Note the 2-byte bit field value is sent in little endian byte order.
9. XBee Command Reference Tables Addressing Addressing Commands) AT Name and Description Command Node Type1 Parameter Range Default MY 16-bit Network Address. Read the 16-bit network address of the module. A value of 0xFFFE means the module has not joined a ZigBee network CRE 0 - 0xFFFE [read-only] 0xFFFE MP 16-bit Parent Network Address. Read the 16-bit network address of the module's parent. A value of 0xFFFE means the module does not have a parent.
XBee®/XBee‐PRO® SE RF Modules Networking Networking Commands AT Name and Description Command Node Type1 Parameter Range Default CH Operating Channel. Read the channel number used for transmitting and receiving between RF modules. Uses 802.15.4 channel numbers. A value of 0 means the device CRE has not joined a PAN and is not operating on any channel. 0, 0x0B - 0x1A (XBee) 0, 0x0B - 0x18 (XBeePRO) [read-only] ID Extended PAN ID. Set/read the 64-bit extended PAN ID.
XBee®/XBee‐PRO® SE RF Modules Security Commands AT Name and Description Command VC Node Parameter Range Type1 Default CRE 1 – 0x00: no certificate present; 0x01: [read-only] certificate present Verify Certificate. Verify the presence of the certificate. This command is read only. RF Interfacing RF Interfacing Commands AT Name and Description Command PL Node Parameter Range Type1 Power Level. Select/Read the power level at which the RF module transmits conducted CRE power.
XBee®/XBee‐PRO® SE RF Modules Serial Interfacing (I/O) Serial Interfacing Commands AT Name and Description Command Node Parameter Range Type1 1-2 1 = API-enabled 2 = API-enabled (w/escaped control characters) Default AP API Enable. Enable API Mode. The AP command is only supported when using API firmware: 31xx (API Coordinator), 33xx (API Router), 39xx (API End Device). AO API Options. Configure options for API.
XBee®/XBee‐PRO® SE RF Modules Diagnostics Diagnostics Commands AT Name and Description Command Node Parameter Range Type1 Default CRE 0 - 0xFFFF [read-only] Factory-set CRE 0 - 0xFFFF [read-only] Factory-set CRE 0 – 0xFF [read-only] 0 - 0xFF [read-only] -- Firmware Version. Read firmware version of the module. The firmware version returns 4 hexadecimal values (2 bytes) "ABCD". Digits ABC are the main release number and D is the revision number from the main release.
XBee®/XBee‐PRO® SE RF Modules Sleep Commands Sleep Commands AT Name and Description Command Node Parameter Range Type1 SM Sleep Mode Sets the sleep mode on the RF module. RE SN Number of Sleep Periods. Sets the number of sleep periods to not assert the On/Sleep pin on wakeup if no RF data is waiting for the end device. This command allows a host CRE application to sleep for an extended time if no RF data is present. It should be set at least equal to the longest SN of any child end device.
10. RF Module Support This chapter provides customization information for the XBee/XBee-PRO SE modules. In addition to providing an extremely flexible and powerful API, the XBee and XBee-PRO SE modules are a robust development platform that have passed FCC and ETSI testing. Developers can customize default parameters, or even write or load custom firmware for Ember's EM250 chip.
XBee®/XBee‐PRO® SE RF Modules Invoke XBee Bootloader See the "XBee Bootloader" section above for steps to invoke the bootloader. Send Firmware Image After invoking the bootloader, the Ember bootloader will send the bootloader menu characters out the UART at 115200 bps. The application should do the following to upload a firmware image. 1. Look for the bootloader prompt "BL >" to ensure the bootloader is active 2. Send an ASCII "1" character to initiate a firmware update 3.
XBee®/XBee‐PRO® SE RF Modules Warning: If programming firmware through the SIF interface, be aware that uploading firmware through the SIF header can potentially erase the XBee bootloader. If this happens, serial firmware updates will not work. (The pinout for the SIF headers are shown in chapter 1.) Writing Custom Firmware The XBee/XBee-PRO module can be used as a hardware development platform for the EM250. Custom firmware images can be developed around the EmberZNet 2.5.x and 3.
XBee®/XBee‐PRO® SE RF Modules x &= (0xFF0F);// Clear bits 4 - 7 x |= 0x0070;// Set bits 4 - 7 to 0111 as shown in the table above. GPIO_CFG = x; Detecting XBee vs. XBee-PRO For some applications, it may be necessary to determine if the code is running on an XBee or an XBee-PRO device. The GPIO1 pin on the EM250 is used to identify the module type (see table 1-03 in chapter 1). GPIO1 is connected to ground on the XBee module.
XBee®/XBee‐PRO® SE RF Modules XBee (non-PRO) Initialization: /* GPIO 1 and 2 are not used in the XBee (non-PRO) and should be set as outputs and driven low to reduce current draw. */ GPIO_DIRSETL = GPIO(1) | GPIO(2);// Set GPIO 1,2 as outputs GPIO_CLRL = GPIO(1) | GPIO(2);// Set GPIO 1,2 low XBee-PRO modules should disable the power compensation circuitry when sleeping to reduce current draw. This is shown below.
Appendix A: Definitions Definitions Terms and Definitions ZigBee Node Types Coordinator A node that has the unique function of forming a network. The coordinator is responsible for establishing the operating channel and PAN ID for an entire network. Once established, the coordinator can form a network by allowing routers and end devices to join to it. Once the network is formed, the coordinator functions like a router (it can participate in routing packets and be a source or destination for data packets).
XBee®/XBee‐PRO® SE RF Modules Terms and Definitions Joining The process of a node becoming part of a ZigBee PAN. A node becomes part of a network by joining to a coordinator or a router (that has previously joined to the network). During the process of joining, the node that allowed joining (the parent) assigns a 16-bit address to the joining node (the child). Network Address The 16-bit address assigned to a node after it has joined to another node. The coordinator always has a network address of 0.
Appendix B: Agency Certifications United States FCC The XBee Module complies with Part 15 of the FCC rules and regulations. Compliance with the labeling requirements, FCC notices and antenna usage guidelines is required. To fulfill FCC Certification, the OEM must comply with the following regulations: 1.The system integrator must ensure that the text on the external label provided with this device is placed on the outside of the final product. [Figure A-01] 2.
XBee®/XBee‐PRO® SE RF Modules FCC-Approved Antennas (2.4 GHz) The XBee and XBee-PRO Module can be installed utilizing antennas and cables constructed with standard connectors (Type-N, SMA, TNC, etc.) if the installation is performed professionally and according to FCC guidelines. For installations not performed by a professional, non-standard connectors (RPSMA, RPTNC, etc.) must be used.
XBee®/XBee‐PRO® SE RF Modules antennas approved for use with the XBee‐PRO Modules YAGI CLASS ANTENNAS Part Number Type (Description) Gain Application* A24-Y6NF A24-Y7NF A24-Y9NF A24-Y10NF A24-Y12NF A24-Y13NF A24-Y15NF A24-Y16NF A24-Y16RM A24-Y18NF Yagi (6-element) Yagi (7-element) Yagi (9-element) Yagi (10-element) Yagi (12-element) Yagi (13-element) Yagi (15-element) Yagi (16-element) Yagi (16-element, RPSMA connector) Yagi (18-element) 8.8 dBi 9.0 dBi 10.0 dBi 11.0 dBi 12.0 dBi 12.0 dBi 12.
XBee®/XBee‐PRO® SE RF Modules Furthermore, the manufacturer must maintain a copy of the XBee user manual documentation and ensure the final product does not exceed the specified power ratings, antenna specifications, and/ or installation requirements as specified in the user manual. If any of these specifications are exceeded in the final product, a submission must be made to a notified body for compliance testing to all required standards.
XBee®/XBee‐PRO® SE RF Modules Antenna Type: Omni-Directional RF module was tested and approved with 15 dBi antenna gain with 1 dB cable-loss (EIRP Maximum of 14 dBm). Any Omni-Directional type antenna with 14 dBi gain or less can be used with no cable-loss. Antenna Type: Flat Panel RF module was tested and approved with 19 dBi antenna gain with 4.8 dB cable-loss (EIRP Maximum of 14.2 dBm). Any Flat Panel type antenna with 14.2 dBi gain or less can be used with no cable-loss.
Appendix C: Migrating from XBee ZB to XBee SE The following list includes the significant differences in XBee SE compared to XBee ZB. • API coordinator, router, and end device targets are supported, AT/Transparent targets are not. • Routers and end devices will perform key establishment after joining (if enabled with EO command). (ZB firmware does not support key establishment.) • New AI codes in SE firmware indicate the progress of key establishment. • Fragmentation in SE supports up to 128 byte payloads.
Appendix D: Smart Energy Certificates All devices that operate in a ZigBee smart energy deployment must have a certificate installed that provides the device with a private key and digital certificate that are used to derive a link key during key establishment. A certificate must be issued by a certificate authority. Each certificate is tied to the 64-bit extended address (serial number) of the device. The certificate authority can generate certificates for general test and development use.
Appendix E:Additional Information 1-Year Warranty XBee Modules from Digi International, Inc. (the "Product") are warranted against defects in materials and workmanship under normal use, for a period of 1-year from the date of purchase. In the event of a product failure due to materials or workmanship, Digi will repair or replace the defective product. For warranty service, return the defective product to Digi International, shipping prepaid, for prompt repair or replacement.