All other trademarks are the property of their respective owners.
Information in this document is subject to change without notice and does not represent
a commitment on the part of Digi International.
Digi provides this document “as is,” without warranty of any kind, either expressed or
implied, including, but not limited to, the implied warranties of fitness or merchantability
for a particular purpose. Digi may make improvements and/or changes in this manual or
in the product(s) and/or the program(s) described in this manual at any time.
This product could include technical inaccuracies or typographical errors. Changes are
periodically made to the information herein; these changes may be incorporated in new
editions of the publication.
Contents
Chapter 1General information .............................................................4
About this guide...............................................................................................4
This section includes information that applies to all XBee™ Adapter,
Router, and Sensor products.
This guide describes the features and functions of XBee Adapter, Router,
and Sensor products, including connection and setup information, pinouts,
configuration, data retrieval, and LEDs and buttons.
This section provides general information that applies to all products.
This guide covers all XBee ZNet 2.5 (Series 2) adapter , router, and sensor
products.
Two sets of XBee and XBee-PRO adapters are offered: Series 1 and
Series 2. Though overall performance and product specifications are
largely similar, the two series are built on distinct and non-compatible
technology platforms. Thus, users must standardize on one series or the
other for operability. The same is true for compatibility with the
ConnectPort X gateways. Series 1 XBee adapters are compatible only with
Series 1 gateways, while Series 2 XBee adapters are compatible only with
Series 2 gateways.
Mounting orientation
All XBee Adapters can be mounted in any orientation.
Warranty exception for batteries
Some XBee Adapters and Sensor products ship with alkaline batteries that
must be replaced by the user when discharged and are not covered under
the terms and conditions of the Digi warranty.
Lithium batteries must be replaced by qualified service personnel.
4
Additional reference material
For additional information about the features and functions of XBee RF
modules in XBee Adapters, see these documents.
XBee Adapters data sheet
http://www.digi.com/pdf/ds_xbeeadapters.pdf
XBee Wall Router data sheet
http://www.digi.com/pdf/ds_xbeewallrouter.pdf
These data sheets provide overviews of XBee Adapter and Wall Router
products, features and benefits, and specifications.
Describes the XBee module embedded in your product, including features,
modes of operation, ZigBee and XBee network fundamentals, and
commands for configuring, controlling, and retrieving data from the XBee
module.
When XBee Adapter, Router, and Sensor product s are deployed in Drop-in
Networks, a ConnectPort X gateway serves as a coordinator and
configuration and monitoring interface for your adapter/router/sensor
product. See this guide to learn more about ConnectPort X features and
functions.
Related ConnectPort X documentation
http://www.digi.com/support/supporttype.jsp?tp=3
An extensive list of related documentation for ConnectPort X gateways is
available on digi.com; go to Support > Documentation and select the
appropriate ConnectPort X model.
Python is a dynamic, object-oriented language for developing software
applications, from simple programs to complex embedded applications.
Python functions can be used to obtain data from integrated sensors on
XBee Adapter, Router, and Sensor products.
The Digi Python Programming Guide introduces the Python programming
language by showing how to create and run a simple Python program. It
reviews Python modules, particularly those modules with Digi-specific
behavior. It describes how to load and run Python programs onto Digi
devices, either through the command-line or web user interfaces, and how
to run several sample Python programs.
5
Questions and technical support
For technical assistance with your product, contact Digi Technical Support
at: 801-765-9885 or 877-912-3444
or make an online support request at:
http://www.digi.com/support/index.jsp
General information
6
XBee RS-232 Adapter
Chapter 2
Overview
Power options
XBee RS-232 Adapter
The XBee RS-232 Adapter provides short range wireless connectivity to
any RS-232 serial device, with available solutions for both mesh (including
ZigBee) and point-to-multipoint networks. Unlike an embedded wireless
module, which requires design integration and development time, these
off-the-shelf adapters provides instant wireless connectivity to existing
RS-232 serial devices. All XBee adapters can be used with Digi's
ConnectPort X gateways for data aggregation and IP connectivity.
Depending on adapter model, there are several powering options.
Alkaline battery model
This product can be powered by a 9-30VDC external power supply (see
"Power requirements" on page 67) or by batteries. Use 3x1.5V “N” alkaline
battery cells. To install batteries, insert a screwdriver in the slots in the side
of the adapter case and twist to snap off the cover. Insert the batteries
following the polarity diagram on the board.
Lithium battery model
This model can be powered by a 3-6VDC external power supply or by 2/3
AA 3.6V lithium batteries and a 1/2 AA boost capacitor. Replacement
batteries available for purchase; contact Digi at 952-912-3444 or
877-912-3444.
Connection and power-on
1. Connect the desired device to the RS-232 port of the adapter.
2. Connect the power supply to the adapter or insert batteries.
7
Pinouts
Assc
Ident
Power
blinking green
solid green
XBee RS-232 Adapter
The RS-232 connector is an industry-standard DB9 male connector with a
DTE configuration, similar to a PC serial port. Pinouts for the connector
are:
PinFunctionData direction
1CDInput
2RXDInput
3TXDOutput
4DTROutput
5GND
6DSRInput
7RTSOutput
8CTSInput
9+12VDC switched power out Output
Data retrieval
LEDs and buttons
Retrieving data from XBee adapters is done by issuing a remote AT IS
(Force Sample) command through the XBee API. The XBee API and A T IS
command are described in detail in the XBee ZNet 2.5 (Series 2) RF
Module data sheet. AT IS commands can be issued via a Python program
that is executed on the gateway . See also the Product Manual for the XBee
Module and the Digi Python Programming Guide.
8
XBee RS-232 Adapter
PowerLED:Indicates that power is on. Illuminated only when adapter is connected to
external power only, not when powered by batteries. Not available in
lithium-battery models.
Assc LED:Indicates the adapter’s ZigBee network association status:
LED statusNetwork association
On, solid greenNot associated
On, blinking greenSuccessfully joined
Reset button:Recessed button on underside of the adapter. Performs equivalent of a
power-cycle. Use a small non-conducive tool with a blunt end to press
gently and hold down button.
Ident button:Recessed button on power end of the adapter between Assc and Power
LEDs. Performs multiple functions for commissioning the adapter in a
ZigBee network. Consecutive button presses must occur within 800ms
second of each other to perform the desired action.
Button
press
SingleAssociated•If adapter is asleep, wakes unit for 30 seconds.
TwoAssociatedTemporarily enables joining on the adapter and the entire ZigBee network for 1
Network
association
•Sends a Node Identification broadcast transmission.
All devices that receive this transmission will blink their Associate LED rapidly
for 1 second.
All API devices that receive this transmission will send a Node Identification
frame out their UART (universal asynchronous receiver/transmitter) (API ID
0x95).
Unassociated•If adapter is asleep, wakes unit for 30 seconds.
•Blinks a numeric error code on the Assc LED, indicating the cause of join
failure.
1 blink: Scan found no PANs.
2 blinks: Scan found no valid PANs based on current SC (Scan Channel) and
ID (PAN ID) settings.
3 blinks: Valid Coordinator or Routers found, but they ar e no t allo wing join ing
minute (if the XBee module’s NJ command setting is less than 255). If joining is
permanently enabled on a module (NJ = 255), joining remains permanently
enabled, and this button press has no effect.
Action
FourAssociated/
Unassociated
Adapter leaves PAN, if associated, and issues a factory reset to restore default
parameters. Default PAN ID is 0x234.
9
Overview
The XBee RS-232 PH Adapter provides short range wireless connectivity
to any RS-232 serial device, with available solutions for both mesh
(including ZigBee) and point-to-multipoint networks. Unlike an embedded
wireless module, which requires design integration and development time,
these off-the-shelf adapters provides instant wireless connectivity to
existing RS-232 serial devices. All XBee adapters can be used with Digi's
ConnectPort X gateways for data aggregation and IP connectivity
Using a powering mode known as power harvesting (PH), this adapter is
powered by the connected host device through its RS-232 serial port.
Power requirements
This product requires a fully functional serial port conforming to the
RS-232C standard for optimal operation. It requires a sleep/wake duty
cycle as part of its normal operation. An internal battery provides power
when the adapter is operating, and recharges from the serial port when in
sleep mode. The sleep/wake duty cycle requirements vary based on the
current output of serial port
Serial ports that provide hard power of 5 to 14VDC on one or more pins
allow the device to operate continually without a sleep/wake cycle.
WARNING: Do not use this adapter with serial port s with more than 14VDC
output as they may cause the adapter to malfunction.
XBee RS-232 PH Adapter
XBee RS-232 PH Adapter
Connection and power-on
Connect the adapter to the RS-232 port of the host device.
The adapter’s power comes from the host’s serial port.
10
Pinouts
XBee RS-232 PH Adapter
The RS232 connector is an industry-standard DB9 male connector with a
DTE configuration, similar to a PC serial port. Pinouts for the connector
are:
PinFunctionData direction
1CDInput
Also used for parasitic power input from host.
2RXD Input
Also used for parasitic power input from host.
3TXDOutput
4DTROutput
5GND
6DSR Input
Also used for parasitic power input from host.
7RTSOutput
8CTS Input
Also used for parasitic power input from host.
9RIInput
Also used for parasitic power input from host.
11
Configuration
XBee RS-232 PH Adapter
There are four key attributes of the Serial PH adapter’s firmware that allow
it to have a net charge on its batteries:
•Sleep Mode (SM)
•Idle Time (ST)
•Sleep Period (SP)
•Sleep Number (SN)
Sleep mode, determines what sleeping behavior the adapter has. By
default the adapter has cyclical sleep enabled. With cyclical sleep enabled,
if the adapter is idle (No RS-232 traffic, no transmit/receive) for the given
amount of Idle Time, it then performs Sleep Number amount of sleeping
cycles, each for the duration of the value of Sleep Period.
The default sleep mode settings are:
•SM = 4 (Cyclical sleep enabled)
•ST = 0x3E8 (Idle time of 1 second)
•SP = 0x40 (Each sleep period’s duration is 640 ms)
•SN = 1 (Perform 1 sleep period when sleeping)
Data retrieval
For this configuration, the adapter would sleep for a total of 640 ms when
performing a sleep period, after it was idle for 1 second. During an RF
receive/transmit, the device is in an active state for a significant amount of
time, regardless of the Idle Time setting. If continuous requests/queries are
made to the device, it will stay in an active state, which can lead to a net
discharge of the battery, and eventually the adapter will become
unresponsive.
Adjusting the default settings is not recommended. Doing so can lead to
unit that will not power on. The fix is to remove the module from the adapter
and plug it into the serial line. Then, you can adjust these parameters
through X-CTU software. This software is available on the Software and
Documentation CD that accompanies Drop-in Networking kits and
ConnectPort X gateways.
The battery can take up to 24 hours to fully charge, and if the unit is run in
the worst-case scenario, no sleep mode enabled and continuously queried,
the battery has only a charge for around 40 minutes. After that, the unit will
become unresponsive. In addition, if the unit isn’t immediately put into a
sleep mode after the battery first becomes unable to power the adapter , the
battery will further deplete, and you will have to perform the fix mentioned
above to recover the device.
Retrieving data from XBee adapters is done by issuing a remote AT IS
(Force Sample) command through the XBee API. The XBee API and A T IS
command are described in detail in the XBee ZNet 2.5 (Series 2) RF
Module data sheet. AT IS commands can be issued via a Python program
that is executed on the gateway . See also the Product Manual for the XBee
Module and the Digi Python Programming Guide.
12
XBee RS-232 PH Adapter
LEDs and buttons
Assoc
Ident
Assoc LED:Indicates the adapter’s ZigBee network association status:
LED statusNetwork association
On, solid greenNot associated
On, blinking greenSuccessfully joined
Reset button:Performs equivalent of a power-cycle. Use a small non-conducive tool
with a blunt end to press gently and hold down button.
Ident button:Performs multiple functions for commissioning the adapter in a ZigBee
network. Consecutive button presses must occur within 800 ms of each
other to perform the desired action.
Reset
Button
press
SingleAssociated•If adapter is asleep, wakes unit for 30 seconds.
TwoAssociatedTemporarily enables joining on the adapter and the entire ZigBee network for 1
Network
association
•Sends a Node Identification broadcast transmission.
All devices that receive this transmission will blink their Associate LED rapidly
for 1 second.
All API devices that receive this transmission will send a Node Identification
frame out their UART (universal asynchronous receiver/transmitter) (API ID
0x95).
Unassociated•If adapter is asleep, wakes unit for 30 seconds.
•Blinks a numeric error code on the Assc LED, indicating the cause of join
failure.
1 blink: Scan found no PANs.
2 blinks: Scan found no valid PANs based on current SC (Scan Channel) and
ID (PAN ID) settings.
3 blinks: Valid Coordinator or Routers found, but they ar e no t allo wing join ing
minute (if the XBee module’s NJ command setting is less than 255). If joining is
permanently enabled on a module (NJ = 255), joining remains permanently
enabled, and this button press has no effect.
Action
FourAssociated/
Unassociated
Adapter leaves PAN, if associated, and issues a factory reset to restore default
parameters. Default PAN ID is 0x234.
13
XBee RS-485 Adapter
Chapter 4
Overview
Power options
XBee RS-485 Adapter
The XBee RS-485 PH Adapter provides short range wireless connectivity
to any RS-485 serial device, with available solutions for both mesh
(including ZigBee) and point-to-multipoint networks. Unlike an embedded
wireless module, which requires design integration and development time,
these off-the-shelf adapters provides instant wireless connectivity to
existing RS-485 serial devices. All XBee adapters can be used with Digi's
ConnectPort X gateways for data aggregation and IP connectivity
Depending on adapter model, there are several powering options.
Alkaline battery model
This product can be powered by a 9-30VDC external power supply (see
"Power requirements" on page 67) or by batteries. Use 3x1.5V “N” alkaline
battery cells. To install batteries, insert a screwdriver in the slots in the side
of the adapter case and twist to snap off the cover. Insert the batteries
following the polarity diagram on the board.
Lithium battery model
This model can be powered by a 3-6VDC external power supply or by 2/3
AA 3.6V lithium batteries and a 1/2 AA boost capacitor. Replacement
batteries available for purchase; contact Digi at 952-912-3444 or
877-912-3444.
Connection and power-on
1. Connect the desired device to the RS-485 port of the adapter.
2. Connect the power supply to the adapter or insert batteries.
14
Pinouts
XBee RS-485 Adapter
The connector for the adapter is a 6-position wire terminal block. The figure
shows Pin 1 of the connector when the adapter is oriented with the
mounting tabs, facing upwards (the underside of the adapter).
The adapter is switch-selectable between RS-422 half duplex, RS-422 full
duplex, and RS-485 modes (see DIP switches, below). The function for
several pins varies between RS-422 and RS-485 modes.
Facing the connector, with the screwdriver release slots up, going from
right to left, the pinouts are:
Pin
1TxD+ (RS422)TxD+ and RxD+ (RS485)
2TxD- (RS422)TxD- and RxD- (RS485)
3RxD+ (RS422)Not used.
4RxD- (RS422) Not used.
5GroundGround
6+12VDC 50mA max
Function in
RS-422 mode
switched power out
Function in
RS-485 mode
+12VDC 50mA max
switched power out
The connector accommodates wire gauges from 16AWG to 30AWG.
To insert or remove wires, insert a screwdriver blade in the slot directly
below the hole where the wire inserts. Press down on the spring to open up
the hole and insert or remove the wire.
15
DIP switches
Assc
Ident
Power
blinking green
solid green
Data retrieval
XBee RS-485 Adapter
The XBee RS-485 Adapter has several DIP switches on the underside of
the unit, with these settings:
DIP SwitchSwitch settings
1Not used. It is covered up by the case and not
accessible.
2, 3, 4ON = RS485
OFF = RS422
5, 6ON = RS485 Bias and line termination on.
OFF = RS485 Bias and line termination off.
Note: Bias and line termination feature can be use d
only when powering from the external power supply.
Retrieving data from XBee adapters is done by issuing a remote AT IS
(Force Sample) command through the XBee API. The XBee API and A T IS
command are described in detail in the XBee ZNet 2.5 (Series 2) RF
Module data sheet. AT IS commands can be issued via a Python program
that is executed on the gateway . See also the Product Manual for the XBee
Module and the Digi Python Programming Guide.
LEDs and buttons
Reset button
16
XBee RS-485 Adapter
PowerLED:Indicates that power is on. Illuminated only when adapter is connected to
external power only, not when powered by batteries. Not available in
lithium-battery models.
Assc LED:Indicates the adapter’s ZigBee network association status:
LED statusNetwork association
On, solid greenNot associated
On, blinking greenSuccessfully joined
Reset button:Recessed button on underside of the adapter. Performs equivalent of a
power-cycle. Use a small non-conducive tool with a blunt end to press
gently and hold down button.
Ident button:Recessed button on power end of the adapter between Assc and Power
LEDs. Performs multiple functions for commissioning the adapter in a
ZigBee network. Consecutive button presses must occur within 800 ms of
each other to perform the desired action.
Button
press
SingleAssociated•If adapter is asleep, wakes unit for 30 seconds.
TwoAssociatedUsed only when network joining is permanently enabled (by the XBee Module’s
Network
association
•Sends a Node Identification broadcast transmission.
All devices that receive this transmission will blink their Associate LED rapidly
for 1 second.
All API devices that receive this transmission will send a Node Identification
frame out their UART (universal asynchronous receiver/transmitter) (API ID
0x95).
Unassociated•If adapter is asleep, wakes unit for 30 seconds.
•Blinks a numeric error code on the Assc LED, indicating the cause of join
failure.
1 blink: Scan found no PANs.
2 blinks: Scan found no valid PANs based on current SC (Scan Channel) and
ID (PAN ID) settings.
3 blinks: Valid Coordinator or Routers found, but they ar e no t allo wing join ing
NJ setting being set to anything other than OFF; in the gateway, this setting is
known as Allows Join Time=255). Temporarily allows joining on the adapter and
the entire ZigBee network for 1 minute.
Action
FourAssociated/
Unassociated
Adapter leaves PAN, if associated, and issues a factory reset to restore default
parameters. Default PAN ID is 0x234.
17
XBee Analog I/O Adapter
Chapter 5
Overview
Analog Modes
XBee Analog I/O Adapter
The XBee Analog I/O Adapter provides short range wireless connectivity to
any analog device, with available solutions for both mesh (including
ZigBee) and point-to-multipoint networks. Unlike an embedded wireless
module, which requires design integration and development time, these
off-the-shelf adapters provides instant wireless connectivity to existing
analog devices. All XBee adapters can be used with Digi's ConnectPort X
gateways for data aggregation and IP connectivity.
The XBee Analog I/O adapter allows for several potential interfaces to
analog devices. It provides greater flexibility and uses than the Digi XBee
Sensor Adapter and XBee Sensor products, in that:
•It can be used with a variety of off-the-shelf sensor products.
•It can be used in situations when the item being measured or analyzed
needs to be separated from the sensor/measuring device itself.
The XBee Analog I/O Adapter has three modes in which it can measure
input on its four terminal lines.
•0-10 volt mode: The device measures the voltage on a scale of 1 to 10
volts, and translates it into a 10-bit scale from 0 to 1023 as possible
values.
•Current Loop (4 mA to 20 mA) mode: The device measures the
amperage on a scale of 4 mA to 20 mA, and translates it into a 10-bit
scale from 0 to 1023 as possible values.
•Differential input mode: The device measures paired terminals (1 and
2 paired, 3 and 4 paired) and translates the difference in voltage
between the two lines to into a 10-bit scale from 0 to 1023 as possible
values.
A Python module named xbeeain.py is available to set the analog mode;
see pages 24 and 25.
18
Power options
Depending on adapter model, there are several powering options.
Alkaline battery model
This product can be powered by a 9-30VDC external power supply (see
"Power requirements" on page 67) or by batteries. Use 3x1.5V “N” alkaline
battery cells. To install batteries, insert a screwdriver in the slots in the side
of the adapter case and twist to snap off the cover. Insert the batteries
following the polarity diagram on the board.
Lithium battery model
This model can be powered by a 3-6VDC external power supply or by 2/3
AA 3.6V lithium batteries and a 1/2 AA boost capacitor. Replacement
batteries available for purchase; contact Digi at 952-912-3444 or
877-912-3444.
Connection and power-on
1. Connect the wires for the desired analog device to the connector for the
adapter. The connector accommodates wire gauges from 16AWG to
30AWG. The connector for the adapter is a 6-position wire terminal
block. The figure shows Pin 1 of the connector when the adapter is
oriented with the mounting tabs, facing upwards (the underside of the
adapter).
XBee Analog I/O Adapter
To insert or remove wires, insert a screwdriver blade in the slot directly
below the hole where the wire inserts. Press down on the spring to
open up the hole and insert or remove the wire.
2. Connect the power supply to the adapter or insert batteries.
19
XBee Analog I/O Adapter
Pinouts
Facing the connector, with the screwdriver release slots down, going from
right to left, the pinouts are:
The XBee Analog I/O Adapter has several DIP switches on the underside
of the unit, with these settings:
DIP SwitchSwitch settings
1Enables and disables direct battery pack voltage
output.
On=battery power out
Off=no battery power out
2Enables and disables +12V power out.
On=+12V power out
Off=no +12V power out
3Not used
4Not used
Note: Switches 1 and 2 should not be on at the same time as increased
parasitic battery drain will result.
20
Configuring inputs and outputs
Input selection
Six control lines from the XBee module are used to place the four external
terminals into the desired input mode.
The power-on default is 0-10VDC on all four terminals.
Set the analog mode
The AT commands D8, D4, and D6 set the analog mode for terminals 1
and 2. P0, D7, and P2 set the mode for terminals 3 and 4. All other
configurations are invalid. A Python module named xbeeain.py is available
to set the analog mode; see pages 24 and 25.
XBee Analog I/O Adapter
Terminal
Terminal 1Current LoopTerminal 2Current Loop000
Analog
Mode
Current LoopTen Volt 001
Ten VoltCurrent Loop 010
Ten VoltTen Volt 011
DifferentialDifferential 100
Terminal
Analog
Mode
AT Commands
D8D4D6
P0D7P2
Terminal 3Current LoopTerminal 4Current Loop 000
Current LoopTen Volt001
Ten VoltCurrent Loop010
Ten VoltTen Volt011
DifferentialDifferential100
21
XBee Analog I/O Adapter
Enable a terminal line for measurement
To enable a terminal line for measurement, the following analog I/O lines
have to be set to value 2:
•D0
•D1
•D2
•D3
D0, D1, D2, and D3 represent terminal lines 1, 2, 3, and 4 respectively. In
the case of a terminal pair in differential mode, only the first terminal of the
terminal pair should be enabled. To disable a terminal line, set the
respective analog I/O line to value 0.