Tool/software: TI-RTOS
Hi,
my problem is the following. We developped a solution based on the collector/sensor examples from TI, and we want, in the collector, to get the RSSI on the RF core in order to perform jamming detection.
The solution I try to set up is as following : I set up a timer every second, in the callback, I am calling the RF_getRssi(rfHandle) function, which returns an error (-128) all the time.
So I have four questions :
- The collector has rx_on_idle set to true. Do we need to send an rx command before trying to get the rssi ?
- Is it safe to perform commands on the RF core while the main program is still executing and can exchange data with devices connected to the pan?
- What is a specific way to get a valid reading of the RSSI ?
- Is there a way to ensure that the RSSI is received when no message is currently being received ?
Here is the code of my opening of the rf core :
RF_Params rfParams;
RF_Params_init(&rfParams);
RF_RadioSetup *pOpSetup = NULL;
// Init jamming period mask
for(i = 0; i < DETECTION_PERIOD_S; ++i) {
jdParams.jammingPeriodMask <<= 1;
jdParams.jammingPeriodMask += 1;
}
// Open RF_core to be able to query the rssi values
pOpSetup = (RF_RadioSetup *)&RF_cmdPropRx;
jdParams.rfHandle = RF_open(&jdParams.rfObject, &RF_prop, pOpSetup, &rfParams);
if(jdParams.rfHandle == NULL) {
System_abort("RF core opening failed");
}
With this cmdPropRx definition :
// CMD_PROP_RX
rfc_CMD_PROP_RX_t RF_cmdPropRx =
{
.commandNo = 0x3802,
.status = 0x0000,
.pNextOp = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.pktConf.bFsOff = 0x0,
.pktConf.bRepeatOk = 0x0,
.pktConf.bRepeatNok = 0x0,
.pktConf.bUseCrc = 0x1,
.pktConf.bVarLen = 0x1,
.pktConf.bChkAddress = 0x0,
.pktConf.endType = 0x0,
.pktConf.filterOp = 0x0,
.rxConf.bAutoFlushIgnored = 0x0,
.rxConf.bAutoFlushCrcErr = 0x0,
.rxConf.bIncludeHdr = 0x1,
.rxConf.bIncludeCrc = 0x0,
.rxConf.bAppendRssi = 0x0,
.rxConf.bAppendTimestamp = 0x0,
.rxConf.bAppendStatus = 0x1,
.syncWord = 0x930B51DE,
.maxPktLen = 0xFF, // MAKE SURE DATA ENTRY IS LARGE ENOUGH
.address0 = 0xAA,
.address1 = 0xBB,
.endTrigger.triggerType = 0x1,
.endTrigger.bEnaCmd = 0x0,
.endTrigger.triggerNo = 0x0,
.endTrigger.pastTrig = 0x0,
.endTime = 0x00000000,
.pQueue = 0, // INSERT APPLICABLE POINTER: (dataQueue_t*)&xxx
.pOutput = 0, // INSERT APPLICABLE POINTER: (uint8_t*)&xxx
};
Thanks very much by advance for your help !