CLASSIC BLUETOOTH GAP API

Overview

Instructions

Application Example

Instructions

API Reference

Functions

esp_err_t esp_bt_gap_set_scan_mode(esp_bt_scan_mode_t mode)

Set discoverability and connectability mode for legacy bluetooth. This function should be called after esp_bluedroid_enable() completes successfully.

Return
  • ESP_OK : Succeed
  • ESP_ERR_INVALID_ARG: if argument invalid
  • ESP_INVALID_STATE: if bluetooth stack is not yet enabled
  • ESP_FAIL: others
Parameters
  • mode: : one of the enums of bt_scan_mode_t

Enumerations

enum esp_bt_scan_mode_t

Discoverability and Connectability mode.

Values:

ESP_BT_SCAN_MODE_NONE = 0

Neither discoverable nor connectable

ESP_BT_SCAN_MODE_CONNECTABLE

Connectable but not discoverable

ESP_BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE

both discoverable and connectaable