Reply
Posts: 10
Registered: ‎09-25-2016

EFR32 802.15.4 ADDRESS FILTER

[ Edited ]

Hi all ,

I met one problem when using EFR32FG IEEE802.15.4.

I can receive 802.15.4 data now, but can not filter address.

My code:

 

uint8_t longAddress[8] = { 0x11, 0x22, 0x33, 0x44,
0x55, 0x66, 0x77, 0x88};

RAIL_IEEE802154_AddrConfig_t nodeAddress = { 0x1234, 0x5678,
&longAddress[0] };
status = RAIL_IEEE802154_SetAddresses(&nodeAddress);

/* Configure 802.15.4 structure */
RAIL_IEEE802154_Config_t config = { false, false,
RAIL_IEEE802154_ACCEPT_STANDARD_FRAMES,
RAIL_RF_STATE_RX, 100, 192, 894, &nodeAddress };
/* Init RAIL => this also initalize ACK sending and address filtering */
if ( RAIL_STATUS_NO_ERROR != RAIL_IEEE802154_2p4GHzRadioConfig())
{
return 1;
}
if ( RAIL_STATUS_NO_ERROR != RAIL_IEEE802154_Init(&config))
{
return 1;
}

// Initialize Radio
RAIL_RfInit(&railInitParams);

// Initialize Radio Calibrations
RAIL_CalInit(&railCalInitParams);

// Configure modem, packet handler
changeRadioConfig(currentConfig);

// Configure RAIL callbacks with no appended info
RAIL_RxConfig(( RAIL_RX_CONFIG_FRAME_ERROR
| RAIL_RX_CONFIG_SYNC1_DETECT
| RAIL_RX_CONFIG_SYNC2_DETECT
| RAIL_RX_CONFIG_ADDRESS_FILTERED
| RAIL_RX_CONFIG_BUFFER_OVERFLOW
| RAIL_RX_CONFIG_BUFFER_UNDERFLOW
| RAIL_RX_CONFIG_SCHEDULED_RX_END
| RAIL_RX_CONFIG_PACKET_ABORTED),
true );
RAIL_TxConfig( RAIL_TX_CONFIG_BUFFER_UNDERFLOW
| RAIL_TX_CONFIG_BUFFER_OVERFLOW
| RAIL_TX_CONFIG_TX_ABORTED
| RAIL_TX_CONFIG_TX_BLOCKED
| RAIL_TX_CONFIG_CHANNEL_BUSY
| RAIL_TX_CONFIG_CHANNEL_CLEAR
| RAIL_TX_CONFIG_CCA_RETRY
| RAIL_TX_CONFIG_START_CCA);

RAIL_SetRxTransitions(RAIL_RF_STATE_RX, RAIL_RF_STATE_RX,
RAIL_IGNORE_NO_ERRORS);
RAIL_SetTxTransitions(RAIL_RF_STATE_RX, RAIL_RF_STATE_RX);

 

 

The code can receive any  channel 0 802.15.4 frame even I have set the address filter.

it will never go to RAIL_RX_CONFIG_ADDRESS_FILTERED;

 

 

/******************************************************************************
* RAIL Callback Implementation
*****************************************************************************/
void RAILCb_RxRadioStatusExt(uint32_t status)
{
if (status & RAIL_RX_CONFIG_FRAME_ERROR)
{
receivingPacket = false;
counters.frameError++;
LedToggle(1);
}
if (status & RAIL_RX_CONFIG_SYNC1_DETECT)
{
receivingPacket = true;
counters.syncDetect++;
rxFifoPrep();
if (abortRxDelay != 0) {
RAIL_TimerSet(abortRxDelay, RAIL_TIME_DELAY);
}
}
if (status & RAIL_RX_CONFIG_PREAMBLE_DETECT)
{
counters.preambleDetect++;
}
if (status & RAIL_RX_CONFIG_BUFFER_OVERFLOW)
{
receivingPacket = false;
counters.rxOfEvent++;
}
if (status & RAIL_RX_CONFIG_BUFFER_UNDERFLOW)
{
receivingPacket = false;
counters.rxUfEvent++;
}
if (status & RAIL_RX_CONFIG_ADDRESS_FILTERED)
{
receivingPacket = false;
counters.addrFilterEvent++;
}
if (status & RAIL_RX_CONFIG_RF_SENSED)
{
counters.rfSensedEvent++;
if (counters.rfSensedEvent == 0) // Wrap it to 1 not 0
{
counters.rfSensedEvent = 1;
}
}
if (status & RAIL_RX_CONFIG_PACKET_ABORTED)
{
counters.rxFail++;
}
// End scheduled receive mode if an appropriate end or error event is received
if ((status & RAIL_RX_CONFIG_SCHEDULED_RX_END)
|| ((schRxStopOnRxEvent && inAppMode(RX_SCHEDULED, NULL))
&& (status & RAIL_RX_CONFIG_ADDRESS_FILTERED
|| status & RAIL_RX_CONFIG_BUFFER_OVERFLOW
|| status & RAIL_RX_CONFIG_FRAME_ERROR)))
{
enableAppMode(RX_SCHEDULED, false, NULL);
}
}

 

Please help!   any sample code about address filter 802.15.4.