Hi All,
I need to detect a ble device and connect to it as a Central, client then I used the gatt client sample.
I read the code, there is indeed a gap scanning then gatt procedures to get the services and characteristics and notification etc... but during scanning nothing occurs with a ble device like a bluetooth lifetrons audio or a beewi small car.
I waited to see a ESP_GAP_BLE_SCAN_RESULT_EVT event triggered but I always see a ESP_GAP_SEARCH_INQ_CMPL_EVT event without a detection if the advertising of the BLE device.
I modified the code to put in advance the string name of the device I want to detect since the code make a gatt process and an open call to connect after checking the name of the device hard implemented in the program.
Can anyone manage to detect a commercial BLE device with the gatt client sample.
Thanks,
Iro
GATT client sample
Re: GATT client sample
I used the gatt client example to scan everything in my neighborhood. It works fine. Even resolved the name of my cubot smart watch. I recommend you take out your modifications and try again or just run the clean example once to see if you are receiving advertisements.
Re: GATT client sample
I think neither of those is a BLE device both are Bluetooth classic devices.irobux wrote:but during scanning nothing occurs with a ble device like a bluetooth lifetrons audio or a beewi small car.
Re: GATT client sample
Hi,
Thanks for your responses !
@fhsh => I modified the code because the devices were not detected then as @WiFive said maybe there are not BLE.
Then where can I modify the code to take into account not only BLE device ?
Thanks
Iro
Thanks for your responses !
@fhsh => I modified the code because the devices were not detected then as @WiFive said maybe there are not BLE.
Then where can I modify the code to take into account not only BLE device ?
Thanks
Iro
Re: GATT client sample
Hi,
I tried with a BLE beewi LED and ths is OK.
Many thanks
Then I want to control the LED and I am not sure to understand the relation between the central and the peripheric. How to send data from Central ? I mean by How is: How to use the following events, is it in the "gattc_profile_a_event_handler" function ?
ESP_GATTC_WRITE_DESCR_EVT = 9
ESP_GATTC_PREP_WRITE_EVT = 11
ESP_GATTC_REG_FOR_NOTIFY_EVT = 38
ESP_GATTC_UNREG_FOR_NOTIFY_EVT = 39
For first sample, I connect in a digital input a button.
Should I call "esp_ble_gattc_write_char_descr" and where, should a implement a thread ?
Iro
I tried with a BLE beewi LED and ths is OK.
Many thanks
Then I want to control the LED and I am not sure to understand the relation between the central and the peripheric. How to send data from Central ? I mean by How is: How to use the following events, is it in the "gattc_profile_a_event_handler" function ?
ESP_GATTC_WRITE_DESCR_EVT = 9
ESP_GATTC_PREP_WRITE_EVT = 11
ESP_GATTC_REG_FOR_NOTIFY_EVT = 38
ESP_GATTC_UNREG_FOR_NOTIFY_EVT = 39
For first sample, I connect in a digital input a button.
Should I call "esp_ble_gattc_write_char_descr" and where, should a implement a thread ?
Iro
Who is online
Users browsing this forum: No registered users and 61 guests