Pages

Monday, 25 May 2015

XBee

ABOUT XBee

 XBee is very easy and popular wireless device. It is a transceiver, it can transmit  and it  receive data wirelessly. There are several types of XBee module. The very popular XBee is Series 1 (802.15.4), comes with the firmware to create connection for point to point or star network. But bear in mind, many people actually thought it is using ZigBee protocol, but it is not compliance to ZigBee because it uses the low layer of ZigBee protocol only. Therefore XBee Series 1 (S1) cannot communicate with ZigBee device in the market.
XBee Series 2 (ZB) does not offer any 802.15.4-only firmware; it is always running ZigBee mesh firmware. It is the new XBee module that we are carrying now. XBee S2 have better performance when you talk about mesh networking where it involve quite a lot of nodes: Coordinators, Routers and End Devices. You can read the datasheet if you want to, but I am going to talk about point to point only, XBee S2 cannot communicate with XBee S1, it is not compatible in term of wireless communication.


 WORKING
Assuming you have done installing USB driver and X-CTU, and the USB of SKXBee is plug in properly, you should see the POWER LED on SKXBee ON. There are two XBee S2 modules needed to be setup. I will show the 1st XBee S2 module setup, which I named it Coordinator 1. 2nd XBee S2 module will be Router 1.

SOFTWARE
XCTU V6.1.0.
COORDINATOR
You can choose either one of the XBee S2 to configure as coordinator. At the end, the host do not know which is which as XBee will become transparent once it is setup correctly.
Launch X-CTU

Click on add device


Choose your corresponding comport

Click on finish

Change pan ID to 1234
 Destination Address low  is the address of router  XBee
You can also set the Node ID, I set “COORDINATOR1” as node ID, this is not critical.


Click “Write” and X-CTU will start loading the parameter you just set.
click “Read” to grab data from XBee S2 module.

ROUTER


Change Pan ID to 1234

Destination address is the address of COORDINATOR XBee
You can also set the Node ID, I set “ROUTER1” as node ID, this is not critical.
Click “Write” and X-CTU will start loading the parameter you just set.
click “Read” to grab data from XBee S2 module.
Type the following commands for both  the XBee
+++
ATDL
ATSL
ATCN

now both this XBee S2 modules are setup and linked together, once they are powered, they are paired. sending data via UART to one of the XBee module will automatically being transmitted wirelessly to the other XBee module and further transmit out from the UART, and this apply for both way. Here I have install two SKXBee with Coordinator and Router that we setup.

If you notice, the DL and SL is paired up. I enter command mode to grab the information we configured and exit the command mode with ATCN. the following text after ATCN and OK is actually happening in transparent mode. The text you type in Router1 XBee will transmit to Coordinator1 XBee and display on terminal and vise versa. Now, you can use this pair of XBee S2 as wireless point to point communication. It has become same as the XBee S1 if you configure the DL and SL correctly.