Hello @nima.askari
I've personally generated a code on the STM32WB using the STM32_WPAN and the P2P server application type. After compilation, everything works fine and no need to add the file manually (using the STM32CubeMX V6.14.1 and the STM32CubeIDE V1.18.1). If you have the need to use the ble.h and it is not included, you need to ad it manually.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.