The usual one. Post your code. Describe what works and what doesn't. If you are looking for help on using those functions, say that. The seem pretty obvious, though. Each XBee has a DH (the most significant byte) and a DL (the least significant byte) address. Those functions get or set both or one or the other values.
void setup () {
delay(1000);
xbee.begin(9600);
Serial.println(“starting up yo!”);
}
void loop () {
// 1. This will read any data that is available:
xbee.readPacket();
// 2. Now, to check if a packet was received:
if (xbee.getResponse().isAvailable()) {
if (xbee.getResponse().getApiId() == ZB_RX_RESPONSE) {
xbee.getResponse().getZBRxResponse(zbRx);
for (int i = 0; i < zbRx.getDataLength(); i++) {
Serial.print(“payload [”);
Serial.print(i, DEC);
Serial.print("] is “);
Serial.print(zbRx.getData(i));
Serial.println(”");
}
Serial.print(XBeeAddress64.getMsb());
}
}
}
But the MSB isnt constant. So it is not the thing i need
It says:
payload [1] is 8
payload [2] is 0
503448064payload [0] is 11
payload [1] is 8
payload [2] is 0
503473154payload [0] is 11
payload [1] is 8
payload [2] is 0
3407873payload [0] is 11
payload [1] is 8
payload [2] is 0
33634817payload [0] is 11
payload [1] is 8
payload [2] is 0
55payload [0] is 11
payload [1] is 8
payload [2] is 0
53payload [0] is 11
payload [1] is 8
payload [2] is 0
352321536payload [0] is 11
payload [1] is 8
payload [2] is 0
7682
Actually both devices send and receive. That code is from a data logging node that receives data from several sensor nodes. Logically it's a star network, data-flow-wise, but of course a mesh network at the physical level with the XBees XD
How come you only care about the most significant bit? Usually that’s the same for all XBees on a network. It is the least significant bit that is unique. Unless you configured your XBees in an unusual way.