Hello,
I have a problem to setup a Coordinator and 2 End Device attached to Arduino Uno.
Setup in XCTU
Controller:
CH: E, ID: 3332, DH:111, DL: 111, MY: 111, CE: 1, A2: 4, NI: Master, AP: 1
End Device 1:
CH: E, ID: 3332, DH:222, DL: 222, MY: 222, CE: 0, A1: 4, NI: Sensor1, AP: 1
End Device 2:
CH: E, ID: 3332, DH:333, DL: 333, MY: 333, CE: 0, A1: 4, NI: Sensor2, AP: 1
On the controller, I have the following code:
#include
#include
SoftwareSerial mySerial(2, 3);
XBee xbee=XBee();
ZBRxResponse zbRx=ZBRxResponse();
void setup () {
Serial.begin(9600);
delay(1000);
mySerial.begin(9600);
delay(1000);
xbee.begin(mySerial);
Serial.println("End Setup");
}
void loop () {
xbee.readPacket();
if(xbee.getResponse().isAvailable()) {
if(xbee.getResponse().getApiId() == ZB_RX_RESPONSE) {
xbee.getResponse().getZBRxResponse(zbRx);
for(int i=0; i
#include
uint8_t text[]={'S', 'e', 'n', 's', 'o', 'r', '_', 'X'};
XBee xbee=XBee();
XBeeAddress64 remoteAddress=XBeeAddress64(0x111, 0x111);
ZBTxRequest zbTx=ZBTxRequest(remoteAddress, text, sizeof(text));
void setup() {
Serial.begin(9600);
xbee.setSerial(Serial);
}
void loop() {
xbee.send(zbTx);
delay(5000);
}
Is this right?
I see the transmit LED blinking every 5sec on both End Device and nothing on the Coordinator. Also, I don’t see any traffic in the Console of XCTU and in the Network Working mode, the End Device appears with a ? in stead of E.
Any help is welcome!
Renaud