New to Xbee’s/Zigbee’s.
Using XBee S2 units.
Having difficulties receiving messages from coordinator to remote.
Coordinator configured as Coordinator -API, and remote is configured Router-AT
Communication from router to coordinator is working fine.
But the router does not seem to receive messages from coordinator.
Here is the code snippet inteded to Set P1 (D11 on pin 7) low.
(P1 is configured sd a digital output as default high (5)
Serial1.print(0x73, HEX); //Start byte
Serial1.print(0x0, HEX); //Hi byte of number of bytes transmitted from length defintion to checksum
Serial1.print(0x10, HEX); //Lo byte of number of bytes transmitted from
Serial1.print(0x17, HEX); //Packet tyoe - in this case AT command to remote
Serial1.print(0x0, HEX); //Frame ID set to 0 for no reply / acknowledge
Serial1.print(0x0, HEX); //ID of receipient 8 bytes or 0xFFFF for broadcast
Serial1.print(0x13, HEX);
Serial1.print(0xA2, HEX);
Serial1.print(0x00, HEX);
Serial1.print(0x40, HEX);
Serial1.print(0x8C, HEX);
Serial1.print(0x53, HEX);
Serial1.print(0x27, HEX); //End of ID of recipient
Serial1.print(0xFF, HEX); //Hi byte of 16 bit nework address or 0xFFFE Serial1.print(0xFE, HEX); //Lo byte of network address
Serial1.print(0x02, HEX); //Option to apply changes immediately in remote
Serial1.print(‘P’, HEX); //reflects AT command ATP1 where PI is D11, pin 7 on remote
Serial1.print(‘1’, HEX);
Serial1.print(bDigOut, HEX); // remote data output value - bDigOut value alternates between 0x4 and 0x5 every 5 sconds
//Checksumis 0xFF-all bytes from end of length deifition
lSum= 0x17 + 0x0
+0x0 + 0x13 + 0xA2 + 0x0 + 0x40 + 0x8C + 0x53 + 0x27
+ 0x20 + 0x01
+ 0x02
+‘P’+‘1’+ bDigOut;
iChkSum=0xFF-(lSum & 0xFF);
Serial1.print(iChkSum, HEX);
P1 (D11) status does not change at all.
Additionally for debugging, is there an API example that will output through serial port the data sent from a coordinator to a remote.
A quick reply will be greatly appreciated.
CJ