[BTC_PID_GAP_BLE] = {btc_gap_ble_call_handler, btc_gap_ble_cb_handler },
[BTC_PID_BLE_HID] = {NULL, NULL},
[BTC_PID_SPPLIKE] = {NULL, NULL},
+#if (GATTS_INCLUDED == TRUE)
[BTC_PID_BLUFI] = {btc_blufi_call_handler, btc_blufi_cb_handler },
+#endif ///GATTS_INCLUDED == TRUE
[BTC_PID_DM_SEC] = {NULL, btc_dm_sec_cb_handler },
+ [BTC_PID_ALARM] = {btc_alarm_handler, NULL },
#if CONFIG_CLASSIC_BT_ENABLED
[BTC_PID_GAP_BT] = {btc_gap_bt_call_handler, NULL },
[BTC_PID_PRF_QUE] = {btc_profile_queue_handler, NULL },
for (int j = 0; j < adv_name_len; j++) {
ESP_LOGI(GATTC_TAG, "%c", adv_name[j]);
}
- memcpy(adv_name_char, adv_name, adv_name_len);
-
if (adv_name != NULL) {
- if (strcmp(adv_name_char, device_name) == 0) {
- ESP_LOGI(GATTC_TAG, "Searched device %s", device_name);
+ if (strlen(device_name) == adv_name_len && strncmp((char *)adv_name, device_name, adv_name_len) == 0) {
+ ESP_LOGI(GATTC_TAG, "Searched device %s\n", device_name);
if (connect == false) {
connect = true;
ESP_LOGI(GATTC_TAG, "Connect to the remote device.");