FC11 ESP32-S3 BLE error

Any bugs you encounter with Flowcode should be discussed here.
stefan.erni
Valued Contributor
Posts: 1125
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 215 times
Been thanked: 235 times

Flowcode v11 FC11 ESP32-S3 BLE error

Post by stefan.erni »

Hi to All

I'm using an M5 Stack Atom S3 with display.

This works very well with FC11.
Now I want to use BLE, but I get an error message as soon as I initialize the BLE component.
Atom_S3_Display_BLE.fcfx
(21.22 KiB) Downloaded 10 times
2025-11-21_17-02-13.PNG
2025-11-21_17-02-13.PNG (291.64 KiB) Viewed 274 times
In file included from C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\includes.c:1964,
from C:\C#_sourcecode\_#FC11\Atom_S3_Display\Atom_S3_Display_BLE.h:297,
from C:/Users/Kfs-Forschung/Desktop/esp-idf-2/mtxesp32_s3_sdkconfig/main/esp-project.c:20:
C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\ESP\ESP_CAL_BLE_SPP_Server.c:16:10: fatal error: esp_gap_ble_api.h: No such file or directory
16 | #include "esp_gap_ble_api.h"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

BenR
Matrix Staff
Posts: 2014
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 529 times
Been thanked: 719 times

Re: FC11 ESP32-S3 BLE error

Post by BenR »

Aha sorry I'll get on this tomorrow and see if I can fix it for you.

I think it's a still work in progress component but I have the raw C code working so shouldn't take me long to finish off the server/client components.

BenR
Matrix Staff
Posts: 2014
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 529 times
Been thanked: 719 times

Re: FC11 ESP32-S3 BLE error

Post by BenR »

Hello,

Right the ESP32 BT BLE Server is now fully functional and live on the library updates. Let me know if you have a go with it. I've done fairly thorough testing and for me it's very responsive and working great.

Note if I try and pair a device directly in Windows or on my Phone it fails. But if I don't pair and instead connect to it directly from a serial BLE app it's connecting and working as it should.

Another thing to note is in the menuconfig under Component Config -> Bluetooth. You must make sure Bluetooth is enabled, Host is Bluedroid and in Bluedroid options ensure that Enable BLE 4.2 features is checked.

I'll make a start on the Client while I'm on a roll and see if I can get that one finished too.

BenR
Matrix Staff
Posts: 2014
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 529 times
Been thanked: 719 times

Re: FC11 ESP32-S3 BLE error

Post by BenR »

Client is being a bit more elusive to get the scanning and connecting done well.

There's progress but it's not going to be ready today by the looks of it.

stefan.erni
Valued Contributor
Posts: 1125
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 215 times
Been thanked: 235 times

Re: FC11 ESP32-S3 BLE error

Post by stefan.erni »

Hi Ben

It's compiling now. Perfect!

On the Notebook and a phone It' found the FC11 BLE SPP
On Computer and IPhone It was not found.

I installed a APP on the Computer but id did not found

I will test it some more.

config:
2025-11-26_08-42-02.PNG
2025-11-26_08-42-02.PNG (29.03 KiB) Viewed 103 times
2025-11-26_08-43-31.PNG
2025-11-26_08-43-31.PNG (323.48 KiB) Viewed 103 times
Multi Comm Terminal
2025-11-26_09-00-48.PNG
2025-11-26_09-00-48.PNG (137.41 KiB) Viewed 103 times

stefan.erni
Valued Contributor
Posts: 1125
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 215 times
Been thanked: 235 times

Re: FC11 ESP32-S3 BLE error

Post by stefan.erni »

Hi Ben
I installed the Multi comm terminal on another computer,
and there I can receive the sent string from ESP32-S3 and BLE.
Have you also planned a component for the app developer?

BenR
Matrix Staff
Posts: 2014
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 529 times
Been thanked: 719 times

Re: FC11 ESP32-S3 BLE error

Post by BenR »

Hello,

Good question. I think a component for web developer should be fairly easy as I've already got this working. I'll have to have a think about PC developer and what we can do there.

My plan is to expose the two GATT service UUIDs in the components and then it should be easy to say have a server with a specific UUID and then have a client that can filter and optionally auto connect to that specific UUID.

stefan.erni
Valued Contributor
Posts: 1125
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 215 times
Been thanked: 235 times

Re: FC11 ESP32-S3 BLE error

Post by stefan.erni »

Hi Ben

A component for web developers would be great.
For my project, the data will have to go to the cloud in the future, via Android or Windows devices.
Web developers are also ideal for testing.
But it's also practical for app developers to receive data from the ESP32-S3.

stefan.erni
Valued Contributor
Posts: 1125
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 215 times
Been thanked: 235 times

Re: FC11 ESP32-S3 BLE error

Post by stefan.erni »

Hi Ben

I tested it for Android and iPhone, and I can receive the string with an App.
My wish is to be able to send an integer array and receive it in the App developer, just like with UART or classic Bluetooth.

My test with a string was working nice.

ESP32 send:
2025-11-27_12-06-02.PNG
2025-11-27_12-06-02.PNG (17.79 KiB) Viewed 45 times
received App for Iphone:
2025-11-27_11-59-54.PNG
2025-11-27_11-59-54.PNG (13.43 KiB) Viewed 45 times
received App for Androide:
2025-11-27_12-02-00.PNG
2025-11-27_12-02-00.PNG (5.93 KiB) Viewed 45 times

BenR
Matrix Staff
Posts: 2014
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 529 times
Been thanked: 719 times

Re: FC11 ESP32-S3 BLE error

Post by BenR »

Hello,

Glad it's now working for you. I've added the embedded client component now too and that also seems to be working well so that's good progress.

If you need to send/receive arrays of INTs then one way to do it now would be to use arrays of bytes and simply assign the low/high byte of each INT to each pair of bytes.

Moving INT array into Byte array
B[0] = I[0]
B[1] = I[0] >> 8
B[2] = I[1]
B[3] = I[1] >> 8

And visa versa
I[0] = B[0] + (B[1] << 8)
I[1] = B[2] + (B[3] << 8)

I'll have a look into the PC/Web devloper components next so we have a full set.

Post Reply