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!

190 thoughts on “Common XBee Mistakes”

  1. 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. 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. Faludi,
    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. Hi
    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.

    1. 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. 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. 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

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

  7. 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. 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.

    1. 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. 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??

      1. Hello Faludi,
        Thank for your reply. But i tried all the restoration methods, but it didn’t work. So now can i conclude that my Xbee is dead or still if there is some method, so that i can recover.

  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. Sir,
    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. 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??

    1. Rudolph Lombaard

      I’m getting the exact same problem. It’s 2019. Does anybody know how to solve this? It’s seems to be S3B specific.

      1. Did anyone figure out why the xbee is receiving hexadecimal counts in-between packets received?
        I am using the XBee Pro S3B.
        The monitor displays a hexadecimal 7 digit number counting up.
        Example: 00180A2

        1. To prevent this with the S3B you have to desolder the resistor that goes to the RSSI led. Most Xbee modules use pin 6 as a signal strength indicator but on the S3B it is not. When pin 6 of this Xbee is pulled low on start up it enters a special mode that continuously counts up in hex. If you go to the terminal in X-CTU is will just be counting away. The resistor and led effectively pull down pin 6 enough to make it start in this mode every time. De-solder that resistor or led and it will work perfectly.

          1. Yes, that was the problem.
            I just connected pin6(PWM0/RSSI) to pin 1(3.3v), and repowered the device, and the hexadecimal counting stopped, and I started receiving the signals without delay.
            Thankyou so much for helping me, this problem has been ongoing for way to long without being able to solve it.

  14. 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. 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. 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. 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. Hi,
    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. 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

  20. 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

  21. 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

  22. 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?

  23. 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

  24. 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….

  25. 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)

  26. 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)
    [email protected]

  27. 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,

    1. 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.

      1. 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 ?

  28. 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?

    1. 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.

  29. 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.?

  30. 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.

  31. 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 ?

      1. Jose Ignacio Mora Cordero

        Hi Rob, where I put this decoupling capacitors ? in the VCC 5v regulator(10uF) and in GND (1uF)

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

  33. 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

  34. 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.

    1. 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?

  35. Hello everyone,

    I am using zigbee tarang p-20 for communication with robot(atmega16 microcontroller)…after some days my zigbee automatically changes its baud rate from 2400 to 9600…can anyone help me please?

  36. I made a setup which consists of 3 Zigbee’s, 2 routers(Zigbee S2C’s) and 1 coordinator(Zigbee S2). The routers are each connected to arduino nano which collects data from 2 FSR’s and an IMU(frame type: zigbee transmit request and packet size 46 bytes) and sends it to the Coordinator attached to an arduino UNO. All the Xbees are in API mode 2 and working at a baud rate of 115200. I am using a library called “Simple Zigbee Library” to send all the collected data to the Coordinator. The collection and sending of data works fine except that there are packets lost in the way. The nano’s sample data at a frequency of around 25Hz independently. The coordinator tries to read the data send from the zigbees(using the library of course) in every loop, but unfortunately, it seems to receive only around 40-45 samples.(Should have been 25*2=50 samples total from the 2 xbees). Can anybody suggest why this is happening. I need as less data loss as possible for my setup to achieve its motive. Any kind of help is appreciated.

    P.S: It may be important to mention that the coordinator is reading the data only from one xbee in each loop.

  37. I am trying to send remote AT command via xbee s1 module using a c program ,but it is transmitted as normal Tx(Transmit Request 64 bit address).Please tell me how to send the remote AT command using c program .

  38. Hi Rob,
    I am using ultrasonic sensors for my project and i need to send the range found by ultrasonic sensors to the routers connected to it but i am not able to do it without delay, also i want to perform task for specific task for specific range So i need a solution so as to overcome this issue i would be thankful if i get any replies

  39. Pingback: Programmable XBee Radios – Bears in Space

  40. Hello Mr. Faludi,

    I’m working with XBee S1 I’m trying to make a simple project with 3 analog sensors connected to 3 Xbees (End devices) and sending data to coordinator. Everything worked fine, but i have problem with sleep mode. When i set my XBess in SLEEP MODE I don’t get any data.
    My configuration for END DEVICE is:
    SM = 5
    ST = 14
    SP = C8
    IT = 1
    IR = 3E8

    ST and SP values are the same for END and COORDINATOR. What am i doing wrong?

    Thank you for the replay!

      1. Thank you a lot for such a quick answer!

        Yes, i had D0 set correctly, however my problem was solved by changing wrong A1 parameter

  41. I just received my copy of Wireless Sensor Networks. I just received my XBee Pro S2B’s (pn XBP24BZ7SIT B003 revF). My research is telling me I purchased the programmable models. If this is the case can I still follow along with the book? As a beginner should I just get standard Series 2 models to follow along with the book?

    1. The programmable modules should still work, but they do have substantially added complexity. As a beginner I’d recommend either the new XBee3 Zigbee modules (which have programmability too, but in a way that you can completely ignore until you’re ready) or any of the older Series 2 ZigBee modules (S2B or S2C) to keep things simple.

  42. After configuring xbee as an end device, it is not responding to +++ command and AT commands. How could I reset my xbee?

  43. Victor Solorzano

    Hi, can anyone tells me if there is a way to know if receiver receive the api frame from trasnitter or do I need create that code?

  44. Collin Konieczka

    I’m wondering what my issue is with my setup. I have two S2C XBee’s in combination with an arduino uno ->shield pair. I configured the XBee’s in XCTU and was able to send data from 500 feet away between the console log of XCTU and the serial monitor of the Arduino program. No matter what code I try to use whether it is moving a servo or something as simple as blinking an LED, even from code I found online that everyone has said works, I cannot get my XBee’s to communicate. The only way I can get them to communicate is as I said through programs like XCTU and Arduino, however I want them to communicate free of a laptop or computer. It seems to me the XBee’s are “expecting” their TX and RX to come through the micro usb cable and not the XBee through pins 0 and 1.

  45. Collin Konieczka

    I have two S2C XBee’s in combination with an arduino uno ->shield pair. I configured the XBee’s in XCTU and was able to send data from 500 feet away between the console log of XCTU and the serial monitor of the Arduino program. No matter what code I try to use whether it is moving a servo or something as simple as blinking an LED, even from code I found online that everyone has said works, I cannot get my XBee’s to communicate. The only way I can get them to communicate is as I said through programs like XCTU and Arduino, however I want them to communicate free of a laptop or computer. It seems to me the XBee’s are “expecting” their TX and RX to come through the micro usb cable and not the XBee through pins 0 and 1.

  46. I have 2Xbee PRO S2B, one configured as coordinator and other one as End device. I am setting up serial communication between the two. I am not able to set up bidirectional communication. Can anyone help me with this?
    Also, when I am sending data from coordinator to end device, not all the bytes are getting received. Can anyone tell me the solution?

Leave a Reply to Rudolph Lombaard Cancel reply

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

Scroll to Top