Hello, I am interested in increasing the transmission power of Bluetooth transmitter.
Transmitter and Receiver: ibeacon ( https://github.com/espressif/esp-idf/tr ... le_ibeacon )
I was able to change the power level of the ibeacon transmitter using a function with two input parameters
esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_t power_level)
The function is given in https://github.com/espressif/esp-idf/bl ... e/esp_bt.h The values of the two input parameters are also given in the esp_bt.h.
But I can only go to +9dBm ( 7.9 mW) which is too low for my project in underground mining.
Question? Is there any other way to increase the power level to lets say 20mW or so. thank you
Here is my code
void app_main()
{
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT));
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
esp_bt_controller_init(&bt_cfg);
esp_bt_controller_enable(ESP_BT_MODE_BLE);
ble_ibeacon_init();
/* set scan parameters */
esp_ble_ibeacon_t ibeacon_adv_data;
esp_err_t status = esp_ble_config_ibeacon_data (&vendor_config, &ibeacon_adv_data);
//*******************************start of tx power test***********************
if (esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV,ESP_PWR_LVL_P9) == OK)
printf("Transmission power changed\n");
//*******************************end of tx power test***********************
if (status == ESP_OK){
esp_ble_gap_config_adv_data_raw((uint8_t*)&ibeacon_adv_data, sizeof(ibeacon_adv_data));
}
else {
ESP_LOGE(DEMO_TAG, "Config iBeacon data failed: %s\n", esp_err_to_name(status));
}
}
Changing ESP32 Bluetooth Transmission Power
-
- Posts: 5
- Joined: Wed May 08, 2019 2:11 pm
Re: Changing ESP32 Bluetooth Transmission Power
Hey, gzjhan. Did you make it? I'm looking for something like that in my project . Any tips?
Who is online
Users browsing this forum: Baidu [Spider] and 104 guests