[SOLVED] ESP-IDF provided Classic Bluetooth Examples won't compile. (v5.3.3 or v5.4.1)

benjammin2068
Posts: 11
Joined: Tue Mar 26, 2024 1:32 am

[SOLVED] ESP-IDF provided Classic Bluetooth Examples won't compile. (v5.3.3 or v5.4.1)

Postby benjammin2068 » Thu May 15, 2025 6:28 pm

[SOLUTION]

Somewhere in my reading, I thought somehow that the BlueDroid stack allows for classic_bt functions with the -S3 (BLE only) device. That's not the case. The -S2 is WiFi only.

And with that -- finding that answers all of this.

So. This thread is solved. Hopefully it resolves for someone else the same confusion I had.

------------------------------------------------------------------------------------------------------------

EDIT: CHANGED TOPIC from "Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined" to "ESP-IDF provided Classic Bluetooth Examples won't compile. (v5.3.3 or v5.4.1)"

Just jump to bottom of post for most recent messages ignoring anything about KORVO-2 for the moment.

I'm installing fresh off GIT to Linux ESP-IDF and then trying to compile the IDF provided classic bluetooth hpf_hf example for ESP32-s2/s3 and the build process fails.

SO I guess the question is - if "Classic Bluetooth" isn't supported on the S3 (and the hardware matrix says that) -- the docs read like classic bluetooth is somehow maybe provided through BlueDroid. But the hpf_hf readme says the example is for ESP32 (not S3).

OK -- so why is Espressif designing audio (video) gizmos like the Korvo2 when none of the example applications that do audio/video can compile?

------------------------------------------------------------------------------------------------------------

I'm building the example pipeline_a2dp_sink_and_hfp ESP_ADF project with a brand new KORVO2 Audio development board.

I've read the readme.md and set the product according to the instructions.

When I create the project using the ESP_ADF examples, I get this compile error:
[{
"resource": "/f:/workspace-VScode/esp32-korvo-2/pipeline_a2dp_sink_and_hfp/pipeline_a2dp_sink_and_hfp/main/a2dp_sink_and_hfp_example.c",
"owner": "C/C++: IntelliSense",
"code": "20",
"severity": 8,
"message": "identifier \"PERIPH_BLUETOOTH_DISCONNECTED\" is undefined",
"source": "C/C++",
"startLineNumber": 534,
"startColumn": 28,
"endLineNumber": 534,
"endColumn": 57
}]
What's missing from this to make it compile? This seems more like an IDF error and an ADF problem (so far).

Thanks,

-Ben
Last edited by benjammin2068 on Thu Jun 26, 2025 11:42 pm, edited 5 times in total.

ahsrabrifat
Posts: 201
Joined: Sat Jan 18, 2025 2:31 pm

Re: Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined

Postby ahsrabrifat » Fri May 16, 2025 3:10 pm

Check the compatibility matrix for ADF/IDF:
https://github.com/espressif/esp-adf#es ... ion-matrix

Example:

ADF v2.4 ➜ Compatible with ESP-IDF v4.4

ADF master ➜ Compatible with ESP-IDF v5.x

Make sure your ESP-IDF version matches the ADF version you're using.

You can verify IDF version with:

Code: Select all

idf.py --version

benjammin2068
Posts: 11
Joined: Tue Mar 26, 2024 1:32 am

Re: Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined

Postby benjammin2068 » Mon May 19, 2025 6:31 pm

Hi there,

Thanks for the reply.

I'm using IDF 5.2.5 with whatever the VScode plugin "install ESP-ADF" installs. I'm not presented with an option to install variants of the esp-adf. Only the ESP-IDF. Could that be part of the problem?

When I run the idf.py from a VScode terminal shell, the results popup in a window and then disappear with no output to inspect or a window to be seen in time.

Cheers,

-Ben
Check the compatibility matrix for ADF/IDF:
https://github.com/espressif/esp-adf#es ... ion-matrix

Example:

ADF v2.4 ➜ Compatible with ESP-IDF v4.4

ADF master ➜ Compatible with ESP-IDF v5.x

Make sure your ESP-IDF version matches the ADF version you're using.

You can verify IDF version with:

Code: Select all

idf.py --version

benjammin2068
Posts: 11
Joined: Tue Mar 26, 2024 1:32 am

Re: Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined

Postby benjammin2068 » Wed May 21, 2025 6:18 pm

After tinkering some more - I've installed v5.3.3 and v5.4.1 of the ESP-IDF.

If I try to compile the more basic bluetooth (using BlueDroid as included) HF example (in the examples lists) and under each version of IDF, none of them compile.

if feels like something is missing from VScode in terms of plugins -- or the ESP VScode plugin is forgetting to do something.

5.4.1 almost compiles - but I get this:
vscode-error.png
vscode-error.png (72.08 KiB) Viewed 529 times
I don't know what I'm missing.

-Ben

ahsrabrifat
Posts: 201
Joined: Sat Jan 18, 2025 2:31 pm

Re: Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined

Postby ahsrabrifat » Wed May 28, 2025 9:59 am


benjammin2068
Posts: 11
Joined: Tue Mar 26, 2024 1:32 am

Re: Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined

Postby benjammin2068 » Fri Jun 13, 2025 1:33 am

Let me check those links and get back to you.

Thanks,

-Ben

benjammin2068
Posts: 11
Joined: Tue Mar 26, 2024 1:32 am

Re: Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined

Postby benjammin2068 » Fri Jun 13, 2025 1:59 am

Here are some info about this error message. Did you check these?
https://github.com/espressif/arduino-esp32/issues/6954
This one doesn't help - although I'm also not working with arduino. I'm trying to compile in VScode for a Korvo2.

but regardless, the info isn't helpful.
Nope. This doesn't help either -- wrong target. Wrong IDE (arduino and not VScode)

Anyone else? Thoughts?

Thanks,

-Ben

benjammin2068
Posts: 11
Joined: Tue Mar 26, 2024 1:32 am

Re: Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined

Postby benjammin2068 » Thu Jun 26, 2025 4:06 am

OK - I installed the ESP-IDF (v5.4.1) for CLI building from scratch in a Mint Linux VM using the ESP-IDF instructions.

https://docs.espressif.com/projects/esp ... setup.html

That part's easy -- so then I went to compile the hfp_hf example and it fails the same way as VScode does (but all the from bash commandline)

So definitely the instructions are lacking some form of setup.

(I can't even get the esp-adf to do an initial 'idf.py set-target esp32s3' as needed for my korvo2 development board - but let's start here.)

So attached is the build log.
Attachments
esp32s3.hpf_hf.example.idf_py_stdout_output_15310.log
(171.41 KiB) Downloaded 9 times

benjammin2068
Posts: 11
Joined: Tue Mar 26, 2024 1:32 am

Re: Error: identifier "PERIPH_BLUETOOTH_DISCONNECTED" is undefined

Postby benjammin2068 » Thu Jun 26, 2025 4:48 pm

Ok - now I installed ESP-IDF 5.3.3 -- and used the same example (hpf_hf) that comes with it in the examples folder and it fails as well.

(attached is the compile log)

These are examples compiled as "out of the box" as possible and none of them work.

So something is definitely wrong with the setup, the instructions or the example.
Attachments
esp32s3.hpf_hf.example-v5.3.3-idf_py_stdout_output_11066.log
(201.86 KiB) Downloaded 8 times

MicroController
Posts: 2661
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: ESP-IDF provided Classic Bluetooth Examples won't compile. (v5.3.3 or v5.4.1)

Postby MicroController » Thu Jun 26, 2025 7:52 pm

then trying to compile the IDF provided classic bluetooth hpf_hf example for ESP32-s2/s3
The ESP32-S2/S3 don't support Bluetooth "Classic", only the original ESP32 does. You won't get classic Bluetooth support to compile for ESP32-Sx, and it will definitely not run.

(The "Supported Targets - ESP32" at the top of the README also kind-of gives it away...)

Who is online

Users browsing this forum: Google [Bot] and 4 guests