
AT commands
I/O sampling commands
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
215
I/O sampling commands
The following AT commands configure I/O sampling parameters.
TP (Temperature)
Displays the temperature of the XBee Smart Modem in degrees Celsius. The temperature value is
displayed in 16-bit two’s complement format. For example,
0x1A
= 26 °C, and
0xF6
= -10 °C.
Parameter range
0 - 0xFF which indicates degrees Celsius displayed in 8-bit two's complement format.
Default
N/A
IS (Force Sample)
When run,
IS
reports the values of all of the enabled digital and analog input lines. If no lines are
enabled for digital or analog input, the command returns an error.
Command mode
In Command mode, the response value is a multi-line format, individual lines are delimited with
carriage returns, and the entire response terminates with two carriage returns. Each line is a series of
ASCII characters representing a single number in hexadecimal notation. The interpretation of the lines
is:
n
Number of samples. For legacy reasons this field always returns 1.
n
Digital channel mask. A bit-mask of all I/O capable pins in the system. The bits set to
1
are
configured for digital I/O and are included in the digital data value below. Pins D0 - D9 are bits 0
- 9, and P0 - P2 are bits 10 - 12.
n
Analog channel mask. The bits set to
1
are configured for analog I/O and have individual
readings following the digital data field.
n
Digital data. The current digital value of all the pins set in the digital channel mask, only
present if at least one bit is set in the digital channel mask.
n
Analog data. Additional lines, one for each set pin in the analog channel mask. Each reading is a
10-bit ADC value for a 2.5 V voltage reference.
API operating mode
In API operating mode,
IS
immediately returns an
OK
response.
The API response is ordered identical to the Command mode response with the same fields present.
Each field is a binary number of the size listed in the following table. Multi-byte fields are in big-endian
byte order.
Field
Size
Number of samples
1 byte
Digital channel mask
2 bytes