Page 1 of 1

ESP32 Bluetooth SPP with IDF v5

Posted: Thu Mar 07, 2024 12:27 pm
by BenR
Hello,

It looks like some of the configuration options in the menuconfig tool have changed for IDF v5 and this is causing the Bluetooth SPP to not be able to startup.

If you go into the folder containing your Flowcode project and then go into the folder with the same name then you should find a file called menuconfig.bat.

Double click this file and then in the window that appears, using the keyboard cursor keys go into Component Config -> Bluetooth -> Bluedroid Options.

Copy the settings shown here.
Opt1.jpg
Opt1.jpg (114.17 KiB) Viewed 10070 times
Once done here, press escape and go into Controller Options -> Bluetooth Controller Mode and change the option to BR/EDR Only.
Opt2.jpg
Opt2.jpg (72.75 KiB) Viewed 10069 times
Press S and Enter to save the configurations, then press escape several times to exit.

Hopefully Bluetooth should now work correctly in IDF v5 onwards.

Re: ESP32 Bluetooth SPP with IDF v5

Posted: Thu Mar 07, 2024 12:41 pm
by BenR
Also a side note, Windows has now hidden legacy Bluetooth SSP devices when trying to add a new device.

You have to scroll down in the Bluetooth dialogue window and change device descovery from Default to Advanced to be able to see them.

This is Win11 but we have also found this to be an issue in Win10.
Device.jpg
Device.jpg (64.32 KiB) Viewed 10065 times

Re: ESP32 Bluetooth SPP with IDF v5

Posted: Thu Mar 07, 2024 1:15 pm
by mnfisher
As another aside - there is also an option to use AT commands.
This requires the download of a component from espressif. I'll see if I can get it to compile. It's probably better to use the 'native' component - but it might be useful for some legacy programs.

Martin

Re: ESP32 Bluetooth SPP with IDF v5

Posted: Thu Mar 07, 2024 2:03 pm
by stefan.erni
Hi Ben , Hi Martin

Set Default to Advanced is good tip. I've also had computers where I had to change this settings.

One more small question:
When i compile an esp32 project, several files are created. One of them is a msg.txt file.
It shows at about line 27, which python version and which IDF version is used.
Maybe we can see which combination works with bluetooth and which does not.
I had problems with Python versions higher than 3.7.3 for example 3.12 did not work with bluetooth

Info in msg.txt file:
Snag_20a56c.png
Snag_20a56c.png (60.72 KiB) Viewed 10053 times

Re: ESP32 Bluetooth SPP with IDF v5

Posted: Thu Mar 07, 2024 10:46 pm
by BenR
This is my setup confirmed working.

Python 3.7.3
git version 2.21.0.windows.1
IDF Version: v5.1.1-1-gd3c99ed3b8 ...