Web Developer with BLE

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
stefan.erni
Valued Contributor
Posts: 1167
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 221 times
Been thanked: 239 times

Web Developer with BLE

Post by stefan.erni »

Hi Steve

ESP32 BLE and App Developer work very well together.
Already done in the forum.
viewtopic.php?t=3468

One more small request:
It doesn't work with the Web Developer yet.
Would it be possible to add this as a feature?

Steve-Matrix
Matrix Staff
Posts: 1761
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 411 times

Re: Web Developer with BLE

Post by Steve-Matrix »

I have made a Web Developer component, but it is currently unreleased and needs a little more work. I'll look into it again and see if we can get something out soon.

Steve-Matrix
Matrix Staff
Posts: 1761
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 411 times

Re: Web Developer with BLE

Post by Steve-Matrix »

BTW, a beta version of the BLE Web Developer component was posted by Ben here:
viewtopic.php?p=22575#p22575

Have you managed to tried it? This might actually work as-is. But if it doesn't, it would be useful to know.

stefan.erni
Valued Contributor
Posts: 1167
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 221 times
Been thanked: 239 times

Re: Web Developer with BLE

Post by stefan.erni »

Hi Steve

I copied the components.

I've already tried that program,
but I can't select which BLE I want to connect .

Is that the component?
Attachments
2026-02-19_15-08-27.PNG
2026-02-19_15-08-27.PNG (29.75 KiB) Viewed 109 times

Steve-Matrix
Matrix Staff
Posts: 1761
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 411 times

Re: Web Developer with BLE

Post by Steve-Matrix »

Yes, that's the component. But a slightly newer version is attached here (this one has a proper icon).

The complication is the "filter" expression. Due to domain origin issues in (most?) browsers, this needs to reference the actual device being connected to. There are examples in the tooltip for that property that show what is required. Here are 4 examples:

Code: Select all

    filters: [ { services: [0x1802, 0x1803] } ]

    filters: [ { name: "My Cool Device" } ]

    filters: [ { namePrefix: "Mtx" } ]

    filters: [ { services: ["heart_rate"] } ], optionalServices: ["battery_service"]
You would also need to enter the appropriate Service and Characteristic too.

The component only supports strings currently.
Attachments
WebBLE.fcpx
(3.34 KiB) Downloaded 9 times

stefan.erni
Valued Contributor
Posts: 1167
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 221 times
Been thanked: 239 times

Re: Web Developer with BLE

Post by stefan.erni »

ok I can see component and the filter now

I have an ESP32 sending a string all second.

I can receive the string in my Iphone.

Is filter like this?

name of device:
2026-02-19_16-18-13.PNG
2026-02-19_16-18-13.PNG (14.26 KiB) Viewed 99 times
Filter?
2026-02-19_16-19-07.PNG
2026-02-19_16-19-07.PNG (22.65 KiB) Viewed 99 times

Steve-Matrix
Matrix Staff
Posts: 1761
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 411 times

Re: Web Developer with BLE

Post by Steve-Matrix »

I think that filter should work. The Service and Characteristic values needs to be correct for your ESP32 device.

If you call "RequestDevice", the browser should ask to connect to your device. Once connected, the "OnValueChanged" macro should be called when the data for that Characteristic has been changed.

stefan.erni
Valued Contributor
Posts: 1167
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 221 times
Been thanked: 239 times

Re: Web Developer with BLE

Post by stefan.erni »

Hi Steve

if I press the Button for "RequestDevice" nothing happens

Steve-Matrix
Matrix Staff
Posts: 1761
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 411 times

Re: Web Developer with BLE

Post by Steve-Matrix »

You could try the filter property set to the following, assuming this is the correct Service ID for your hardware project:

Code: Select all

filters: [ { services: [0xffe0] } ]
I tried a test project on my mobile phone and I had to use the Chrome browser. I tried another browser and that did nothing, presumably because it does not have Bluetooth available to it.

stefan.erni
Valued Contributor
Posts: 1167
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 221 times
Been thanked: 239 times

Re: Web Developer with BLE

Post by stefan.erni »

Hi Steve

Perfect!

This filter is working.

This is the HTML code on Edge working

I can receive nonstop text from the ESP32 via BLE

2026-02-20_15-12-17.PNG
2026-02-20_15-12-17.PNG (39.81 KiB) Viewed 9 times
A small note:
with the filter
filters: [ { namePrefix: "Flow" } ]
I can connect but it's not working
And....
It's not working in the HTML viewer.
2026-02-20_15-13-11.PNG
2026-02-20_15-13-11.PNG (19.13 KiB) Viewed 9 times

Post Reply