(xBee) How to get connected endpoints in the coordinator?

Hi!

I have a small network of a single Corrdinator and N end-points.
The coordinator must ask for each end-point to send some data (pooling)

Is there a way to get the address of each end point connected to the coordinator?

Also is there a way to identify which end-point sent the data?

Any help will be very useful.

Thanks in advance.

Are the XBees connected to Arduinos, or standalone?

Are you using API mode or AT mode?

Which XBees, Series 1 or Series 2/2.5, are you using?

Whether what you want to do is possible, or not, and whether it is easy, or not, depends on these details.

PaulS:
Are the XBees connected to Arduinos, or standalone?

Are you using API mode or AT mode?

Which XBees, Series 1 or Series 2/2.5, are you using?

Whether what you want to do is possible, or not, and whether it is easy, or not, depends on these details.

Im using Arduinos with xBees Series 1.

I'm using API mode, but I can change that if necessary.

Thanks!

Im using Arduinos with xBees Series 1.

This makes it super easy. The Arduino simply needs to add a unique ID to the data that it sends. Each Arduino gets a different name, that it adds to whatever it sends.

The receiver then knows who (which Arduino) sent the data.

PaulS:
This makes it super easy. The Arduino simply needs to add a unique ID to the data that it sends. Each Arduino gets a different name, that it adds to whatever it sends.

The receiver then knows who (which Arduino) sent the data.

I Had this Idea, but this way each arduino should have a different program, each one compiled to transmit a uniqueid right? Or is there a way to retrive a unique id from the xBee so that I can write a generic program for all end-points?

Thanks!

The easiest thing to do would be to have a sketch that you modify for each Arduino, that causes the Arduino to store a unique value in EEPROM, in setup().

Change the sketch, upload to an Arduino.

Then, load the real sketch, which, in setup(), reads that stored ID.

That way, all the running Arduinos have the same code. Before using in this scheme, the Arduino needs to have the unique ID sketch modified and uploaded.

There are ways of having the XBee itself report it's MY value, but I don't have any experience doing that.

Not sure about Series 1, but Series 2 has a Node Discover (ND) command, I might look for that.

I've managed to avoid polling and the associated overhead by just having my endpoints send data when they have it ready. If it's important to know which endpoint, I assign a unique Node Identifier (NI) when I configure the XBees, and have them send that as part of the data packet.

One of the many links for the manual on the series 1 is : http://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Manual.pdf and starting on page 10 is a discussion of API mode. In API mode the packet you receive has the unique source address in it. I don't use series 1 my, network of XBees is totally series 2 so I can get the data out of the packets much like you want to. However, from looking at the document, it appears the devices will do exactly what you want. In the document, scroll down to page 54 and take a look at the format of the packets. Everything you ever wanted to know about the XBee series 1 is in there somewhere.

On my series 2 XBees, I grabbed it out of the header and away I went.