App Developer Comport scan ID for ESP32 Bluetooth

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: 1287
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 246 times
Been thanked: 257 times

Flowcode v10 App Developer Comport scan ID for ESP32 Bluetooth

Post by stefan.erni »

Hi Steve

There is a very good command,(scan_ for_device_ID) to detect the comport of a microchip bluetooth modul and then connect the comport. That worked pretty well.

Each bluetooth connection makes two comports, incoming and outgoing.

So far, FC has always detected the correct one, even if the wrong port (port6) appears first, it has detected the correct one (port7).

But with the ESP32 Bluetooth it only recognises the first one. So it's not working if the first is the wrong one .

Is there a way to improve this?

regards


Stefan


Snag_fdee49.png
Snag_fdee49.png (44.66 KiB) Viewed 3747 times

Snag_fe3380.png
Snag_fe3380.png (55.14 KiB) Viewed 3747 times
Attachments
port_found1.fcsx
(12.77 KiB) Downloaded 431 times
(view online)

Steve-Matrix
Matrix Staff
Posts: 2032
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 307 times
Been thanked: 471 times

Re: App Developer Comport scan ID for ESP32 Bluetooth

Post by Steve-Matrix »

Hi Stefan,

I have had a little success and hopefully this will help you.

My ESP32 device creates only one COM port at COM3:
ESP32 COM port.png
ESP32 COM port.png (97.09 KiB) Viewed 3744 times

If I alter your project and look for this, it is correctly returning the COM port number:
ESP32 COM port FC.png
ESP32 COM port FC.png (37.61 KiB) Viewed 3744 times

My ESP32 has no program and so I have not attempted to try PC <-> ESP comms, but hopefully this gets you started.

Steve-Matrix
Matrix Staff
Posts: 2032
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 307 times
Been thanked: 471 times

Re: App Developer Comport scan ID for ESP32 Bluetooth

Post by Steve-Matrix »

You can just look for the VID/PID instead - i.e. "USB\VID_1A86&PID_7523".

stefan.erni
Valued Contributor
Posts: 1287
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 246 times
Been thanked: 257 times

Re: App Developer Comport scan ID for ESP32 Bluetooth

Post by stefan.erni »

Hi Steve

I have now adjusted my program so that I can also recognise the USB port.
This port can also be used for programming (flash) or as a comport for a USB C connection with, for example, 921600 bd.

But after lunch I restarted my computer and now it reads the correct number (7).

regards


Stefan

Infos:
Attachments
Snag_77628f.png
Snag_77628f.png (107.85 KiB) Viewed 3738 times
Snag_7740de.png
Snag_7740de.png (57.97 KiB) Viewed 3738 times
port_found1.fcsx
(25.11 KiB) Downloaded 414 times
(view online)

Post Reply