Hi, this is my first post so i would like to congratulate for the great idea!
I also experienced the same issue between ESP32 and ble 4.0 keyrings. Measured signal level is -80 at 1 meter of distance.
I tried as you suggested to include the esp_ble_tx_power_set but the configuration i had to set is ESP_PWR_LVL_P7 because with ESP_PWR_LVL_P9 i got the error:
\ZgatewayBT.ino: In function ‘void setupBT()’:
ZgatewayBT:129:73: error: ‘ESP_PWR_LVL_P9’ was not declared in this scope
esp_err_t errRc = esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT,ESP_PWR_LVL_P9);
anyway also with the P7 setup i didn’t experience any change in quality of signal (still between -70 or -80).
The purpose of my implementation is to set up a reliable presence detection to my openhab.
#define TimeBtw_Read 500 //define the time between 2 scans
#define Scan_duration 10 //define the time for a scan
And i configured my openhab to set the person as “not at home” if i dont recieve updates for 2 minutes from the mqtt item.
Unfortunately it still looks like i got frequent offline messages. What can i do to improve my application?