esp_bt_gap_set_scan_mode() function
Set discoverability and connectability mode for legacy bluetooth. This function should be called after esp_bluedroid_enable() completes successfully
Arguments
c_mode
one of the enums of esp_bt_connection_mode_t
d_mode
one of the enums of esp_bt_discovery_mode_t
Return value
- ESP_OK : Succeed - ESP_ERR_INVALID_ARG: if argument invalid - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled - ESP_FAIL: others
![]()
esp_err_t esp_bt_gap_set_scan_mode(esp_bt_connection_mode_t c_mode, esp_bt_discovery_mode_t d_mode)
esp_bt_gap_set_scan_mode() calls 2 functions:
![]()
esp_bt_gap_set_scan_mode()
esp_bt_gap_set_scan_mode() reads 6 variables and writes 5 variables:
![]()
esp_bt_gap_set_scan_mode()