ESP32C3 BLE 5.0 and long range BLE

rjustice
Posts: 16
Joined: Mon Sep 06, 2021 9:12 am

ESP32C3 BLE 5.0 and long range BLE

Postby rjustice » Tue Oct 11, 2022 2:03 pm

Hi,

I'm interested in increasing the BLE range of the ESP32C3 and I am a little confused about BLE 5.0 vs 4.2, as I understand it BLE 5.0 is longer range.

Is BLE 5.0 purely a hardware level change (that the programmer does not see) or are there software level changes?

I notice there are configuration options for BLE 5.0 in menuconfig, how should this be configured.

If there are software level changes are there any examples of BLE 5.0 use as a GATT server?

Thanks

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32C3 BLE 5.0 and long range BLE

Postby chegewara » Tue Oct 11, 2022 11:51 pm

Its both, hardware and software. Here you can find examples:
https://github.com/espressif/esp-idf/tr ... oid/ble_50
https://github.com/espressif/esp-idf/tr ... riodic_adv
https://github.com/espressif/esp-idf/tr ... iodic_sync

You also has to use ESP_BLE_GAP_PHY_2M or ESP_BLE_GAP_PHY_CODED settings (just play with settings).
https://github.com/espressif/esp-idf/bl ... .c#L52-L54

rjustice
Posts: 16
Joined: Mon Sep 06, 2021 9:12 am

Re: ESP32C3 BLE 5.0 and long range BLE

Postby rjustice » Wed Oct 12, 2022 9:45 am

Thanks for your reply, the examples there are for advertising and a security server.

I'm not bothered about implementing the security server part just a server for now.

Are those settings all that are needed to enable the long range features of ble5 in server mode? Is there any change in settings from advertising to server mode when using the long range features of ble5?

Code: Select all

esp_ble_gap_ext_adv_params_t ext_adv_params_2M = {
    .type = ESP_BLE_GAP_SET_EXT_ADV_PROP_NONCONN_NONSCANNABLE_UNDIRECTED,
    .interval_min = 0x40,
    .interval_max = 0x40,
    .channel_map = ADV_CHNL_ALL,
    .own_addr_type = BLE_ADDR_TYPE_RANDOM,
    .filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
    .primary_phy = ESP_BLE_GAP_PHY_1M,
    .max_skip = 0,
    .secondary_phy = ESP_BLE_GAP_PHY_2M,
    .sid = 1,
    .scan_req_notif = false,
};
Is there anywhere I can get more information on ble5 that you can recommend, I'm finding hard to find the information I need about the above.

Thanks for your time

Who is online

Users browsing this forum: MicroController and 107 guests