Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

RTOS/LAUNCHXL-CC1310: Problem with RX filtering

$
0
0

Part Number:LAUNCHXL-CC1310

Tool/software:TI-RTOS

Hi,

 I'm using EasyLink with 4 byte addresses. I want to filter packets at Rx based on the destination address. I tried using the following code, but this wouldn't work. Am I missing anything?

EasyLink_Status init_rx(void)
{
    EasyLink_init(EasyLink_Phy_625bpsLrm);

    EasyLink_setCtrl(EasyLink_Ctrl_AddSize, 4);

    uint32_t addrFilter = get_my_address();
   EasyLink_enableRxAddrFilter((uint8_t *) (&addrFilter), 4, 1);

 }

void rcv(void) {

init_rx();

While(1) {

    rxPacket.absTime = 0;
    EasyLink_Status result = EasyLink_receive(&rxPacket);

process_packet(rxPacket);

}

}

Tx Side

EasyLink_Status ra_phy_init_tx(void)
{

    EasyLink_init(EasyLink_Phy_625bpsLrm);
    /* Set output power to 12dBm */
    EasyLink_setRfPwr(12);

    EasyLink_setCtrl(EasyLink_Ctrl_AddSize, 4);

}

void send((EasyLink_TxPacket *p, uint32_t dest, uint8_t *data,
                          uint16_t datalength)
{
    memcpy(p->dstAddr, &dest, 4);

    if (data != NULL)
    {
        memcpy(p->payload, data, datalength);
    }

    p->absTime = 0;

    p->len = datalength;

   EasyLink_transmit(&txPacket);

}

Stripped off some code for easy readability. Data is totally filtered. Nothing is reaching on the other rx side.

If I remove EasyLink_setCtrl() on both sides, data is received, but no filtering is being applied. May be because of 1 byte filtering is not enough.

Thanks in advance for any suggestions.

Vamsi


Viewing all articles
Browse latest Browse all 262198

Trending Articles