XBee connection examples Send an SMS message to a phone
Digi XBee® 3 Cellular LTE Cat 1 AT&T Smart Modem User Guide
29
Send an SMS message to a phone
The XBee Smart Modem can send and receive Short Message Service (SMS) transmissions (text
messages) while in Transparent mode. This allows you to send and receive text messages to and from
an SMS capable device such as a mobile phone.
Note For help with debugging, see Debugging.
The following table explains the AT commands that you use in this example.
Command Value Description
AP (APIEnable)
0 Set the device's API mode to Transparent mode.
IP (IP Protocol)
2 Set the expected transmission mode to SMScommunication.
P#
(DestinationPhone
Number)
<Target
phone
number>
The target phone number that you send to, for example, your
cellular phone. See P# (Destination Phone Number) for instructions
on using this command.
TD (Text Delimiter)
D (0x0D)
The text delimiter to be used for Transparent mode, as an ASCII hex
code. No information is sent until this character is entered, unless
the maximum number of characters has been reached. Set to 0 to
disable text delimiter checking. Set to D for a carriage return.
PH (Module's SIM
phone number)
Read
only
The value that represents your device's phone number as supplied
by the SIM card. This is used to send text messages to the device
from another cellular device.
1. Ensure that the device is set up correctly with the SIM card installed and the antennas
connected as described in Connect the hardware.
2. Open XCTU and Add a device to XCTU.
3.
Click the Configuration working mode button.
4. Select a device from the Radio Modules list. XCTU displays the current firmware settings for
that device.
5.
To switch to SMS communication, in the IP field, select 2 and click the Write button .
6. To enter your cell phone number, in the P# field, type the <target phone number> and click
the Write button. Type the phone number using only numbers, with no dashes. You can use the
+ prefix if necessary. The target phone number is the phone number you wish to send a text to.
7. In the TD field, type D and click the Write button.
8. Note the number in the PH field; it is the XBee Smart Modem phone number, which you see
when it sends an SMS to your phone.
9.
Click the Consoles working mode button on the toolbar to open a serial console to the
device. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
10.
Click the Open button to open a serial connection to the device.