Code: Select all
static struct gattc_profile_inst gattc_profile_tab[GATTC_PROFILE_NUM] = {
[GATTC_PROFILE_A_APP_ID] = {
.gattc_cb = gattc_profile_a_event_handler,
.gattc_if = ESP_GATT_IF_NONE, /* Not get the gatt_if, so initial is ESP_GATT_IF_NONE */
},
[GATTC_PROFILE_B_APP_ID] = {
.gattc_cb = gattc_profile_b_event_handler,
.gattc_if = ESP_GATT_IF_NONE, /* Not get the gatt_if, so initial is ESP_GATT_IF_NONE */
},
[GATTC_PROFILE_C_APP_ID] = {
.gattc_cb = gattc_profile_c_event_handler,
.gattc_if = ESP_GATT_IF_NONE, /* Not get the gatt_if, so initial is ESP_GATT_IF_NONE */
},
[GATTC_PROFILE_D_APP_ID] = {
.gattc_cb = gattc_profile_d_event_handler,
.gattc_if = ESP_GATT_IF_NONE, /* Not get the gatt_if, so initial is ESP_GATT_IF_NONE */
},
};
Code: Select all
uint8_t value[4] = {0x23, 01, 03, 05};
esp_ble_gattc_write_char(gattc_profile_tab[GATTC_PROFILE_B_APP_ID].gattc_if,
gattc_profile_tab[GATTC_PROFILE_B_APP_ID].conn_id,
REMOTE_B_SERVICE_UUID,
sizeof(value),
value,
ESP_GATT_WRITE_TYPE_RSP,
ESP_GATT_AUTH_REQ_NONE);
Code: Select all
Write char failed, error status = 0x1
sorry for my bad english
with best regards eldiamond