This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2651R3SIPA: Filter policy GAP_ADV_WL_POLICY_WL_ALL_REQ doesn't work

Part Number: CC2651R3SIPA

Hi TI-Experts,

first this is the configuration in our project

Device: CC2651R3SIPA
Compiler: TI Clang v2.1.2LTS
SimpleLink SDK: simplelink_cc13xx_cc26xx_sdk_6_30_01_03

We want to use filter policy GAP_ADV_WL_POLICY_WL_ALL_REQ to allow just connections with a bonded device. But that doesn't work, because when we activate GAP_ADV_WL_POLICY_WL_ALL_REQ no GAP_LINK_ESTABLISHED_EVENT occurs in our system on the other device we see GATT ERROR 133 on connection attempt. This is the code snippet from the init:

memcpy(advParams1.peerAddr, persistentMemory->peerRandomStaticAddress, B_ADDR_LEN);
advParams1.peerAddrType = PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID
advParams1.filterPolicy = GAP_ADV_WL_POLICY_WL_ALL_REQ;

When we set the filter policy to GAP_ADV_WL_POLICY_WL_SCAN_REQ the GAP_LINK_ESTABLISHED_EVENT occurs but the address type is 0x03. We expect 0x01 because we use RANDOM_STATIC_ADDRESS on both sides. This is a snapshot from GAP_LINK_ESTABLISHED_EVENT

The connect packet from the other side contains this header

So, what is the reason for this behaviour?

Thanks in advance

  • Hi Victor,

    I will try to reproduce this issue using our project zero.

    Meanwhile it would be nice if you provide on the steps you performed until you got this issue.

    However  if not already done, I would recommend you to look into our SLA within the security fundamentals there is a good explanation bonding. 

    Regards, 

    Alex

  • Hi Alex,

    thank you for your reply.

    1. We start as an unbonded device. We use this advertiser configuration:

    GapAdv_params_t advParams1 = {
      .eventProps =   GAP_ADV_PROP_CONNECTABLE | GAP_ADV_PROP_LEGACY | GAP_ADV_PROP_SCANNABLE,
      .primIntMin =   160,
      .primIntMax =   160,
      .primChanMap =  GAP_ADV_CHAN_ALL,
      .peerAddrType = PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID,
      .peerAddr =     { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa },
      .filterPolicy = GAP_ADV_WL_POLICY_ANY_REQ,
      .txPower =      GAP_ADV_TX_POWER_NO_PREFERENCE,
      .primPhy =      GAP_ADV_PRIM_PHY_1_MBPS,
      .secPhy =       GAP_ADV_SEC_PHY_1_MBPS,
      .sid =          0
    };

    With this configuration the connection with the peer device can be established and bonding is also successful - Events GAPBOND_PAIRING_STATE_ENCRYPTED & GAPBOND_PAIRING_STATE_BOND_SAVED are executed successful.

    2. At the next startup we change the advertiser configuration:

    memcpy(advParams1.peerAddr, peerRandomStaticAddress, B_ADDR_LEN);
    advParams1.filterPolicy = GAP_ADV_WL_POLICY_WL_SCAN_REQ;

    But in this case the GAP_LINK_ESTABLISHED_EVENT event doesn't occur anymore and the peer device get error 133 on connection request

  • Hi Viktor,

    Did you already have a look into our SImpleLink academy? 

    BLE Security Fundamentals (ti.com)

    We have a example explaining how bonding works with CC2651 available.

    Regards,
    Alex

  • Hi Alex,

    thank your for your hint. We fixed this issue. This are our changes:

    HCI_LE_ClearWhiteListCmd("");
    HCI_LE_AddWhiteListCmd(peerAddressMode, peerRandomStaticAddress);
    
    memcpy(advParams1.peerAddr, peerRandomStaticAddress, B_ADDR_LEN);
    advParams1.filterPolicy = GAP_ADV_WL_POLICY_WL_ALL_REQ;

    Thank you for your help!

    Best regards