Common XBee Mistakes

Bookmark and Share

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)
* Windows and X-CTU are required for firmware upgrades

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

146 Responses to “Common XBee Mistakes”


  • 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

  • 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

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

  • 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)

    Thanks

  • 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?

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

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

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

  • 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??

  • 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?

  • 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?

  • 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??

  • 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

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

  • 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

  • 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:
    .84
    .SH.84
    .84
    .S.84
    .84
    .84
    .84
    .84
    .84
    .S84
    .57
    .S.57
    .S.SH.S.84
    .84
    .84
    .84
    .84
    .SS84
    .84
    .84
    .84
    .57
    .84
    .84
    .S.S84
    .84
    .S.84
    .84
    .84
    .S84
    .SS
    y tendria que dar en este caso solo 84, aunque es un sensor ultrasonico sfr10.

  • 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

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

  • 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

  • I have the Bee Adapter v1.4 from http://www.ElecFreaks.com 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

  • 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

  • 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?

  • 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

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

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

  • 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

    open()

    while True:
    # Retrieve a sample reading from the LT

    flushInput()
    flushOutput()
    #time.sleep(15)
    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
    sync=254
    temp=round(temp_C,2)
    light=round(lux,2)
    no_temp = len(str(temp))
    no_light = len(str(light))
    total_length=no_temp+no_light+3+2
    if total_length<256:
    low_byte=total_length
    high_byte=0
    else:
    low_byte=total_length%256
    high_byte=high_byte/256
    msg_id_low=0
    msg_id_high=0
    checksum=low_byte+high_byte+msg_id_low+msg_id_high+ord('#')+ord(':')+ord(',')
    t=str(temp)
    for c in t:
    if c == '.':
    checksum+=ord('.')
    else:
    checksum+=ord(c)
    t=str(light)
    for c in t:
    if c == '.':
    checksum+=ord('.')
    else:
    checksum+=ord(c)
    checksum=256-(checksum%256)
    if checksum == 256:
    checksum=0
    print "Checksum Value after applying mod operator:%d" %checksum
    packet=str(chr(254))+str(chr(low_byte))+str(chr(high_byte))+str(chr(msg_id_low))+str(chr(msg_id_high))+str('#')+str(temp)+str(':')+str(light)+str(',')+str(chr(checksum))

    print "packet:%s" %packet
    bytes_written = write(packet)
    print "bytes_written : %s value : %s" %(bytes_written,packet)
    time.sleep(15)

  • 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 (0×17)and I receive a right remote comand response (0×97), but, sometimes the ack is wrong or even I don´t receive any ack.
    Thanks a lot for your help.
    Mario
    Madrid (spain)
    anroza@ono.com

  • Dear Robert,
    I have 2 xbee modules (https://www.sparkfun.com/products/10414), 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,
    Dauren

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

      • 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 ?

Leave a Reply