Home/Support/Support Forum/Get specific data from XBee-Arduino

Get specific data from XBee-Arduino

0 votes
Hi.

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) {
xbee.getResponse().getAtCommandResponse(response);
if (response.isOk()) {
nodeCount++;
for (int i = 2; i < 10; i++) {
//Serial.print(response.getValue(), HEX);
//Serial.print(" ");
matDevices[nodeCount-1]=response.getValue();
Serial.print(matDevices[nodeCount-1],HEX);
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.
asked Feb 25 in RF Solutions and XBee by AntonioGR96 New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

+1 vote
Antonio,

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 https://www.digi.com/resources/documentation/digidocs/90002002/default.htm#Reference/r_zb_binding.htm?Highlight=binding

Digi Support
answered Feb 25 by mvut Veteran of the Digi Community (11,963 points)
...