Few months ago, I was wondering how to use Xbee for sending and receiving data wireless-ly. I looked for some references in internet but no tutorial had ever made for this. As we know that Xbee is a wireless transceiver (transmitter-receiver) device which operates in frequency of 2.4 GHz and this device communicates using serial communication.
First, we have to understand how serial communication works from this picture below:
As we can see from the picture, serial communication will send data bit per bit or if we make a simple example by having 1 road from A to B, but this road is 1 way only so that if there are few vehicles which want to go to B from A, it must make a queue because the road is only limited for 1 vehicle at the time. The data transfer process will be slower indeed, but the other factor is that it depends on how wide is the channel we have, the wider channel we use for smaller data, the faster connection we can achieve for sure.
I understood about that serial communication and how it works, but the big question was how to make controlling and monitoring process by using Xbee, as we know that Xbee is also working on hall-duplex transmission that we can see the difference of it in this below picture:
In half-duplex data transmission, only 1 channel is available to be used in transferring data regardless it is from A to B or B to A. So, if a data wants to be transferred from A to B, the other data in B which will be transferred to A should wait for the channel available after data from A to B is completely arrived in B. From this comprehension, we can take a conclusion that it is absolutely possible to make two-way communication by using Xbee.
Xbee is using Zigbee protocol which can be configured to 3 kind of AT function; they are Coordinator AT, Router AT and End Device AT. For the simple explanation, Coordinator is used as aggregator to collect any kind of data which is sent to it from another device with the same PAN ID with it (PAN ID is such a network number), as long as i tried, Coordinator node can do both controlling (sending) and monitoring (receiving) data but in half-duplex transmission.
The other one is End Device AT, from experiments that i've done, End Device node is only able to send data and unable to receive data from the other node either Coordinator or Router. So Xbee with End Device configuration is good for sensor node in the Xbee network, sensor node only does sensing and producing data without needing any incoming control data (or etc) and then the data will be sent to the other node.
Router, as we can read that this node is used for forwarding data from End Device or the other Router node to the destination node. With this kind of ability, Router node is able to do receiving and sending data which makes this node has similar purpose with Coordinator but has less function such as authentication for security, forming network and etc. Thus, to make a two-way communication with using Xbee, we should only have at least 1 Router node and 1 Coordinator Node.
I will separate this thread into 2 parts, the next part will be discussing about the configuration and steps to an example of project. See you in Part II!