Common XBee Mistakes

Your XBee project isn’t working? Here’s some common mistakes that both beginners and experts make:

  • Not using the latest firmware (especially if ATD0 or ATIR is giving an error)*
  • No reference voltage to VREF pin on the 802.15.4 radios (analog and digital reads give wrong values)
  • Forgetting that AT commands use hexadecimals
  • Hitting return after +++ (or otherwise not respecting 1 second default guard time)
  • Conversely, _not_ hitting return after an AT command
  • Letting the XBee time out of command mode before issuing an AT command (you’ll know because you get no response)
  • Forgetting to write the configuration to firmware with ATWR (unless your application configures the radio interactively)
  • Not using ATRE (restore factory defaults) before re-configuring a previously used radio (previous settings lurk unless you manually reset them all)
  • Looking for analog output on the analog input pins instead of pins 6 and 7 (P0, P1)
  • Using a voltage regulator without decoupling capacitors (10uF on input, 1uF on output is good)
  • Mixing up TX and RX pins (fastest way to check this is switch the wires and see if it starts working)
  • Using ZigBee version (ZB Pro or ZNet 2.5) when 802.15.4 version would do just fine (if you don’t need to make a mesh network)
  • Trying to read more than 1.2 Volts on the ZB Pro and ZNet 2.5 analog inputs (that’s the limit)
  • Buying Pro radios when you don’t need them. (Cost more, bigger, use a lot more battery)
  • Deciding the XBees are flaky. (You may not be using them correctly, but they are very reliable)
  • Deciding an XBee is burned out when it’s set to a different baud rate (check ON and ASSC lights)
  • Deciding an XBee is burned out when it is just sleeping (Check ON light to see if it blinks occasionally)
  • Forgetting to supply power or ground (ON light may go on and ASSC light may blink but both will be significantly dimmer)
  • Not contacting Digi sooner for support, especially if your radio seems dead or you keep getting an error you don’t understand.

XBee Arduino Mistakes

  • Sending continuously without any delay (try 10ms delay)
  • Not removing RX and TX connections before uploading code (Arduino will give an error)
  • Not removing RX connection when reseting, if you are continuously receiving data. (Arduino will never reset)

XBee LilyPad Mistakes

  • Hooking up more than 4 Volts to the 3.3V pin
  • Using switches without pull-down resistors (but not if you use the internal pull-ups)
  • Not using a pull-up or pull-down resistor on pins 5 and 7 (these don’t have internal pull-ups at all)
  • Using sensors without voltage divider resistors (if your sensor needs that circuit)
  • Using too-resistive conductive thread for power and ground (try fabric or wires)
X-CTU is required for firmware upgrades

This list isn’t exhaustive. Got a suggestion I should add? Let me know!

158 comments on “Common XBee Mistakes
  1. nemi says:

    Hi everyone,

    I attached a LED to the 6th pin (RSSI) of my XBP24-ZB, but when the radio receives data it doesn’t light up (I’m using a protoboard). But if I use the xbee shield I got form sparkfun and switch it to DLINE (there is a tiny switch for dline/uart) the RSSI led lights up perfectly, I checked and double checked and its hooked up to the same pin. Any ideas of what I might be doing wrong ?
    PD: Awesome book!

  2. magnas says:

    hello guys am working with xbee on libelium waspmote , do any of you know how to read the on/sleep state of xbee, sumthing like a digital read of the sleep pins . there is not much information on which pin to cheack for sleep stauts

    awaiting any reply thanks

  3. iar says:

    I have an Arduino UNO and 2 XB24’s configured with 21A7 and 29A7 firmware versions. All xctu tests are successful including assembling a remote AT Command (apiId = 0x17), transmitting it and receiving an Remote AT Responde (apiId = 0x97).
    With the Coordinator connected to UNO pins 0 and 1, my sketch send a remote AT command but readPacket never receives the return packet. It is as if the UNO’s Rx pin is held at one state by the FTDI. I would appreciate your advise.
    Thanks in advance.

  4. Cristian says:

    I have run 3 Xbee Modules 2 as router and 1 as coordinator.
    My modludes works perfectly for a period but after that the coordinator changes its 16-bit operating pan id, but the routers do not change their 16-bit operating pan id. So, the coordiantor can not send and receive any data from the routers. Also when I use the remote configuration and discover the network the coordinator does not find the routers and vice versa.
    Please help me with this issue.
    Thanks a lot.

    • faludi says:

      Is there a reason you’re changing the operating PAN ID? ATNR 1 will reset your network. Also ATNW on your routers will have them rejoin after a timeout (set in seconds) if they can no longer reach the coordinator, so that could be a piece of the solution. Check my book or the product manual for a description of both.

  5. akshit says:

    I have a problem with the wires ,when I connect a bus which is around 40 cm from my arduino to the xbee regulator I dont receive anything,but it works fine when I use double females close by

  6. hanumesh says:

    i have a zigbee hardware(xbee series 2 ) connected to x-ctu on windows.
    How do i perform “energy scan ” using two xbee modules via x-ctu.

    i use x-ctu to tranfers chunks of data etc,.. and everything works fine

    • faludi says:

      Energy scans are performed automatically by the coordinator when it creates a network. See the XBee ZB Product Manual for a complete description.

  7. bimb says:

    dear faludi,

    welldone here…plz i need to transmit and receive “bio-signals” not “text” via my xbeeS2. How do i go about it?…all the examples i have seen demonstrates sending and reception of texts( numbers, alphabets)


  8. I have an XBEE Pro S2B on a Bee Adapter v1.2 from ElecFreaks. I have the switch to 3v3 and the other switch to H (not sure what this switch is for). If I hook the bee adapter up to usb, I can use X-ctu to discover the the node from a coordinator and all is well. I can also send packets (api).

    However, if I unhook the usb and hook up the power only from a arduino mini (5V and GND – the bee adapter converts to 3.3v, I’ve checked) I cannot discover the node. Can anyone think of any reasons this would be the case?

  9. Kossi says:

    Dear Faludi,
    Hope this is the right place for this post.
    My network:
    I need to collect analog readings at about 5Hz on remote end devices for maybe 10 min and then put them into energy saving mode. Essentially, I am trying to have the end devices go into sleep mode when I am not collecting data and keep them constantly active (no down time) when I am collecting data. I am thinking of achieving this by sending remote AT command ‘SM1’ (pin sleep mode) to end devices when I am collecting data with pin 9 to GND then switch them back to ‘SM4’ when not collecting data.

    When I run the end device in cyclic sleep mode (‘SM4’), the data I receive is fine (fairly steady). But in ‘SM1’ mode, there is an occasional hiccup in the data stream (often a drop of 20 to 40 ADC units). What could it be? I am using a modified version of your Simple_actuator_network processing code combined with the SensorData class from Simple_sensor_network code.

    Thanks in advance for your help.

    • faludi says:

      5Hz is much faster than an XBee will handle directly. I’d recommend another solution unless you are simply using the XBees to transmit data collected and stored using an external processor. I’m not understanding what you are trying to accomplish by changing sleep modes between cyclic to pin sleep. Normally you would use one or the other in an application, but not both.

  10. Ram Kumar says:

    I configure Xbee series 2 module as Router AT with (BR-9600;None-parity) and after that that module is not communicating with X-CTU, And even after hardware reset. How ot slove this issue??

  11. I have an XBee 900HP Digimesh base radio module (coordinator) 3s-wake/15s Sleep, that has stopped listening to commands from a pcDuino /dev/ttyS1/ port. The XBee is still sending modem status packets on the right intervals but I can’t get it to respond to any inputs. I’m using Eagle’s PERL API to communicate with the base radio in escape mode. I’ve also tried minicom and can see the modem status packets but, again no response to +++ or anything I type. It used to work, and I was able to get it to work for a while after taking it out of the socket and reprogramming it but, it has hung again. I’m working remotely by ssh so I can’t resocket it which isn’t a viable long term solution anyway in a product. Do you have any sequence of packets for getting such a hung XBee to respond?

  12. Pratyush says:

    I have written a xbee program on a ATMEGA 2560 based platform in avr studio 4 .It supposed to send 3 hex data periodically to pc terminal.But instead it sends 2 dots(..) some arbitrary hex numbers.(4C 3F).Can you shed some light on this?

  13. daniel says:

    I just received my xbee pro s3b 900 mhz edition with a wireless proto shield. Plugged in for the first time, open up a terminal and I only see a hex counter in each line. The module keeps transmitting that in the serial port. I cannot find any documentation on that. Is that normal??

  14. Bruno says:

    Hi faludi,

    I am doing a wireless home automation system with xbee series 1 and arduino. I made an android app to send commands to arduino that will receive the command through the ethernet shield and then send the api command to the specific xbee…

    The system is working great, but when I send a command to an xbee put an output high or low and then send a command to another xbee with a delay about half second both xbees do nothing and the rssi from both blinks for 2 or 3 seconds and stops and still nothing happens, but if I send a command to only one xbee no matter how fast I send the command from the app the xbee works correly

    If you can help me I would thank you

  15. Dennis says:

    Good list. I had a recent issue where all my series 1’s would report checksum errors after an upload of the firmware using either an Arduino XBee shield or the Adafruit xbee adapter.

    Funny thing my Series 2s did not have any problems updating.

    Assumed it was hardware issue (my bad soldering perhaps) so I purchased a xbib-u dev board out of desperation.

    Same error, so I changed machines and lo and behold it worked fine. Not sure what the problem was but a different computer solved the issue. I re-installed x-ctu on the original computer and it all worked after that.

    Quite strange I wonder if the firmware was corrupted somehow on the original install. Seems odd because it happened to both xb24’s and xbp24’s which seem to use different firmware but not any of the series 2’s.

  16. Bruno says:

    Hi Faludi,

    I am doing a wireless home automation system with xbee series 1 and arduino. I have made and android app to send commands to arduino that will receive the command through the ethernet shield and then send the api command to the specific xbee…

    The system is working great, but when I send a command to an xbee put an output high or low and then send a command to another xbee with a delay about half second or less both xbees do nothing and the rssi from both blinks for about 2 or 3 seconds and then nothing happens, but when I send a command to only one xbee no matter how fast I do it always work the issue only occurs when I send to one and then to the other but very fast. The arduino always get the successful response from xbees.

    Can you help with that ??

    Thank you

  17. miguel says:

    tengo valores extraños al enviarlos desde un arduino one con el Shield a un xbee usb exprored. ya los configure de canal id baudios y nivel de poder. loa valores que me aparecen son:
    y tendria que dar en este caso solo 84, aunque es un sensor ultrasonico sfr10.

  18. Abdurrashid says:

    I have program my two xbee seies1 modules in such away that one is transmitting and the other is receiving.However i noticed that the transmitter is always transmitting even when there is no data from the USART.
    please i need help

  19. manoj says:

    how many(need a max value) routers can add to the XbeeS2B pro module,the S2B works as a coordinator.

  20. Thanasis says:

    Hi Mr. Faludi,

    I have this problem:

    I use extended sleep for an XBee series 2 using this values: SP=140, SN=14, SO=4, so i expect the module to sleep for 64 seconds. In my surprise the module sleeps for about 50 seconds and not for the (expected) 64 seconds. I use 2 AAA batteries to power the module. Any idea why this is happening?

    Thanasis, Greece

  21. adam C says:

    I have the Bee Adapter v1.4 from and am trying to program an XBee S1 and can not ever get it to see the radio. I have updated the USB driver and am running Win7 64-bit. I tested the radios with a serial programmer and the radios are fine. I ordered 2 usb adapter bees and both do the same thing and have also tried 2 separate usb cords. Any help would be appreciated to connect and communicate with these radios thru the Bee Adapter v1.4

  22. Okha says:

    Hello Faludi,
    I want to transfer images using xbee, xbee shield and arduino as intermediate nodes while I will have USB doggle+xbee as sender and sink connected to 2computers. Can you advise the xbee type to use? is there any device to sniff the packet at the receiver? any other useful advise will help. Thank You

  23. CHEN says:

    In a multihop network,from point A to B, how can I configure all the xbee pro, In such a way that A can transmit to B and B to C, C to D, D to E and so on?

  24. CATALIN says:

    Hi guys.
    I have a problem to connect to an xbee module. I tried to connect to the module via a xbee shield (using the shield connected to arduino) and using xbee adapter straight to pc(via usb).
    I tried different baud rates. The xbee module doesn’t respond. This module was taken from a working environment so it is working but I connnet connect to it. Any information would be appreciated
    Thank you

  25. pankaj says:

    our xbee(s2 v1.1) is giving 0.8v drop across 1(vcc) and 10(gnd)..although suplly is 3.3 if we are disconnecting the xbee module….

  26. Fida says:

    How to Configure Xbee series radios for multi-hop Communication?

  27. Jayagopi says:

    Hi Mr. Faludi,

    I’m stuck in a serial communication between Digi Xbee ConnectPort X3 and an embedded board . Digi Xbee is in python code . I’m sending the temperature and light sensor values from digi to the board in the form a packet(Sync|Low Byte | High Byte | Data | Checksum) which the device accepts . I tested both the devices seperately . They work perfectly. I send data to the embedded board from my computer using pyserial it receives data perfectly (around 30 data). Then I checked whether the Digi is sending data perfectly using my computer in COM Port. But when I connect the Digi device to the board the digi sends very few data(1 to 3) ie I can debug the digi Xbee to an extend in which i see after sending few data the COM port of Digi Xbee closes .

    I have added part of the source code of Digi Xbee for your understanding


    while True:
    # Retrieve a sample reading from the LT

    io_sample = xbee.ddo_get_param(sensor_address, “is”)
    light = parseIS(io_sample)[“AI1”]
    temp = parseIS(io_sample)[“AI2”]
    hum = parseIS(io_sample)[“AI3”]
    mVanalog = (float(temp) / 1023.0) * 1200.0
    temp_C = (mVanalog – 500.0)/ 10.0 # – 4.0
    lux = (float(light) / 1023.0) * 1200.0
    print “hum:%f” %hum
    no_temp = len(str(temp))
    no_light = len(str(light))
    if total_length<256:
    for c in t:
    if c == '.':
    for c in t:
    if c == '.':
    if checksum == 256:
    print "Checksum Value after applying mod operator:%d" %checksum

    print "packet:%s" %packet
    bytes_written = write(packet)
    print "bytes_written : %s value : %s" %(bytes_written,packet)

  28. Dear Faludi,
    I´ve got a XBee serie 1 and I´m working in API mode.
    From time to time, when I send a data the acknowledge received is wrong. An example. I send a remote AT command (0x17)and I receive a right remote comand response (0x97), but, sometimes the ack is wrong or even I don´t receive any ack.
    Thanks a lot for your help.
    Madrid (spain)

  29. Dauren says:

    Dear Robert,
    I have 2 xbee modules (, coordinator and router. Both are in API mode. They communicate fine, but the problem is that if I send bytes to serial port in a row (without delay) xbee module does not react at all.
    If I put delay between bytes everithing works ok.
    You also wrote about “Sending continuously without any delay (try 10ms delay)”. Why should I put delay between bytes?
    Thank you

    Knid regards,

    • faludi says:

      Without the delay you may be overflowing the buffer. The radio is fast but your microcontroller is faster. There’s nothing magic about 10ms specifically, so try different delays until you get one that works. You can also sample frequently and send messages that contain multiple readings which might help, as each message you send comes with transactional overhead.

      • Dauren says:

        Thank you for your response.
        I know that Zigbee is not supposed to be used for streaming data, but I’m trying to transfer voice over the network.
        When I use 9600 baud rate, for instance, I have to put 1ms delay between bytes in API frame. So sending 20 bytes through UART takes 40ms, which makes translation twice slower (4800 bps). If the higher baud rate is set the delay between bytes can be reduced proportionally (1ms delay for 9600, 500us for 19200, 250us for 38400 and so on).
        For 115200 baud rate (max baud rate for my modules) the delay between sending bytes is 85us. Does it mean that the highest data rate for this case will be 57600bps ?

  30. garry says:

    Hello , I am using xbee with mbed lpc 1768.
    And I am receiving the data in hex and I expect to receive in ascii or integer.
    I have used Tera term, real term and XCTU also.
    I am not getting the whole data.
    basket overflow…
    I think the problem is with the data type format or buffer (I am using char type array to save incoming data)
    I tried but I can not use the unsigned char or int type array.
    anyone can help?

    • faludi says:

      All data is sent binary. Hex, ASCII and so forth are displayed by your terminal interface, and that can typically be changed in the serial terminal’s settings.

  31. vineeth says:

    Hello, I am using 2 numbers xbee pro s1 (xbp24-10ef) ,i can’t able to receive any packet data on arduino mega .i can able to communicate between two xbee module via xctu software.But arduino mega i tried xbee code on serial port1.No packet is recvng. xbee.readpacket() is not working.?

  32. OmkarNinawe says:

    I wish to implement a wireless sensor network with a temperature and pulse rate sensor. I have used 3arduino boards, 3 shileds aand 3 xbee series2 mounted on those shields.
    I have configured one coordinator and two routers(each connected to one sensor), however I dont know how to proceed further. Also being a newbie I dont know the arduino code either.
    Please guide me through this.

  33. Omar El Kurdi says:

    Dear Mr. Faludi,
    I am facing a weird problem with my xbees.
    i am powering up the Xbee using an external power source and i’m trying to connect it wirelessly to Arduino (Serial Communication), however it is not working.
    when i power the xbee from the Arduino board using jumper wires, the serial connection works. why is that happening and how can i solve it ?

  34. tamam says:

    hello , i want help to use xbee endpoints , i don’t know how use it and connect multi device hardware with it ?

  35. sandy says:

    hey, actually i was connected my x-bee of s2 model with 9v, it shows no response with x-ctu , so could u tell me whether this problem would resolve or i lost my xbee completely.Thank you

  36. Megha says:

    Dear Faludi,
    I am very much confused with mesh operation and frame sending ..when code is required API mode..etc..
    One of my major doubts is…i have created a mesh network operating in AT mode…but it works only if all are configured as routers ..if i configure one radio as coordinator except that all others are receiving data.Also i want to see all data from which node etc in coordinator(gateway)..please help me…i have ambiguity over the entire thing…..Please Sir.

    • Rob Faludi says:

      You don’t mention which XBee you’re using, what host platform they’re communicating with or the specific problem or error that is occurring. Are you working from examples in my book or doing something else?

Leave a Reply

Your email address will not be published. Required fields are marked *


Subscribe by email:

Enter your email address:

Delivered by FeedBurner