Digi XB3C1 XB3C1 User Manual

Digi International Inc XB3C1

user manual

Digi XBee3® Cellular LTE Cat 1Smart ModemUser Guide
Revision history—90002253Revision Date DescriptionAJanuary 2018 Initial release of the document.Trademarks and copyrightDigi, Digi International, and the Digi logo are trademarks or registered trademarks in the UnitedStates and other countries worldwide. All other trademarks mentioned in this document are theproperty of their respective owners.© 2018 Digi International Inc. All rights reserved.DisclaimersInformation in this document is subject to change without notice and does not represent acommitment on the part of Digi International. Digi provides this document “as is,” without warranty ofany kind, expressed or implied, including, but not limited to, the implied warranties of fitness ormerchantability for a particular purpose. Digi may make improvements and/or changes in this manualor in the product(s) and/or the program(s) described in this manual at any time.WarrantyTo view product warranty information, go to the following website:www.digi.com/howtobuy/termsSend commentsDocumentation feedback: To provide feedback on this document, send your comments totechcomm@digi.com.Customer supportDigi Technical Support: Digi offers multiple technical support plans and service packages to help ourcustomers get the most out of their Digi product. For information on Technical Support plans andpricing, contact us at +1 952.912.3444 or visit us at www.digi.com/support.Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 2
ContentsDigi XBee3 Cellular LTE Cat 1 Smart Modem User GuideApplicable firmware and hardware 9SIM cards 9Getting started with the XBee Smart Modem Development KitIdentify the kit contents 11XBIB-U-DEV reference 12Cellular service 13Connect the hardware 14Configure the device using XCTU 15Add a device 15Check for cellular registration and connection 16Update to the latest firmware 16Send an SMS message to a phone 18Debugging 19Connect to the ELIZA server 20Debugging 21Connect to the echo server 22Debugging 23Connect to the Daytime server 24Debugging 25Connect to a TCP/IP address 26Debugging 27Perform a (GET) HTTP request 28Debugging 29Get started with MQTT 30Example: MQTT connect 30Send a connect packet 32Example: send messages (publish) with MQTT 34Example: receive messages (subscribe) with MQTT 34Use MQTT over the XBee Cellular Modem with a PC 35Get started with CoAP 39CoAP terms 39CoAP quick start example 39Configure the device 40Example: manually perform a CoAPrequest 40Example: use Python to generate a CoAP message 41Configure the XBee Smart Modem using Digi Remote Manager 44Create a Remote Manager account 44Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 3
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 4Get the XBee Smart Modem IMEI number 44Add a XBee Smart Modem to Remote Manager 44Update the firmware 45Software libraries 45Get started with MicroPythonAbout MicroPython 47Why use MicroPython 47MicroPython on the XBee Smart Modem 47Use XCTU to enter the MicroPython environment 47Use the MicroPython Terminal in XCTU 48Example: hello world 48Example: turn on an LED 48Example: code a request help button 49Enter MicroPython paste mode 50Catch a button press 50Send a text (SMS) when the button is pressed 52Add the time the button was pressed 53Exit MicroPython mode 54Other terminal programs 54Tera Term for Windows 54Use picocom in Linux 55Technical specificationsInterface and hardware specifications 58RF characteristics 58Networking specifications 58Power requirements 58Power consumption 59Electrical specifications 59Regulatory approvals 60HardwareMechanical drawings 62Pin signals 62Pin connection recommendations 63RSSI PWM 64SIM card 64The Associate LED 64Antenna recommendationsAntenna connections 67Antenna placement 68Design recommendationsCellular component firmware upgrades 70USB Direct design 70
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 5Power supply considerations 70Add a capacitor to the RESET line 70Heat considerations and testing 71Heat sink guidelines 71Add a fan to provide active cooling 73Cellular connection processConnecting 75Cellular network 75Data network connection 75Data communication with remote servers (TCP/UDP) 75Disconnecting 75SMS encoding 76ModesSelect an operating mode 78Transparent operating mode 79API operating mode 79Bypass operating mode 79Enter Bypass operating mode 79Leave Bypass operating mode 80Restore cellular settings to default in Bypass operating mode 80USB direct mode 80Enable USB direct mode 80Command mode 80Enter Command mode 81Send AT commands 81Apply command changes 82Make command changes permanent 82Exit Command mode 82Sleep modesAbout sleep modes 84Normal mode 84Pin sleep mode 84Cyclic sleep mode 84Cyclic sleep with pin wake up mode 84Airplane mode 84Connected sleep mode 84The sleep timer 85MicroPython sleep behavior 85Serial communicationSerial interface 87Serial data 87UART data flow 87Serial buffers 87CTS flow control 88RTS flow control 88
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 6AT commandsMicroPython commands 90PS (Python Startup) 90PY (MicroPython Command) 90Special commands 91AC (Apply Changes) 91FR (Force Reset) 91RE command 92WR command 92Cellular commands 92PH (Phone Number) 92S# (ICCID) 92IM (IMEI) 93MN (Operator) 93MV (Modem Firmware Version) 93DB (Cellular Signal Strength) 93AN (Access Point Name) 93OA (Operating APN) 94AM (Airplane Mode) 94DV (Antenna Diversity) 94Network commands 95IP (IP Protocol) 95TL (SSL/TLS Protocol Version) 95TM (IP Client Connection Timeout) 95TS (IP Server Connection Timeout) 96DO (Device Options) 96EQ (Device Cloud FQDN) 96Addressing commands 97SH (Serial Number High) 97SL (Serial Number Low) 97DL (Destination Address) 97P# (Destination Phone Number) 97N1 (DNS Address) 98N2 (DNS Address) 98DE (Destination Port) 98TD (Text Delimiter) 98MY (Module IP Address) 99LA (Lookup IP Address of FQDN) 99OD (Operating Destination Address) 99C0 (Source Port) 99Serial interfacing commands 100BD (Baud Rate) 100NB (Parity) 101SB (Stop Bits) 101RO (Packetization Timeout) 101FT (Flow Control Threshold) 101AP (API Enable) 102I/O settings commands 102D0 (DIO0/AD0) 102D1 (DIO1/AD1) 103D2 (DIO2/AD2) 103D3 (DIO3/AD3) 104D4 (DIO4) 104D5 (DIO5/ASSOCIATED_INDICATOR) 105
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 7D6 (DIO6/RTS) 105D7 (DIO7/CTS) 105D8 (DIO8/SLEEP_REQUEST) 106P0 (DIO10/PWM0 Configuration) 107P1 (DIO11/PWM1 Configuration) 107P2 (DIO12 Configuration) 108PD (Pull Direction) 108PR (Pull-up/down Resistor Enable) 109M0 (PWM0 Duty Cycle) 109I/O sampling commands 110TP (Temperature) 110Sleep commands 110SM (Sleep Mode) 110SP (Sleep Period) 111ST (Wake Time) 111SO (Sleep Options) 111Command mode options 112CC (Command Sequence Character) 112CT (Command Mode Timeout) 112GT (Guard Times) 112Firmware version/information commands 112VR (Firmware Version) 112VL (Verbose Firmware Version) 113HV (Hardware Version) 113AI (Association Indication) 113HS (Hardware Series) 114CK (Configuration CRC) 114Diagnostic interface commands 114DI (Device Cloud Indicator) 114CI (Protocol/Connection Indication) 114Execution commands 116NR (Network Reset) 116!R (Modem Reset) 117IS (Force Sample) 117Operate in API modeAPI mode overview 120Use the AP command to set the operation mode 120API frame format 120API operation (AP parameter = 1) 120API operation with escaped characters (AP parameter = 2) 121Frame descriptions 124AT Command - 0x08 124Transmit (TX) SMS - 0x1F 125Transmit (TX) Request: IPv4 - 0x20 126AT Command Response - 0x88 127Transmit (TX) Status - 0x89 128Modem Status - 0x8A 129Receive (RX) Packet: SMS - 0x9F 130Receive (RX) Packet: IPv4 - 0xB0 131
Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 8Socket behaviorSupported sockets 133Secure Sockets Layer (SSL) certificate checking 133Socket timeouts 133Socket limits in API mode 133Enable incoming TCP connections 133API mode behavior for outgoing TCP and SSL connections 134API mode behavior for outgoing UDP data 134API mode behavior for incoming TCP connections 135API mode behavior for incoming UDP data 135Transparent mode behavior for outgoing TCP and SSL connections 135Transparent mode behavior for outgoing UDP data 136Transparent mode behavior for incoming TCP connections 136Transparent mode behavior for incoming UDP connections 136TroubleshootingCannot find the serial port for the device 138Condition 138Solution 138Correct a macOS Java error 140Condition 140Solution 140Unresponsive cellular component in Bypass mode 141Condition 141Solution 141Not on expected network after APN change 142Condition 142Solution 142Syntax error at line 1 142Solution 142Error Failed to send SMS 142Solution 142Regulatory informationModification statement 144Interference statement 144FCC Class B digital device notice 144RF exposure 145FCC-approved antennas 145Bluetooth antennas 145Dipole antennas 145Flex PCB antennas 145Cellular antennas 146Labeling requirements for the host device 146
Digi XBee3 Cellular LTE Cat 1 Smart Modem UserGuideThe XBee Smart Modem is an embedded Long-Term Evolution (LTE) Category 1 cellular module thatprovides original equipment manufacturers (OEMs) with a simple way to integrate cellularconnectivity into their devices.The XBee Smart Modem enables OEMs to quickly integrate cutting edge 4G cellular technology intotheir devices and applications without dealing with the painful, time-consuming, and expensive FCCand carrier end-device certifications.With the full suite of standard XBee API frames and AT commands, existing XBee customers canseamlessly transition to this new device with only minor software adjustments. When OEMs add theXBee Smart Modem to their product, they create a future-proof design with flexibility to switchbetween wireless protocols or frequencies as needed.You can read some frequently asked questions here.Applicable firmware and hardwareThis manual supports the following firmware:n310xxIt supports the following hardware:nXB3-C-A1-UT-xxxSIM cardsThe XBee Smart Modem requires a 4FF (Nano) size SIM card. The SIM interface supports both 1.8 Vand 3 V SIM types.Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 9
Getting started with the XBee Smart ModemDevelopment KitThis section describes how to connect the hardware in the XBee Smart Modem Development Kit, andprovides some examples you can use to communicate with the device.Identify the kit contents 11XBIB-U-DEV reference 12Cellular service 13Connect the hardware 14Configure the device using XCTU 15Send an SMS message to a phone 18Connect to the ELIZA server 20Connect to the echo server 22Connect to the Daytime server 24Connect to a TCP/IP address 26Perform a (GET) HTTP request 28Get started with MQTT 30Get started with CoAP 39Configure the XBee Smart Modem using Digi Remote Manager 44Software libraries 45Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 10
Getting started with the XBee Smart Modem Development Kit Identify the kit contentsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 11Identify the kit contentsThe Developer's kit includes the following:One XBIB-U-DEV boardOne 12 V power supplyTwo cellular antennas with U.FL connectorsOne USB cableOne XBee Smart ModemOne SIMcard
Getting started with the XBee Smart Modem Development Kit XBIB-U-DEV referenceDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 12XBIB-U-DEV referenceThis picture shows the XBee USB development board and the table that follows explains the calloutsin the picture.Number Item Description1 Programmingheader Header used to program XBee Programmable devices.
Getting started with the XBee Smart Modem Development Kit Cellular serviceDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 13Number Item Description2 Self power module Advanced users only—voids the warranty. Depopulate R31 topower the device using V+ and GND from J2 and J5. You canconnect sense lines to S+ and S- for sensing power supplies.CAUTION: Voltage is not regulated. Applying the incorrectvoltage can cause fire and serious injury.13 Current testing Depopulating R31 allows a current probe to be inserted across P6terminals. The current though P6/R31 powers the device only.Other supporting circuitry is powered by a different trace.4 Loopback jumper Populating P8 with a loopback jumper causes serial transmissionsboth from the device and from the USB to loopback.5 DC barrel plug: 6-20V Greater than 500 mA loads require a DC supply for correctoperation. Plug in the external power supply prior to the USBconnector to ensure that proper USB communications are notinterrupted.6 LED indicator Yellow: Modem sending serial/UART data to host.Green: Modem receiving serial/UART data from host.Red: Associate.7 USB8 RSSI indicator9 User buttons Connected to DIO lines for user implementation.10 Reset button11 SPI power Connect to the power board from 3.3 V.12 SPI Only used for surface-mount devices.13 Indicator LEDs DS5: ON/SLEEPDS2: DIO12, the LED illuminates when driven low.DS3: DIO11, the LED illuminates when driven low.DS4: DIO4, the LED illuminates when driven low.14 Through-hole XBeesockets15 20-pin header Maps to standard through-hole XBee pins.Cellular serviceThe XBee Cellular kit includes six months of free cellular service.1Powering the board with J2 and J5 without R31 removed can cause shorts if the USB or barrel plug power areconnected. Applying too high a voltage destroys electronic circuitry in the device and other board componentsand/or can cause injury.
Getting started with the XBee Smart Modem Development Kit Connect the hardwareDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 14Connect the hardware1. The XBee Smart Modem should already be plugged into the XBIB-U-DEV board.2. The SIMcard should be already be inserted into the XBee Smart Modem. If not, install theSIMcard into the XBee Smart Modem.WARNING! Never insert or remove the SIM card while the device is powered!3. Connect the antennas to the XBee Smart Modem by aligning the U.FL connectors carefully,then firmly pressing straight down to seat the connector. You should hear a snap when theantenna attaches correctly. U.FL is fragile and is not designed for multiple insertions, soexercise caution when connecting or removing the antennas. We recommend using a U.FLremoval tool.4. Plug the 12 V power supply to the power jack on the development board.
Getting started with the XBee Smart Modem Development Kit Configure the device using XCTUDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 155. Connect the USB cable from a PC to the USB port on the development board. The computersearches for a driver, which can take a few minutes to install.Configure the device using XCTUXBee Configuration and Test Utility (XCTU) is a multi-platform program that enables users to interactwith Digi radio frequency (RF) devices through a graphical interface. The application includes built-intools that make it easy to set up, configure, and test Digi RF devices.XCTU does not work directly over an SPI interface.For instructions on downloading and using XCTU, see the XCTU User Guide.Note If you are on a macOS computer and encounter problems installing XCTU, see Correct a macOSJava error.Add a deviceThese instructions show you how to add the XBee Smart Modem to XCTU. If XCTU does not find yourserial port, see Cannot find the serial port for the device.1. Launch XCTU .2. Click the Discover radio modules button .3. In the Discover radio devices dialog, select the serial ports where you want to look for XBeemodules, and click Next.4. In the Set port parameters window, maintain the default values and click Finish.5. As XCTU locates radio modules, they appear in the Discovering radio modules dialog box.If your module could not be found, XCTU displays the Could not find any radio module dialogproviding possible reasons why the module could not be added.
Getting started with the XBee Smart Modem Development Kit Configure the device using XCTUDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 16Check for cellular registration and connectionIn the following examples, proper cellular network registration and address assignment must occursuccessfully. The LED on the development board blinks when the XBee Smart Modem is registered tothe cellular network; see The Associate LED. If the LEDremains solid, registration has not occurredproperly. Registration can take several minutes.Note Make sure you are in an area with adequate cellular network reception or the XBee SmartModem will not make the connection.In addition to the LED confirmation, you can check the AT commands below in XCTU to check theregistration and connection. To view these commands:1. Open XCTU and Add a device.2. Click the Configuration working mode button.3. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.4. On the Configuration toolbar, click the Default button to load the default valuesestablished by the firmware, and click Yes to confirm.The relevant commands are:nAI (Association Indication) reads zero when the device successfully registers to the cellularnetwork. If it reads 0x23 it is connecting to the Internet; 0x22 means it is registering to thecellular network.nMY (Module IPAddress) should display a valid IPaddress. If it reads 0.0.0.0, it has notregistered yet.Note To search for an ATcommand in XCTU, use the search box.Update to the latest firmwareFirmware is the program code stored in the device's persistent memory that provides the controlprogram for the device. Use XCTU to update the firmware.1. Click the Configuration working modes button .2. Select a local XBee module from the Radio Modules list.3. Click the Update firmware button .The Update firmware dialog displays the available and compatible firmware for the selectedXBee module.4. Select the product family of the XBee module, the function set, and the latest firmware version.
Getting started with the XBee Smart Modem Development Kit Configure the device using XCTUDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 175. Click Update. A dialog displays update progress. Click Show details for details of the firmwareupdate process.See How to update the firmware of your modules in the XCTU User Guide for more information.
Getting started with the XBee Smart Modem Development Kit Send an SMS message to a phoneDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 18Send an SMS message to a phoneThe XBee Smart Modem can send and receive Short Message Service (SMS) transmissions (textmessages) while in Transparent mode. This allows you to send and receive text messages to and froman SMS capable device such as a mobile phone.The following table explains the AT commands that you use in this example.Command Value DescriptionAP (APIEnable) 0 Set the device's API mode to Transparent mode.IP (IP Protocol) 2 Set the expected transmission mode to SMScommunication.P#(DestinationPhoneNumber)<Targetphonenumber>The target phone number that you send to, for example, yourcellular phone. See P# (Destination Phone Number) for instructionson using this command.TD (Text Delimiter) D (0x0D) The text delimiter to be used for Transparent mode, as an ASCII hexcode. No information is sent until this character is entered, unlessthe maximum number of characters has been reached. Set to zeroto disable text delimiter checking. Set to D for a carriage return.PH (Module's SIMphone number)ReadonlyThe value that represents your device's phone number as suppliedby the SIM card. This is used to send text messages to the devicefrom another cellular device.1. Ensure that the device is set up correctly with the SIM card installed and the antennasconnected as described in Connect the hardware.2. Open XCTU and Add a device.3. Click the Configuration working mode button.4. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.5. To switch to SMS communication, in the IP field, select 2and click the Write button .6. To enter your cell phone number, in the P# field, type the <target phone number> and clickthe 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 Dand click the Write button.8. Note the number in the PH field; it is the XBee Smart Modem phone number, which you seewhen it sends an SMS to your phone.
Getting started with the XBee Smart Modem Development Kit Send an SMS message to a phoneDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 199. Click the Consoles working mode button on the toolbar to open a serial console to thedevice. 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.11. Click in the left pane of the Console log, type hello world and press Enter. The XBee SmartModem sends the message to the destination phone number set by the P# command.12. When the phone receives the text, you can see that the sender's phone number matches thevalue reported by the XBee Smart Modem with the PH command.13. On the phone, reply with the text connect with confidence and the XBee Smart Modemoutputs this reply from the UART.DebuggingIf you experience problems with the settings in this example, you can load the default settings inXCTU:1. On the Configuration toolbar, click the Default button to load the default valuesestablished by the firmware, and click Yes to confirm.2. Factory settings are loaded but not written to the device. To write them, click the Write buttonon the toolbar.
Getting started with the XBee Smart Modem Development Kit Connect to the ELIZA serverDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 20Connect to the ELIZA serverYou can use the XBee Smart Modem to chat with the ELIZA Therapist Bot. ELIZAis an artificialintelligence (AI) bot that emulates a therapist and can perform simple conversations.The following table explains the AT commands that you use in this example.At command Value DescriptionIP (IP Protocol) 1 Set the expected transmission mode to TCPcommunications.DL (DestinationAddress)52.43.121.77 The target IP address of the Eliza server.DE (Destination Port) 0x2328 The target port number of the Eliza server.To communicate with the ELIZA Therapist Bot:1. Ensure that the device is set up correctly with the SIM card installed and the antennasconnected as described in Connect the hardware.2. Open XCTU and Add a device.3. Click the Configuration working mode button.4. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.5. To switch to TCP communication, in the IP field, select 1 and click the Write button .6. To enter the destination address of the ELIZATherapist Bot, in the DL field, type 52.43.121.77and click the Write button.7. To enter the destination IP port number, in the DE field, type 2328 and click the Write button.8. Click the Consoles working mode button on the toolbar to open a serial console to thedevice. For instructions on using the Console, see the AT console topic in the XCTU User Guide.9. Click the Open button to open a serial connection to the device.10. Click in the left pane of the Console log, then type in the Console to talk to the ELIZA TherapistBot. The following screenshot provides an example of this chat.
Getting started with the XBee Smart Modem Development Kit Connect to the ELIZA serverDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 21DebuggingIf you experience problems with the settings in this example, you can load the default settings inXCTU:1. On the Configuration toolbar, click the Default button to load the default valuesestablished by the firmware, and click Yes to confirm.2. Factory settings are loaded but not written to the device. To write them, click the Write buttonon the toolbar.
Getting started with the XBee Smart Modem Development Kit Connect to the echo serverDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 22Connect to the echo serverThis server echoes back the messages you type.The following table explains the AT commands that you use in this example.Atcommand Value DescriptionIP (IPProtocol)1 Set the expected transmission mode to TCP communications.TD (TextDelimiter)D (0x0D) The text delimiter to be used for Transparent mode, as an ASCII hexcode. No information is sent until this character is entered, unless themaximum number of characters has been reached. Set to zero todisable text delimiter checking. Set to Dfor a carriage return.DL(DestinationAddress)52.43.121.77 The target IPaddress of the echo server.DE(DestinationPort)0x2329 The target port number of the echo server.To communicate with the echo server:1. Ensure that the device is set up correctly with the SIM card installed and the antennasconnected as described in Connect the hardware.2. Open XCTU and Add a device.3. Click the Configuration working mode button.4. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.5. To switch to TCP communication, in the IP field, select 1 and click the Write button .6. To enable the XBee Smart Modem to recognize carriage return as a message delimiter, in theTD field, type Dand click the Write button.7. To enter the destination address of the echo server, in the DL field, type 52.43.121.77 and clickthe Write button.8. To enter the destination IP port number, in the DE field, type 2329 and click the Write button.
Getting started with the XBee Smart Modem Development Kit Connect to the echo serverDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 239. Click the Consoles working mode button on the toolbar to open a serial console to thedevice. 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.11. Click in the left pane of the Console log, then type in the Console to talk to the echo server.The following screenshot provides an example of this chat.DebuggingIf you experience problems with the settings in this example, you can load the default settings inXCTU:1. On the Configuration toolbar, click the Default button to load the default valuesestablished by the firmware, and click Yes to confirm.2. Factory settings are loaded but not written to the device. To write them, click the Write buttonon the toolbar.
Getting started with the XBee Smart Modem Development Kit Connect to the Daytime serverDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 24Connect to the Daytime serverThe Daytime server reports the current Coordinated Universal Time (UTC) value responding to anyuser input.The following table explains the AT commands that you use in this example.Atcommand Value DescriptionIP (IPProtocol)1 Set the expected transmission mode to TCP communications.DL(DestinationAddress)52.43.121.77 The target IP of the Daytime server.DE(DestinationPort)0x232A The target port number of the Daytime server.TD (TextDelimiter)0The text delimiter to be used for Transparent mode, as an ASCII hexcode. No information is sent until this character is entered, unless themaximum number of characters has been reached. Set to zero todisable text delimiter checking.To communicate with the Daytime server:1. Ensure that the device is set up correctly with the SIM card installed and the antennasconnected as described in Connect the hardware.2. Open XCTU and Add a device.3. Click the Configuration working mode button.4. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.5. To switch to TCP communication, in the IP field, select 1 and click the Write button .6. To enter the destination address of the daytime server, in the DL field, type 52.43.121.77 andclick the Write button.7. To enter the destination IP port number, in the DE field, type 232A and click the Write button.8. To disable text delimiter checking, in the TD field, type 0and click the Write button.9. Click the Consoles working mode button on the toolbar to open a serial console to thedevice. For instructions on using the Console, see the AT console topic in the XCTU User Guide.
Getting started with the XBee Smart Modem Development Kit Connect to the Daytime serverDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 2510. Click the Open button to open a serial connection to the device.11. Click in the left pane of the Console log, then type in the Console to query the Daytime server.The following screenshot provides an example of this chat.DebuggingIf you experience problems with the settings in this example, you can load the default settings inXCTU:1. On the Configuration toolbar, click the Default button to load the default valuesestablished by the firmware, and click Yes to confirm.2. Factory settings are loaded but not written to the device. To write them, click the Write buttonon the toolbar.
Getting started with the XBee Smart Modem Development Kit Connect to a TCP/IP addressDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 26Connect to a TCP/IP addressThe XBee Smart Modem can send and receive TCP messages while in Transparent mode; seeTransparent operating mode.You can use this example as a template for sending and receiving data from a user. The following tableexplains the AT commands that you use in this example.Command Value DescriptionIP (IPProtocol)1 Set the expected transmission mode to TCPcommunication.DL(DestinationIPAddress)<TargetIPaddress>The target IP address that you send and receive from. For example, adata logging server’s IP address that you want to sendmeasurements to.DE(DestinationPort)<Targetportnumber>The target port number that the device sends the transmission to.This is represented as a hexadecimal value.To connect to a TCP/IP address:1. Ensure that the device is set up correctly with the SIM card installed and the antennasconnected as described in Connect the hardware.2. Open XCTU and Add a device.3. Click the Configuration working mode button.4. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.5. In the IP field, select 1 and click the Write button .6. In the DL field, type the <target IP address> and click the Write button. The target IP addressis the IPaddress that you send and receive from.7. In the DE field, type the <target port number>, converted to hexadecimal, and click the Writebutton.8. Exit Command mode; see Exit Command mode.After exiting Command mode, any UART data sent to the device is sent to the destination IP addressand port number after the RO (Packetization Timeout) occurs.
Getting started with the XBee Smart Modem Development Kit Connect to a TCP/IP addressDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 27DebuggingIf you experience problems with the settings in this example, you can load the default settings inXCTU:1. On the Configuration toolbar, click the Default button to load the default valuesestablished by the firmware, and click Yes to confirm.2. Factory settings are loaded but not written to the device. To write them, click the Write buttonon the toolbar.
Getting started with the XBee Smart Modem Development Kit Perform a (GET) HTTP requestDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 28Perform a (GET) HTTP requestYou can use the XBee Smart Modem to perform a GET Hypertext Transfer Protocol (HTTP) requestusing XCTU. This example uses http://httpbin.org/ as the target website that responds to the HTTPrequest.To perform a GETrequest:1. Ensure that the device is set up correctly with the SIM card installed and the antennasconnected as described in Connect the hardware.2. Open XCTU and Add a device.3. Click the Configuration working mode button.4. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.5. To enter the destination address of the target website, in the DL field, type httpbin.org andclick the Write button .6. To enter the HTTP request port number, in the DE field, type 50 and click the Write button.Hexadecimal 50 is 80 in decimal.7. To switch to TCP communication, in the IP field, select 1and click the Write button.8. To move into Transparent mode, in the APfield, select 0and click the Write button.9. Wait for the AI (Association Indication) value to change to 0(Connected to the Internet).10. Click the Consoles working mode button on the toolbar.11. From the AT console, click the Add new packet button in the Send packets dialog. TheAdd new packet dialog appears.12. Enter the name of the data packet.13. Type the following data in the ASCII input tab:GET /ip HTTP/1.1Host: httpbin.org14. Click the HEX input tab and add 0A (zero A) after each 0D (zero D), and add an additional 0D 0Aat the end of the message body. For example, copy and past the following text into the HEXinput tab:47 45 54 20 2F 69 70 20 48 54 54 50 2F 31 2E 31 0D 0A 48 6F 73 74 3A 20 68 74 74 70 62 69 6E2E 6F 72 67 0D 0A 0D 0ANote The HTTP protocol requires an empty line (a line with nothing preceding the CRLF) to terminatethe request.15. Click Add packet.16. Click the Open button .
Getting started with the XBee Smart Modem Development Kit Perform a (GET) HTTP requestDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 2917. Click Send selected packet.18. A GETHTTP response from httpbin.org appears in the Console log.DebuggingIf you experience problems with the settings in this example, you can load the default settings inXCTU:1. On the Configuration toolbar, click the Default button to load the default valuesestablished by the firmware, and click Yes to confirm.2. Factory settings are loaded but not written to the device. To write them, click the Write buttonon the toolbar.
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 30Get started with MQTTMQ Telemetry Transport (MQTT) is a messaging protocol that is ideal for the Internet of Things (IoT)due to a light footprint and its use of the publish-subscribe model. In this model, a client connects to abroker, a server machine responsible for receiving all messages, filtering them, and then sendingmessages to the appropriate clients.The first two MQTTexamples do not involve the XBee Smart Modem. They demonstrate using theMQTTlibraries because those libraries are required for Use MQTT over the XBee Cellular Modem witha PC.The examples in this guide assume:nSome knowledge of Python.nAn integrated development environment (IDE)such as PyCharm, IDLE or something similar.The examples require:nAn XBee Smart Modem.nA compatible development board, such as the XBIB-U.nXCTU. See Configure the device using XCTU.nThat you install Python on your computer. You can download Python from:https://www.python.org/downloads/.nThat you install the pyserial and paho-mqtt libraries to the Python environment. If you usePython 2, install these libraries from the command line with pip install pyserial and pipinstall paho-mqtt. If you use Python 3, use pip3 install pyserial and pip3 install paho-mqtt.nThe full MQTT library source code, which includes examples and tests, which is available in thepaho-mqtt github repository at https://github.com/eclipse/paho.mqtt.python. To download thisrepository you must have Git installed.Example: MQTT connectThis example provides insight into the structure of packets in MQTT as well as the interactionbetween the client and broker. MQTT uses different packets to accomplish tasks such as connecting,subscribing, and publishing. You can use XCTU to perform a basic example of sending a broker aconnect packet and receiving the response from the server, without requiring any coding. This is agood way to see how the client interacts with the broker and what a packet looks like. The followingtable is an example connect packet:Description Hex valueCONNECT packet fixed headerbyte 1 Control packet type 0x10byte 2 Remaining length 0x10CONNECT packet variable headerProtocol name
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 31Description Hex valuebyte 1 Length MSB (0) 0x00byte 2 Length LSB (4) 0x04byte 3 (M) 0x4Dbyte 4 (Q) 0x51byte 5 (T) 0x54byte 6 (T) 0x54Protocol levelbyte 7 Level (4) 0x04Connect flagsbyte 8 CONNECT flags byte, see the table below for the bits. 0X02Keep alivebyte 9 Keep Alive MSB (0) 0X00byte 10 Keep Alive LSB (60) 0X3CClient IDbyte 11 Length MSB (0) 0x00byte 12 Length LSB (4) 0x04byte 13 (D) 0x44byte 14 (I) 0x49byte 15 (G) 0x47byte 16 (I) 0x49The following table describes the fields in the packet:Fieldname DescriptionProtocolName The connect packet starts with the protocol name, which is MQTT. The length ofthe protocol name (in bytes) is immediately before the name itself.ProtocolLevel Refers to the version of MQTT in use, in this case a value of 4 indicates MQTTversion 3.1.1.Connect Flags Indicate certain aspects of the packet. For simplicity, this example only sets theClean Session flag, which indicates to the client and broker to discard any previoussession and start a new one.Keep Alive How often the client pings the broker to keep the connection alive; in this exampleit is set to 60 seconds.
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 32Fieldname DescriptionClient ID The length of the ID (in bytes) precedes the ID itself. Each client connecting to abroker must have a unique client ID. In the example, the ID is DIGI. When using thePaho MQTT Python libraries, a random alphanumeric ID is generated if you do notspecify an ID.The following table provides the CONNECT flag bits from byte 8, the CONNECT flags byte.CONNECT Flag Bit(s) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0User name flag 0Password flag 0Will retain 0Will QoS 0 0Will flag 0Clean session 1Reserved 0Send a connect packetNow that you know what a connect packet looks like, you can send a connect packet to a broker andview the response. Open XCTU and click the Configuration working mode button.1. Ensure that the device is set up correctly with the SIM card installed and the antennasconnected as described in Connect the hardware.2. Open XCTU and click the Configuration working mode button.3. Add the XBee Smart Modem to XCTU; see Add a device.4. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.5. In the APfield, set Transparent Mode to [0] if it is not already and click the Write button.6. In the DL field, type the IP address of the broker you wish to use. This example uses198.41.30.241, which is the IP address for m2m.eclipse.org, a public MQTT broker.7. In the DE field, type 75B and set the port that the broker uses. This example uses 75B, becausethe default MQTT port is 1883 (0x75B).8. Once you have entered the required values, click the Write button to write the changes to theXBee Smart Modem.
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 339. Click the Consoles working mode button on the toolbar to open a serial console to thedevice. 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.11. From the AT console, click the Add new packet button in the Send packets dialog. TheAdd new packet dialog appears.12. Enter the name of the data packet. Name the packet connect_frame or something similar.13. Click the HEX input tab and type the following (these values are the same values from thetable in Example: MQTT connect):10 10 00 04 4D 51 54 54 04 02 00 3C 00 04 44 49 47 4914. Click Add packet. The new packet appears in the Send packets list.15. Click the packet in the Send packets list.16. Click Send selected packet.17. A CONNACK packet response from the broker appears in the Console log. This is a connectionacknowledgment; a successful response should look like this:
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 34You can verify the response from the broker as a CONNACK by comparing it to the structure of aCONNACK packet in the MQTT documentation, which is available at http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718081).Example: send messages (publish) with MQTTA basic Python example of a node publishing (sending) a message is:mqttc = mqtt.Client("digitest") # Create instance of client with client ID“digitest”mqttc.connect("m2m.eclipse.org", 1883) # Connect to (broker, port,keepalive-time)mqttc.loop_start() # Start networking daemonmqttc.publish("digitest/test1", "Hello, World!") # Publish message to“digitest /test1” topicmqttc.loop_stop() # Kill networking daemonNote You can easily copy and paste code from the online version of this Guide. Use caution with thePDF version, as it may not maintain essential indentations.This example imports the MQTT library, allowing you to use the MQTT protocol via APIs in the library,such as the connect(),subscribe(), and publish() methods.The second line creates an instance of the client, named mqttc. The client ID is the argument youpassed in: digitest (this is optional).In line 3, the client connects to a public broker, in this case m2m.eclipse.org, on port 1883 (the defaultMQTT port, or 8883 for MQTT over SSL). There are many publicly available brokers available, you canfind a list of them here: https://github.com/mqtt/mqtt.github.io/wiki/brokers.Line 4 starts the networking daemon with client.loop_start() to handle the backgroundnetwork/data tasks.Finally, the client publishes its message Hello, World! to the broker under the topicdigitest/backlog/test1. Any nodes (devices, phones, computers, even microcontrollers) subscribed tothat same topic on the same broker receive the message.Once no more messages need to be published, the last line stops the network daemon withclient.loop_stop().Example: receive messages (subscribe) with MQTTThis example describes how a client would receive messages from within a specific topic on thebroker:import paho.mqtt.client as mqttdef on_connect(client, userdata, flags, rc): # The callback for when theclient connects to the brokerprint("Connected with result code {0}".format(str(rc))) # Print resultof connection attemptclient.subscribe("digitest/test1") # Subscribe to the topic“digitest/test1”, receive any messages published on itdef on_message(client, userdata, msg): # The callback for when a PUBLISHmessage is received from the server.print("Message received-> " + msg.topic + " " + str(msg.payload)) #
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 35Print a received msgclient = mqtt.Client("digi_mqtt_test") # Create instance of client withclient ID “digi_mqtt_test”client.on_connect = on_connect # Define callback function for successfulconnectionclient.on_message = on_message # Define callback function for receipt of amessage# client.connect("m2m.eclipse.org", 1883, 60) # Connect to (broker, port,keepalive-time)client.connect('127.0.0.1', 17300)client.loop_forever() # Start networking daemonNote You can easily copy and paste code from the online version of this Guide. Use caution with thePDF version, as it may not maintain essential indentations.The first line imports the library functions for MQTT.The functions on_connect and on_message are callback functions which are automatically called bythe client upon connection to the broker and upon receiving a message, respectively.The on_connect function prints the result of the connection attempt, and performs the subscription.It is wise to do this in the callback function as it guarantees the attempt to subscribe happens onlyafter the client is connected to the broker.The on_message function prints the received message when it comes in, as well as the topic it waspublished under.In the body of the code, we:nInstantiate a client object with the client ID digi_mqtt_testnDefine the callback functions to use upon connection and upon message receiptnConnect to an MQTT broker at m2m.eclipse.org, on port 1883 (the default MQTT port, or 8883for MQTT over SSL) with a keepalive of 60 seconds (this is how often the client pings the brokerto keep the connection alive).The last line starts a network daemon that runs in the background and handles data transactions andmessages, as well as keeping the socket open, until the script ends.Use MQTT over the XBee Cellular Modem with a PCTo use this MQTT library over an XBee Smart Modem, you need a basic proxy that transfers a payloadreceived via the MQTT client’s socket to the serial or COM port that the XBee Smart Modem is activeon, as well as the reverse; transfer of a payload received on the XBee Smart Modem’s serial or COMport to the socket of the MQTT client. This is simplest with the XBee Smart Modem in Transparentmode, as it does not require code to parse or create API frames, and not using API frames meansthere is no need for them to be queued for processing.1. To put the XBee Cellular Modem in Transparent mode, set AP to 0.2. Set DL to the IP address of the broker you want to use.3. Set DE to the port to use, the default is 1883 (0x75B). This sets the XBee Smart Modem tocommunicate directly with the broker, and can be performed in XCTU as described in Example:MQTT connect.4. You can make the proxy with a dual-threaded Python script, a simple version follows:
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 36import threadingimport serialimport socketdef setup():"""This function sets up the variables needed, including the serial port,and it's speed/port settings, listening socket, and localhost adddress."""global clisock, cliaddr, svrsock, ser# Change this to the COM port your XBee Cellular module is using. On# Linux, this will be /dev/ttyUSB#comport = 'COM44'# This is the default serial communication speed of the XBee Cellular# modulecomspeed = 115200buffer_size = 4096 # Default receive size in bytesdebug_on = 0 # Enables printing of debug messagestoval = None # Timeout value for serial port below# Serial port object for XBCell modemser = serial.Serial(comport,comspeed,timeout=toval)# Listening socket (accepts incoming connection)svrsock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)# Allow address reuse on socket (eliminates some restart errors)svrsock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)clisock = Nonecliaddr = None # These are first defined before thread creationaddrtuple = ('127.0.0.1', 17300) # Address tuple for localhost# Binds server socket to localhost (allows client program connection)svrsock.bind(addrtuple)svrsock.listen(1) # Allow (1) connectiondef ComReaderThread():"""This thread listens on the defined serial port object ('ser') for datafrom the modem, and upon receipt, sends it out to the client over theclient socket ('clisock')."""global clisockwhile (1):resp = ser.read() ## Read any available data from serial portprint("Received {} bytes from modem.".format(len(resp)))clisock.sendall(resp) # Send RXd data out on client socketprint("Sent {} byte payload out socket to client.".format(len(resp)))def SockReaderThread():"""This thread listens to the MQTT client's socket and upon receiving apayload, it sends this data out on the defined serial port ('ser') tothemodem for transmission."""global clisock
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 37while (1):data = clisock.recv(4096) # RX data from client socket# If the RECV call returns 0 bytes, the socket has closedif (len(data) == 0):print("ERROR - socket has closed. Exiting socket readerthread.")return 1 # Exit the thread to avoid a loop of 0-byte receptionselse:print("Received {} bytes from client via socket.".format(len(data)))print("Sending payload to modem...")bytes_wr = ser.write(data) # Write payload to modem viaUART/serialprint("Wrote {} bytes to modem".format(bytes_wr))def main():setup() # Setup the serial port and socketglobal clisock, svrsockif (not clisock): # Accept a connection on 'svrsock' to open 'clisock'print("Awaiting ACCEPT on server sock...")(clisock,cliaddr) = svrsock.accept() # Accept an incomingconnectionprint("Connection accepted on socket")# Make thread for ComReadercomthread = threading.Thread(target=ComReaderThread)comthread.start() # Start the thread# Make thread for SockReadersockthread = threading.Thread(target=SockReaderThread)sockthread.start() # Start the threadmain()Note This script is a general TCP-UART proxy, and can be used for other applications or scripts thatuse the TCP protocol. Its functionality is not limited to MQTT.Note You can easily copy and paste code from the online version of this Guide. Use caution with thePDF version, as it may not maintain essential indentations.This proxy script waits for an incoming connection on localhost (127.0.0.1), on port 17300. Afteraccepting a connection, and creating a socket for that connection (clisock), it creates two threads,one that reads the serial or COM port that the XBee Smart Modem is connected to, and one thatreads the socket (clisock), that the MQTT client is connected to.With:nThe proxy script runningnThe MQTT client connected to the proxy script via localhost (127.0.0.1)nThe XBee Smart Modem connected to the machine via USB and properly powerednAP,DL, and DE set correctlythe proxy acts as an intermediary between the MQTT client and the XBee Smart Modem, allowing theMQTT client to use the data connection provided by the device.Think of the proxy script as a translator between the MQTT client and the XBee Smart Modem. Thefollowing figure shows the basic operation.
Getting started with the XBee Smart Modem Development Kit Get started with MQTTDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 38The thread that reads the serial port forwards any data received onward to the client socket, and thethread reading the client socket forwards any data received onward to the serial port. This isrepresented in the figure above.The proxy script needs to be running before running an MQTT publish or subscribe script.1. With the proxy script running, run the subscribe example from Example: receive messages(subscribe) with MQTT, but change the connect line from client.connect("m2m.eclipse.org",1883, 60) to client.connect("127.0.0.1", port=17300, keepalive=20). This connects theMQTT client to the proxy script, which in turn connects to a broker via the XBee SmartModem’s internet connection.2. Run the publish example from Example: send messages (publish) with MQTT in a third Pythoninstance (while the publish script is running you will have three Python scripts running at thesame time).The publish script runs over your computer’s normal internet connection, and does not use the XBeeSmart Modem. You are able to see your published message appear in the subscribe script’s outputonce it is received from the broker via the XBee Smart Modem. If you watch the output of the proxyscript during this process you can see the receptions and transmissions taking place.The proxy script must be running before you run the subscribe and publish scripts. If you stop thesubscribe script, the socket closes, and the proxy script shows an error. If you try to start the proxyscript after starting the subscribe script, you may also see a socket error. To avoid these errors, it isbest to start the scripts in the correct order: proxy, then subscribe, then publish.
Getting started with the XBee Smart Modem Development Kit Get started with CoAPDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 39Get started with CoAPConstrained Application Protocol (CoAP) is based on UDP connection and consumes low power todeliver similar functionality to HTTP. This guide contains information about sending GET, POST, PUTand DELETE operations by using the Coap Protocol with XCTU and Python code working with the XBeeSmart Modem and Coapthon library (Python 2.7 only).The Internet Engineering Task Force describes CoAP as:The protocol is designed for machine-to-machine (M2M) applications such as smart energy andbuilding automation. CoAP provides a request/response interaction model between applicationendpoints, supports built-in discovery of services and resources, and includes key concepts ofthe Web such as URIs and Internet media types. CoAP is designed to easily interface with HTTPfor integration with the Web while meeting specialized requirements such as multicastsupport, very low overhead, and simplicity for constrained environments (source).CoAP termsWhen describing CoAP, we use the following terms:Term MeaningMethod COAP's method action is similar to the HTTP method. This guide discusses the GET,POST, PUT and DELETE methods. With these methods, the XBee Smart Modem cantransport data and requests.URI URI is a string of characters that identifies a resource served at the server.Token Atoken is an identifier of a message. The client uses the token to verify if the receivedmessage is the correct response to its query.Payload The message payload is associated with the POST and PUT methods. It specifies thedata to be posted or put to the URI resourceMessageID The message ID is also an identifier of a message. The client matches the message IDbetween the response and query.CoAP quick start exampleThe following diagram shows the message format for the CoAP protocol; see ISSN: 2070-1721 fordetails:This is an example GET request:44 01 C4 09 74 65 73 74 B7 65 78 61 6D 70 6C 65
Getting started with the XBee Smart Modem Development Kit Get started with CoAPDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 40The following table describes the fields in the GETrequest.Field HEX Bits MeaningVer 44 01 Version 01, which is mandatory here.T 00 Type 0: confirmable.TKL 0100 Token length: 4.Code 01 000 00001 Code: 0.01, which indicates the GET method.Message ID C4 09 2 Bytes equalto hex at leftMessage ID. The response message will have thesame ID. This can help out identification.Token 74 65 73 74 4 Bytes equalto hex at leftToken. The response message will have the sametoken. This can help out identification.Option delta B7 1011 Delta option: 11 indicates the option data is Uri-Path.Optionlength 0111 Delta length: 7 indicates there are 7 bytes of datafollowing as a part of this delta option.Option value 65 78 61 6D70 6C 657 Bytes equalto hex at leftExample.Configure the device1. Ensure that the device is set up correctly with the SIM card installed and the antennasconnected as described in Connect the hardware.2. Open XCTU and click the Configuration working mode button.3. Add the XBee Smart Modem to XCTU; see Add a device.4. Select a device from the Radio Modules list. XCTU displays the current firmware settings forthat device.5. To switch to UDPcommunication, in the IP field, select 0and click the Write button .6. To set the target IP address that the XBee Smart Modem will talk to, in the DL field type52.43.121.77and click the Write button . A CoAP server is publicly available at address52.43.121.77.7. To set the XBee Smart Modem to send data to port 5683 in decimal, in the DEfield, type 1633and click the Write button.8. To move into Transparent mode, in the APfield, select 0and click the Write button.9. Wait for the AI (Association Indication) value to change to 0(Connected to the Internet). Youcan click Read to get an update on the AI value.Example: manually perform a CoAPrequestFollow the steps in Configure the device prior to this example. This example performs the CoAPGETrequest:
Getting started with the XBee Smart Modem Development Kit Get started with CoAPDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 41nMethod: GETnURI: examplenGiven message token: test1. Click the Consoles working mode button on the toolbar to add a customized packet.2. From the AT console, click the Add new packet button in the Send packets dialog. TheAdd new packet dialog appears.3. Click the HEX tab and type the name of the data packet: GET_EXAMPLE.4. Copy and past the following text into the HEX input tab:44 01 C4 09 74 65 73 74 B7 65 78 61 6D 70 6C 65This is the CoAP protocol message decomposed by bytes to perform a GET request on anexample URI with a token test.5. Click Add packet.6. Click the Open button .7. Click Send selected packet. The message is sent to the public CoAP server configured inConfigure the device. A response appears in the Console log. Blue text is the query, red text isthe response.The payload is Get to uri: example, which specifies that this is a successful CoAP GET to URI endexample, which was specified in the query.Click the Close button to terminate the serial connection.Example: use Python to generate a CoAP messageThis example illustrates how the CoAP protocol can perform GET/POST/PUT/DELETE requestssimilarly to the HTTP protocol and how to do this using the XBee Smart Modem. In this example, theXBee Smart Modem talks to a CoAP Digi Server. You can use this client code to provide an abstractwrapper to generate a CoAP message that commands the XBee Smart Modem to talk to the remoteCoAP server.Note It is crucial to configure the XBee Smart Modem settings. See Configure the device and followthe steps. You can target the IP address to a different CoAP public server.1. Install Python 2.7. The Installation guide is located at: https://www.python.org/downloads/.2. Download and install the Coapthon library in the python environment fromhttps://pypi.python.org/pypi/CoAPthon.3. Download these two .txt files: Coap.txt and CoapParser.txt. After you download them, open thefiles in a text editor and save them as .py files.4. In the folder that you place the Coap.py and CoapParser.py files, press Shift +right-click andthen click Open command window.5. At the command prompt, type python Coap.py and press Enter to run the program.
Getting started with the XBee Smart Modem Development Kit Get started with CoAPDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 426. Type the USB port number that the XBee Smart Modem is connected to and press Enter. Onlythe port number is required, so if the port is COM19, type 19.Note If you do not know the port number, open XCTU and look at the XBee Smart Modem in the RadioModules list. This view provides the port number and baud rate, as in the figure below where the baudrate is 9600 b/s.7. Type the baud rate and press Enter. You must match the device's current baud rate.XCTUprovides the current baud rate in the BD Baud Rate field. In this example you would type9600.8. Press Yif you want an auto-generated example. Press Enter to build your own CoAP request.9. If you press Yit generates a message with:nMethod: POSTnURI: examplenpayload:hello worldntoken: testThe send and receive message must match the same token and message id. Otherwise, the client re-attempts the connection by sending out the request.In the following figure, the payload contains the server response to the query. It shows the results forwhen you press Enter rather than Y.
Getting started with the XBee Smart Modem Development Kit Get started with CoAPDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 43
Getting started with the XBee Smart ModemDevelopment KitConfigure the XBee Smart Modem using Digi RemoteManagerDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 44Configure the XBee Smart Modem using Digi Remote ManagerUse Digi Remote Manager (https://remotemanager.digi.com/) to perform the operations in thissection. Each operation requires that you enable Remote Manager with the DO command and thatyou connect the XBee Smart Modem to an access point that has an external Internet connection toallow access to Digi Remote Manager.Note Digi is consolidating our cloud services, Digi Device Cloud and Digi Remote Manager®, under theRemote Manager name. This phased process does not affect device functionality or the functionalityof the web services and other features. However, customers will find that some user interface andfirmware functionality mention both Device Cloud and Digi Remote Manager.Create a Remote Manager accountDigi Remote Manager is an on-demand service with no infrastructure requirements. Remote devicesand enterprise business applications connect to Remote Manager through standards-based webservices. This section describes how to configure and manage an XBee using Remote Manager. Fordetailed information on using Remote Manager, refer to the Remote Manager User Guide, availablevia the Documentation tab in Remote Manager.Before you can manage an XBee with Remote Manager, you must create a Remote Manager account.To create a Remote Manager account:1. Go to https://www.digi.com/products/cloud/digi-remote-manager.2. Click 30 DAYFREETRIAL/LOGIN.3. Follow the online instructions to complete account registration. You can upgrade yourDeveloper account to a paid account at any time.When you are ready to deploy multiple XBee Smart Modems in the field, upgrade your account toaccess additional Remote Manager features.Get the XBee Smart Modem IMEI numberBefore adding an XBee to your Remote Manager account inventory, you need to determine theInternational Mobile Equipment Identity (IMEI) number for the device. Use XCTUto view the IMEInumber by querying the IM parameter.Add a XBee Smart Modem to Remote ManagerTo add an XBee to your Remote Manager account inventory, follow these steps:Go to https://remotemanager.digi.com/.1. Log in to your account2. Click Device Management >Devices.3. Click Add Devices. The Add Devices dialog appears.4. Select IMEI#, and type or paste the IMEI number of the XBee you want to add. The IM(IMEI)command provides this number.
Getting started with the XBee Smart Modem Development Kit Software librariesDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 455. Click Add to add the device. The XBee is added to your inventory.6. Click OK to close the Add Devices dialog and return to the Devices view.Update the firmwareXBee Smart Modem supports Remote Manager firmware updates. To perform a firmware update, usethe following steps.1. Download the updated firmware file for your device from Digi's support site. This is a zip filecontaining .ebin and .mxi files for import.2. Unzip the file.3. In your Remote Manager account, click Device Management > Devices.4. Select the first device you want to update.5. To select multiple devices (must be of the same type), press the Control key and selectadditional devices.6. Click More in the Devices toolbar and select Update Firmware from the Update category ofthe More menu. The Update Firmware dialog appears.7. Click Browse to select the .ebin file that you unzipped earlier.8. Click Update Firmware. The updated devices automatically reboot when the updates arecomplete.Software librariesOne way to communicate with the XBee device is by using a software library. The libraries availablefor use with the XBee Smart Modem include:nXBee Java librarynXBee Python libraryThe XBee Java Library is a Java API. The package includes the XBee library, its source code and acollection of samples that help you develop Java applications to communicate with your XBee devices.The XBee Python Library is a Python API that dramatically reduces the time to market of XBeeprojects developed in Python and facilitates the development of these types of applications, making itan easy process.
Get started with MicroPythonThis guide provides an overview of how to use MicroPython with the XBee Smart Modem. For in-depthinformation and more complex code examples, refer to the Digi MicroPython Programming Guide.Continue with this guide for simple examples to get started using MicroPython on the XBee SmartModem.About MicroPython 47MicroPython on the XBee Smart Modem 47Use XCTU to enter the MicroPython environment 47Use the MicroPython Terminal in XCTU 48Example: hello world 48Example: turn on an LED 48Example: code a request help button 49Exit MicroPython mode 54Other terminal programs 54Use picocom in Linux 55Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 46
Get started with MicroPython About MicroPythonDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 47About MicroPythonMicroPython is an open-source programming language based on Python 3, with much of the samesyntax and functionality, but modified to fit on small devices with limited hardware resources, such asmicrocontrollers, or in this case, a cellular modem.Why use MicroPythonMicroPython enables on-board intelligence for simple sensor or actuator applications using digital andanalog I/O. MicroPython can help manage battery life. Cryptic readings can be transformed into usefuldata, excess transmissions can be intelligently filtered out, modern sensors and actuators can beemployed directly, and logic can glue inputs and outputs together in an intelligent way.For more information about MicroPython, see www.micropython.org.For more information about Python, see www.python.org.MicroPython on the XBee Smart ModemThe XBee Smart Modem has MicroPython running on the device itself. You can access a MicroPythonprompt from the XBee Smart Modem when you install it in an appropriate development board (XBDBor XBIB), and connect it to a computer via a USB cable.Note MicroPython does not work with SPI.The examples in this guide assume:nYou have XCTU on your computer. See Configure the device using XCTU.nYou have a terminal program installed on your computer. We recommend using the Use theMicroPython Terminal in XCTU. This requires XCTU 6.3.7 or higher.nYou have an XBee Smart Modem installed in an appropriate development board such as anXBIB-U-DEV or an XBIB-2.Note Most examples in this guide require the XBIB-U-DEV board.nThe XBee Smart Modem is connected to the computer via a USB cable and XCTU recognizes it.nThe board is powered by an appropriate power supply, 12 VDC and at least 1.1 A.Use XCTU to enter the MicroPython environmentTo use the XBee Smart Modem in the MicroPython environment:1. Use XCTU to add the device(s); see Configure the device using XCTU and Add a device.2. The XBee Smart Modem appears as a box in the Radio Modules information panel. Eachmodule displays identifying information about itself.3. Click this box to select the device and load its current settings.4. To set the device's baud rate to 115200 b/s, in the BD field select 115200 [7] and click theWrite button . We recommend using flow control to avoid data loss, especially when pastinglarge amounts of code/text.
Get started with MicroPython Use the MicroPython Terminal in XCTUDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 485. To put the XBee Smart Modem into MicroPython mode, in the APfield select MicroPythonREPL [4] and click the Write button .6. Note what COM port(s) the XBee Smart Modem is using, because you will need this informationwhen you use terminal communication.Use the MicroPython Terminal in XCTUYou can use the MicroPython Terminal to communicate with the XBee Smart Modem when it is inMicroPython mode.1This requires XCTU 6.3.7 or higher. To enter MicroPython mode, follow the stepsin Use XCTU to enter the MicroPython environment. To use the MicroPython Terminal:1. Click the Tools drop-down menu and select MicroPython Terminal. The terminal opens.2. Click Open.3. In the Select the Serial/USB port area, click the COM port that the device uses.4. Verify that the baud rate and other settings are correct.5. Click OK. The Open icon changes to Close , indicating that the device is properly connected.You can now type or paste MicroPython code in the terminal.Example: hello world1. At the MicroPython >>> prompt, type the Python command: print("Hello, World!")2. Press Enter to execute the command. The terminal echos back Hello, World!.Example: turn on an LED1. Note the DS4 LED on the XBIB board. The following image highlights it in a red box. The LED isnormally off.1See Other terminal programs if you do not use the MicroPython Terminal in XCTU.
Get started with MicroPython Example: code a request help buttonDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 492. At the MicroPython >>> prompt, type the commands below, pressing Enter after each one.After entering the last line of code, the LED illuminates. Anything after a #symbol is acomment, and you do not need to type it.Note You can easily copy and paste code from the online version of this Guide. Use caution with thePDF version, as it may not maintain essential indentations.import machinefrom machine import Pinled = Pin("D4", Pin.OUT, value=0) # Makes a pin object set to output 0.# One might expect 0 to mean OFF and 1 to mean ON, and this is normally thecase.# But the LED we are turning on and off is setup as what is# known as"active low".# This means setting the pin to 0 allows current to flow through the LED andthen through the pin, to ground.3. To turn it off, type the following and press Enter:led.value(1)You have successfully controlled an LED on the board using basic I/O!Example: code a request help buttonThis example provides a fast, deep dive into MicroPython designed to let you see some of the powerfulthings it can do with minimal code. It is not meant as a tutorial; for in-depth examples refer to the Digi
Get started with MicroPython Example: code a request help buttonDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 50MicroPython Programming Guide.Many stores have help buttons in their aisles that a customer can press to alert the store staff thatassistance is required in that aisle. You can implement this type of system using the Digi XBee SmartModem, and this example provides the building blocks for such a system. This example, based on SMSpaging, can have many other uses such as alerting someone with a text to their phone if a watersensor in a building detects water on the floor, or if a temperature sensor reports a value that is toohot or cold relative to normal operation.Enter MicroPython paste modeIn the following examples it is helpful to know that MicroPython supports paste mode, where you cancopy a large block of code from this user guide and paste it instead of typing it character by character.To use paste mode:1. Copy the code you want to run. For example, copy the following code that is the code from theLED example:from machine import Pinled = Pin("D4", Pin.OUT, value=0)Note You can easily copy and paste code from the online version of this Guide. Use caution with thePDF version, as it may not maintain essential indentations.2. In the terminal, at the MicroPython >>> prompt type Ctrl-+Eto enter paste mode. The terminaldisplays paste mode; Ctrl-C to cancel, Ctrl-D to finish.3. The code appears in the terminal occupying four lines, each line starts with its line number andthree =symbols. For example line 1 starts with 1===.4. If the code is correct, press Ctrl+Dto run the code and you should once again see the DS4 LEDturn on. If you get a Line 1 SyntaxError: invalid syntax error, see Syntax error at line 1.(If you wish to exit paste mode without running the code, for example, or if the code did notcopy correctly, press Ctrl+Cto cancel and return to the normal MicroPython >>> prompt).5. Next turn the LED off. Copy the code below:from machine import Pinled = Pin("D4", Pin.OUT, value=1)print("DS4 LED now OFF!")print("Paste Mode Successful!")6. Press Ctrl+Eto enter paste mode.7. Press Ctrl +Shift +Vor right-click in the Terminal and select Paste to paste the copied code.8. If the code is correct, press Ctrl+Dto run it. The LED should turn off and you should see twoconfirmation messages print to the screen.Catch a button pressFor this part of the example, you write code that responds to a button press on the XBIB-U-DEV boardthat comes with the XBee Smart Modem Development Kit. The code monitors the pin connected tothe button on the board labeled SW2.
Get started with MicroPython Example: code a request help buttonDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 51On the board you see DIO0 written below SW2, to the left of the button. This represents the pin thatthe button is connected to.In MicroPython, you will create a pin object for the pin that is connected to the SW2 button. When youcreate the pin object, the DIO0 pin is called D0 for short.The loop continuously checks the value on that pin and once it goes to 0(meaning the button has beenpressed) a print() call prints the message Button pressed! to the screen.At the MicroPython >>> prompt, copy the following code and enter it into MicroPython using pastemode and then run it:# Import the Pin module from machine, for simpler syntax.from machine import Pin# Create a pin object for the pin that the button "SW2" is connected to.dio0 = Pin("D0", Pin.IN, Pin.PULL_UP)# Give feedback to inform user a button press is needed.print("Waiting for SW2 press...")# Create a WHILE loop that checks for a button press.while (True):if (dio0.value() == 0): # Once pressed.print("Button pressed!") # Print message once pressed.break # Exit the WHILE loop.# When you press SW2, you should see "Button pressed!" printed to thescreen.# You have successfully performed an action in response to a button press!Note You can easily copy and paste code from the online version of this Guide. Use caution with thePDF version, as it may not maintain essential indentations.Note If you have problems pasting the code, see Syntax error at line 1. For SMS failures, see ErrorFailed to send SMS.
Get started with MicroPython Example: code a request help buttonDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 52Send a text (SMS) when the button is pressedAfter creating a while loop that checks for a button press, add sending an SMS to your code. Instead ofprinting Button pressed! to the screen, this code sends Button pressed to a cell phone as a text(SMS) message.To accomplish this, use the sms_send() method, which sends a string to a given phone number. Ittakes the arguments in the order of1. <phone number>2. <message-to-be-sent>Before you run this part of the example, you must create a variable that holds the phone number ofthe cell phone or mobile device you want to receive the SMS.1. To do this, at the MicroPython >>> prompt, type the following command, replacing 1123456789with the full phone number (no dashes, spaces, or other symbols) and press Enter:ph = 11234567892. After you create this ph variable with your phone number, copy the code below and enter itinto MicroPython using paste mode and then run it.from machine import Pinimport network # Import network moduleimport timec = network.Cellular() # initialize cellular network parameterdio0 = Pin("D0", Pin.IN, Pin.PULL_UP)while not c.isconnected(): # While no network connection.print("Waiting for connection to cell network...")time.sleep(5)print("Connected.")# Give feedback to inform user a button press is needed.print("Waiting for SW2 press...")while (True):if (dio0.value() == 0):# When SW2 is pressed, the module will send an SMS# message saying "Button pressed" to the given target cell phonenumber.try:c.sms_send(ph, 'Button Pressed')print("Sent SMS successfully.")except OSError:print("ERROR- failed to send SMS.")# Exit the WHILE loop.breakNote You can easily copy and paste code from the online version of this Guide. Use caution with thePDF version, as it may not maintain essential indentations.Note If you have problems pasting the code, see Syntax error at line 1. For SMS failures, see ErrorFailed to send SMS.
Get started with MicroPython Example: code a request help buttonDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 53Add the time the button was pressedAfter you add the ability to send an SMS to the code, add functionality to insert the time at which thebutton was pressed into the SMS that is sent. To accomplish this:1. Create a UDP socket with the socket() method.2. Save the IP address and port of the time server in the addr variable.3. Connect to the time server with the connect() method.4. Send hello to the server to prompt it to respond with the current date and time.5. Receive and store the date/time response in the buf variable.6. Send an SMSin the same manner as before using the sms_send() method, except that you addthe time into the SMS message, such that the message reads: [Button pressed at: YYYY-MM-DD HH:MM:SS]To verify that your phone number is still in the memory, at the MicroPython >>> prompt, type ph andpress Enter.If MicroPython responds with your number, copy the following code and enter it into MicroPythonusing paste mode and then run it. If it returns an error, enter your number again as shown in Send atext (SMS) when the button is pressed. With your phone number in memory in the ph variable, copythe code below and enter it into MicroPython using paste mode and then run it.from machine import Pinimport networkimport usocketimport timec = network.Cellular()dio0 = Pin("D0", Pin.IN, Pin.PULL_UP)while not c.isconnected(): # While no network connection.print("Waiting for connection to cell network...")time.sleep(5)print("Connected.")# Give feedback to inform user a button press is needed.print("Waiting for SW2 press...")while (1):if (dio0.value() == 0):# When button pressed, now the module will send "Button Press" AND# the time at which it was pressed in an SMS message to the given# target cell phone number.socketObject = usocket.socket(usocket.AF_INET, usocket.SOCK_DGRAM)# Connect the socket object to the web server specified in"address".addr = ("52.43.121.77", 10002)socketObject.connect(addr)bytessent = socketObject.send("hello")print("Sent %d bytes on socket" % bytessent)buf = socketObject.recv(1024)# Send message to the given number. Handle error if it occurs.try:c.sms_send(ph, 'Button Pressed at: ' + str(buf))print("Sent SMS successfully.")except OSError:print("ERROR- failed to send SMS.")
Get started with MicroPython Exit MicroPython modeDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 54# Exit the WHILE loop.breakNote You can easily copy and paste code from the online version of this Guide. Use caution with thePDF version, as it may not maintain essential indentations.Now you have a system based on the XBee Smart Modem that sends an SMS in response to a certaininput, in this case a simple button press.Note If you have problems pasting the code, see Syntax error at line 1. For SMS failures, see ErrorFailed to send SMS.Exit MicroPython modeTo exit MicroPython mode:1. In the XCTU MicroPython Terminal, click the green Close button .2. Click Close at the bottom of the terminal to exit the terminal.3. In XCTU's Configuration working mode , change AP API Enable to another mode and clickthe Write button . We recommend changing to Transparent mode [0], as most of theexamples use this mode.Other terminal programsIf you do not use the MicroPython Terminal in XCTU, you can use other terminal programs tocommunicate with the XBee Smart Modem. If you use Microsoft Windows, follow the instructions forTera Term, if you use Linux, follow the instructions for picocom. To download these programs:nTera Term for Windows; see https://ttssh2.osdn.jp/index.html.en.nPicocom for Linux; see https://developer.ridgerun.com/wiki/index.php/Setting_up_Picocom_-_Ubuntu and for the source code and in-depth information https://github.com/npat-efault/picocom.Tera Term for WindowsWith the XBee Smart Modem in MicroPython mode (AP =4), you can access the MicroPython promptusing a terminal.1. Open Tera Term. The Tera Term: New connection window appears.2. Click the Serial radio button to select a serial connection.3. From the Port: drop-down menu, select the COM port that the XBee Smart Modem isconnected to.4. Click OK. The COMxx - Tera Term VT terminal window appears and Tera Term attempts toconnect to the device at a baud rate of 9600 b/s. The terminal will not allow communicationwith the device since the baud rate setting is incorrect. You must change this rate as it was
Get started with MicroPython Use picocom in LinuxDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 55previously set to 115200 b/s.5. Click Setup and Serial Port. The Tera Term: Serial port setup window appears.6. In the Tera Term: Serial port setup window, set the parameters to the following values:nPort: Shows the port that the XBee Smart Modem is connected on.nBaud rate:115200nData: 8 bitnParity: nonenStop: 1 bitnFlow control: hardwarenTransmit delay: N/A7. Click OK to apply the changes to the serial port settings. The settings should go into effectright away.8. To verify that local echo is not enabled and that extra line-feeds are not enabled:a. In Tera Term, click Setup and select Terminal.b. In the New-line area of the Tera Term: Serial port setup window, click theReceive drop-down menu and select CR if it does not already show that value.c. Make sure the Local echo box is not checked.9. Click OK.10. Press Ctrl+Bto get the MicroPython version banner and prompt.Now you can type MicroPython commands at the >>> prompt.Use picocom in LinuxWith the XBee Smart Modem in MicroPython mode (AP =4), you can access the MicroPython promptusing a terminal.
Get started with MicroPython Use picocom in LinuxDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 56Note The user must have read and write permission for the serial port the XBee Smart Modem isconnected to in order to communicate with the device.1. Open a terminal in Linux and type picocom -b 115200 /dev/ttyUSB0. This assumes you haveno other USB-to-serial devices attached to the system.2. Press Ctrl+Bto get the MicroPython version banner and prompt. You can also press Enter tobring up the prompt.If you do have other USB-to-serial devices attached:1. Before attaching the XBee Smart Modem, check the directory /dev/ for any devices namedttyUSBx, where xis a number. An easy way to list these is to type: ls /dev/ttyUSB*. Thisproduces a list of any device with a name that starts with ttyUSB.2. Take note of the devices present with that name, and then connect the XBee Smart Modem.3. Check the directory again and you should see one additional device, which is the XBee SmartModem.4. In this case, replace /dev/ttyUSB0 at the top with /dev/ttyUSB<number>, where <number>is the new number that appeared.5. It should connect and show Terminal ready.Now you can type MicroPython commands at the >>> prompt.
Technical specificationsInterface and hardware specifications 58RF characteristics 58Networking specifications 58Power requirements 58Power consumption 59Electrical specifications 59Regulatory approvals 60Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 57
Technical specifications Interface and hardware specificationsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 58Interface and hardware specificationsThe following table provides the interface and hardware specifications for the device.Specification ValueDimensions 2.438 x 3.294 cm (0.960 x 1.297 in)Weight 5 g (0.18 oz)Operating temperature -40 to +80 °CAntenna connector U.FL for primary and secondary antennasDigital I/O 13 I/O linesADC 4 10-bit analog inputsRF characteristicsThe following table provides the RF characteristics for the device.Specification Cellular value BLE valueModulation LTE/4G – QPSK, 16 QAM QPSKTransmit power 23 dBm 9 dBmReceive sensitivity -102 dBm -92 dBmOver-the-air maximum data rate 10 Mb/s 2 Mb/sNetworking specificationsThe following table provides the networking and carrier specifications for the device.Specification ValueAddressing options TCP/IPand SMSCarrier and technology AT&T LTE Cat 1Supported bands 2, 4 and 12Security SSL/TLSPower requirementsThe following table provides the power requirements for the device.Specification ValueSupply voltage range 3.0 to 5.5 VDCExtended voltage range 2.7 to 5.5 VDC
Technical specifications Power consumptionDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 59Power consumptionSpecification StateAveragecurrentMeasured peakcurrent2.4 GHz TX Active transmit @ 3.3 V 70 mA2.4 GHz RX Active receive @ 3.3 V 30 mACellular Tx+RX current Active transmit, 23 dBm @ 3.3 V 860 mA 1020 mACellular Tx+RX current Active transmit, 23 dBm @ 5.0 V 555 mA 630 mACellular TX OnlycurrentActivetransmit,23dBm@3.3V 680 mA N/ACellular Rx + ACKcurrentActive receive @ 3.3 V 530 mA N/ACellular Rx + ACKcurrentActive receive @ 5 V 360 mA N/ACellular RX OnlycurrentActive receive @ 3.3 V 300 mA N/AIdle current Idle/connected, listening @ 3.3V110 mA N/AIdle current Idle/connected, listening @ 5 V 75 mA N/ASleep current Notconnected,DeepSleep@3.3V12 µA N/AElectrical specificationsThe following table provides the electrical specifications for the XBee Smart Modem.Symbol Parameter Condition Min Typical Max UnitsVCCMAX Maximum limitsof VCC line0 5.5 VVDD_IO Internal supplyvoltage for I/OWhile in deep sleep andduring initial power upMin(VCC-0.3,3.3)3.3 VVDD_IO Internal supplyvoltage for I/OIn normal running mode 3.3 V V
Technical specifications Regulatory approvalsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 60Symbol Parameter Condition Min Typical Max UnitsVI Voltage on 5 Vtolerant pinsXBee pin 6 0.3 Min(5.25,VDD_IO+2)1VOther input pins 0.3 VDD_IO +0.3VVIL Input low voltage 0.3*VDD_IO VVIH Input highvoltage0.7*VDD_IOVVOL Voltage outputlowSinking 3 mA VDD_IO = 3.3 V 0.2*VDD_IO VVOH Voltage outputhighSourcing 3 mA VDD_IO = 3.3V0.8*VDD_IOVI_IN Input leakagecurrentHigh Z state I/O connectedto Ground or VDD_IO0.1 100 nARPU Internal pull-upresistorEnabled 40 kΩRPD Internal pull-down resistorEnabled 40 kΩRegulatory approvalsThe following table provides the regulatory and carrier approvals for the device.Specification ValueModel XB3C1United States FCC ID: MCQ-XB3C1Contains FCC ID:RI7XE866A1NAContains IC: 1846A-XB3C1 IC: 1846A-XB3C1Contains IC: 5131A-XE866A1NAEurope (CE) N/ARoHS Lead-free and RoHS compliantAustralia N/AVerizon end-device certified NoAT&T end-device certified YesPTCRB end-device certified Yes1Pin 6 is also 5 V tolerant even when the XBee Smart Modem is not powered. We recommend only driving thispin with 3.3 V for compatibility with other XBee products. The VBUS line is not used to enable/disable USB onthis product.
HardwareMechanical drawings 62Pin signals 62RSSI PWM 64SIM card 64The Associate LED 64Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 61
Hardware Mechanical drawingsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 62Mechanical drawingsThe following figures show the mechanical drawings for the XBee Smart Modem. All dimensions are ininches.Pin signalsThe pin locations are:
Hardware Pin signalsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 63The following table shows the pin assignments for the through-hole device. In the table, low-assertedsignals have a horizontal line above signal name.Pin Name Direction Default DescriptionPin Name Direction Default Description1VCC Power supply2 DOUT Output Output UART Data Out3DIN / CONFIG Input Input UART Data In4 DIO12 / SPI_MISO Either Disabled Digital I/O 12 or SPI Slave Output line5 RESET Input6 PWM0 / RSSI /DIO10/USB_VBUSEither Output PWM Output 0 / RX Signal Strength Indicator /Digital I/O 107 DIO11/USB D+ Either Disabled Digital I/O 11 or USB D+ line8 USB D- Direct USB D- line9DTR / SLEEP_RQ/DIO8Either Disabled Pin Sleep Control Line or Digital I/O 810 GND Ground11 DIO4 / SPI_MOSI Either Disabled Digital I/O 4 or SPI Slave Input Line12 CTS / DIO7 Either Output Output Clear-to-Send Flow Control or Digital I/O 713 ON /SLEEP/DIO9 Output Output Module Status Indicator or Digital I/O 914 VREF - Feature not supported on this device. Used onother XBee devices for analog voltage reference.15 Associate / DIO5 Either Output Associated Indicator, Digital I/O 516 RTS / DIO6 Either Disabled Input Request-to-Send Flow Control, Digital I/O 617 AD3/DIO3/SPI_SSEither Disabled Analog Input 3 or Digital I/O 3, SPI low enabledselect line18 AD2 / DIO2 / SPI_CLKEither Disabled Analog Input 2 or Digital I/O 2, SPI Clock line19 AD1/DIO1/ SPI_ATTNEither Disabled Analog Input 1 or Digital I/O 1, SPI Attention lineoutput20 AD0/DIO0 Either Input Analog Input 0, Digital I/O 0Pin connection recommendationsThe recommended minimum pin connections are VCC, GND, DIN, DOUT, RTS, DTR and RESET.Firmware updates require access to these pins.To ensure compatibility with future updates, make USB D+ and D- (pin 7 and pin 8) available in yourdesign.
Hardware RSSI PWMDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 64RSSI PWMThe XBee Smart Modem features an RSSI/PWM pin (pin 6) that, if enabled, adjusts the PWM output toindicate the signal strength of the cellular connection. Use P0 (DIO10/PWM0 Configuration) to enablethe RSSI pulse width modulation (PWM) output on the pin. If P0 is set to 1, the RSSI/PWM pin outputs aPWM signal where the frequency is adjusted based on the received signal strength of the cellularconnection.The RSSI/PWM output is enabled continuously unlike other XBee products where the output is enabledfor a short period of time after each received transmission. If running on the XBIB development board,DIO10 is connected to the RSSI LEDs, which may be interpreted as follows:PWM duty cycleNumber of LEDs turnedon Received signal strength (dBm)79.39% or more 3 -83 dBm or higher62.42% to79.39%2 -93 to -83 dBm45.45% to62.42%1 -103 to -93 dBmLess than45.45%0Less than -103 dBm, or no cellular networkconnectionSIM cardThe XBee Smart Modem uses a 4FF (Nano) size SIM card.CAUTION! Never insert or remove SIM card while the power is on!The Associate LEDThe following table describes the Associate LED functionality. For the location of the Associate LED onthe XBIB-U development board, see number 6 on the XBIB-U-DEV reference.LED statusBlinktiming MeaningOn, solid Not joined to a mobile network.Double blink ½second The last TCP/UDP/SMS attempt failed. If the LED has this pattern,you may need to check DI (Device Cloud Indicator) or CI(Protocol/Connection Indication) for the cause of the error.Standardsingleblink 1second Normal operation.The normal association LED signal alternates evenly between high and low as shown below:
Hardware The Associate LEDDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 65Where the low signal means LED off and the high signal means LED on.When CI is not 0or 0xFF, the Associate LED has a different blink pattern that looks like this:
Antenna recommendationsAntenna connections 67Antenna placement 68Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 66
Antenna recommendations Antenna connectionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 67Antenna connectionsCAUTION! The XBee Smart Modem will not function properly with only the secondaryantenna port connected!The XBee Smart Modem has two U.FL antenna ports; a primary on the upper left of the board and asecondary port on the upper right, see the drawing below. You must connect the primary port and thesecondary port is optional. The secondary antenna improves receive performance in certainsituations, so we recommend it for best results.See FCC-approved antennas for a list of approved antennas.
Antenna recommendations Antenna placementDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 68Connect the antenna cables as shown below.WARNING! Cable directions matter. Do not cover the integrated antenna areas (the redsquares below) with cables. The left cable can travel up or down only.Antenna placementFor optimal cellular reception, keep the antenna as far away from metal objects and other electronics(including the XBee Smart Modem) as possible. Often, small antennas are desirable, but come at thecost of reduced range and efficiency.
Design recommendationsCellular component firmware upgrades 70USB Direct design 70Power supply considerations 70Add a capacitor to the RESET line 70Heat considerations and testing 71Heat sink guidelines 71Add a fan to provide active cooling 73Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 69
Design recommendations Cellular component firmware upgradesDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 70Cellular component firmware upgradesEven if you do not plan to use the USB interface, we strongly recommend you provide a way to accessthe USB to support direct firmware upgrades of the cellular modem.One way to provide access to the USB interface is to connect XBee pins 6, 7, and 8, and 10 to anunpopulated USB connector; see USB Direct design for more information. At a minimum you shouldconnect pins 7 and 8 to test points so they are easy to wire to a connector if necessary.If you are using pins 6, 7, and 8 for other purposes you must provide a way to disconnect thoseinterfaces during USB operation, such as using zero ohm resistors.USB Direct designConnect USB data pins 7 and 8 (USB_D+ and USB_D- respectively) on the XBee Smart Modem to theappropriate pins on the host processor or connector. You may optionally connect pin 6 to VBUS if youwant USB to be enabled based on whether your host is connected. Alternatively, you may configureVBUS in software; see USB direct mode for more details. VBUS is only used as a reference, not forpowering anything on the XBee Smart Modem, so it may be routed as a standard signal trace.The USB interface follows the USB 2.0 high speed specification and data lines must be designed as a90 Ωdifferential pair. Both traces should be the same length and the overall trace length should bekept as short as possible. If you are connecting to a USB connector then we recommend that youemploy an ESD suppressor appropriate for USB 2.0 HS (for example the Littelfuse PESD0402-140).Other than the ESD suppressor, do not place additional components in the signal paths. Thesuppressor is not needed if you are connecting to an on-board host processor.Power supply considerationsWhen considering a power supply, use the following design practices.1. Power supply ripple should be less than 75 mV peak to peak.2. The power supply should be capable of providing a minimum of 1.5 A at 3.3 V (5 W). Keep inmind that operating at a lower voltage requires higher current capability from the powersupply to achieve the 5 W requirement.3. Place sufficient bulk capacitance on the XBee VCC pin to maintain voltage above the minimumspecification during inrush current. Inrush current is about 2 A during initial power up of cellularcommunications and wakeup from sleep mode.4. Place smaller high frequency ceramic capacitors very close to the XBee Smart Modem VCC pinto decrease high frequency noise.5. Use a wide power supply trace or power plane to ensure it can handle the peak currentrequirements with minimal voltage drop. We recommend that the power supply and trace bedesigned such that the voltage at the XBee VCC pin does not vary by more than 0.1 V betweenlight load (~0.5 W) and heavy load (~3 W).Add a capacitor to the RESET lineIn high EMI noise environments, we recommend adding a 10 nF ceramic capacitor very close to pin 5.
Design recommendations Heat considerations and testingDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 71Heat considerations and testingThe XBee Smart Modem may generate significant heat during sustained operation. In addition toheavy data transfer, other factors that can contribute to heating include ambient temperature, airflow around the device, and proximity to the nearest cellular tower (the XBee Smart Modem musttransmit at a higher power level when communicating over long distances). Overheating can causedevice malfunction and potential damage. In order to avoid this it is important to consider theapplication the XBee Smart Modem is going into and mitigate heat issues if necessary. We recommendthat you perform thermal testing in your application to determine the resulting steady statetemperature of the XBee Smart Modem. Use TP (Temperature) to estimate the device temperature.Convert the TP reading from hex format to decimal.You also need to know the ambient temperature and the average current consumption during yourtest. If you do not have a way to measure current consumption you can estimate it from the table inthe next section.Use those results to approximate the maximum safe ambient temperature for the XBee SmartModem, TMAX,amb, with the following equation:Where:TXBee is the steady state temperature of the XBee Smart Modem that you measured during your test(if using the TP command, be sure to convert from hex format to decimal).Tamb,test is the ambient air temperature during your test.IAVG,test is the average current measured during your test.IMAX is the average current draw expected for your application when transmitting at maximum RFpower; see Power consumption.Heat sink guidelinesBased on the results of your thermal testing you may find it is advisable or required to implement amethod of dissipating excess heat. This section explains how to employ a heat sink on top of the XBee
Design recommendations Heat sink guidelinesDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 72Smart Modem.A bolt-down style heat sink on top of the XBee Smart Modem provides the best performance. Anexample part number is Advanced Thermal Solutions ATS-PCBT1084/ATS-PCB1084. You must use anelectrically non-conductive thermal gasket on top of the XBee device under the area that will becovered by the heat sink. A thermal gasket such as Gap Pad® 2500S20 is suitable for this purpose. Werecommend using a gasket with thickness of at least 0.080 in to ensure that components on top ofthe XBee device do not tear through the material when pressure is applied to the heat sink.Install the SIM card prior to placement of the heat sink. Position the thermal gasket and heat sinkassembly on the top of the device so that it covers the entire section shown inside the blue box below(covering the RF shield with thermal gasket is optional because the RF shield is allowed to directlycontact the heat sink). Do not cover the U.FL connectors.When attaching to the host PCB, tighten the mounting hardware until the gasket is compressed atleast 25% and the heat sink is snug against the RF shield. Avoid overtightening. To prevent shorting,check that the surface of the heat sink does not directly contact any of the XBee device components.The following table provides a list of typical scenarios and the maximum ambient temperature atwhich the XBee Smart Modem can be safely operated under that condition. These are provided only asguidelines as your results will vary based on application. We recommend that you perform sufficienttesting, as explained in Heat considerations and testing, to ensure that the XBee Smart Modem doesnot exceed temperature specifications.ScenarioAveragecurrentconsumption(VCC = 3.3V) Example applicationPeak dataconsumed(MB/hr)Maximum safeambient temperatureNoheatsinkHeatsink(bolt-downstyle)HeatsinkandfanMaximumtransmissionduty cycle950 mA Running video camera 500 to2000N/A 49 C 70 C50% duty cycle 475 mA Running low resolutionvideo camera200 to 400 TBD 65 C 75 C
Design recommendations Add a fan to provide active coolingDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 73ScenarioAveragecurrentconsumption(VCC = 3.3V) Example applicationPeak dataconsumed(MB/hr)Maximum safeambient temperatureNoheatsinkHeatsink(bolt-downstyle)Heatsinkandfan20% duty cycle 200 mA Sending high resolutionphoto less than onceper minute50 to 150 TBD 74 C 78 CDevice awake,limitedtransmissions170 mA Updating traffic sign 1 to 10 TBD 75 C 80 CDevice primarilyasleep, verylimitedtransmissions20 mA Small datatransmission/receptionswhich occur once perhourLess than0.180 C 80 C 80 CAdd a fan to provide active coolingAnother option for heat mitigation is to add a fan to your system to provide active cooling. You can usea fan instead of or in addition to a heat sink. The XBee Smart Modem offers a fan control feature onI/O pin DIO11 (pin 7). When the functionality is enabled, that line is pulled high to indicate when the fanshould be turned on. The line is pulled high when the device gets above 70 °C and the cellularcomponent is running, and turns off when the device drops below 65 °C.To enable the functionality set P1 (DIO11/PWM1 Configuration) to 1. Note that the I/O pin is notcapable of driving a fan directly; you must implement a circuit to power the fan from a suitable powersource.
Cellular connection processConnecting 75Cellular network 75Data network connection 75Data communication with remote servers (TCP/UDP) 75Disconnecting 75SMS encoding 76Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 74
Cellular connection process ConnectingDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 75ConnectingIn normal operations, the XBee Smart Modem automatically attempts both a cellular networkconnection and a data network connection on power-up. The sequence of these connections is asfollows:Cellular network1. The device powers on.2. It looks for cellular towers.3. It chooses a candidate tower with the strongest signal.4. It negotiates a connection.5. It completes cellular registration; the phone number and SMS are available.Data network connection1. The network enables the evolved packet system (EPS) bearer with an access point name(APN). See AN (Access Point Name) if you have APNissues. You can use OA (Operating APN) toquery the APN value currently configured in the cellular component.2. The device negotiates a data connection with the access point.3. The device receives its IP configuration and address.4. The AI (Association Indication) command now returns a 0and the sockets become available.Data communication with remote servers (TCP/UDP)Once the data network connection is established, communication with remote servers can beinitiated in several ways:nTransparent mode data sent to the serial port (see TD (Text Delimiter) and RO (PacketizationTimeout) for timing).nAPI mode: Transmit (TX) Request: IPv4 - 0x20 received over the serial connection.nDigi Remote Manager connectivity begins.Data communication begins when:1. A socket opens to the remote server.2. Data is sent.Data connectivity ends when:1. The server closes the connection.2. The TM timeout expires (see TM (IP Client Connection Timeout)).3. The cellular network may also close the connection after a timeout set by the networkoperator.DisconnectingWhen the XBee Smart Modem is put into Airplane mode or deep sleep is requested:
Cellular connection process SMS encodingDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 761. Sockets are closed, cleanly if possible.2. The cellular connection is shut down.3. The cellular component is powered off.Note We recommend entering Airplane mode before resetting or rebooting the device to allow thecellular module to detach from the network.SMS encodingThe XBee Smart Modem transmits SMS messages using the standard GSM 03.38 character set.1Because this character set only provides 7 bits of space per character, the XBee Smart Modemignores the most significant bit of each octet in an SMS transmission payload.The device converts incoming SMS messages to ASCII. Characters that cannot be represented inASCIIare replaced with a space (' ', or 0x20 in hex). This includes emoji and other special characters.1Also referred to as the GSM 7-bit alphabet.
ModesSelect an operating mode 78Transparent operating mode 79API operating mode 79Bypass operating mode 79USB direct mode 80Command mode 80Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 77
Modes Select an operating modeDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 78Select an operating modeThe XBee Smart Modem interfaces to a host device such as a microcontroller or computer through alogic-level asynchronous serial port. It uses a UART for serial communication with those devices.The XBee Smart Modem supports three operating modes: Transparent operating mode, APIoperatingmode, and Bypass operating mode. The default mode is Transparent operating mode. Use the AP (APIEnable) command to select a different operating mode.The following flowchart illustrates how the modes relate to each other.
Modes Transparent operating modeDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 79Transparent operating modeDevices operate in this mode by default. The device acts as a serial line replacement when it is inTransparent operating mode. The device queues all serial data it receives through the DIN pin for RFtransmission. When a device receives RF data, it sends the data out through the DOUT pin. You can setthe configuration parameters using Command mode.The IP (IP Protocol) command setting controls how Transparent operating mode works for the XBeeSmart Modem.Note Transparent operation is not available when using SPI.API operating modeAPI operating mode is an alternative to Transparent operating mode. API mode is a frame-basedprotocol that allows you to direct data on a packet basis. The device communicates UART or SPI datain packets, also known as API frames. This mode allows for structured communications withcomputers and microcontrollers.The advantages of APIoperating mode include:nIt is easier to send information to multiple destinationsnThe host receives the source address for each received data framenYou can change parameters without entering Command modeBypass operating modeCAUTION! Bypass operating mode is an alternative to Transparent and API modes foradvanced users with special configuration needs. Changes made in this mode mightchange or disable the device and we do not recommended it for most users.In Bypass mode, the device acts as a serial line replacement to the cellular component. In this mode,the XBee Smart Modem exposes all control of the cellular component's AT port through the UART. Ifyou use this mode, you must setup the cellular modem directly to establish connectivity. The modemdoes not automatically connect to the network.Note The cellular component can become unresponsive in Bypass mode. See Unresponsive cellularcomponent in Bypass mode for help in this situation.When Bypass mode is active, most of the XBee Smart Modem's AT commands do not work. Forexample, IM (IMEI)may never return a value, and DB does not update. In this configuration, thefirmware does not test communication with the cellular component (which it does by sending ATcommands). This is useful in case you have reconfigured the cellular component in a way that makes itincompatible with the firmware. Bypass operating mode exists for users who wish to communicatedirectly with the cellular component settings and do not intend to use XBee Smart Modem softwarefeatures such as API mode.Command mode is available while in Bypass mode; see Enter Command mode for instructions.Enter Bypass operating modeTo configure a device for Bypass operating mode:
Modes USB direct modeDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 801. Set the AP (API Enable) parameter value to 5.2. Send WR command to write the changes.3. Send FR (Force Reset) to reboot the device.4. After rebooting, enter Command mode and verify that Bypass operating mode is active byquerying AI (Association Indication) and confirming that it returns a value of 0x2F.It may take a moment for Bypass operating mode to become active.Leave Bypass operating modeTo configure a device to leave Bypass operating mode:1. Set AP (API Enable) to something other than 5.2. Send WR command to write the changes.3. Send FR (Force Reset) to reboot the device.4. After rebooting, enter Command mode and verify that Bypass operating mode is not active byquerying AI (Association Indication) and confirming that it returns a value other than 0x2F.Restore cellular settings to default in Bypass operating modeSend AT&F1 to reset the cellular component to its factory profile.USB direct modeThis mode allows you to replace the cellular component with the XBee Smart Modem such that theUSB lines are the same through a configuration option.Enable USB direct modeSet P1 (DIO11/PWM1 Configuration) to 7to enable USB direct mode. When set to 7DIO11/PWM1 (pin7) brings out the USB D+ signal of the cellular component. The USB D- signal is available on pin 8. Withthese pins connected to a USB host a direct connection is made to the cellular component which is notmediated by the XBee processor.When in USB direct mode AI (Association Indication) returns 0x2B.Command modeCommand mode is a state in which the firmware interprets incoming characters as commands. Itallows you to modify the device’s configuration using parameters you can set using AT commands.When you want to read or set any parameter of the device when operating in Transparent mode, youhave to enter Command mode and send an AT command. Every AT command starts with the lettersAT followed by the two characters that identify the command and then by some optional configurationvalues.The three operating modes are controlled by the AP (API Enable) setting, but Command mode isalways available as a mode the XBee Smart Modem can enter while configured for any of theoperating modes.Command mode is available on the UART interface in both Transparent and API modes. You cannotuse the SPI interface to enter Command mode.
Modes Command modeDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 81Enter Command modeTo get a device to switch into this mode, you must issue the following sequence: +++ within onesecond. There must be at least one second preceding and following the +++ sequence. Both thecommand character (CC) and the silence before and after the sequence (GT) are configurable. Whenthe device sees a full second of silence in the data stream (the guard time, GT) followed by the string+++ (without Enter or Return) and another full second of silence, it knows to stop sending data andstart accepting commands locally.Note Do not press Return or Enter after typing +++ because it will interrupt the guard time silenceand prevent you from entering Command mode.When the device is in Command mode, it listens for user input and is able to receive AT commands onthe UART. If CT time (default is 10 seconds) passes without any user input, the device drops out ofCommand mode and returns to the previous operating mode (Transparent, Bypass, API, Python, andso forth).You can customize the command character, the guard times and the timeout in the device’sconfiguration settings. For more information, see CC (Command Sequence Character),CT (CommandMode Timeout) and GT (Guard Times).TroubleshootingFailure to enter Command mode is often due to baud rate mismatch. Ensure that the baud rate of theconnection matches the baud rate of the device. By default, the BD parameter = 3 (9600 b/s).There are two alternative ways to enter Command mode:nA serial break for six seconds enters Command mode. The "break" command can be issuedfrom a serial console, and is often a button or menu item.nAsserting DIN (serial break) upon power up or reset enters Command mode. XCTU guides youthrough a reset and automatically issues the break when needed.Both of these methods temporarily set the device's baud rate to 9600 and return an OK on the UARTto indicate that Command mode is active. When Command mode exits, the device returns to normaloperation at the baud rate the BD parameter is set to.Send AT commandsOnce the device enters Command mode, use the syntax in the following figure to send AT commands.Every AT command starts with the letters AT, which stands for "attention." The AT is followed by twocharacters that indicate which command is being issued, then by some optional configuration values.To read a parameter value stored in the device’s register, omit the parameter field.The preceding example changes the IP protocol to SMS.
Modes Command modeDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 82Multiple AT commandsYou can send multiple AT commands at a time when they are separated by a comma in Commandmode; for example, ATSH,SL.Parameter formatRefer to the list of AT commands for the format of individual AT command parameters. Valid formatsfor hexidecimal values include with or without a leading 0x for example FFFF or 0xFFFF.Response to AT commandsWhen reading parameters, the device returns the current parameter value instead of an OK message.Apply command changesAny changes you make to the configuration command registers using AT commands do not take effectuntil you apply the changes. For example, if you send the BD command to change the baud rate, theactual baud rate does not change until you apply the changes. To apply changes:1. Send the AC (Apply Changes) command.or:2. Exit Command mode.Make command changes permanentIssue a WR command command to save the changes. WR writes parameter values to non-volatilememory so that parameter modifications persist through subsequent resets.Exit Command mode1. Send CN command followed by a carriage return.or:2. If the device does not receive any valid AT commands within the time specified by CT(Command Mode Timeout), it returns to the mode that the device was last in.
Sleep modesAbout sleep modes 84Normal mode 84Pin sleep mode 84Cyclic sleep mode 84Cyclic sleep with pin wake up mode 84Airplane mode 84Connected sleep mode 84The sleep timer 85MicroPython sleep behavior 85Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 83
Sleep modes About sleep modesDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 84About sleep modesA number of low-power modes exist to enable devices to operate for extended periods of time onbattery power. Use SM (Sleep Mode) to enable these sleep modes.Normal modeSet SM to 0 to enter Normal mode.Normal mode is the default sleep mode. If a device is in this mode, it does not sleep and is alwaysawake.Devices in Normal mode are typically mains powered.Pin sleep modeSet SM to 1 to enter pin sleep mode.Pin sleep allows the device to sleep and wake according to the state of the SLEEP_RQ pin (SLEEP_RQ).When you assert SLEEP_RQ (high), the device finishes any transmit or receive operations, closes anyactive connection, and enters a low-power state.When you de-assert SLEEP_RQ (low), the device wakes from pin sleep.Cyclic sleep modeSet SM to 4 to enter Cyclic sleep mode.Cyclic sleep allows the device to sleep for a specific time and wake for a short time to poll.If you use the D7 command to enable hardware flow control, the CTS pin asserts (low) when thedevice wakes and can receive serial data, and de-asserts (high) when the device sleeps.Cyclic sleep with pin wake up modeSet SM to 5 to enter Cyclic sleep with pin wake up mode.This mode is a slight variation on Cyclic sleep mode (SM = 4) that allows you to wake a deviceprematurely by de-asserting the SLEEP_RQ pin (SLEEP_RQ).In this mode, you can wake the device after the sleep period expires, or if a high-to-low transitionoccurs on the SLEEP_RQ pin.Airplane modeWhile not technically a sleep mode, airplane mode is another way of saving power. When set, thecellular component of the XBee Smart Modem is fully turned off and no access to the cellular networkis performed or possible. Use AM (Airplane Mode) to configure this mode.Connected sleep modeXBee Smart Modem hardware part number XB3-C-A1-UT-xxx can enter Connected sleep mode.Set bit 0 of SO (Sleep Options) for connected sleep. When bit 0 is set and the XBee Smart Modem goesto sleep, instead of the cellular component shutting down, it enters a lower power consumption modethat maintains registration with the cellular network. This allows significantly faster resumption ofcommunications when coming out of sleep at the cost of additional power used.
Sleep modes The sleep timerDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 85Connected sleep mode draws 9 mA during sleep and 11 mA average over time (including periodicallywaking up to maintain connection).The sleep timerIf the device receives serial or RF data in Cyclic sleep mode and Cyclic sleep with pin wake up modes(SM = 4 or SM = 5), it starts a sleep timer (time until sleep).nUse ST (Wake Time) to set the duration of the timer.nWhen the sleep timer expires the device returns to sleep.MicroPython sleep behaviorWhen the XBee Smart Modem enters deep sleep mode, any MicroPython code currently executing issuspended until the device comes out of sleep. When the XBee Smart Modem comes out of sleepmode, MicroPython execution continues where it left off.Upon entering deep sleep mode, the XBee Smart Modem closes any active UDP connections and turnsoff the cellular component. As a result, any sockets that were opened in MicroPython prior to sleepreport as no longer being connected. This behavior appears the same as a typical socketdisconnection event will:nsocket.send raises OSError: ENOTCONNnsocket.sendto raises OSError: ENOTCONNnsocket.recv returns the empty string, the traditional end-of-file return valuensocket.recvfrom returns an empty message, for example:(b'', (<address from connect()>, <port from connect()>) )The underlying UDP socket resources have been released at this point.
Serial communicationSerial interface 87Serial data 87UART data flow 87Serial buffers 87CTS flow control 88RTS flow control 88Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 86
Serial communication Serial interfaceDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 87Serial interfaceThe XBee Smart Modem interfaces to a host device through a serial port. The device can communicatethrough its serial port with:nThrough logic and voltage compatible universal asynchronous receiver/transmitter (UART).nThrough a level translator to any serial device, for example, through an RS-232 or USBinterface board.nThrough a serial peripheral interface (SPI) port.Serial dataA device sends data to the XBee Smart Modem's UART through pin 3 DIN as an asynchronous serialsignal. When the device is not transmitting data, the signals should idle high.For serial communication to occur, you must configure the UART of both devices (the microcontrollerand the XBee Smart Modem) with compatible settings for the baud rate, parity, start bits, stop bits,and data bits.Each data byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit (high).The following diagram illustrates the serial bit pattern of data passing through the device. Thediagram shows UART data packet 0x1F (decimal number 31) as transmitted through the device.You can configure the UART baud rate, parity, and stop bits settings on the device with the BD,NB,and SB commands respectively. For more information, see Serial interfacing commands.In the rare case that a device has been configured with the UART disabled, you can recover the deviceto UART operation by holding DIN low at reset time. DIN forces a default configuration on the UART at9600 baud and it brings the device up in Command mode on the UART port. You can then send theappropriate commands to the device to configure it for UART operation. If those parameters arewritten, the device comes up with the UART enabled on the next reset.UART data flowDevices that have a UART interface connect directly to the pins of the XBee Smart Modem as shown inthe following figure. The figure shows system data flow in a UART-interfaced environment. Low-asserted signals have a horizontal line over the signal name.Serial buffersThe XBee Smart Modem maintains internal buffers to collect serial and RF data that it receives. Theserial receive buffer collects incoming serial characters and holds them until the device can processthem. The serial transmit buffer collects the data it receives via the RF link until it transmits that dataout the serial or SPI port.
Serial communication CTS flow controlDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 88CTS flow controlWe strongly encourage you to use flow control with the XBee Smart Modem to prevent bufferoverruns.CTS flow control is enabled by default; you can disable it with D7 (DIO7/CTS). When the serial receivebuffer fills with the number of bytes specified by FT (Flow Control Threshold), the device de-assertsCTS (sets it high) to signal the host device to stop sending serial data. The device re-asserts CTS whenless than FT-32 bytes are in the UART receive buffer.Note Serial flow control is not possible when using the SPI port.RTS flow controlIf you set D6 (DIO6/RTS) to enable RTS flow control, the device does not send data in the serialtransmit buffer out the DOUT pin as long as RTS is de-asserted (set high). Do not de-assert RTS forlong periods of time or the serial transmit buffer will fill.
AT commandsMicroPython commands 90Special commands 91Cellular commands 92Network commands 95Addressing commands 97Serial interfacing commands 100I/O settings commands 102I/O sampling commands 110Sleep commands 110Command mode options 112Firmware version/information commands 112Diagnostic interface commands 114Execution commands 116Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 89
AT commands MicroPython commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 90MicroPython commandsThe following commands relate to using MicroPython on the XBee Smart Modem.PS (Python Startup)Sets whether or not the XBee Smart Modem runs the stored Python code at startup.Range0 - 1Parameter Description0 Do not run stored Python code at startup.1 Run stored Python code at startup.Default0PY (MicroPython Command)Interact with the XBee Smart Modem using MicroPython. PY is a command with sub-commands.These sub-commands are arguments to PY.PYC(Code Report)You can store compiled code in flash using the Ctrl-F command from the MicroPython REPL; refer tothe Digi MicroPython Programming Guide. The PYC sub-command reports details of the stored code.In Command mode, it returns three lines of text, for example:source: 1662 bytes (hash=0xC3B3A813)bytecode: 619 bytes (hash=0x0900DBCE)compiled: 2017-05-09T15:49:44The messages are:nsource: the size of the source code used to generate the bytecode and its 32-bit hash.nbytecode:the size of bytecode stored in flash and its 32-bit hash. A size of 0indicates thatthere is no stored code.ncompiled:a compilation timestamp. A timestamp of 2000-01-01T00:00:00 indicates that theclock was not set during compilation.In API mode, PYC returns five 32-bit big-endian values:nsource sizensource hashnbytecode sizenbytecode hashntimestamp as seconds since 2000-01-01T00:00:00
AT commands Special commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 91PYD (Delete Code)PYDinterrupts any running code, erases any stored code and then does a soft-reboot on theMicroPython subsystem.PYV (Version Report)Report the MicroPython version.PY^ (Interrupt Program)Sends KeyboardInterrupt to MicroPython. This is useful if there is a runaway MicroPython programand you have filled the stdin buffer. You can enter Command mode (+++) and send ATPY^ to interruptthe program.DefaultN/ASpecial commandsThe following commands are special commands.AC (Apply Changes)Immediately applies new settings without exiting Command mode.Applying changes means that the device re-initializes based on changes made to its parameter values.Once changes are applied, the device immediately operates according to the new parameter values.This behavior is in contrast to issuing the WR (Write) command. The WR command saves parametervalues to non-volatile memory, but the device still operates according to previously saved values untilthe device is rebooted or you issue the CN (Exit AT Command Mode) or AC commands.Parameter rangeN/ADefaultN/AFR (Force Reset)Resets the device. The device responds immediately with an OK and performs a reset 100 ms later.If you issue FR while the device is in Command Mode, the reset effectively exits Command mode.Note We recommend entering Airplane mode before resetting or rebooting the device to allow thecellular module to detach from the network.Parameter rangeN/ADefaultN/A
AT commands Cellular commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 92RE commandRestore device parameters to factory defaults.The RE command does not write restored values to non-volatile (persistent) memory. Issue the WR(Write) command after issuing the RE command to save restored parameter values to non-volatilememory.Parameter rangeN/ADefaultN/AWR commandWrites parameter values to non-volatile memory so that parameter modifications persist throughsubsequent resets.Note Once you issue a WR command, do not send any additional characters to the device until afteryou receive the OK response.Parameter rangeN/ADefaultN/ACellular commandsThe following AT commands are cellular configuration and data commands.PH (Phone Number)Reads the SIM card phone number. If PH is blank, the XBee Smart Modem is not registered to thenetwork.Parameter rangeN/ADefaultSet by the cellular carrier via the SIM cardS# (ICCID)Reads the Integrated Circuit Card Identifier (ICCID) of the inserted SIM.Parameter rangeN/ADefaultSet by the SIMcard
AT commands Cellular commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 93IM (IMEI)Reads the device's International Mobile Equipment Identity (IMEI).Parameter rangeN/ADefaultSet in the factoryMN (Operator)Reads the network operator on which the device is registered.Parameter rangeN/ADefaultAT&TMV (Modem Firmware Version)Read the firmware version string for cellular component communications. See the related VR(Firmware Version) command.Parameter rangeN/ADefaultSet in the currently loaded firmwareDB (Cellular Signal Strength)Reads the absolute value of the current signal strength to the cell tower in dB. If DB is blank, the XBeeSmart Modem has not received a signal strength from the cellular component.Parameter range0x71 - 0x33 (-113 dBm to -51 dBm) [read-only]DefaultN/AAN (Access Point Name)Specifies the packet data network that the modem uses for Internet connectivity. This information isprovided by your cellular network operator. After you set this value, applying changes with AC (ApplyChanges) or CN (Exit Command mode) triggers a network reset.Parameter range1 - 100 ASCII characters
AT commands Cellular commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 94Default-OA (Operating APN)Reads the APN value currently configured in the cellular component.Parameter rangeASCII charactersDefaultN/AAM (Airplane Mode)When set, the cellular component of the XBee Smart Modem is fully turned off and no access to thecellular network is performed or possible.Parameter range0 - 10 = Normal operation1 = Airplane modeDefault0DV (Antenna Diversity)Set and read the antenna diversity setting of the cellular component. When enabled, the cellularcomponent uses both antennas to improve receive sensitivity.This setting is applied only while the XBee Smart Modem is initializing the cellular component. Afterchanging this setting, you must:1. Use WR command to write all values to flash.2. Use FR (Force Reset) to reset the device.3. Wait for the cellular component to be initialized: AI (Association Indication) reaches 0x00.4. Use FR to reset the device a second time.5. Wait again for the cellular component to initialize:AI reaches 0x00.Parameter range0 - 10 - diversity disabled1 - diversity enabledDefault1
AT commands Network commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 95Network commandsThe following commands are network commands.IP (IP Protocol)Sets or displays the IP protocol used for client and server socket connections in IP socket mode.Parameter range0 - 4Value Description0x00 UDP0x01 TCP0x02 SMS0x03 Reserved0x04 SSL over TCPcommunicationDefault0x01TL (SSL/TLS Protocol Version)Sets the SSL/TLS protocol version used for the SSL socket. If you change the TL value, it does notaffect any currently open sockets. The value only applies to subsequently opened sockets.Note Due to known vulnerabilities in prior protocol versions, we strongly recommend that you use thelatest TLS version whenever possible.RangeValue Description0x00 SSL v30x01 TLS v1.00x02 TLS v1.10x03 TLS v1.2Default0x03TM (IP Client Connection Timeout)The IP client connection timeout. If there is no activity for this timeout then the connection is closed. IfTMis 0, the connection is closed immediately after the device sends data.
AT commands Network commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 96If you change the TM value while in Transparent Mode, the current connection is immediately closed.Upon the next transmission, the TM value applies to the newly created socket.If you change the TM value while in API Mode, the value only applies to subsequently opened sockets.Parameter range0 - 0xFFFF [x 100 ms]Default0xBB8 (5 minutes)TS (IP Server Connection Timeout)The IP server connection timeout. If no activity for this timeout then the connection is closed. Whenset to 0the connection is closed immediately after data is sent.]Parameter Range10 - 0xFFFF; (x 100 ms)Default3000DO (Device Options)Enables and disables special features on the XBee Smart Modem according to the following table.Bit 0 - Remote Manager supportIf the XBee Smart Modem cannot establish a connection with Remote Manager , it waits 30 secondsbefore trying again. On each successive connection failure, the wait time doubles (60 seconds, 120,240, and so on) up to a maximum of 1 hour. This time resets to 30 seconds once the connection toRemote Manager succeeds or if the device is reset.Bits 1 - 7ReservedRange0x00 - 0x07Value Description0x00 Disable Remote Manager support.0x01 Enable Remote Manager support.Default0x01EQ (Device Cloud FQDN)Sets or display the fully qualified domain name of the Remote Manager server.
AT commands Addressing commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 97RangeFrom 0 through 63 ASCII characters.Defaultmy.devicecloud.comAddressing commandsThe following AT commands are addressing commands.SH (Serial Number High)The upper digits of the unique International Mobile Equipment Identity (IMEI) assigned to this device.Parameter range0 - 0xFFFFFFFF [read-only]DefaultN/ASL (Serial Number Low)The lower digits of the unique International Mobile Equipment Identity (IMEI) assigned to this device.Parameter range0 - 0xFFFFFFFF [read-only]DefaultN/ADL (Destination Address)The destination IPv4 address or fully qualified domain name.To set the destination address to an IP address, the value must be a dotted quad, for exampleXXX.XXX.XXX.XXX.To set the destination address to a domain name, the value must be a legal Internet host name, forexample remotemanager.digi.comParameter range0 - 128 ASCII charactersDefault0.0.0.0P# (Destination Phone Number)Sets or displays the destination phone number used for SMS when IP (IP Protocol) =2. Phone numbersmust be fully numeric, 7 to 20 ASCIIdigits, for example:8889991234.
AT commands Addressing commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 98P# allows international numbers with or without the +prefix. If you omit +and are dialinginternationally, you need to include the proper International Dialing Prefix for your calling region, forexample, 011 for the United States.Range7 - 20 ASCII digits including an optional +prefixDefaultN/AN1 (DNS Address)Displays the IPv4 address of the primary domain name server.Parameter RangeRead-onlyDefault0.0.0.0 (waiting on cellular connection)N2 (DNS Address)Displays the IPv4 address of the secondary domain name server.Parameter RangeRead-onlyDefault0.0.0.0 (waiting on cellular connection)DE (Destination Port)Sets or displays the destination IP port number.Parameter range0x0 - 0xFFFFDefault0x2616TD (Text Delimiter)The ASCII character used as a text delimiter for Transparent mode. When you select a character,information received over the serial port in Transparent mode is not transmitted until that characteris received. To use a carriage return, set to 0xD. Set to zero to disable text delimiter checking.Parameter range0 - 0xFFDefault0x0
AT commands Addressing commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 99MY (Module IP Address)Reads the device's IP address. This command is read-only because the IPaddress is assigned by themobile network.In APImode, the address is represented as the binary four byte big-endian numeric value representingthe IPv4 address.In Transparent or Command mode, the address is represented as a dotted-quad string notation.Parameter range0- 15 IPv4 charactersDefault0.0.0.0LA (Lookup IP Address of FQDN)Performs a DNS lookup of the given fully qualified domain name (FQDN) and outputs its IP address.When you issue the command in API mode, the IP address is formatted in binary four byte big-endiannumeric value. In all other cases (for example, Command mode) the format is dotted decimal notation.RangeValid FQDNDefault-OD (Operating Destination Address)Read the destination IPv4 address currently in use by Transparent mode. The value is 0.0.0.0 if noTransparent IP connection is active.In API mode, the address is represented as the binary four byte big-endian numeric value representingthe IPv4 address.In Transparent or Command mode, the address is represented as a dotted-quad string notation.Parameter range-Default0.0.0.0C0 (Source Port)Set or get the port number used to provide the serial communication service. Data received by thisport on the network is transmitted on the XBee Smart Modem's serial port.As long as a network connection is established to this port (for TCP) data received on the serial port istransmitted on the established network connection.IP (IP Protocol) sets the protocol used when UART is in Transparent or APImode.For more information on using incoming connections, see Socket behavior.
AT commands Serial interfacing commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 100Parameter range0 - 0xFFFFValue Description0 DisabledNon-0 Enabled on that portDefault0Serial interfacing commandsThe following AT commands are serial interfacing commands.BD (Baud Rate)Sets or displays the serial interface baud rate for communication between the device's serial port andthe host.Modified interface baud rates do not take effect until the XBee Smart Modem exits Command mode oryou issue AC (Apply Changes). The baud rate resets to default unless you save it with WR command orby clicking the Write module settings button in XCTU.Parameter rangeStandard baud rates:0x1 - 0x8Non-standard baud rates:0x5B9 to 0x3D090 (250,000 b/s)Parameter Description0x0 1200 b/s0x1 2400 b/s0x2 4800 b/s0x3 9600 b/s0x4 19200 b/s0x5 38400 b/s0x6 57600 b/s0x7 115200 b/s0x8 230400 b/sDefault0x3 (9600 b/s)
AT commands Serial interfacing commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 101NB (Parity)Set or read the serial parity settings for UART communications.Parameter range0x00 - 0x02Parameter Description0x00 No parity0x01 Even parity0x02 Odd parityDefault0x00SB (Stop Bits)Sets or displays the number of stop bits for UART communications.Parameter range0 - 1Parameter Configuration0 One stop bit1 Two stop bitsDefault0RO (Packetization Timeout)Set or read the number of character times of inter-character silence required before transmissionbegins when operating in Transparent mode.RF transmission also starts after 100 bytes (maximum packet size) are received in the DI buffer.Set RO to 0 to transmit characters as they arrive instead of buffering them into one RF packet.Set to FF for realtime typing by humans. Also, see TD (Text Delimiter).Parameter range0 - 0xFF (x character times)Default3FT (Flow Control Threshold)Set or display the flow control threshold.
AT commands I/O settings commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 102The device de-asserts CTS when FT bytes are in the UART receive buffer.Parameter range0x9D - 0x82DDefault0x681AP (API Enable)The API mode setting. The device can format the RF packets it receives into API frames and sendthem out the UART. When API is enabled the UART data must be formatted as API frames becauseTransparent mode is disabled. See Modes for more information.Parameter range0x00 - 0x05Parameter Description0x00 API disabled (operate in Transparent mode)0x01 API enabled0x02 API enabled (with escaped control characters)0x03 N/A0x04 MicroPython REPL0x05 Bypass modeDefault0I/O settings commandsThe following AT commands are I/O settings commands.D0 (DIO0/AD0)Sets or displays the DIO0/AD0 configuration (pin 20).Parameter range0, 2 - 5Parameter Description0 Disabled1 N/A
AT commands I/O settings commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 103Parameter Description2 Analog input3 Digital input4 Digital output, default low5 Digital output, default highDefault0D1 (DIO1/AD1)Sets or displays the DIO1/AD1 configuration (pin 19).Parameter range0 - 6Parameter Description0 Disabled1SPI_ATTN2 ADC3 Digital input4 Digital output, low5 Digital output, high6 I2C SCLDefault0D2 (DIO2/AD2)Sets or displays the DIO2/AD2 configuration (pin 18).Parameter range0 - 5Description0 Disabled1SPI_CLK2 Analog input
AT commands I/O settings commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 104Description3 Digital input4 Digital output, default low5 Digital output, default highDefault0D3 (DIO3/AD3)Sets or displays the DIO3/AD3 configuration (pin 17).Parameter range0 - 5Parameter Description0 Disabled1SPI_SSEL2 Analog input3 Digital input4 Digital output, default low5 Digital output, default highDefault0D4 (DIO4)Sets or displays the DIO4 configuration (pin 11).Parameter range0, 1, 3 - 5Parameter Description0 Disabled1 SPI_MOSI2 N/A3 Digital input4 Digital output, default low5 Digital output, default high
AT commands I/O settings commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 105Default0D5 (DIO5/ASSOCIATED_INDICATOR)Sets or displays the DIO5/ASSOCIATED_INDICATOR configuration (pin 15).Parameter range0, 1, 3 - 5Parameter Description0 Disabled1 Associated LED2 N/A3 Digital input4 Digital output, default low5 Digital output, default highDefault1D6 (DIO6/RTS)Sets or displays the DIO6/RTS configuration (pin 16).Parameter range0, 1, 3 - 5Parameter Description0 Disabled1RTS flow control2 N/A3 Digital input4 Digital output, default low5 Digital output, default highDefault0D7 (DIO7/CTS)Sets or displays the DIO7/CTS configuration (pin 12).
AT commands I/O settings commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 106Parameter range0, 1, 3 - 5Parameter Description0 Disabled1CTSflow control2 N/A3 Digital input4 Digital output, default low5 Digital output, default highDefault0x1D8 (DIO8/SLEEP_REQUEST)Sets or displays the DIO8/DTR/SLP_RQ configuration (pin 9).Parameter range0, 1, 3 - 5Parameter Description0 Disabled1 SLEEP_REQUEST input3 Digital input4 Digital output, default low5 Digital output, default highDefault1Sets or displays the DIO9/ON_SLEEP configuration (pin 13).Parameter range0, 1, 3 - 5Parameter Description0 Disabled1ON/SLEEP output
AT commands I/O settings commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 107Parameter Description3 Digital input4 Digital output, default low5 Digital output, default highDefault1P0 (DIO10/PWM0 Configuration)Sets or displays the PWM/DIO10 configuration (pin 6).This command enables the option of translating incoming data to a PWM so that the output can betranslated back into analog form.Parameter range0 - 5Parameter Description0 Disabled1 RSSI PWM0 output2 PWM0 output3 Digital input4 Digital output, low5 Digital output, highDefault0P1 (DIO11/PWM1 Configuration)Sets or displays the DIO11 configuration (pin 7).Parameter range0, 1, 3 - 6Parameter Description0 Disabled1 Fan enable. Output is low when the XBee Smart Modem is sleeping, turning anattached fan off when the cellular component is in a power saving mode, and alsoduring Airplane Mode
AT commands I/O settings commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 108Parameter Description3 Digital input4 Digital output, default low5 Digital output, default high6 I2C SDA7 USB directDefault0P2 (DIO12 Configuration)Sets or displays the DIO12 configuration (pin 4).Parameter range0, 1, 3 - 5Parameter Description0 Disabled1 SPI_MISO2 N/A3 Digital input4 Digital output, default low5 Digital output, default highDefault0PD (Pull Direction)The resistor pull direction bit field (1= pull-up, 0= pull-down) for corresponding I/O lines that are setby PR (Pull-up/down Resistor Enable).If the bit is not set in PR, the device uses PD.Note Resistors are not applied to disabled lines.See PR (Pull-up/down Resistor Enable) for bit mappings, which are the same.Parameter range0x0 – 0x7FFFDefault0 – 0x7FFF
AT commands I/O settings commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 109PR (Pull-up/down Resistor Enable)Sets or displays the bit field that configures the internal resistor status for the digital input lines.Internal pull-up/down resistors are not available for digital output pins, analog input pins, or fordisabled pins.Use the PD command to specify whether the resistor is pull-up or pull-down.nIf you set a PR bit to 1, it enables the pull-up/down resistornIf you set a PR bit to 0, it specifies no internal pull-up/down resistor.The following table defines the bit-field map for both the PR and PD commands.Bit I/O line Module pin0 DIO4 pin 111 DIO3/AD3 pin 172 DIO2/AD2 pin 183 DIO1/AD1 pin 194 DIO0/AD0 pin 205DIO6/RTS pin 166 DIO8/SLEEP_REQUEST pin 97DIO14/DIN pin 38 DIO5/ASSOCIATE pin 159DIO9/On/SLEEP pin 1310 DIO12 pin 411 DIO10 pin 612 DIO11 pin 713 DIO7/CTS pin 1214 DIO13/DOUT pin 17Parameter range0 - 0x7FFF (bit field)Default0x7FFFM0 (PWM0 Duty Cycle)Sets the duty cycle of PWM0 (pin 6) for P0 =2, where a value of 0x200 is a 50% duty cycle.Before setting the line as an output:1. Enable PWM0 output (P0 (DIO10/PWM0 Configuration) =2).2. Apply the settings (use CN command or AC (Apply Changes)).
AT commands I/O sampling commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 110The PWM period is 42.62 µs and there are 0x03FF (1023 decimal) steps within this period. When M0 =0(0% PWM), 0x01FF (50% PWM), 0x03FF (100% PWM), and so forth.Parameter range0 - 0x3FFDefault0I/O sampling commandsThe following AT commands configure I/O sampling parameters.TP (Temperature)Displays the temperature of the XBee Smart Modem in degrees Celsius. The temperature value isdisplayed in 8-bit two’s compliment format. For example, 0x1A = 26 °C, and 0xF6 = -10 °C.Parameter range0 - 0xFF which indicates degrees Celsius displayed in 8-bit two's compliment format.DefaultN/ASleep commandsThe following AT commands are sleep commands.SM (Sleep Mode)Sets or displays the sleep mode of the device.The sleep mode determines how the device enters and exits a power saving sleep.Sleep mode is also affected by the SO command, option bit 6. See Sleep modes for more informationabout sleep modes.Parameter range0, 1, 4, 5Parameter Description0 Normal. In this mode the device never sleeps.1 Pin Sleep. In this modethe device honors the SLEEP_RQ pin. Set D8 (DIO8/SLEEP_REQUEST) to the sleeprequest function: 1.4 Cyclic Sleep. In this modethe device repeatedly sleeps for the value specified by SP and spends ST time awake.
AT commands Sleep commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 111Parameter Description5 Cyclic Sleep with Pin Wake. In this mode the device acts as in Cyclic Sleep but does notsleep if the SLEEP_RQ pin is inactive, allowing the device to be kept awake or woken bythe connected system.Default0SP (Sleep Period)Sets or displays the time to spend asleep in cyclic sleep modes. In Cyclic sleep mode, the node sleepswith CTS disabled for the sleep time interval, then wakes for the wake time interval.Parameter range0x1 - 0x83D600 (x 10 ms)Default0x7530 (5 minutes)ST (Wake Time)Sets or displays the time to spend awake in cyclic sleep modes.Parameter range0x1 - 0x36EE80 (x 1 ms)Default0xEA60 (60 seconds)SO (Sleep Options)Set or read the sleep options bit field of a device. This command is a bitmask.Parameter range0x0 - 0xFFFFBit field:Bit Setting Meaning Description0x00 0 ConnectedsleepOn compatible hardware, enters a lower power consumption modethat maintains registration with the cellular network.Set all other option bits to 0.Default0
AT commands Command mode optionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 112Command mode optionsThe following commands are Command mode option commands.CC (Command Sequence Character)The character value the device uses to enter Command mode.The default value (0x2B) is the ASCII code for the plus (+) character. You must enter it three timeswithin the guard time to enter Command mode. To enter Command mode, there is also a requiredperiod of silence before and after the command sequence characters of the Command modesequence (GT +CC +GT). The period of silence prevents inadvertently entering Command mode.Parameter range0 - 0xFFDefault0x2B (the ASCII plus character:+)CT (Command Mode Timeout)Sets or displays the Command mode timeout parameter. If a device does not receive any validcommands within this time period, it returns to Idle mode from Command mode.Parameter range2 - 0x1770 (x 100 ms)Default0x64 (10 seconds)GT (Guard Times)Set the required period of silence before and after the command sequence characters of theCommand mode sequence (GT +CC +GT). The period of silence prevents inadvertently enteringCommand mode.Parameter range0x2 - 0x6D3 (x 1 ms)Default0x3E8 (one second)Firmware version/information commandsThe following AT commands are firmware version/information commands.VR (Firmware Version)Reads the firmware version on a device.Parameter range0 - 0xFFFF [read-only]
AT commands Firmware version/information commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 113DefaultSet in firmwareVL (Verbose Firmware Version)Shows detailed version information including the application build date and time.Parameter rangeN/ADefaultSet in firmwareHV (Hardware Version)Display the hardware version number of the device.Parameter range0 - 0xFFFF [read-only]DefaultSet in firmwareAI (Association Indication)Reads the Association status code to monitor association progress. The following table provides thestatus codes and their meanings.Statuscode Meaning0x00 Connected to the Internet.0x22 Registering to cellular network.0x23 Connecting to the Internet.0x24 The cellular component is missing, corrupt, or otherwise in error. The cellularcomponent requires a new firmware image.0x25 Cellular network registration denied.0x2A Airplane mode.0x2B USB Direct active.0x2F Bypass mode active.0xFF Initializing.Parameter range0 - 0xFF [read-only]DefaultN/A
AT commands Diagnostic interface commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 114HS (Hardware Series)Read the device's hardware series number.Parameter rangeN/ADefaultSet in the firmwareCK (Configuration CRC)Displays the cyclic redundancy check (CRC) of the current AT command configuration settings.Parameter range0 - 0xFFFFFFFFDefaultN/ADiagnostic interface commandsThe following AT commands are diagnostic interface commands.DI (Device Cloud Indicator)Displays the current Remote Manager status for the XBee.RangeValue Description0x00 Connected0x01 Before connection to the Internet0x02 Remote Manager connection in progress0x03 Disconnecting from Remote Manager0x04 Not configured for Remote ManagerDefaultN/ACI (Protocol/Connection Indication)Displays information regarding the last IP connection (when the IP command = 0,1or 4) or SMStransmission (when IP = 2).The value for this parameter resets to 0xFF when the device switches between IP (IP Protocol)modes.
AT commands Diagnostic interface commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 115When IP is set to 0,1, or 4(UDP, TCP, over SSL over TCP), CI resets to 0xFF when you apply changes toany of the following settings:nDL (Destination Address)nDE (Destination Port)nTM (IP Client Connection Timeout)When IP is set to 2(SMS), CI resets to 0xFF when P# (Destination Phone Number) is changed.The following table provides the parameter's meaning when IP =0for UDP connections.Parameter Description0x00 The socket is open.0x01 Tried to send but could not.0x02 Invalid parameters (bad IP/host).0x03 TCP not supported on this cellular component.0x10 Not registered to the cell network.0x11 Cellular component not identified yet.0x12 DNS query lookup failure.0x20 Bad handle.0x21 User closed.0x22 Unknown server - DNS lookup failed.0x23 Connection lost.0x24 Unknown.0xFF No known status.The following table provides the parameter's meaning when IP =1or 4for TCP connections.Parameter Description0x00 The socket is open.0x01 Tried to send but could not.0x02 Invalid parameters (bad IP/host).0x03 TCP not supported on this cellular component.0x10 Not registered to the cell network.0x11 Cellular component not identified yet.0x12 DNS query lookup failure.0x20 Bad handle.
AT commands Execution commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 116Parameter Description0x21 User closed.0x22 No network registration.0x23 No internet connection.0x24 No server - timed out on connection.0x25 Unknown server - DNS lookup failed.0x26 Connection refused.0x27 Connection lost.0x28 Unknown.0xFF No known status.The following table provides the parameter's meaning when IP =2for SMS connections.Parameter Description0x00 SMS successfully sent.0x01 SMS failed to send.0x02 Invalid SMS parameters - check P# (Destination Phone Number).0x03 SMS not supported.0x10 No network registration.0x11 Cellular component stack error.0xFF No SMS state to report (no SMS messages have been sent).Parameter range0 - 0xFF (read-only)Default-Execution commandsThe location where most AT commands set or query register values, execution commands execute anaction on the device. Execution commands are executed immediately and do not require changes tobe applied.NR (Network Reset)NR resets the network layer parameters.The XBee Smart Modem responds immediately with an OK on the UART and then causes a networkrestart.If NR =0, the XBee Smart Modem tears down any TCP/UDP sockets and resets Internet connectivity.
AT commands Execution commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 117You can also send NR, which acts like NR =0.Parameter range0DefaultN/A!R (Modem Reset)Forces the cellular component to reboot.CAUTION! This command is for advanced users, and you should only use it if the cellularcomponent becomes completely stuck while in Bypass mode. Normal users should neverneed to run this command. See the FR (Force Reset) command instead.RangeN/ADefaultN/AIS (Force Sample)When run, IS reports the values of all of the enabled digital and analog input lines. If no lines areenabled for digital or analog input, the command returns an error.Command modeIn Command mode, the response value is a multi-line format, individual lines are delimited withcarriage returns, and the entire response terminates with two carriage returns. Each line is a series ofASCII characters representing a single number in hexadecimal notation. The interpretation of the linesis:nNumber of samples. For legacy reasons this field always returns 1.nDigital channel mask. A bit-mask of all I/O capable pins in the system. The bits set to 1areconfigured 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.nAnalog channel mask. The bits set to 1are configured for analog I/O and have individualreadings following the digital data field.nDigital data. The current digital value of all the pins set in the digital channel mask, onlypresent if at least one bit is set in the digital channel mask.nAnalog data. Additional lines, one for each set pin in the analog channel mask. Each reading is a10-bit ADC value for a 2.5 V voltage reference.API operating modeIn API operating mode, ISimmediately returns an OK response.
AT commands Execution commandsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 118The 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-endianbyte order.Field SizeNumber of samples 1 byteDigital channel mask 2 bytesAnalog chanel mask 1 byteSamples 2 bytes eachParameter rangeN/ADefaultN/A
Operate in API modeAPI mode overview 120Use the AP command to set the operation mode 120API frame format 120Frame descriptions 124Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 119
Operate in API mode API mode overviewDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 120API mode overviewAs an alternative to Transparent operating mode, you can use API operating mode. API mode providesa structured interface where data is communicated through the serial interface in organized packetsand in a determined order. This enables you to establish complex communication between deviceswithout having to define your own protocol. The API specifies how commands, command responsesand device status messages are sent and received from the device using the serial interface or theSPIinterface.We may add new frame types to future versions of firmware, so build the ability to filter out additionalAPI frames with unknown frame types into your software interface.Use the AP command to set the operation modeUse AP (API Enable) to specify the operation mode:AP commandsetting DescriptionAP = 0 Transparent operating mode, UARTserial line replacement with API modesdisabled. This is the default option.AP = 1 API operation.AP = 2 API operation with escaped characters (only possible on UART).AP = 3 N/AAP = 4 MicroPython REPLAP = 5 Bypass mode. This mode is for direct communication with the underlying chip andis only for advanced users.The API data frame structure differs depending on what mode you choose.API frame formatAn API frame consists of the following:nStart delimeternLengthnFrame datanChecksumAPI operation (AP parameter = 1)This is the recommended API mode for most applications. The following table shows the data framestructure when you enable this mode:
Operate in API mode API frame formatDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 121Frame fields Byte DescriptionStart delimiter 1 0x7ELength 2 - 3 Most Significant Byte, Least Significant ByteFrame data 4 - number (n) API-specific structureChecksum n + 1 1 byteAny data received prior to the start delimiter is silently discarded. If the frame is not received correctlyor if the checksum fails, the XBee replies with a radio status frame indicating the nature of the failure.API operation with escaped characters (AP parameter = 2)Setting API to 2 allows escaped control characters in the API frame. Due to its increased complexity,we only recommend this API mode in specific circumstances. API 2 may help improve reliability if theserial interface to the device is unstable or malformed frames are frequently being generated.When operating in API 2, if an unescaped 0x7E byte is observed, it is treated as the start of a new APIframe and all data received prior to this delimiter is silently discarded. For more information on usingthis API mode, see the Escaped Characters and API Mode 2 in the Digi Knowledge base.API escaped operating mode works similarly to API mode. The only difference is that when working inAPI escaped mode, the software must escape any payload bytes that match API frame specific data,such as the start-of-frame byte (0x7E). The following table shows the structure of an API frame withescaped characters:Frame fields Byte DescriptionStart delimiter 1 0x7ELength 2 - 3 Most Significant Byte, Least Significant Byte Characters escaped if neededFrame data 4 - n API-specific structureChecksum n + 1 1 byteStart delimiter fieldThis field indicates the beginning of a frame. It is always 0x7E. This allows the device to easily detect anew incoming frame.Escaped characters in API framesIf operating in API mode with escaped characters (AP parameter = 2), when sending or receiving aserial data frame, specific data values must be escaped (flagged) so they do not interfere with thedata frame sequencing. To escape an interfering data byte, insert 0x7D and follow it with the byte tobe escaped (XORed with 0x20).The following data bytes need to be escaped:n0x7E: start delimitern0x7D: escape charactern0x11: XONn0x13: XOFF
Operate in API mode API frame formatDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 122To escape a character:1. Insert 0x7D (escape character).2. Append it with the byte you want to escape, XORed with 0x20.In API mode with escaped characters, the length field does not include any escape characters in theframe and the firmware calculates the checksum with non-escaped data.Example: escape an API frameTo express the following API non-escaped frame in API operating mode with escaped characters:Start delimiter Length Frame type Frame Data ChecksumData7E 00 0F 17 01 00 13 A2 00 40 AD 14 2E FF FE 02 4E 49 6DYou must escape the 0x13 byte:1. Insert a 0x7D.2. XOR byte 0x13 with 0x20: 13 ⊕20 = 33The following figure shows the resulting frame. Note that the length and checksum are the same asthe non-escaped frame.Start delimiter Length Frame type Frame Data ChecksumData7E 00 0F 17 01 00 7D 33 A2 00 40 AD 14 2E FF FE 02 4E 49 6DThe length field has a two-byte value that specifies the number of bytes in the frame data field. It doesnot include the checksum field.Length fieldThe length field is a two-byte value that specifies the number of bytes contained in the frame datafield. It does not include the checksum field.Frame dataThis field contains the information that a device receives or will transmit. The structure of frame datadepends on the purpose of the API frame:LengthFrame dataData1 2 3 4 5 6 7 8 9 ... n n+10x7E MSB LSB DatanFrame type is the API frame type identifier. It determines the type of API frame and indicateshow the Data field organizes the information.nData contains the data itself. This information and its order depend on the what type of framethat the Frame type field defines.Multi-byte values are sent big-endian.
Operate in API mode API frame formatDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 123Calculate and verify checksumsTo calculate the checksum of an API frame:1. Add all bytes of the packet, except the start delimiter 0x7E and the length (the second andthird bytes).2. Keep only the lowest 8 bits from the result.3. Subtract this quantity from 0xFF.To verify the checksum of an API frame:1. Add all bytes including the checksum; do not include the delimiter and length.2. If the checksum is correct, the last two digits on the far right of the sum equal 0xFF.ExampleConsider the following sample data packet: 7E 00 0A 01 01 50 01 00 48 65 6C 6C 6F B8+Byte(s) Description7E Start delimeter00 0A Length bytes01 API identifier01 API frame ID50 01 Destination address low00 Option byte48 65 6C 6C 6F Data packetB8 ChecksumTo calculate the check sum you add all bytes of the packet, excluding the frame delimiter 7E and thelength (the second and third bytes):7E 00 0A 01 01 50 01 00 48 65 6C 6C 6F B8Add these hex bytes:01 + 01 + 50 + 01 + 00 + 48 + 65 + 6C + 6C + 6F = 247Now take the result of 0x247 and keep only the lowest 8 bits which in this example is 0xC4 (the twofar right digits). Subtract 0x47 from 0xFF and you get 0x3B (0xFF - 0xC4 = 0x3B). 0x3B is the checksumfor this data packet.If an API data packet is composed with an incorrect checksum, the XBee Smart Modem will considerthe packet invalid and will ignore the data.To verify the check sum of an API packet add all bytes including the checksum (do not include thedelimiter and length) and if correct, the last two far right digits of the sum will equal FF.01 + 01 + 50 + 01 + 00 + 48 + 65 + 6C + 6C + 6F + B8 = 2FF
Operate in API mode Frame descriptionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 124Frame descriptionsThe following sections describe the API frames.AT Command - 0x08DescriptionUse this frame to query or set parameters on the local device. Changes this frame makes to deviceparameters take effect after executing the AT command.FormatThe following table provides the contents of the frame. For details on frame structure, see API frameformat.FieldnameFieldvalueDatatype DescriptionFrametype0x08 ByteFrame ID Byte Identifies the data frame for the host to correlate with a subsequentACK. If set to 0, the device does not send a response.ATcommandByte Command name: two ASCII characters that identify the AT command.ParametervalueByte If present, indicates the requested parameter value to set the givenregister. If no characters are present, it queries the register.
Operate in API mode Frame descriptionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 125Transmit (TX) SMS - 0x1FDescriptionTransmit an SMS message. The frame allows international numbers with or without the +prefix. If youomit +and are dialing internationally, you need to include the proper International Dialing Prefix foryour calling region, for example, 011 for the United States.FormatThe following table provides the contents of the frame. For details on frame structure, see API frameformat.Fieldname Fieldvalue Data type DescriptionFrametype 0x1F ByteFrame ID Byte Reference identifier used to match status responses. 0disables the TX Status frame.Options Byte Reserved for future use.Phonenumber20 byte string String representation of phone number terminatedwith a null (0x0) byte. Use numbers and the +symbolonly, no other symbols or letters.Payload Variable(160charactersmaximum)Data to send as the body of the SMS message.
Operate in API mode Frame descriptionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 126Transmit (TX) Request: IPv4 - 0x20DescriptionA TX Request message causes the device to transmit data in IPv4 format. A TX request frame for anew destination creates a network socket. After the network socket is established, data from thenetwork that is received on the socket is sent out the device's serial port in the form of a Receive (RX)Packet frame.FormatThe following table provides the contents of the frame. For details on frame structure, see API frameformat.Field nameFieldvalue Data type DescriptionFrame type 0x20 ByteFrame ID Byte Reference identifier used to match status responses. 0disables the TX Status frame.Destinationaddress32-bit bigendianDestination port 16-bitbigendianSource port 16-bitbigendianIf the source port is 0, the device attempts to send the framedata using an existing open socket with a destination thatmatches the destination address and destination port fieldsof this frame. If there is no matching socket, then the deviceattempts to open a new socket.If the source port is non-zero, the device attempts to sendthe frame data using an existing open socket with a sourceand destination that matches the source port, destinationaddress, and destination port fields of this frame. If there isno matching socket, it returns an error.Protocol Byte 0 = UDP1 = TCP4 = SSL over TCPTransmitoptions BytebitfieldBit fields are offset 0Bit field 0 - 7. Bits 0, and 2-7 are reserved, bit 1 is not.BIT 1 =1- Terminate the TCP socket after transmission is complete0- Leave the socket open. Closed by timeout, see TM (IPClient Connection Timeout).Ignore this bit for UDP packets.All other bits are reserved and should be 0.Payload Variable Data to be transferred to the destination, may be up to 1500bytes.
Operate in API mode Frame descriptionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 127AT Command Response - 0x88DescriptionA device sends this frame in response to an AT Command (0x08) frame. Some commands send backmultiple frames.FormatThe following table provides the contents of the frame. For details on frame structure, see API frameformat.FieldnameFieldvalueDatatype DescriptionFrametype0x88 ByteFrame ID Byte Identifies the data frame for the host to correlate with a subsequentACK. If set to 0, the device does not send a response.ATcommandByte Command name: two ASCII characters that identify the AT command.Status ## Byte 0 = OK1 = ERROR2 = Invalid command3 = Invalid parameterParametervalueByte Register data in binary format. If the register was set, then this field isnot returned.
Operate in API mode Frame descriptionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 128Transmit (TX) Status - 0x89DescriptionIndicates the success or failure of a transmit operation.FormatThe following table provides the contents of the frame. For details on frame structure, see API frameformat.Field name Field value Data type DescriptionFrametype 0x89 ByteFrame ID Byte Refers to the frame ID specified in a previous transmitframeStatus Byte Status code (see the table below)The following table shows the status codes.Code Description0x0 Successful transmit0x21 Failure to transmit to cell network0x22 Not registered to cell network0x2c Invalid frame values (check the phone number)0x31 Internal error0x32 Resource error (retry operation later)0x74 Message too long0x78 Invalid UDP port0x79 Invalid TCP port0x7A Invalid host address0x7B Invalid data mode0x80 Connection refused0x81 Socket connection lost0x82 No server0x83 Socket closed0x84 Unknown server0x85 Unknown error
Operate in API mode Frame descriptionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 129Modem Status - 0x8ADescriptionCellular component status messages are sent from the device in response to specific conditions.FormatThe following table provides the contents of the frame. For details on frame structure, see API frameformat.Field name Field value Data type DescriptionFrame type 0x8A ByteStatus ## Byte 0 = Hardware reset or power up1 = Watchdog timer reset2 = Registered with cellular network3 = Unregistered with cellular network0x0E = Remote Manager connected0x0F = Remote Manager disconnected
Operate in API mode Frame descriptionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 130Receive (RX) Packet: SMS - 0x9FDescriptionThis XBee Smart Modem uses this frame when it receives an SMS message.FormatThe following table provides the contents of the frame. For details on frame structure, see API frameformat.FieldnameFieldvalue Data type DescriptionFrameType0x9F BytePhonenumber20 bytestringString representation of the phone number, padded out withnull bytes (0x0).Payload Variable Body of the received SMS message.
Operate in API mode Frame descriptionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 131Receive (RX) Packet: IPv4 - 0xB0DescriptionThe XBee Smart Modem uses this frame when it receives RF data on a network socket that is createdby a TX request frame or configuring C0 (Source Port).FormatThe following table provides the contents of the frame. For details on frame structure, see API frameformat.
Socket behaviorSupported sockets 133Secure Sockets Layer (SSL) certificate checking 133Socket timeouts 133Socket limits in API mode 133Enable incoming TCP connections 133API mode behavior for outgoing TCP and SSL connections 134API mode behavior for outgoing UDP data 134API mode behavior for incoming TCP connections 135API mode behavior for incoming UDP data 135Transparent mode behavior for outgoing TCP and SSL connections 135Transparent mode behavior for outgoing UDP data 136Transparent mode behavior for incoming TCP connections 136Transparent mode behavior for incoming UDP connections 136Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 132
Socket behavior Supported socketsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 133Supported socketsThe XBee Smart Modem supports the following number of sockets:n10 maximum: some combination of 6 TCP, 6 UDP, 6 SSL.1Secure Sockets Layer (SSL) certificate checkingCurrently, the XBee Smart Modem is not capable of checking the certificate of the remote end of thesocket connection. We will add this support in the future.This means that the device cannot authenticate the remote end of the connection. Although theconnection is encrypted, there is no way to verify that the remote server is the expected server.Socket timeoutsThe XBee Smart Modem implicitly opens the socket any time there is data to be sent, and closes itaccording to the timeout settings. The TM (IP Client Connection Timeout) command controls thetimeout settings.Socket limits in API modeThere are a fixed number of sockets that can be created which varies by device variant and protocol.When a Transmit (TX) Request: IPv4 - 0x20 frame is sent to the XBee Smart Modem for a newdestination, it creates a new socket. The exception to this is when using the UDP protocol with the C0source port, which allows unlimited destinations on the socket created by C0 (Source Port).If no more sockets are available, the device sends back a Transmit (TX) Status - 0x89 frame with aResource Error.The Resource Error resolves when an existing socket is closed.An existing socket may be closed when the socket times out (see TM (IP Client Connection Timeout)and TS (IP Server Connection Timeout)) or when the socket is closed via a TX request with the CLOSEflag set.Enable incoming TCP connectionsTCP establishes virtual connections between the XBee Smart Modem and other devices. You canenable the XBee Smart Modem to listen for incoming TCP connections. Listen means waiting for aconnection request from any remote TCP and port.2The following devices support incoming TCP connections:nPart number: XBC-V1-UT-001 (Digi XBee Cellular Verizon LTE Cat 1)nPart number: XBC-M1-UT-001 (Digi XBee Cellular AT&T LTE Cat 1)nPart number: XB3-C-A1-UT-xxx (Digi XBee3 Cellular AT&T LTE Cat 1)The XBee Smart Modem only supports incoming TCP connections, not UDP or SSL.To enable incoming connections in XCTU:11 UDPsocket is always reserved for DNS, so subtract 1 socket from the values above.2See https://tools.ietf.org/html/rfc793.
Socket behavior API mode behavior for outgoing TCP and SSL connectionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 1341. Set AP (API Enable) to Transparent Mode [0].2. Set C0 (Source Port) to the value of the TCP port that the device listens on.3. Click the Write button .API mode behavior for outgoing TCP and SSL connectionsTo initiate an outgoing TCP or SSL connection to a remote host, send a Transmit (TX) Request: IPv4 -0x20 frame to the XBee Smart Modem's serial port specifying the destination address and destinationport for the remote host; the data is optional and the source port is 0.If the connection is disconnected at any time, send a Transmit TX Request frame to trigger a newconnection attempt.To send data over this connection use the Transmit (TX) Request: IPv4 - 0x20.The device sends a Transmit (TX) Status - 0x89 frame in reply to the Transmit TX Request indicatingthe status of the request. A status of 0indicates the connection and/or data was successful and anon-zero value indicates a failure.Any data received on the connection is sent out the XBee Smart Modem's serial port as a Receive RXframe.A connection is closed when:nThe remote end closes the connection.nNo data is sent or received for longer than the socket timeout set by TM (IP Client ConnectionTimeout).nA Transmit TX Request is sent with the CLOSE flag set.API mode behavior for outgoing UDP dataTo send a UDP datagram to a remote host, send a Transmit (TX) Request: IPv4 - 0x20 frame to theXBee Smart Modem's serial port specifying the destination address and destination port of theremote host. If you use a source port of 0, the device creates a new socket for the purpose of sendingto the remote host. The XBee Smart Modem supports a finite number of sockets, so if you need tosend to many destinations:1. The socket must be closed after use.or2. You must use the socket specified by the C0 (Source Port) setting.To use the socket specified by the C0 setting, in the Transmit TX request frame use a source port thatmatches the value configured for the C0 setting.The device sends a Transmit (TX) Status - 0x89 frame in reply to the Transmit TX Request to indicatethe status of the request. A status of 0indicates the data was successfully sent out of the device anda non-zero value indicates a failure.Any data received on the UDP socket is sent out the XBee Smart Modem's serial port as a Receive (RX)Packet: IPv4 - 0xB0 frame.A UDP socket is closed when:nNo data has been sent or received for longer than the socket timeout set by TM (IP ClientConnection Timeout).nA transmit TX Request is sent with the CLOSE flag set.
Socket behavior API mode behavior for incoming TCP connectionsDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 135API mode behavior for incoming TCP connectionsFor incoming connections and data in API mode, the XBee Smart Modem uses the C0 (Source Port)and IP (IP Protocol) settings to specify the listening port and protocol used. The XBee Smart Modemdoes not currently support the SSL protocol for incoming connections.When the IP setting is TCP the XBee Smart Modem allows multiple incoming TCP connections on theport specified by the C0 setting. Any data received on the connection is sent out the XBee SmartModem's serial port as a Receive (RX) Packet: IPv4 - 0xB0 frame.To send data from the device over the connection, use the Transmit (TX) Request: IPv4 - 0x20 framewith the corresponding address fields received from the Receive RX frame. In other words:nTake the source address, source port, and destination port fields from the Receive (RX) frameand use those respectively as:nThe destination address, destination port, and source port fields for the Transmit (TX) Requestframe.A connection is closed when:nThe remote end closes the connection.nNo data has been sent or received for longer than the socket timeout set by TS (IP ServerConnection Timeout).nA Transmit (TX) Request frame is sent with the CLOSE flag set.API mode behavior for incoming UDP dataWhen the IP (IP Protocol) setting is UDP, any data sent from a remote host to the XBee SmartModem's network port specified by the C0 (Source Port) setting is sent out the XBee Smart Modem'sserial port as a Receive (RX) Packet: IPv4 - 0xB0 frame.To send data from the XBee Smart Modem to the remote destination, use the Transmit (TX) Request:IPv4 - 0x20 frame with the corresponding address fields received from the Receive RX frame. In otherwords take the source address, source port, and destination port fields from the Receive (RX) frameand use those respectively as the destination address, destination port, and source port fields for theTransmit (TX) Request frame.Transparent mode behavior for outgoing TCP and SSLconnectionsFor Transparent mode, the IP (IP Protocol) setting specifies the protocol and the DL (DestinationAddress) and DE (Destination Port) settings specify the destination address used for outgoing data(UDP) and outgoing connections (TCP and SSL).To initiate an outgoing TCP or SSL connection to a remote host, send data to the XBee SmartModem's serial port. If CI (Protocol/Connection Indication) reports a value of 0, then the connectionwas successfully established, otherwise the value of CI indicates why the connection attempt failed.Any data received over the connection is sent out the XBee Smart Modem's serial port.A connection is closed when:nThe remote end closes the connection.nNo data has been sent or received for longer than the socket timeout set by TM (IP ClientConnection Timeout).nYou make and apply a change to the IP,DL, or DE.
Socket behavior Transparent mode behavior for outgoing UDP dataDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 136Transparent mode behavior for outgoing UDP dataTo send outgoing UDP data to a remote host, send data to the XBee Smart Modem's serial port. If CI(Protocol/Connection Indication) reports a value of 0, the data was successfully sent; otherwise, thevalue of CI indicates why the data failed to be sent.The RO (Packetization Timeout) setting provides some control in how the serial data gets packetizedbefore being sent to the remote host. The first send opens up a UDP socket used to send and receivedata. Any data received by this socket is sent out the XBee Smart Modem's serial port.Transparent mode behavior for incoming TCP connectionsThe C0 (Source Port) and IP (IP Protocol) settings specify the listening port and protocol used forincoming connections (TCP) and incoming data (UDP) in Transparent mode. SSL is not currentlysupported for incoming connections.When the IP setting is TCP and there is no existing connection to or from the XBee Smart Modem, thedevice accepts one incoming connection. Any data received on the connection is sent out the XBeeSmart Modem's serial port. Any data sent to the XBee Smart Modem's serial port is sent over theconnection. If the connection is disconnected, it discards pending data.Transparent mode behavior for incoming UDP connectionsWhen the IP (IP Protocol) setting is UDP any data sent from a remote host to the XBee SmartModem's network port specified by C0 (Source Port) is sent out the XBee Smart Modem's serial port.Any data sent to the XBee Smart Modem's serial port is sent to the network destination specified bythe DL (Destination Address) and DE (Destination Port) settings. If the DL and DE settings areunspecified or invalid, the XBee Smart Modem discards data sent to the serial port.
TroubleshootingThis section contains troubleshooting steps for the XBee Smart Modem.Cannot find the serial port for the device 138Correct a macOS Java error 140Unresponsive cellular component in Bypass mode 141Not on expected network after APN change 142Syntax error at line 1 142Error Failed to send SMS 142Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 137
Troubleshooting Cannot find the serial port for the deviceDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 138Cannot find the serial port for the deviceConditionIn XCTU, the serial port that your device is connected to does not appear.Solution1. Click the Discover radio modules button .2. Select all of the ports to be scanned.3. Click Next and then Finish. A dialog notifies you of the devices discovered and their details.4. Remove the development board from the USB port and view which port name no longerappears in the Discover radio devices list of ports. The port name that no longer appears isthe correct port for the development board.Other reasons that the XBee Smart Modem is not discoverable include:
Troubleshooting Cannot find the serial port for the deviceDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 1391. If you accidentally have the loopback pins jumpered.2. You may not be using an updated FTDI driver.a. This may require you to reboot your computer.b. Disconnect the power and USB from the XBIB-U-DEV board and reconnect it.
Troubleshooting Correct a macOS Java errorDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 140Correct a macOS Java errorWhen you use XCTU on macOS computer, you may encounter a Java error.ConditionWhen opening XCTU for the first time on a macOS computer, you may see the following error:Solution1. Click More info to open a browser window.2. Click Download to get the file javaforosx.dmg.3. Double-click on the downloaded javaforosx.dmg.4. In the dialog, double-click the JavaForOSX.pkg and follow the instructions to install Java.
Troubleshooting Unresponsive cellular component in Bypass modeDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 141Unresponsive cellular component in Bypass modeWhen in Bypass mode, the XBee Smart Modem does not automatically reset or reboot the cellularcomponent if it becomes unresponsive.ConditionIn Bypass mode, the XBee Smart Modem does not respond to commands.Solution1. Query the AI (Association Indication) parameter to determine whether the cellular componentis connected to the XBee Smart Modem software. If AIis 0x2F, Bypass mode should work. Ifnot, look at the status codes in AI (Association Indication) for guidance.2. You can send the !R (Modem Reset) command to reset only the cellular component.
Troubleshooting Not on expected network after APN changeDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 142Not on expected network after APN changeConditionThe XBee Smart Modem is not on the expected network after a change to the AN (Access Point Name)command.SolutionSend ATNR0 to reset Internet connectivity. See NR (Network Reset) for more information.Syntax error at line 1You may get a syntax error at line 1 error after pasting example MicroPython code and pressingCtrl+D.SolutionThis commonly happens when you accidentally type a character at the beginning of line 1 beforepasting the code.Error Failed to send SMSIn MicroPython, you consistently get Error Failed to send SMS messages.SolutionYour device cannot connect to the cell network. The reason may be:1. The antenna is improperly or loosely connected.2. The device is at a location where cellular service cannot reach. If the device is connected to thenetwork, the red LED blinks about twice in a second. If it is not connected it does not blink; seeThe Associate LED.3. You SIMcard is out of SMS text quota.4. The device is not getting enough current, for example if power is being supplied only by USB tothe XBIB development board, rather than using an additional external power supply.
Regulatory informationModification statement 144Interference statement 144FCC Class B digital device notice 144RF exposure 145FCC-approved antennas 145Labeling requirements for the host device 146Digi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 143
Regulatory information Modification statementDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 144Modification statementDigi International has not approved any changes or modifications to this device by the user. Anychanges or modifications could void the user’s authority to operate the equipment.Digi International n’approuve aucune modification apportée à l’appareil par l’utilisateur, quelle qu’en soitla nature. Tout changement ou modification peuvent annuler le droit d’utilisation de l’appareil parl’utilisateur.Interference statementThis device complies with Part 15 of the FCC Rules and Industry Canada license-exempt RSS standard(s). Operation is subject to the following two conditions: (1) this device may not cause interference,and (2) this device must accept any interference, including interference that may cause undesiredoperation of the device.Le présent appareil est conforme aux CNR d'Industrie Canada applicables aux appareils radio exempts delicence. L'exploitation est autorisée aux deux conditions suivantes : (1) l'appareil ne doit pas produire debrouillage, et (2) l'utilisateur de l'appareil doit accepter tout brouillage radioélectrique subi, même si lebrouillage est susceptible d'en compromettre le fonctionnement.FCC Class B digital device noticeThis equipment has been tested and found to comply with the limits for a Class B digital device,pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protectionagainst harmful interference in a residential installation. This equipment generates, uses and canradiate radio frequency energy and, if not installed and used in accordance with the instructions, maycause harmful interference to radio communications. However, there is no guarantee thatinterference will not occur in a particular installation. If this equipment does cause harmfulinterference to radio or television reception, which can be determined by turning the equipment offand on, the user is encouraged to try to correct the interference by one or more of the followingmeasures:nReorient or relocate the receiving antenna.nIncrease the separation between the equipment and receiver.nConnect the equipment into an outlet on a circuit different from that to which the receiver isconnected.nConsult the dealer or an experienced radio/TV technician for help.IMPORTANT: The RF module has been certified for mobile and base radio applications. If the modulewill be used for portable applications, the device must undergo SAR testing.This equipment has been tested and found to comply with the limits for a Class B digital device,pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protectionagainst harmful interference in a residential installation. This equipment generates, uses and canradiate radio frequency energy and, if not installed and used in accordance with the instructions, maycause harmful interference to radio communications. However, there is no guarantee thatinterference will not occur in a particular installation.If this equipment does cause harmful interference to radio or television reception, which can bedetermined by turning the equipment off and on, the user is encouraged to try to correct theinterference by one or more of the following measures: Re-orient or relocate the receiving antenna,Increase the separation between the equipment and receiver, Connect equipment and receiver tooutlets on different circuits, or Consult the dealer or an experienced radio/TV technician for help.
Regulatory information RF exposureDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 145RF exposureCAUTION! This equipment is approved for mobile and base station transmitting devicesonly. Antenna(s) used for this transmitter must be installed to provide a separationdistance of at least 25 cm from all persons and must not be co-located or operating inconjunction with any other antenna or transmitter.ATTENTION! Cet équipement est approuvé pour la mobile et la station base dispositifsd'émission seulement. Antenne(s) utilisé pour cet émetteur doit être installé pour fournirune distance de séparation d'au moins 25 cm à partir de toutes les personnes et ne doitpas être situé ou fonctionner en conjonction avec tout autre antenne ou émetteur.FCC-approved antennasThe can be installed using antennas and cables constructed with non-standard connectors (RPSMA,RPTNC, and so forth) An adapter cable may be necessary to attach the XBee connector to the antennaconnector.The modules are FCC approved for fixed base station and mobile applications for the channelsindicated in the tables below. If the antenna is mounted at least 25 cm from nearby persons, theapplication is considered a mobile application.The antennas below have been approved for use with this module. Digi does not carry all of theseantenna variants. Contact Digi Sales for available antennas.Bluetooth antennasThe following tables cover the antennas that are approved for use with the Bluetooth radio.Integral antennaPart number Type (description) Gain Application31000020-01 Integral antenna -2.5 dBi Fixed/MobileDipole antennasPart number Type (description) Gain ApplicationA24-HASM-450 Dipole (Half-wave articulated RPSMA-4.5") 2.1 dBi Fixed/MobileA24-HABUF-P5I Dipole (Half-wave bulkhead mount U.FL w/ 5" pigtail) 2.0 dBi Fixed/MobileA24-HASM-525 Dipole (Half-wave articulated RPSMA-5.25") 2.0 dBi Fixed/MobileFlex PCB antennasPart number Type (description) Gain ApplicationFXP74.07.0100A Flexible PCB, U.FL w/ 100mm pigtail 4.0 dBi Fixed/Mobile
Regulatory information Labeling requirements for the host deviceDigi XBee3 Cellular LTE Cat 1 Smart Modem User Guide 146Cellular antennasAntenna gain must be below:Frequency band GainBand 2 (1900 MHz) 9.70 dBiBand 4 (1700 MHz) 6.00 dBiBand 12 (700 MHz) 9.01 dBiBande de fréquence GainBand 2 (1900 MHz) 9.70 dBiBand 4 (1700 MHz) 6.00 dBiBand 12 (700 MHz) 9.01 dBiLabeling requirements for the host deviceThe device shall be properly labeled to identify the product within the host device. The certificationlabels of the module shall be clearly visible at all times when installed in the host device, otherwise thehost device must be labeled to display the FCC ID and IC of the module, preceded by the words"Contains transmitter module", or the word "Contains", or similar wording expressing the samemeaning, as follows:Contains FCC ID: MCQ-XB3C1Contains IC: 1846A-XB3C1Contains FCC ID:RI7XE866A1NAContains IC: 5131A-XE866A1NAL'appareil hôte doit être étiqueté comme il faut pour permettre l'identification des modules qui s'ytrouvent. L'étiquettes de certification du module donné doit être posée sur l'appareil hôte à un endroit bienen vue en tout temps. En l'absence d'étiquette, l'appareil hôte doit porter une étiquette donnant le FCC ID etle IC du module, précédé des mots « Contient un module d'émission », du mot « Contient » ou d'uneformulation similaire exprimant le même sens, comme suit:Contains FCC ID: MCQ-XB3C1Contains IC: 1846A-XB3C1Contains FCC ID:RI7XE866A1NAContains IC: 5131A-XE866A1NAThis Class B digital apparatus complies with Canadian ICES-003.Cet appareil numérique de classe B est conforme à la norme canadienne ICES-003.

Navigation menu