The communication model proposed by the Digi IoT Mobile SDK is based on a pair of channels to exchange data, one to send (TX) and one to receive (RX).

All Digi IoT devices supported by the Digi IoT Mobile SDK share this communication model. In the case of XBee devices, it’s already integrated in their firmware. For the ConnectCore devices, this communication model is implemented by the Digi ConnectCore BLE Python Library.

Communication model definition

In this communication model, the Digi IoT devices act as GATT servers, declaring a unique service that we call Communication Service. The service, in turn, contains the TX and RX characteristics that define the communication lines. GATT clients, such as smartphones, can connect and communicate with the Digi devices through these characteristics.

BLE Communication

The TX characteristic is writable and used to send data to the Digi IoT device. After data is processed by the device, the result is returned on the RX characteristic.

The RX characteristic is readable and defines the indicated permission to subscribe to it (cannot be read directly). Response data to any request is presented on this characteristic.

Communication is secured and encrypted following the SRP protocol. Check the Bluetooth Low Energy security layer chapter for more information about BLE security in the Digi IoT devices.

Service and characteristics UUIDs

These are the UUIDs of both service and characteristics used in the communication model:

Service/Characteristics UUID

Communication service

53da53b9-0447-425a-b9ea-9837505eb59a

TX characteristic

7dddca00-3e05-4651-9254-44074792c590

RX characteristic

f9279ee9-2cd0-410c-81cc-adf11e4e5aea

Send and read data

The libraries from the Digi IoT Mobile SDK offer the necessary methods to read and receive data via BLE for the different applications involved in the communication.

Mobile application

For cross-platform mobile applications development, the Digi IoT Library for .NET MAUI provides methods to directly send and receive data from the characteristics exposed by the Digi IoT devices. You do not need to write or read from the characteristics; the methods provided by the library do these tasks underneath.

Check the following chapters of the Digi IoT Library for .NET MAUI for more information:

ConnectCore application

The ConnectCore BLE Python Library from the SDK includes methods to send and receive data in an easy way. Check the following chapters of the ConnectCore BLE Python Library for more information:

XBee applications

In the case of XBee devices, there are different use cases. The way to communicate with the mobile application depends on the use case and library used:

MicroPython application

If your implementation consists of a MicroPython application running in the XBee device, you should use User Data Relay frames to send and receive BLE data. Check the following chapter of the MicroPython Development Guide for more information:

External micro-controller application

If you prefer to use an external micro-controller connected to the XBee device, you can use any of the XBee libraries offered by Digi to send and receive BLE data. Check the following chapters of the XBee Java and Python libraries for more information: