Xbee Addressing problem

Hi,

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. 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 identifier string matches.)

I have tried different version of firmware (10CD) and setting the address using the X-CTU software as well as the terminal. When I write the changes to the device (using the write button on X-CTU 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? Do I need to change a few more configuration settings?

Here is a detail for my physical setup: 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/documentat … 0982_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?

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

regards,

A

DH/DL on the sending device must match the SH, SL address of the receiving device. SH & SL are factory set and can not be changed, read them in X-CTU.

Waltr,

That is true only when you use 64-bit addressing. I am using 16-bit addresses (page 20 of the Xbee product manual) http://ftp1.digi.com/support/documentat … 0982_B.pdf

regards,

A

easier to use 64 MAC addressing.

XCTU:

“CE=0”, // Coordinator mode false

“A1=0”, // end device association disabled

“A2=0”, // coordinator association

Waltr,

You are correct in a way. This is what I have observed:

With the coordinator unplugged, when I run the MY command on the end device I get the address as 2. When I plug in the coordinator and allow the association to complete, the address that MY reutrns on the end device is changed to 0xFFFE. If I now unplug the coordinator and run the MY command for the end device it again returns 2.

This is what the digi documentation has to say for 64-bit addressing:

“When an End Device associates to a Coordinator, its MY parameter is set to 0xFFFE to enable 64-bit addressing. The 64-bit address of the module is stored as SH and SL parameters. To send a packet to a specific module, the Destination Address (DL + DH) on the sender must match the Source Address (SL + SH) of the desired receiver.”

I guess it is true for 16 bit addressing as well.

Stevech, it seems no matter what I want 64 bit addressing is what I finally get!

So, any ideas on how to set the D0 line low on the end device?

regards,

A

aundh:
So, any ideas on how to set the D0 line low on the end device?

regards,

A

Apologies if this is irrelevant...

the DIO output line on the distant device can be altered

  1. using XCTU to configure that chosen bit as a 1, 0, or a virtual link to a mating XBee.

  2. Programmatically, using +++ and AT commands on the serial port or via the Digi API without the +++ escape.

Often, people do the virtual bit extension wirelessly - as in Digi’s documentation. The sending end: you setup the input bit. Setup DH:DL as the MAC address of the far end. Setup the sample interval time. Enable. On the far end device, you setup the same bit as an output, virtual.

I didn’t detail this, but it is simple to do, in hindsight.

I’ve tried using the 16bit address but it can be changed by network association so I just use the 64-bit MAC address which is fixed at the factory.

waltr:
I’ve tried using the 16bit address but it can be changed by network association so I just use the 64-bit MAC address which is fixed at the factory.

Yep, that's the MAC address and it's unique for every radio.

The 16 bit address is at the network layer, above the MAC layer, in the protocol stack. How that address is created and managed depends on what network layer, if any, you choose, such as ZigBee, DigiMesh, 6LoWPAN, etc.

Most projects, I choose to use no network layer at all.