Web Developer with BLE

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
stefan.erni
Valued Contributor
Posts: 1166
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: 1759
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 410 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: 1759
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 410 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: 1166
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 91 times

Steve-Matrix
Matrix Staff
Posts: 1759
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 410 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 8 times

stefan.erni
Valued Contributor
Posts: 1166
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 81 times
Filter?
2026-02-19_16-19-07.PNG
2026-02-19_16-19-07.PNG (22.65 KiB) Viewed 81 times

Steve-Matrix
Matrix Staff
Posts: 1759
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 256 times
Been thanked: 410 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: 1166
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

Post Reply