Get specific data from XBee-Arduino


I’m using some XBees S2 in a project. One Coordinator and some Routers, all in API mode, and I’ve been using NodeDiscovery function to know all the routers connected to the network. When I issue the ND function, 64 bit Serial number is reported back with the data of each node. And I store the data in a matrix at this part:

int matDevices[100][8];

while(xbee.readPacket(timeout)) {
// should be receiving AT command responses
if (xbee.getResponse().getApiId() == AT_COMMAND_RESPONSE) {
if (response.isOk()) {
for (int i = 2; i < 10; i++) {
//Serial.print(response.getValue()[i], HEX);
//Serial.print(" “);
Serial.print(” ");

I know how to send data to a specific Xbee: uint16_t addr = 0xFFFE or XBeeAddress64 addr64 = XBeeAddress64(0x0013a200, 0x40…);
How could I pass the dara from the array to the variable addr or addr64? With ND function I would like to save the address of all routers and send data to every router I want.

And last question. I got the routers with a structure with some data. For example:
struct router{
String name={“Sensor”};
String type={“Temp”};

It is possible with the NodeDiscovery function to ask for this router’s information? Or could I create a command in the ND function to ask for the name of the Router “Sensor” ?

Thank you.


I don’t know how you would do it on an Arduino as I don’t support that product. But I would suggest looking over

Digi Support

1 Like