Hi,
I am using a freertos port of BTstack with STM32L4 (host) and ESP32 (controller) and it is working fine. I am running the gap_le_advertisments example with slight modifications in gap_le_advertisments_setup.
static void gap_le_advertisements_setup(void)
{
static bd_addr_t addr_1 = {0xF8, 0x33, 0x31, 0x5E, 0xBD, 0x1A};
static bd_addr_t addr_2 = {0xA0, 0x82, 0x22, 0xD4, 0x4C, 0xB5};
gap_whitelist_add(BD_ADDR_TYPE_LE_PUBLIC, addr_1);
gap_whitelist_add(BD_ADDR_TYPE_LE_PUBLIC, addr_2);
// Active scanning, 100% (scan interval = scan window = 30 seconds), white list on
gap_set_scan_params(1, 48, 48, 1);
gap_start_scan();
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
}
When I whitelist one address at a time, I am able to see only its advertisements. When adding both, only the advertisments for addr_1 show up. I have noticed that device with addr_1 advertises more frequently than device with addr_2.
Am I using the API correctly? If so, what could be the problem?