Hello I am developing the rfpackettx and the rfpacketrx... but with 802.15.4 packets. I am aware that I am able to send packets -every 10 seconds-. This packets are identical. And while I am debugging, a breakpoint is triggered every 10 sec. So I am certain I receive the packets/frames.
void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
{
if (e & RF_EventRxEntryDone )
{
/* Toggle pin to indicate RX */
PIN_setOutputValue(ledPinHandle, CONFIG_PIN_RLED,
!PIN_getOutputValue(CONFIG_PIN_RLED));
/* Get current unhandled data entry */
currentDataEntry = RFQueue_getDataEntry();
/* Handle the packet data, located at ¤tDataEntry->data:
* - Length is the first byte with the current configuration
* - Data starts from the second byte */
packetLength = *(uint8_t*)(¤tDataEntry->data);
packetDataPointer = (uint8_t*)(¤tDataEntry->data + 1);
/* Copy the payload + the status byte to the packet variable */
memcpy(packet, packetDataPointer, (packetLength + 1));
RFQueue_nextEntry();
}
}
However it appears the packets are empty, the packet length is zero and there is no data. One wild guess is the fact that the packets are identicals and some filters are discarting them... but this ¿sdk? does not allow it... the RF_cmdIeeeRx_ieee154_0 variable does not contain a field to filter repeated packets...
/* Modify CMD_PROP_RX command for application needs */
/* Set the Data Entity queue for received data */
RF_cmdIeeeRx_ieee154_0.pRxQ = &dataQueue;
/* Discard ignored packets from Rx queue */
RF_cmdIeeeRx_ieee154_0.rxConfig.bAutoFlushIgn = 0;
/* Discard packets with CRC error from Rx queue */
RF_cmdIeeeRx_ieee154_0.rxConfig.bAutoFlushCrc = 0;
/* Implement packet length filtering to avoid PROP_ERROR_RXBUF */
//RF_cmdIeeeRx_ieee154_0.maxPktLen = MAX_LENGTH;
//RF_cmdIeeeRx_ieee154_0.pktConf.bRepeatOk = 1; // could be that??
//RF_cmdIeeeRx_ieee154_0.pktConf.bRepeatNok = 1;// could be that??
When I compile the code I am forced to comment this two assignations... I replace RF_cmdPropRx with RF_cmdIeeeRx_ieee154_0 but it does not recognise some of their fields so I comment them.
But I doubt what else it could be...
Maybe the RF_ScheduleCmdParams aren't correctly initialized... could it be the parameters inside the RF_runScheduleCmd are not valid?
RF_ScheduleCmdParams scheduleParams;
RF_ScheduleCmdParams_init(&scheduleParams);
scheduleParams.startTime = 0;
scheduleParams.startType = RF_StartNotSpecified;
scheduleParams.allowDelay = RF_AllowDelayAny;
scheduleParams.duration = ~(0); // The CMD_FS will run until done
scheduleParams.endTime = ~(0); // The CMD_FS will run until done
scheduleParams.endType = RF_EndNotSpecified;
//(RF_Handle h, RF_Op *pOp, RF_ScheduleCmdParams *pSchParams, RF_Callback pCb, RF_EventMask bmEvent);
RF_EventMask terminationReason = RF_runScheduleCmd(rfHandle, (RF_Op*)&RF_cmdIeeeRx_ieee154_0, &scheduleParams, callback, 0xFFFFFFFFFFFFFFFF);