Home/Support/Support Forum/XBee S2 Sending data from Coordinator to Router - Arduino
New and improved user forum site coming soon

XBee S2 Sending data from Coordinator to Router - Arduino

0 votes

I am working on a project and I got three XBees modules S2. I'm trying to use Arduino to comunicate them. Now I'm using the NodeDiscovery function (in the Coordinator code), wich reports me back the address of the two Routers. So I save the Address of each router in an array, for example: matDevices[100][8]. 100 the total devices we could found and 8 the length of the address.

The code would be something like this:


int matDevices[100][8];

//In the NodeDiscovery Function
Serial.print("Sending command to the XBee ");

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++) {
matDevices[nodeCount-1]=response.getValue(); //get address of every Router discovered




Sorry if it's a little weird.

But I would like to be able to send data this way: XBeeAddress64 addr64 = XBeeAddress64(0x0013a200, 0xXXXXXXXX);

it is possible to send data once I have saved the address in an array, I mean, do I have to send data creating the variable XBeeAddress64 addr64, or it is possible to do it with the same array?

Thank you all and excuse about my poor english at some parts, Spanish over her
asked Mar 26, 2020 in RF Solutions and XBee by AntonioGR96 New to the Community (1 point)

Please log in or register to answer this question.

2 Answers

0 votes

This is the wrong forum for this kind of question. You really need to ask this question on a forum for the Arduino.

Digi Support
answered Mar 27, 2020 by mvut Veteran of the Digi Community (15,515 points)
0 votes
You may want to post this code on stackoverflow.com for help.
answered Apr 7, 2020 by asgm Veteran of the Digi Community (1,499 points)