When designing an XBee-based system, a key decision is whether the XBee will operate autonomously or be managed by an external microcontroller. There are two primary architectural options - Hosted and Hostless - and where the intelligence of the XBee device solution resides is dependent on which one you choose. There is also the option to combine the strengths of both in a Hybrid architecture:

Hosted architecture

In a Hosted architecture, the XBee device is connected to an external microcontroller, which handles all critical data processing, decision-making, and logic. The XBee module primarily serves as a communication bridge.

diagram
Figure 1. "The microcontroller generates the data and sends it to the XBee which transmits it wirelessly.

The XBee device facilitates wireless communication by relaying data between the microcontroller (via the serial interface) and other XBee devices. This allows the microcontroller to seamlessly send and receive wireless data across the network.

Hostless architecture

In a Hostless architecture, the XBee device operates independently, without any connection to an external microcontroller. Instead, the device relies on a MicroPython application running directly on the XBee module to perform edge computing tasks.

diagram
Figure 2. The MicroPython application running on the XBee generates the data and transmits it wirelessly.

The MicroPython application handles all computing tasks, allowing the XBee device to operate autonomously. This setup is ideal for scenarios where low-power operation, real-time processing, or simplified solutions are necessary. The XBee device can process data locally, interact with sensors, and perform specific actions without needing to communicate with an external processor. This reduces latency and the need for constant communication with a central controller.

Although the hostless architecture does not require a communication with an external device when the solution is deployed, you will need to communicate with a computer or microcontroller at development time for configuration and Micropython debugging purposes.
hostless_configuring

Hybrid architecture

A Hybrid architecture combines elements of both Hosted and Hostless setups. In this configuration, the XBee device is connected to an external microcontroller but also runs a MicroPython application that can perform certain computing tasks independently.

diagram
Figure 3. "The microcontroller generates the data which is post-processed by the MicroPython application and then transmits it wirelessly.

The microcontroller handles more complex or resource-intensive tasks, while the XBee device manages simpler, localized processing through its MicroPython application. This allows for a division of labor between the microcontroller and the XBee module, optimizing performance and reducing the load on the microcontroller.

For example, a hybrid setup can process data in the following order:

  • The XBee gathers data periodically from other XBee devices or connected sensors, processes the data locally (e.g., filtering or transforming it), and stores it in memory.

  • The external microcontroller requests specific sensor data from the XBee device and uses it for more complex tasks, such as advanced calculations or data aggregation.

  • The microcontroller then uploads the processed data to the cloud for any of the following reasons:

    • for further analysis

    • to trigger alerts

    • to initiate specific actions based on sensor readings

Select the appropriate architecture

Selecting the appropriate architecture is a crucial step when designing your XBee based solution. The following table displays a summary of each architecture with their advantages and disadvantages that will help you to choose the one that better suits your needs:

Architecture Description Pros Cons

Hosted

Centralized solutions with high data processing requiring wireless communication and access to multiple interfaces.

  • Complex data processing

  • Access to multiple peripherals and interfaces

  • Forward data to other interfaces and external services

  • Higher power consumption

  • Advanced implementation

Hostless

Autonomous operation and low-power applications where the XBee device makes little data processing independently, making it suitable for intelligent sensors and edge computing tasks.

  • Low power consumption

  • Easy implementation

  • Low data processing

  • Limited to the XBee device interfaces

Hybrid

Balanced and flexible solution with the microcontroller handling broader tasks while the XBee manages specific functions such as data collection or post-processing.

  • Parallel data processing for complex and simpler tasks

  • Access to multiple peripherals and interfaces

  • Forward data to other interfaces and external services

  • Higher power consumption

  • Advanced implementation

While it’s more of a design decision, the architecture you choose does not require any specific configuration on the XBee device. However, it does influence the choice of Operating mode for your XBee device.

Once you’ve determined the appropriate architecture for your XBee setup, the next key step is selecting how your device communicates and processes data within your system, referred to as the Operating mode.