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.

LP-EM-CC2745R10-Q1: [BLE 6.0 CS DKC ]How to use whitelist connections in CC2745R10

Part Number: LP-EM-CC2745R10-Q1

Tool/software:

*SDK:9.11.00.18

I currently need to set up the phone white list management on CC2745(car_node demo code) (device role: peripheral + central). Our expectation is to enable the whitelist and add the specified MAC address to the whitelist, so that phones with the corresponding MAC address can connect, and phones that are not in the whitelist cannot connect.On the system configuration, the Filtering Policy is set to Process scan req from all devices and only conn req from devices in AL.When we use HCI_LE_AddAcceptListCmd (uint8 addrType,uint8) after successful BLEAppUtil_registerEventHandler (&peripheralConnHandler) *devAddr) adds my phone address to the whitelist and returns success, running HCI_LE_AddAcceptListCmd returns success, but when I try to connect my phone doesn't connect. I would like to ask how to achieve my desired results?The configuration is as follows,:

    bStatus_t status2;
    PHSCA_ESELOG_PRINTF("%s", "app_peripheral.c -> test_name\r\n");
     uint8_t peer_addr[B_ADDR_LEN] = {0x72,0x59,0x7b,0x63,0x9c,0xb0};
     uint8_t peer_addr2[B_ADDR_LEN] = {0xb0,0x9c,0x63,0x7b,0x59,0x72};
     PHSCA_ESELOG_PRINTF("app_peripheral.c -> addr: %02X:%02X:%02X:%02X:%02X:%02X\r\n",
                         peer_addr[0],peer_addr[1],peer_addr[2],peer_addr[3],peer_addr[4],peer_addr[5]);
     PHSCA_ESELOG_PRINTF("app_peripheral.c -> addr2: %02X:%02X:%02X:%02X:%02X:%02X\r\n",
                            peer_addr2[0],peer_addr2[1],peer_addr2[2],peer_addr2[3],peer_addr2[4],peer_addr2[5]);
     HCI_LE_ClearAcceptListCmd("");
     PHSCA_ESELOG_PRINTF("%s", "app_peripheral.c -> clearAcceptlist\r\n ");

          status =   HCI_LE_AddAcceptListCmd(ADDRTYPE_PUBLIC,peer_addr);
          status2 =   HCI_LE_AddAcceptListCmd(ADDRTYPE_PUBLIC,peer_addr2);
     if((status != SUCCESS) || (status2 !=SUCCESS))
     {
         PHSCA_ESELOG_PRINTF("app_peripheral.c -> AddAcceptlist fail status:0x%2x\r\n",status);
     }
     else
     {
         bStatus_t gstatus;
         PHSCA_ESELOG_PRINTF("%s", "app_peripheral.c -> Local MAC AddAcceptlist SUCCESS\r\n");
         gstatus =  HCI_LE_ReadWhiteListSizeCmd();
         if(gstatus != SUCCESS)
         {
         PHSCA_ESELOG_PRINTF("app_peripheral.c -> Local MAC ReadAcceptlistSize fail status:0x%2x\r\n",gstatus);
         }
         else
         {
             PHSCA_ESELOG_PRINTF("app_connection.c -> Local MAC ReadAcceptlistSize success status:0x%2x\r\n",gstatus);
         }
     }

System configuration :

Result:

Best Regards,

Burt

  • Hello!

    Out of curiosity, are the addresses in little endian or big endian? It may be that the addresses must be in reverse order.

    If that doesn't work, I can try this on my side and give you a response on Monday.

    A quick note about the HCI APIs, they will always return true. You have to check the generated HCI event to pull the actual result, however, I don't think that's the issue.

    Best,

    Nima Behmanesh

  • Hi Nima,

    The address is in little-endian format.I tried reversing the order of the address, but it didn't work.

    Best,

    Burt

  • Hi James,

    Thanks for testing that out. I'll try it on my side following the code you've provided.

    Please allow me a couple of days to get back to you.

    Best,

    Nima Behmanesh