What is this? BT_BTM: Advertising or scaning now, can't set privacy

DerrickLau
Posts: 7
Joined: Mon Apr 13, 2020 9:09 pm

What is this? BT_BTM: Advertising or scaning now, can't set privacy

Postby DerrickLau » Mon Dec 14, 2020 12:14 am

I am seeing the following output when I run idf.py -p COM5 -b 115200 monitor:

E (1986) BT_BTM: Advertising or scaning now, can't set privacy
V (1996) app_main(): ble_gap_event_handler() called.
V (1996) BtController::BleGapEventHandler(): called.
V (1996) BtController::BleGapEventHandler(): ESP_GAP_BLE_ADV_START_COMPLETE_EVT.
I (2006) BtController::BleGapEventHandler(): Start adv successfully

V (2006) BtController::BleGapEventHandler(): done.

What does that error "BT_BTM: Advertising or scaning now, can't set privacy" mean? What ESP-IDF API is throwing it?

ESP_Jan
Posts: 42
Joined: Tue Dec 01, 2020 10:56 am

Re: What is this? BT_BTM: Advertising or scaning now, can't set privacy

Postby ESP_Jan » Mon Dec 14, 2020 9:41 am

Hi DerrickLau,

This error is being thrown at:
https://github.com/espressif/esp-idf/bl ... gap.c#L857
This error is thrown if the function BTM_BleConfigPrivacy is called while the Bluetooth interface is not idle.

DerrickLau
Posts: 7
Joined: Mon Apr 13, 2020 9:09 pm

Re: What is this? BT_BTM: Advertising or scaning now, can't set privacy

Postby DerrickLau » Tue Dec 15, 2020 12:38 am

That function is called by esp_ble_gap_start_advertising() right? I only call that once in my current execution, which means the bluetooth interface was doing something during that?
Well, the thing is, I only call that method once, in my GAP event handler, when a ESP_GAP_BLE_SCAN_RSP_DATA_RAW_SET_COMPLETE_EVT event is received.

And what do you mean by bluetooth interface not idle? Does that mean the ESP32 should not be also listening for audio streaming connections?

The example I am using is a2dp_gatts_coex.

ESP_Jan
Posts: 42
Joined: Tue Dec 01, 2020 10:56 am

Re: What is this? BT_BTM: Advertising or scaning now, can't set privacy

Postby ESP_Jan » Wed Dec 16, 2020 11:40 pm

Hi DerrickLau,

I've just flashed the a2dp_gatts_coex example from IDF v4.1 to a ESP-WROVER-KIT board with the ESP32-WROVER-B module.
I connected my iPhone to the ESP using Bluetooth and was unable to produce the error you were experiencing.

What module are you using?
What is your IDF version? (run idf.py --version)

Who is online

Users browsing this forum: No registered users and 430 guests