Xbee configuration at runtime

Hi, is It possibile send a String to different xbee modules?
I would create a Little network with a one center module and few module as end devices (star network). But i have need to send a String one time to xbee A, one time to xbee B. How to male It?

Thank. (Sorry for my bad english)

Hi, is It possibile send a String to different xbee modules?

Yes, you can Send String or string data to Other XBeE modUles.

How to male It?

Start with a male sperm.

Using API mode, as in the XBee library, is the easiest way to send data to ONE other XBee.

sorry for the mistake. :slight_smile:
With the Xbee library when I go

XBee xbee = XBee ();

void setup(){
   ...
   xbee.begin (9600);
   ...
}

void loop(){
   ...
   i++;
   uint8_t payload [] = {(char) i};

   XBeeAddress64 addr64 = XBeeAddress64 (SH, SL);

   ZBTxRequest zbTx = ZBTxRequest (addr64, payload, sizeof (payload));

   xbee.send (zbTx);

   changeSHandSL();
   ...
}

I'm going to change the eeprom device, or I'm just going to tell you where to send? because if every time I write in memory then you ruin the module?

up please

I'm going to change the eeprom device, or I'm just going to tell you where to send?

Depending on what you are doing in changeSHandSL(). It is most likely NOT changing the EEPROM on the sending XBee.

the procedure would be like than this

static unsigned int SH_1 = 0x456;
static unsigned int SL_1 = 0x123;
...

void changeSHandSL(){
   switch(count){
      case:1{
         SH = SH_1; 
         SL = SL_1;
         break;
      }
      ...
   }
}

related question guys.
The end devices broadcast for some information in the network. when the coordinator receives the information. reply should be sent in the unicast manner.
now i get the address using following commands:
rx.getRemoteAddress64().getMsb()
rx.getRemoteAddress64().getLsb()

i tried this also:
XBeeAddress64 addr64 = XBeeAddress64(rx.getRemoteAddress64().getMsb(),rx.getRemoteAddress64().getLsb());

but it doesn't work. so can someone tell how i can achieve dynamic allocation of address. Network will be big so defining statically is not an option.

now i get the address using following commands:

The address of what? Where do you store it?

i tried this also:
XBeeAddress64 addr64 = XBeeAddress64(rx.getRemoteAddress64().getMsb(),rx.getRemoteAddress64().getLsb());

but it doesn't work.

Yes it did. It may not have performed in the way you expected, but it did something. Of course, that snippet by itself tells us nothing.

and for my problem??

and for my problem??

Need to see some code and an explanation of what the problem is.

I have this situation

XBee xbee = XBee ();

void setup(){
   ...
   xbee.begin (9600);
   ...
}

void loop(){
   ...
   i++;
   uint8_t payload [] = {(char) i};

   XBeeAddress64 addr64 = XBeeAddress64 (SH, SL);

   ZBTxRequest zbTx = ZBTxRequest (addr64, payload, sizeof (payload));

   xbee.send (zbTx);

   changeSHandSL();
   ...
}

static unsigned int SH_1 = 0x456;
static unsigned int SL_1 = 0x123;
...

void changeSHandSL(){
   switch(count){
      case:1{
         SH = SH_1; 
         SL = SL_1;
         break;
      }
      ...
   }
}

But I don't know if it is correct. I don'tt know if I'm going to change the eeprom, and then I'm going to spoil the memory, or do I properly and the API route the message correctly without modifying the memory module.

I don'tt know if I'm going to change the eeprom, and then I'm going to spoil the memory

You aren't changing the name/address of a device. So, there is no writing to EEPROM in any XBee. All you are doing is defining, in software, the contents of a packet that the XBee is going to transmit. That packet is going to be received by every XBee, but it will be discarded (and now acknowledged) by all but one (hopefully) of them.