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

minor issue: can't turn off advertising log messages

Open rickAllDev opened this issue 4 years ago • 4 comments

I'm toggling advertising on and off and get log messages every toggle: GAP procedure initiated: advertise; disc_mode=2 adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=0 adv_itvl_max=0 GAP procedure initiated: stop advertising.

code: class task_advertising: public Task { void run(void *data) { NimBLEAdvertising *advertising_t = NimBLEDevice::getAdvertising(); while(true) { while(!ble_connected) { if (!advertising_t->isAdvertising()) advertising_t->start(); //NimBLEDevice::stopAdvertising(); else //NimBLEDevice::startAdvertising(); advertising_t->stop(); delay(1000); } delay(1000); } }};

rickAllDev avatar Mar 28 '21 13:03 rickAllDev

Related to my issue #41

DavidJRobertson avatar Mar 28 '21 15:03 DavidJRobertson

Hi @rickAllDev, I just merged the PR by @DavidJRobertson that should help with this, could you give that a try and let me know?

h2zero avatar Mar 28 '21 20:03 h2zero

It appears there is a new log config for NimBLE in the latest idf, assuming that's what you're using. If so you can change the NimBLE log level to none in menuconfig and those messages will be gone.

h2zero avatar Mar 29 '21 00:03 h2zero

Can we close this?

mickeyl avatar Apr 28 '23 14:04 mickeyl