Hi,
I am trying to modify the code on the design example provided for the ez430 rf2500 to
1) make the Led on the access point blink when the switch on the end device is pressed and
2)Led on the end device blink when the switch on the access point is pressed.
I cannot make the second problem work as the SMPL_Recieve on the End Device is giving the SMPL_NO_FRAME error, but the access point says that transmission to end device is successful...
Important part of code below:
Access point:
uint8_t swOp[3];
P1DIR &=0xFB ; //Set switch direction temp=ReadSwitch(); if(!temp) //Switch output is low if pressed { swOp[0]=1; swOp[1]=1; swOp[2]=1; //Initially all Leds are in the off state BSP_TURN_ON_LED1();//Switch on Red Led if (SMPL_SUCCESS == SMPL_Send(sLID[0], swOp, sizeof(swOp))) TXString("\r\nTransmitONSuccess",19); } else { swOp[0]=0; swOp[1]=0; swOp[2]=0; BSP_TURN_OFF_LED1(); if (SMPL_SUCCESS == SMPL_Send(sLID[0], swOp, sizeof(swOp))) TXString("\r\nTransmitOFFSuccess",20); }
END DEVICE: Recieve Code:
uint8_t messg[MAX_APP_PAYLOAD], len;
if(SMPL_SUCCESS==SMPL_Receive(linkID1, messg, &len)) { //This code is not working as it does not return a successful receive }
else if(SMPL_NO_FRAME==SMPL_Receive(linkID1, messg, &len)) { BSP_TURN_ON_LED1(); //This code is working..... BlinkLed2(); }
PLEASE HELP! :)