When Using Esp32-C3 Ble Scan, Can I Set It To Only Scan The Long Range Devices; Is There A Limit To The Name Length Of Esp32 As A Bluetooth Device; How Do I Set The Esp32 Ble Scan To The Permanent Scan Without Generating A Timeout; How Can I Get Rssi Of Ble Devices Through Esp32 - Espressif Systems ESP Faq

Table of Contents

Advertisement

Chapter 4. Software framework

4.1.60 When using ESP32-C3 BLE Scan, can I set it to only scan the Long Range devices?

• Yes, you can make tests based on esp-idf/examples/bluetooth/bluedroid/ble_50/ble50_security_client.
By
changing
the
|
ESP_BLE_GAP_EXT_SCAN_CFG_CODE_MASK
ESP_BLE_GAP_EXT_SCAN_CFG_CODE_MASK, you can scan the broadcast packets whose primary
PHY type is LE CODED PHY.

4.1.61 Is there a limit to the name length of ESP32 as a Bluetooth device?

• The names should be no longer than 248 bytes. However, in practice, the name length is also limited by
the length of Bluetooth advertising packets. For the description of configurations, please refer to
FIG_BT_MAX_DEVICE_NAME_LEN.
4.1.62 How do I set the ESP32 BLE Scan to the permanent scan without generating a
timeout?
• You can realize this by setting"duration" to 0 before using the
BLE Scan.

4.1.63 How can I get RSSI of BLE devices through ESP32?

• You can use the
esp_ble_gap_read_rssi()
• If you want to get RSSI of all scanned BLE devices around, please use the
in the ESP_GAP_BLE_SCAN_RESULT_EVT event to enable the printing of RSSI.
4.1.64 How can I increase the transmission distance of BLE5.0? How can I set BLE5.0
to long-range mode?
• In practice, the transmission distance of BLE5.0 is about 200 m. It is recommended to refer to the actual test
distance. ESP32-S3 supports the features of BLE5.0, and supports long-range communication through Coded
PHY (125 Kbps and 500 Kbps) and broadcast extension.
• You can realize long-range communication by using 125 Kbps Coded PHY and increasing the transmit power
(tx_power). Refer to the following settings:
esp_ble_gap_ext_adv_params_t ext_adv_params_coded = {
.type = ESP_BLE_GAP_SET_EXT_ADV_PROP_SCANNABLE,
.interval_min = 0x50,
.interval_max = 0x50,
.channel_map = ADV_CHNL_ALL,
.filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
.primary_phy = ESP_BLE_GAP_PHY_CODED,
.max_skip = 0,
.secondary_phy = ESP_BLE_GAP_PHY_CODED,
.sid = 0,
.scan_req_notif = false,
.own_addr_type = BLE_ADDR_TYPE_RANDOM,
.tx_power = 18,
};
Espressif Systems
configuration
.cfg_mask
function to get RSSI of connected BLE devices.
Submit Document Feedback
=
ESP_BLE_GAP_EXT_SCAN_CFG_UNCODE_MASK
in
ext_scan_params
esp_ble_gap_start_scanning()
ble_scan_result_evt_param
55
to
.cfg_mask
=
CON-
function to start
structure
Release master

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP and is the answer not in the manual?

This manual is also suitable for:

Esp32Esp8266Esp32-s2Esp32-c3Esp32-s3

Table of Contents