What is the use of esp_gatt_if_t?
Posted: Sun Jan 14, 2018 1:48 pm
I am working on a BLE client and I see function esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, bool is_direct) suceeds only with gattc_if = 0x03.
I tried finding relevant documentation and walking through the forums and found nothing definite.
My asumption is esp_gatt_if_t gattc_if has got to do with BLE addressing.
The reason being, my server is set with a Random Static Address, but in that light gattc_if = 0x01 should have worked
What confuses me further is that we use different parameters for gattc_app_register/unregister
In btc_ble_gattc_args_t we store two different types for register and unregister
To sum it up. What is gattc_if?
Thank you so much
I tried finding relevant documentation and walking through the forums and found nothing definite.
My asumption is esp_gatt_if_t gattc_if has got to do with BLE addressing.
The reason being, my server is set with a Random Static Address, but in that light gattc_if = 0x01 should have worked
Code: Select all
typedef enum {
BLE_ADDR_TYPE_PUBLIC = 0x00,
BLE_ADDR_TYPE_RANDOM = 0x01,
BLE_ADDR_TYPE_RPA_PUBLIC = 0x02,
BLE_ADDR_TYPE_RPA_RANDOM = 0x03,
} esp_ble_addr_type_t;
Code: Select all
esp_err_t esp_ble_gattc_app_register(uint16_t app_id);
esp_err_t esp_ble_gattc_app_unregister(esp_gatt_if_t gattc_if);
Code: Select all
//BTC_GATTC_ACT_APP_REGISTER,
struct app_reg_arg {
uint16_t app_id;
} app_reg;
//BTC_GATTC_ACT_APP_UNREGISTER,
struct app_unreg_arg {
esp_gatt_if_t gattc_if;
} app_unreg;
Thank you so much