Other Parts Discussed in Thread: Z-STACK, CC2530
After successfully binding (end device bind request) two End devices, I would like to use indirect addressing mode to send from the one bound end device to the other, however I cannot find an appropriate message. As it stands I can successfully send from the one to the other using the AF_DATA_REQUEST, however only when using the destination party short address, which is defying the purpose somewhat. If I follow the message flow it does get sent to the Coordinator and then to the destination end point as expected. For obvious reasons II would like to get away from first retrieving and then using the destination short address of the other bound party. Could you please advise.
The software I have is the ez430 zigbee mini-kit example code and the Z-stack the kit shipped with. I do not currently have the capability to compile the stack.
The current message I use (to send data to the other bound peer device) looks as follows:
znpBuf[0] = AF_DATA_REQUEST_PAYLOAD_LEN + dataLength;
znpBuf[1] = MSB(AF_DATA_REQUEST);
znpBuf[2] = LSB(AF_DATA_REQUEST);
znpBuf[3] = LSB(destinationShortAddress);
znpBuf[4] = MSB(destinationShortAddress);
znpBuf[5] = destinationEndpoint;
znpBuf[6] = sourceEndpoint;
znpBuf[7] = LSB(clusterId);
znpBuf[8] = MSB(clusterId);
znpBuf[9] = transactionSequenceNumber++;
znpBuf[10] = MAC_ACK; //Could also use AF_APS_ACK;
znpBuf[11] = DEFAULT_RADIUS;
znpBuf[12] = dataLength;
memcpy(znpBuf+AF_DATA_REQUEST_PAYLOAD_LEN+3, data, dataLength);