esp_ble_gattc_write_char fault

elDi@mond
Posts: 19
Joined: Fri Feb 04, 2022 10:42 am

esp_ble_gattc_write_char fault

Postby elDi@mond » Fri Feb 04, 2022 12:46 pm

I have a ESP based device with 5 buttons, it performs scaning to fullfill gattc_profile_tab using gattc_multi_connect example

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 */
    },
};
on button handler there are function

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);
and it always returns

Code: Select all

Write char failed, error status = 0x1
what i'm doing wrong?
sorry for my bad english
with best regards eldiamond

elDi@mond
Posts: 19
Joined: Fri Feb 04, 2022 10:42 am

Re: esp_ble_gattc_write_char fault

Postby elDi@mond » Fri Feb 18, 2022 9:31 am

problem solved
wrong remote_filter_char_uuid when scaning devices

Who is online

Users browsing this forum: Bing [Bot] and 90 guests