Bluetooth mode configuration

Matt141
Posts: 8
Joined: Fri Oct 04, 2019 2:24 pm

Bluetooth mode configuration

Postby Matt141 » Tue Aug 08, 2023 2:12 pm

Hello ESP32 users,

The functionbtdm_controller_get_mode below is retourning a wrong mode number . I am expecting 4 (ESP_BT_MODE_BTDM), but 1 (ESP_BT_MODE_BLE) is returned. In menuconfig->Component->Bluetooth->Bluetooth->Host Bluedroid - Dual-Mode is activated, so I am expecting btdm_controller_get_mode to return ESP_BT_MODE_BTDM. Also, in BlueDroid option Classic Bluetooth (A2DP) and Bluetooth Low Energy are activated as expected. Am I missing something in the configuration to make btdm_controller_get_mode returning ESP_BT_MODE_BTDM ?

My error occurs at line 1655 of bt.c:

Code: Select all

if (mode != btdm_controller_get_mode()) {
        return ESP_ERR_INVALID_ARG;
}
Since, the function btdm_controller_get_mode() return a different mode than expected, and to figure out why I'd like to find the definition of btdm_controller_get_mode, which I cannot find in my project or in esp-idf .

Regards,
Matt
Last edited by Matt141 on Wed Aug 09, 2023 11:26 am, edited 1 time in total.

ESP_Sprite
Posts: 9715
Joined: Thu Nov 26, 2015 4:08 am

Re: Bluetooth mode configuration

Postby ESP_Sprite » Wed Aug 09, 2023 4:48 am

What chip is this on? Asking as only the (original, non-S, non-C) ESP32 can do classic BT.

Matt141
Posts: 8
Joined: Fri Oct 04, 2019 2:24 pm

Re: Bluetooth mode configuration

Postby Matt141 » Wed Aug 09, 2023 9:36 am

It's the ESP32_DevKitc_V4 and the chip is the ESP32-WROOM-32E.

Matt141
Posts: 8
Joined: Fri Oct 04, 2019 2:24 pm

Re: Bluetooth mode configuration

Postby Matt141 » Wed Aug 09, 2023 11:34 am

The solution was to change Component->Bluetooth->Controller Options->Bluetooth controlleur mode from BLE Only to Bluetooth Dual Mode.

Who is online

Users browsing this forum: Google [Bot], taherrera and 233 guests