esp-nimble-cpp icon indicating copy to clipboard operation
esp-nimble-cpp copied to clipboard

Advertising slow an ESP32C3 but very fast on ESP32

Open 0FR0 opened this issue 1 year ago • 3 comments

Hi, i am i having an issue with the esp32c3 and BLE advertising. The delay between packages 64ms and a lot of seconds (+ 13 sec). When i put the same code on a esp32 the delay between packages is 0 to 200ms.

I tryed to set the delay on the esp32c3 code but it made it worse. Does any one else had seen the same problem or any idea how to fix it?

Sender code: `#include <NimBLEDevice.h>

extern "C" { void app_main(void); }

void app_main(void) { BLEDevice::init("Techniker Projekt 2024"); BLEDevice::startAdvertising(); }`

0FR0 avatar Nov 07 '24 02:11 0FR0

How are you setting the interval?

h2zero avatar Nov 09 '24 16:11 h2zero

i tryed:

...
BLEDevice::init("Techniker Projekt 2024");
BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
pAdvertising->setMaxInterval(32);
pAdvertising->setMinInterval(32);
pAdvertising->setMaxPreferred(32);
pAdvertising->setMinPreferred(32);
BLEDevice::startAdvertising();
...

with different values.

0FR0 avatar Nov 10 '24 01:11 0FR0

Not sure about this one yet but I'm seeing some similarly odd behavior with the scanning start/stop. Will be investigating

h2zero avatar Nov 16 '24 23:11 h2zero