[ESP32C6 ] multipairing program

leevisual
Posts: 2
Joined: Thu Nov 23, 2023 5:25 am

[ESP32C6 ] multipairing program

Postby leevisual » Thu Nov 23, 2023 5:49 am

Hi, all
I am developing ble hid peripheral device with ble_hid_device_demo project.
I already have two bonding lists.
I want to connect to 2nd bonding device.


<Question>
1> Do I use whitelist ?
2> How to avoid 1st device connection event ?
3> Let me recommend adjust manner.


Thank you for reply.

leevisual
Posts: 2
Joined: Thu Nov 23, 2023 5:25 am

Re: [ESP32C6 ] multipairing program

Postby leevisual » Thu Nov 23, 2023 8:54 am

This issue just appear on android smartphone.
I appended to pair with Windows10 notebook.
Total number of bonding devices is 3 .
I have 2 android smartphones and 1 windows10 notebook.

Whitelist is operated on Windows10.
But it is not operated on android smartphone.

I append code snippet

static esp_ble_adv_params_t hidd_adv_params = {
.adv_int_min = 0x20,
.adv_int_max = 0x30,
.adv_type = ADV_TYPE_IND,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
//.peer_addr =
//.peer_addr_type =
.channel_map = ADV_CHNL_ALL,
.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};

esp_bd_addr_t dev1 ={0x41,0x2a,0x9e,0x05,0xbe,0x87}; // note10
esp_bd_addr_t dev2 ={0x4e,0xf3,0xd1,0xc3,0x62,0xd7}; // S6
esp_bd_addr_t dev3 ={0xF8,0x63,0x3F,0x0A,0xF1,0xDF}; // Windows 10

iRet=esp_ble_gap_clear_whitelist();

// iRet=esp_ble_gap_update_whitelist(ESP_BLE_WHITELIST_ADD,dev1,BLE_WL_ADDR_TYPE_RANDOM);
// iRet=esp_ble_gap_update_whitelist(ESP_BLE_WHITELIST_ADD,dev2,BLE_WL_ADDR_TYPE_RANDOM);
iRet=esp_ble_gap_update_whitelist(ESP_BLE_WHITELIST_ADD,dev3,BLE_WL_ADDR_TYPE_PUBLIC);

hidd_adv_params.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_WLST;

esp_ble_gap_start_advertising(&hidd_adv_params);

Who is online

Users browsing this forum: Gaston1980, Google [Bot] and 96 guests