Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

PC to PC communication over Zigbee Protocol using Xbee and XCTU : IoT Part 36

By Priya May 2, 2024

In the previous tutorial, Zigbee technology and its application in building Wireless Sensor Networks was discussed. In this tutorial, learn to perform simple Client to Client Communication over Zigbee Protocol. There will be two Xbee modules taken and will be configured to communicate data with each other over the air. 
The Xbee devices communicate with each other wirelessly over the air. They do not have any microcontroller or processor in themselves, so they cannot manage the received or sent data. They can simply transfer the information what they receive. But they can be interfaced with other microcontrollers and processors like Arduino, Raspberry Pi or PC via serial Interface.
So, basically, Xbee modules are capable of two types of communication – wireless communication and serial communication. The wireless communication takes place between Xbee devices so that the devices act as radio frequency (RF) devices. For data to transmit and receive from one Xbee module to another, both devices should be on same network. The data between two devices is transmitted wirelessly. By serial communication (UART), the Xbee modules can communicate with microcontrollers and processors.  
A microcontroller, processor or PC can send data through the serial interface to the Xbee module (transmitter) and the Xbee module wirelessly transmits the data to other Xbee module (Receiver). The receiver Xbee module transmits the data through the serial interface to controller, processor or PC to which it is interfaced. The controller interfaced to the Xbee module processes the information received by the Xbee devices. This way, controllers can monitor and control remote devices by sending messages through the local Xbee modules. 
The Xbee modules communicate with each other in two modes – Transparent mode  and API (Application Peripheral Interface) mode. This project is based on Transparent mode. In transparent mode, Xbee modules act as serial line replacement. All data received through serial input is immediately transmitted over the air. When other Xbee module receives data wirelessly, it sends that exactly as it receives through the serial interface and vice versa. Contrary to this, in the API mode, the data is transmitted with some additional information.
In this project, two Xbee modules will be interfaced with two PCs and they will be configured to communicate data with each other in transparent mode. The XCTU software can be used on the PCs to send and receive data between the PCs and the Xbee modules. 
Component Required –
List of Components required for Zigbee based PC to PC Communication using Xbee and XCTU
Fig. 1: List of components required for Zigbee based PC to PC communication using Xbee and XCTU
Software Required – 
• XCTU (6.3.1 or later) or XCTU legacy
Block Diagram – 
Block Diagram of Zigbee based PC to PC Communication using Xbee and XCTU
Fig. 2: Block Diagram of Zigbee based PC to PC communication using Xbee and XCTU
Circuit Connections – 
The Xbee Series 2 modules will be used in this project. The X-Bee module is a 20-pin module with the following pin configuration – 
Screenshot of Xbee Module Configuration on XCTU Software
Fig. 3: Screenshot of Xeebee Module Configration on XCTU Software
Table Listing Pin Configuration of Xbee Series 2 Module
Fig. 4: Table listing pin configuration of Xbee Series 2 Module
For connecting the module with PC, first place the Xbee to the Xbee Shield and connect module with an Arduino. The Arduino UNO or Arduino Mega acts as a USB converter for Xbee modules. Before using Arduino UNO with Xbee modules, a bare minimum sketch  must be uploaded on it or the Atmega microcontroller must be removed from the board. The Xbee module can be provided power by an external power supply or from the Arduino. The Xbee module and the Arduino board must communicate serially. The Xbee module should be connected to the Arduino according to the following table –  
Table Listing Pin Configuration of Xbee Series 2 Module
Fig. 5: Table listing circuit connections between Arduino and Xbee Series 2 Module
Now Arduino can be connected with the PC using a USB cable. 
Prototype of Xbee Series 2 Module and PC Interfacing
Fig. 6: Prototype of Xbee Series 2 Module and PC Interfacing
After connecting the module to the computer, perform the following steps – 
1) Open the XCTU software.  Make sure, the software is in configuration working mode. 
2) Click on “Discover Radio Modules”. 
3) Click on the desired COM port on which module is connected.
4) Click next, in the ‘Set port parameters’ window, change the values according to the requirements and click finish.
5) As XCTU locates radio modules after full scan, select the radio modules by clicking on ‘Add selected devices’. Now, the selected radio modules should show in radio module window.
In order to transmit or receive data on Xbee modules, they need to be properly configured on the same network. According to the Zigbee protocol one device needs to be in coordinator mode and the rest can be router or end devices. In this case, one device is coordinator and other is router.
Screenshot of Xbee Module Configuration on XCTU Software
Fig. 7: Screenshot of Xbee Module Configuration on XCTU Software
Now, restore the default setting of all Xbee modules with the ‘Load default firmware setting’ button at the top of Radio configuration section and use XCTU to configure the following parameter –
Table Listing Pin Configuration of Xbee Series 2 Module
Fig. 8: Table listing configuration parameters of Xbee Module
Keep the rest of the values as default and write the settings of all Xbee modules with the ‘write radio modules’ button at the top of radio configuration. Once the configuration is completed, click on the discover radio modules on same network button of any of the radio module. Now, the radio modules for the same network can be found. After configuring both modules, the data can be sent and received among them. 
The following precautions must be taken care while interfacing the Xbee modules – 
1) Xbee modules operate on 3V3 with current of 40 mA to transmit and receive the data. Don’t provide 5V from Arduino. 
2) Xbee modules have 3V3 tolerant signal level. For providing communication between arduino and Xbee, use CMOS-to-TTL logic level converter (Bidirectional).
3) Sometimes when trying to discover Xbee, there may occur an error like – ‘Could not find any device in port COM6 >For input string: “ERROR” or error initializing device parameter = connection timeout or could not find device parameter’ then the error may be because of the incorrect baud rate. 
For this, connect the modem using FTDI cable to the PC, open XCTU, select the COM port and multiple baud rates like 9600, 115200, 57600 then search for the radio module and possibly there the radio module can be found. But if not found, then open XCTU legacy (old version), select the possible baud rate and in the modem configuration window select the correct modem firmware/ function set, then enable ‘always update firmware’ and select write. After that, when the info box (action required) appears, then reset the Xbee by connecting RST to GND or simply unseat the Xbee and again place on seat. Now info box will disappear. It will then re-flash the radio modules automatically. 
4) If there comes the error of baud rate difference then the error can be that the PC and radio module are not working on same baud rate. In such case, try to change the PC and flash the firmware with another PC. The Xbee module can also be recovered this way. 
5) Issue the commands properly when working in AT mode.
Image showing Zigbee Communication between Xbee Modules
Fig. 9: Image showing Zigbee communication between Xbee Modules
How the Circuit Works – 
The XCTU console mode is used to provide communication between the two Xbee modules in serial communication mode. In XCTU, click the open serial connection button to start the communication. The background changes to green to indicate that the connection is open. Use the console log section to type the messages on one Xbee. It can be seen that the message is received by other Xbee which is connected in the same network.
Screenshot of Console Log of XCTU Software showing Messages communicated between Xbee Modules
Fig. 10: Screenshot of Console Log of XCTU Software showing messages communicated between Xbee Modules
The serial console transmits the exact same message to the Xbee modules what it received from them. This way, messages can be communicated between two PCs over Zigbee protocol using Xbee modules and XCTU software. 
In the next tutorial, learn to setup IoT communication between two Arduino based devices using Xbee modules.

Project Video


Filed Under: IoT tutorials, Tutorials
Tagged With: IoT
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • High Side current sensing
  • How to simulate power electronics converter in PSpice?
  • Voltage mode pushpull is a nonsense SMPS?
  • Layout IRN reduction in Comparator

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe