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.

CC2564CSTBTBLESW: Restricting the LE to connect to a device which is connected over BR/EDR Only

Part Number: CC2564CSTBTBLESW


Hi TI,

We are doing one application/Device to use with Android/ iOS phones with basic features of music and phone calls and an App over BLE to control the device Parameters.

From BR/EDR we are doing the secure simple pairing and we are storing the Linkkeys to make the reconnections. 

Now I want the BLE to connect only to that device(to which BR/EDR is connected), when we were testing we observed that BR/EDR is connected to one phone and BLE is connected to another phone.

We advertise BLE only after BT is connected, now is there any way I can add the same phone's BLE(Random Address)  to the Whitelist so that connection will happen only to that phone.

We saw some articles about generating the BLE IRKs from Linkkeys. Is there any function available to achieve this? 

Regards,

Vishnuprasad V

  • Hi Vishnuprasad,

    I'll follow up here tomorrow.

    Thanks,
    Jacob

  • Hi Vishnuprasad,

    You want to establish both a BLE and BT classic connection to one phone? I think some of the features you are looking for (whitelist, pairing) may be provided in the SPPLEDemo. I'll for an API in Bluetopia, but you may want to start there.

    We advertise BLE only after BT is connected, now is there any way I can add the same phone's BLE(Random Address)  to the Whitelist so that connection will happen only to that phone.

    Another method that can achieve this functionality is Direct, Connectable Advertisements. This type of advertisement is sent to a specific device to establish connections.

    Best,
    Jacob

  • Hi Jacob,

    Yes we are looking on whitelisting and Direct Connectable Advertisements of BLE, What we want is how can we get BLE Address from BT address so that we can whitelist or do directed advertisements to that.

    Regards, 

  • Ok great I'll have more information soon

  • Hi Vishnuprasad,

    I have some more information on how to accomplish Direct, Connectable Advertisements and Acceptlisting (Whitelisting) in Bluetopia.

    Direct, Connectable Advertisements 

    Essentially, you need to modify the ConnectabilityParameters and AdvertisingParameters before you call GAP_LE_Advertising_Enable

     /* Set up the advertising parameters.                 */
    AdvertisingParameters.Advertising_Channel_Map   = HCI_LE_ADVERTISING_CHANNEL_MAP_DEFAULT;
    AdvertisingParameters.Scan_Request_Filter       = fpNoFilter;
    AdvertisingParameters.Connect_Request_Filter    = fpNoFilter;
    AdvertisingParameters.Advertising_Interval_Min  = 100;
    AdvertisingParameters.Advertising_Interval_Max  = 200;
    
    /* Put the controller in direct, connectable mode */
    ConnectabilityParameters.Connectability_Mode   = lcmDirectConnectable;
          ConnectabilityParameters.Own_Address_Type      = OwnAddressType;
    ConnectabilityParameters.Direct_Address_Type   = latPublic;
    
    /* Set the BD_ADDR to advertise to directly */
    ASSIGN_BD_ADDR(ConnectabilityParameters.Direct_Address, 0x88, 0xC2, 0x55, 0xD1, 0xD6, 0x4D);

    Whitelisting

    To accomplish whitelists, you need to first create a WhiteList structure and add a Bluetooth address.

    /* create a WhiteListEntries struct and filter for the desired BD_ADDR */
    GAP_LE_White_List_Entry_t WhiteListEntries;
    WhiteListEntries.Address_Type = latPublic;
    ASSIGN_BD_ADDR(WhiteListEntries.Address, 0xC8, 0xDF, 0x84, 0x25, 0x68, 0x2B);
    
    unsigned int AddedDeviceCount = 1;
    
    GAP_LE_Add_Device_To_White_List(BluetoothStackID, 1, &WhiteListEntries, &AddedDeviceCount);
    
    /* Not currently scanning, go ahead and attempt to perform the    */
    /* scan.                                                          */
    Result = GAP_LE_Perform_Scan(BluetoothStackID, stActive, 10, 10, latPublic, fpWhiteList, TRUE, GAP_LE_Event_Callback, 0);

     IRK

    Check out GAP_LE_Identity_Information_t in GAPAPI.h. There you can specify an IRK and then generate a random address (GAP_LE_Generate_Resolvable_Address) and an authentication response (GAP_LE_Authentication_Response).

    Best,

    Jacob

  • Hi Jacob,

    Thanks for the Info. 

    I understood the Whitelisting Process.

    Little more detail I like to know is,

    1) If the device which needs to be added to the whitelist uses a Random Address, How can I add that device to Whitelist, Does the Whitelist entries have the provision to give IRK also?

    We are using static Addresses only.

    Regards,

  • Hi Vishnuprasad,

    The only way to add a device to the whitelist is to know the address beforehand. I recommend that you bond with the device before in case your address changes at boot, so that you can reconnect. Since you are using a Random Static Address, can you provide that using the GAP_LE_Add_Device_To_White_List API above?

    From my understanding, if you are using a Random Static Address, you do not need an IRK. I believe this is the case because IRK's are combined with a random number to generate the address used in a Resolvable Random Private Addresses.

    Thanks,
    Jacob