Maybe this is not the best topic to ask about it, but I was fixing the similar errors for two days and have found this topic. I will start from AFAR
What I need to do is to implement modem-sleep of ESP32C3 chip. I’ve found this example:
I do use Arduino for the board, but since I need to do the menuconfig changes, I understood, I need to go with the following setting in my ini file:
framework = arduino, espidf
With this, I was able to have sdkconfig in my project and use menuconfig to change the values according to the Readme.
I am a complete dummy in espidf sdk, but for me it looks like the whole code of that example is just for the general BLE connection, and everything related to the modem-sleep mode is the pm config and light-sleep enable thing.
Which raises a question:
do I need to do the espidf + arduino just for sdkconfig file? Because the pm_config and light_sleep is something you can do in arduino just importing appropriate esp libraries
if it is indeed needed, how to minimize the C code? is it as easy as to just create an app_main entry point for the application similar to the arduino-esp blinky example you have in the pioarduino repository? So then from that app_main I can navigate to my normal cpp arduino code?
I can imagine I do it completely wrong and don’t understand many things, but maybe you guys can guide me here a little.
Since there is no default NimBLE support in Arduino there is no easy solution. Probably easier and faster to reach the goal is to code everything with espidf. Even when managed to compile with Arduino with needed changes, i don’t know if Arduino will work at all with the changed power mode settings.