XBee addressing problem


I just got XBees to start a wireless project. I am using series 1 radios with firmware version 10E6. The setup is a coordinator and end device set up. I have a simple goal: set pin D0 on the end device low. Initially the D0 pin on the end device is set high, and I can verify that with an LED.

I have set the PAN Id and channel Ids for both correctly.
I have set the coordinator: CE flag = 1, A2 = 100 (binary).

For the end device CE =0 and A1 = 100.

The coordinator is connected to an XBee explorer that is plugged into the USB port of my PC. The end device is powered by a battery using a 3.3V regulator. I am using 16 bit addressing.

The address setup is as follows
Cordinator End Device
MY = 0x0001 MY = 0x0002
DH = 0 DH = 0
DL = 0x0002 DL = 0x0001

On the end device, I have set the IA address to 0x0001.

With the two devices powered up ND command on the coordinator discovers the end device but the adress for the end device is shown as FFFE and not 2 as it should. (It is the correct device because the node identofier string matches.)

I have tried different version of firmware (10CD) and setting the address using hte X-ctu software as well as the terminal. When I write the changes to the device (using the write button on xctu or WR command on the terminal) it complies but then once I unplug the device it restores the defaults.

Any ideas on why this is happening?

My other question is: Assuming I can fix this problem of adressing how do I set the D0 line low on the end device?


May be the problem is with the physical setup, but Idon't know. Here is a detail for my physical setup:

  1. The coordinator is connected to the XBee explorer which is plugged into the USB port of my PC. The end device sits on a breadboard with only the power and ground connceted. There is no "physical" connection between the two modules. My aim is for them to communicate wirelessly.

Page 7 on the XBee manual at http://ftp1.digi.com/support/documentation/90000982_B.pdf

says "Minimum connections: VCC, GND, DOUT & DIN", but I think that refers to connection with the host application. Do I need to make any more connections?

Any suggestions?


Sometimes X-ctu will appear to write but does not - easy to check by reading after writing.
If it won't write, it may be due to the fact that the device is set to api mode with escape off or on and you are not setting those on the X-ctu
panel. I.e. you must write with X-ctu set to the same parameters as the device. Try variations until it works.

D0 can be set high/low by toggling the pull-up resistors with a command. Check Xbee manual.

How are you planning to trigger the D0 low/high change?

If you want a low input on the coord. to drive the remote radio pin low see this XBee Tips & Tricks and Using Xbees to control relays « Adafruit Industries – Makers, hackers, artists, designers and engineers!

If you want to send a serial command to the coord to drive it low/high, you could use the Remote AT command. This requires API mode. There may be a way to do in in AT mode but I'm not sure.