Bluetooth spp does't work in ESP32

Any bugs you encounter with Flowcode should be discussed here.
dvcam99
Posts: 89
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 11:03 am
Has thanked: 6 times
Been thanked: 12 times

Re: Bluetooth spp does't work in ESP32

Post by dvcam99 »

Hello together,

just a add on in relation to the BT connectivity.

I testet some samart phone Android BT terminal APP´s.

"Bluetooth Terminal HC-05" Pro or non Pro Version works and is stable with my ESP-32.

BR

Dirk
Happy FC9, FC-8 and FC-6 professional user ;)

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: Bluetooth spp does't work in ESP32

Post by mnfisher »

I'm trying to get Bluetooth working on a Heltec wifi kit 32.

I altered the sdkconfig as per previous posts but I get linker errors:
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP/ESP_CAL_BT_SPP.c:210: undefined reference to `esp_bt_gap_pin_reply'
h:/.espressif/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP/ESP_CAL_BT_SPP.c:214: undefined reference to `esp_bt_gap_pin_reply'
h:/.espressif/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/main/libmain.a(esp-project.c.obj): in function `esp_spp_cb':
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP/ESP_CAL_BT_SPP.c:138: undefined reference to `esp_bt_gap_set_scan_mode'

Trimmed for readability - but there are several of the 'undefined reference' errors on linking..

Anyone got this working?

As an aside - the forum search function ignores a lot of words (for example I can't search for esp32 bluetooth) - I'd prefer to get lot's of results than none?

Martin

medelec35
Matrix Staff
Posts: 1449
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 509 times
Been thanked: 471 times

Re: Bluetooth spp does't work in ESP32

Post by medelec35 »

mnfisher wrote:
Sun Apr 25, 2021 11:25 am
As an aside - the forum search function ignores a lot of words (for example I can't search for esp32 bluetooth) - I'd prefer to get lot's of results than none?
I fully agree with Martin.
Search on the Martrix forums for bluetooth and you get

Code: Select all

Search found 642 matches: bluetooth
Much better than these forums:

Code: Select all

The following words in your search query were ignored because they are too common words: bluetooth.
Martin

Steve-Matrix
Matrix Staff
Posts: 1244
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Bluetooth spp does't work in ESP32

Post by Steve-Matrix »

Regarding the search issue, I've changed the threshold level for common words from 5% to 30% so you shouldn't have this problem in the future.

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: Bluetooth spp does't work in ESP32

Post by stefan.erni »

Hi Ben

I have tried all the tips listed here but no success.
There are no errors when compiling, but neither my computer nor my phone can find the bluetooth signal.
I tried two different modules without success


regards

Stefan

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: Bluetooth spp does't work in ESP32

Post by stefan.erni »

Hi Ben

It's working again with the M5 Atom board.

But I don't know why.

I guess, because every time I rename the program or copy it to another folder I have to redefine the two lines in the sdkconfig file.


On this occasion I would like to mention the simple drag and drop of Flowcode for ESP32 Bluetooth. You don't need a pin or baud rate and you never confuse about rx and tx pin. And simple to choose a Bt name. Also to check if it's connected is so easy.

regards

Stefan

Code: Select all

#
# Bluetooth
#
CONFIG_BT_ENABLED=y
#
# Bluetooth controller
#
# CONFIG_BTDM_CTRL_MODE_BLE_ONLY is not set
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BTDM is not set
Attachments
FC9_M5STACK_Modul_Atom_BT.fcfx
(9.25 KiB) Downloaded 199 times
BT-ok.png
BT-ok.png (97.92 KiB) Viewed 5564 times

BenR
Matrix Staff
Posts: 1726
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 438 times
Been thanked: 602 times

Re: Bluetooth spp does't work in ESP32

Post by BenR »

Hi Stefan,

Glad you've got it working now. I would like to revisit Bluetooth on the ESP32 soon and get some of the more modern Bluetooth profiles working. Would you have any need for anything specific to be supported?

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: Bluetooth spp does't work in ESP32

Post by stefan.erni »

Hi Ben

A small wish, is to read the uniq ID from the Bluetooth part.

Yes the A2DP is an option
This enables me to stream my measurement data directly into Audacity. I had done this many years ago with a Microchip module.
Of course you can also send sound, to some bluetooth speaker.

regards

Stefan

A2DP (Advanced Audio Distribution Profile) is a Bluetooth protocol that enables a headset to stream high quality stereo audio wirelessly from a smartphone or other compatible device. The quality of the audio is much better, both for calls and for music playback.

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: Bluetooth spp does't work in ESP32

Post by stefan.erni »

Hi Ben

I have two wish more...

1. A command to set the RF Power from the Bluetooth (to reduce it).

2. I have a recorder with 2 external Sensor, all the 3 are programmed with Flowcode and ESP32.
When I turn on all the 3, the recorder should connect automatically with the 2 sensors. It's always a set and the distance between the recorder and sensor is just about 0.5meter. In the recorder is permanently programmed the same two sensors it has to be connected
This funktion can also be used if just 2 ESP32 boards need to be connected by Bluetooth, without a computer or a user input.

regards

Stefan

stefan.erni
Valued Contributor
Posts: 749
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: Bluetooth spp does't work in ESP32

Post by stefan.erni »

Hi Ben

What about a files transfer protocol?

OBEX-FTP File Transfer Profile

regards

Stefan


Bluetooth file transfer is a simple way to send files to another nearby Bluetooth device without the need for a separate app. Bluetooth is compatible with smartphones, tablets, laptops, and desktop computers. Files can be transferred over Bluetooth using Android OS, Fire OS, Blackberry OS, Windows OS, Mac OS, and Linux OS.

Post Reply