by now, the idea is works in api mode and software serial in the easiest way.
to get working with parameters of sofware serial is mandatory modify the software serial library,
but in this moment the config of the pins for software serial is in the cpp file of this library
in the example show how config in order to get working the system
void xbee::xbee_in_array() bool xbee::xbee_detected() int xbee::endbyte_pos() char xbee::buffer(int posi)String xbee::array_concat(int ini, int fin) String xbee::getdata()void xbee::begin(int speed, char buffer[],int pin)uint8_t xbee::checksum(int ini, uint8_t fin, char bufa) void xbee::sendata(String data) /*
in xbee_serial_array.cpp must change software serial pins
*/
#include <xbee_serial_array.h>
uint8_t wakeup = 9;
xbee xbeeSerial;
char xbeedir[8] = {0x00, 0x13, 0xA2, 0x00, 0x40, 0xE6, 0x71, 0x55};//coordinator
String anal;
String response;
// the setup function runs once when you press reset or power the board
void setup() {
xbeeSerial.begin(9600, xbeedir, wakeup);
Serial.println("online");
}
// the loop function runs over and over again until power down or reset
void loop() {
xbeeSerial.xbee_in_array();//siempre recive datos
if (xbeeSerial.xbee_detected()) {
response = xbeeSerial.getdata();
Serial.println(response);
if (response == "anal") {
Serial.println("Recibido");
anal = String(analogRead(luz));
xbeeSerial.sendata(anal);
}
}
}