Why did not call "ZPS_bAppAddBeaconFilter()" in "BDB_vSetRejoinFilter()"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why did not call "ZPS_bAppAddBeaconFilter()" in "BDB_vSetRejoinFilter()"

1,705 Views
qingshuzhuang
Contributor II

I am using JN5169 with JN-SW-4170 Zigbee 3.0 v1840.

Does this mean the parameter sBeaconFilter will not work?

BDB_vSetRejoinFilter() function code:

pastedImage_1.png

Is it OK If I change the code like this:

pastedImage_2.png

Labels (2)
0 Kudos
Reply
7 Replies

1,543 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

I am not sure what is the modification that you did. 

The example that we provide shows the code:

sBeaconFilter.pu64ExtendPanIdList = NULL;
    sBeaconFilter.u8ListSize = 0;
    sBeaconFilter.u8Lqi = BEACON_FILTER_LQI_VALUE;

Note: If this is a whitelist, only beacons from networks with EPIDs in the list will be accepted

Regards,

Mario

0 Kudos
Reply

1,543 Views
qingshuzhuang
Contributor II

Hi,

  This is my modification:

pastedImage_1.png

What is you SDK version?

I am using JN-SW-4170 Zigbee 3.0 v1840.

It seems my original code is not the same as yours.

Can you put all code about BDB_vSetRejoinFilter() function?

Regards,

qingshu

0 Kudos
Reply

1,543 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

I am working with the same SDK version.

PUBLIC void BDB_vSetRejoinFilter()
{
    uint64 u64Epid;

    sBeaconFilter.u16FilterMap = BF_BITMAP_LQI;
    sBeaconFilter.u8ListSize = 0;
    sBeaconFilter.pu64ExtendPanIdList = NULL;

    u64Epid = ZPS_psAplAibGetAib()->u64ApsUseExtendedPanid;
    if ((u64Epid > 0) &&
        (u64Epid < 0xffffffffffffffffUL))
    {
        /* Apply a beacon filter */
        au64ExtPanListForBeaconFilter[0] = u64Epid;
        sBeaconFilter.pu64ExtendPanIdList = &au64ExtPanListForBeaconFilter[0];
        sBeaconFilter.u8ListSize = BEACON_FILTER_EXT_PAN_LIST_SIZE;
        sBeaconFilter.u16FilterMap |= BF_BITMAP_WHITELIST;
    }
}

Regards,

Mario

0 Kudos
Reply

1,543 Views
qingshuzhuang
Contributor II

Hi,

   Thank you for your reply.

   My original code is the same as yours.

   What do you think about the code I modified?is it necessary?

pastedImage_1.png

0 Kudos
Reply

1,543 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

It depends on your requirement, what are you trying to achieve?

You are saving and filtering the Extended PAN ID, but are you trying to filter some devices?

Do you want to only permit some devices in your network? Did you try to change the network key?

Regards,

Mario

0 Kudos
Reply

1,543 Views
qingshuzhuang
Contributor II

Hi,

   Sorry i didn't make it clear before.

   I want the device to rejoin the network according to the LQI,Select parent node based on LQI。

0 Kudos
Reply

1,543 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

By default, the device is looking for the network baes on the LQI.

Regards,

Mario

0 Kudos
Reply