Search found 4 matches

by foxkeys
Wed Apr 18, 2018 3:10 pm
Forum: General Discussion
Topic: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event after esp_ble_gap_set_scan_params()
Replies: 7
Views: 9440

Re: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event after esp_ble_gap_set_scan_params()

I did deep investigation of BLE functions and found that any esp_ble_* calls (with callbacks) can fail silently. So, using esp_ble_* functions you must not rely on callbacks. At least, you must add some sort of watchdog in app code , and restart (or do anything else) if no callback from bt stack fun...
by foxkeys
Fri Apr 06, 2018 6:17 am
Forum: General Discussion
Topic: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event after esp_ble_gap_set_scan_params()
Replies: 7
Views: 9440

Re: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event after esp_ble_gap_set_scan_params()

This should have answer all your questions: https://github.com/espressif/esp-idf/bl ... .c#L59-L76 Maybe, it answers. Just one little-little problem, find the answers :) esp_ble_gap_set_scan_params() does only one thing - it calls "btc_transfer_context" function. That send message to PID msg.pid = ...
by foxkeys
Thu Apr 05, 2018 9:46 am
Forum: General Discussion
Topic: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event after esp_ble_gap_set_scan_params()
Replies: 7
Views: 9440

Re: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event after esp_ble_gap_set_scan_params()

When you execute a command that is expected to eventually post an event, we should expect that event to always occur ASSUMING we did not get a failure code from the original command. Check the return code from esp_ble_gap_set_scan_params() and if it is not ESP_OK then you won't get an event. Ok. So...
by foxkeys
Wed Apr 04, 2018 9:35 am
Forum: General Discussion
Topic: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event after esp_ble_gap_set_scan_params()
Replies: 7
Views: 9440

ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event after esp_ble_gap_set_scan_params()

All samples i have found using esp_ble_gap_set_scan_params() rely on ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT event in gap callback. But, i have two questions about this: 1. Is time between esp_ble_gap_set_scan_params and ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT limited by any way? If so, which it can...