In this post we shall make use of Modem type XB24 from DIGI International,the manufacturers of original XBEEs to demonstrate point to point communication.

XB24 is 802.15.4 (Series 1) module .XBP 24 is Pro series to achieve longer distance.

         xbee2                                xbeepro

(XB24-B & XB24-ZB  are Series 2 modules running under Zigbee protocol  & need to be configured .There must be one Coordinator & other should be a Router.This  Setup is done using the X-CTU software.Channel selection is done automatically by Coordinator in Series 2 modules)

We shall use USB XBEE Explorer (Breakout board or Dongle).This board doesn’t need any external power source.It is compatible with all XBEE modules (Series 1 ,Series 2 standard & Pro models).It has a built in 3.3V regulator & status LEDs for  RX,TX,RSSI & Power.If you want to use this dongle on Breadboard you’ve to solder 10 pins of Berg stick on both sides of XBEE.Holes spacing 2.4mm are provided for this purpose on the breakout board.

Place one XBEE on an USB breakout board   & connect it to one USB port of the PC.Same way connect the second XBEE to another USB port of the PC.

Care should be taken to insert XBEE onto the breakout board in correct direction. Pin 1 (Vcc) & Pin 10 (GND) should be plugged as shown below.

USB_XBEE       Picture 65

Open up the Device Manager & scroll down  to expand Ports.

You should see the allotment of ports.If the USB breakout boards are not recognized by Windows,you’ve to install the FTDI  drivers.Download drivers Here.FTDI is the device used in USB Breakout board that creates VCP Virtual Com Port.

Image 1

 

We shall make use of X-CTU software to configure the XBEEs.

Download the X_CTU program Here.

Fire up X-CTU.You can see the USB ports detected by the program.Select the first port (COM13) & click on Test/Query button.X-CTU communicates with the XBEE connected to COM13 & displays the Modem type (XB24) & Serial number.

Make sure that ‘Enable API’ is not selected.

Image2

 

Select Modem Configuration & then click on Read.

If the Modem is pre configured then it will display the type as XB24 & under Function Set the Firmware type is displayed (XBEE 802.15.4).Note that it is a Series 1 module.If it is a Series 2 module then you’ve to set Coordinator & Router.

Image 6

If it is not pre configured then you can select the type under Modem:XBEE & select a Firmware under Function Set & click Write. X-CTU won’t let you load Firmware into an incompatible module.

Image 3

 

For two XBEEs to communicate ,both should be in the same Network,defined by PAN ID –Personal Area Network ID.By default it is hex 3332.(ID-PANID in XCTU).To avoid interference from other networks change it to some other value.Note that XBEEs on different networks cannot talk to each other.

Once both XBEEs are on the same network,we can give each one a Source Address (denoted by MY in XCTU)  &  a Destination address to talk to (DH & DL in XCTU).

It is enough to configure only the Low byte address DL.

For XBEE to enter into Broadcast mode set the value of DL as 0xFFFF.Now XBEE enters into broadcast mode (point to multipoint).Every XBEE with same channel will communicate.

XBEEs are 2.4GHz radios & there are several channels in 2.4GHz band.In XCTU window ,under Networking & Security you see the first entry CH.

Any value between 0B & 1A (in Decimal Channel 11 to 26) can be assigned to channel.Default Channel is 0C . Both devices should be in the same channel to talk to each other.Remember that in Series 2 modules Channel is automatically assigned by the Coordinator & you can’t change it manually.  

Next one is the Baud Rate,which should be same for both the devices.Scroll down to Serial Interface to see BD .From the drop down window you can select the baud rate.By default it is hex 03 (9600).

Put together here are the thumb rules for 2 XBEEs to communicate :

1. PAN ID , CH & BD must be same i.e., both the XBEEs should be in Same Network,Same Channel & operate at same baud rate.

2. Destination Address ( DL)  of one XBEE should be same as Source address  (MY) of other XBEE & MY of second XBEE should be same as  DL of first XBEE.

For e.g the following is a successful setting

                                                First XBEE settings              2nd XBEE settings

   Network ID                            ID  = 3110                        ID = 3110

    Channel                                CH = C                               CH = C

    Baud Rate                             BD = 3                                 BD = 3

    Source Address                   MY = 0010                        MY = 0011

     Destination Address           DL = 0011                        DL = 0010    

If you try to change first one’s ID as 3332 then communication is lost.Or if you change DL to some other value , you can’t communicate.

In XCTU you can conduct a Range test.To do this select Range test in XCTU of COM13.

At the bottom select transmit.By default 32 bytes of data is generated.Click Start button.

In the XCTU window of COM14 select Terminal to see the bytes received.

loop

But this data received by COM 14 is not looped back to COM13.You get Range test as Bad in COM13 window.

To loop back data connect the pins 2 & 3 of the XBEE connected to COM14.

                                xbee_pinout

An Xbee module has three communication modes: Transparent mode, Command mode  & API mode.

By default all  Xbee modules start up in transparent mode.  All data received from the DIN pin is transmitted, and when RF data is being received, it is sent out on the DOUT pin. A pair of XBee modules can act Wireless in this mode.

Command mode is where you can configure XBEE using AT commands through any Terminal software like TeraTerm or CoolTerm.Built in terminal of XCTU can also be used. To enter Command mode type in 3 consecutive  characters +++ and wait a second. Once the XBee enters command mode, it will answer with OK.  While in command mode you can change baud rate, PANID,Destination address, etc . If you are not typing anything for 10 seconds the module will return to Transparent mode ,or you can issue  the ATCN command to exit.

API (Application Programming Interface) mode is a frame-based method for sending and receiving data to and from an XBee.API MODE is powerful & complicated to setup.It is used to send messages to constantly changing targets (other XBee modules).

API mode has some special abilities to change parameters without entering command mode & Receive packet delivery confirmation on every transmitted packet .

Watch this Video :

 

Configuring SERIES 1 type XBEE Radios using X-CTU

 

 

For availability of XBEEs & Breakout boards contact :

cooltext753793315         cooltext753790696