I/O support
On-demand sampling
Digi XBee® 3 802.15.4 RF Module User Guide
96
If
AO
=
0
or
1
on both the source and destination node, then a 0x92 frame is generated on the
destination.
See
I/O Data Sample Rx Indicator frame - 0x92
for more information on the frame's format and an
example.
For all other cases, the destination node generates either a 0x82 or 0x83 frame depending on
whether the source node is operating in a 16-bit or 64-bit configuration. See
for
more information.
See
for more information on what configuration options generate the various I/O
frames.
On-demand sampling
You can use
to query the current state of all digital I/O and ADC lines on the device and
return the sample data as an AT command response. If no inputs or outputs are defined, the
command returns an ERROR.
On-demand sampling can be useful when performing initial deployment, as you can send
IS
locally to
verify that the device and connected sensors are correctly configured. The format of the sample data
matches what is periodically sent using other sampling methods. You can also send
IS
remotely using
a remote AT command. When sent remotely from a gateway or server to each sensor node on the
network, on-demand sampling can improve battery life and network performance as the remote node
transmits sample data only when requested instead of continuously.
If you send
IS
using
, then the device returns a carriage return delimited list
containing the I/O sample data. If
IS
is sent either locally or remotely via an API frame, the I/O sample
data is presented as the parameter value in the AT command response frame (
or
Remote Command Response frame - 0x97
).
Example: Command mode
An
IS
command sent in Command mode returns the following
:
This example uses the
, if you use the legacy format (
AO
=
2
or data is
received from an S1 or S2C device) then refer to the
for information on how this
data is structured.
Output
Description
01
One sample set
0C0C
Digital channel mask, indicates which digital lines are sampled
(0x0C0C = 0000
11
00 0000
11
00b = DIO2, 3, 10, 11)
03
Analog channel mask, indicates which analog lines are sampled
(0x03 = 0000 00
11
b = AD0, 1)
0408
Digital sample data that corresponds with the digital channel mask
0x0408 = 0000
01
00 0000
1
000b = DIO3 and DIO10 are high, DIO2 and DIO11 are low
03D0
Analog sample data for AD0
0124
Analog sample data for AD1