ESP-WROOM-32 BLE power saving

pleriche
Posts: 1
Joined: Tue May 04, 2021 4:53 pm

ESP-WROOM-32 BLE power saving

Postby pleriche » Tue May 04, 2021 8:21 pm

I'm trying to build a HID BLE device around ESP-WROOM-32 using the Arduino IDE. The objective is to create a gadget that sends keyboard short-cuts in response to button presses.

A simple solution is easy using the BleKeyboard write() function but the current consumption of the ESP-WROOM-32 is such that I'd need a fairly hefty LiPo battery to give an acceptable battery life of a day or two, comparable to commercial BT keyboards and mice.

I've been looking at deep sleep awakened by button presses, but it seems I'd then need to reestablish the BLE connection on each press, which would take unacceptably long. Perhaps I could save a connection key in non-volatile memory to avoid that, but I can't find any examples showing me how to do it, or functions in the source code which seem relevant.

Alternatively, perhaps there's some other way. Running at 80MHz will help but not massively. Modem Sleep would perhaps not require explicit saving and restoring of a connection key, but I'm unable to find examples or source code functions that facilitate anything other than deep sleep. Or is ESP-WROOM-32 just not the right device?

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 96 guests