(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param); #define GATTS_SERVICE_UUID_TEST_A 0x00FF #define GATTS_CHAR_UUID_TEST_A 0xFF01 #define GATTS_DESCR_UUID_TEST_A 0x3333 #define GATTS_NUM_HANDLE_TEST_A 4 #define GATTS_SERVICE_UUID_TEST_B ...
sizeof(GATTS_SERVICE_UUID_TEST):当前服务长度设置为 GATTS_SERVICE_UUID_TEST的大小,为 16-bit。 static const uint16_t GATTS_SERVICE_UUID_TEST = 0x00FF; 1. (uint8_t *)&GATTS_SERVICE_UUID_TEST:服务属性值设置为 GATTS_SERVICE_UUID_TEST 3 AT 固件自定义蓝牙服务 测试环境如下: 软件: ESP32-WR...
2.7 esp_ble_gatts_app_register 2.8 esp_ble_gatts_create_attr_tab 2.9 esp_ble_gatts_start_service 2.10 esp_ble_gatts_send_indicate 2.11 esp_ble_gatts_send_response 三、蓝牙4.0通信实现过程 扫描蓝牙BLE终端设备,对应esp32就是广播给大家供扫描 连接蓝牙BLE终端设备,pad扫描到后去连接 启动服务发现,连...
2.6 esp_ble_gatts_register_callback 2.7 esp_ble_gatts_app_register 2.8 esp_ble_gatts_create_service 2.9 esp_ble_gatts_add_char 2.10 esp_ble_gatts_add_char_descr 2.11 esp_ble_gatts_start_service 2.12 esp_ble_gatts_send_indicate 2.13 esp_ble_gatts_send_response 2.14 esp_ble_gatts_get_att...
2.9 esp_ble_gatts_start_service 2.10 esp_ble_gatts_send_indicate 2.11 esp_ble_gatts_send_response 三、蓝牙4.0通信实现过程 扫描蓝牙BLE终端设备,对应esp32就是广播给大家供扫描 连接蓝牙BLE终端设备,pad扫描到后去连接 启动服务发现,连接到esp32后获取相应的服务。
将触发ESP_GATTS_REG_EVT事件, 除了可以完成对应profile的gatts_if的注册, 还可以调用esp_bel_create_attr_tab()来创建profile Attributes 表 或创建一个服务esp_ble_gatts_create_service() */ret = esp_ble_gatts_app_register(PROFILE_A_APP_ID);if(ret){ ...
8、 注册 service : /* 当调用esp_ble_gatts_app_register()注册一个应用程序Profile(Application Profile), 将触发ESP_GATTS_REG_EVT事件, 除了可以完成对应profile的gatts_if的注册, 还可以调用esp_bel_create_attr_tab()来创建profile Attributes 表 或创建一个服务esp_ble_gatts_create_service() */ ret ...
注册service: c /* 当调用esp_ble_gatts_app_register()注册一个应用程序Profile(Application Profile), 将触发ESP_GATTS_REG_EVT事件, 除了可以完成对应profile的gatts_if的注册, 还可以调用esp_bel_create_attr_tab()来创建profile Attributes 表 或创建一个服务esp_ble_gatts_create_service() */ ret = es...
(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param); #define GATTS_SERVICE_UUID_TEST_A 0x00FF #define GATTS_CHAR_UUID_TEST_A 0xFF01 #define GATTS_DESCR_UUID_TEST_A 0x3333 #define GATTS_NUM_HANDLE_TEST_A 4 #define GATTS_SERVICE_UUID_TEST_B ...
case ESP_GATTS_START_EVT: if(create_tab1 == false) { ESP_LOGI(GATTS_TABLE_TAG, "SERVICE_START_EVT1, status %d, service_handle %d", param->start.status, param->start.service_handle); esp_err_t create_attr_ret1 = esp_ble_gatts_create_attr_tab(gatt_db2, gatts_if, HRS_IDX_NB2,...