How to get latest arduinoespressif32 framework

I’m trying to get a BLE example working using the ESP32 BLE Arduino library but I’m getting an error with “esp_bt.h” missing.

If I search the framework-arduinoespressif32 folder, the file is not there. However If I go to to the github repository that PIO is pointing to I can see the missing header. (

So how do I force PIO to use the code from this repo ? I tried changing the platform variable in the ini to
platform = GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO but this did not help .

Can someone tell em how I point to the latest version ?

The solution is incomplete. Released versions of the framework contain a file “core_version.h”. The linked document explains how to use the version from git directly, but the git repository does not contain that file.

This leads to build failures when the include file is required.