Hi,
I dont know how to process acknowledgement. I have following program, I send "1" to "SWITCH_ADDR", but how can I know, that data was successfully recieved? The other device (SWITCH_ADDR) send acknowledgement, but I dont know how to process it. What is command for this? When I dont recieve acknowledgement I want to resend packet. Thank you for help.
// Config basicRF
basicRfConfig.panId = PAN_ID;
basicRfConfig.channel = RF_CHANNEL;
basicRfConfig.ackRequest = TRUE;
// Initalise board peripherals
halBoardInit();
halJoystickInit();
// Initalise hal_rf
if(halRfInit()==FAILED) {
HAL_ASSERT(FALSE);
}
basicRfConfig.myAddr = OVLADAC_ADDR;
if(basicRfInit(&basicRfConfig)==FAILED) {
HAL_ASSERT(FALSE);
}
// Keep Receiver off when not needed to save power
basicRfReceiveOn();
// Main loop
while (TRUE) {
pTxData[0]=1;
basicRfSendPacket(SWITCH_ADDR, pTxData, APP_PAYLOAD_LENGTH);
pTxData[0]=LIGHT_TOGGLE_CMD;
here I need process acknowledgement//
// Put MCU to sleep. It will wake up on joystick interrupt
halIntOff();
halMcuSetLowPowerMode(HAL_MCU_LPM_3); // Will turn on global
// interrupt enable
halIntOn();