Hello everyone,
I would like to propose a new Flowcode component: TCP Sockets (Client and Server), Embedded and PC-App (Web-App?)
With the increasing use of Wi-Fi-enabled microcontrollers such as the ESP32, many projects require reliable communication between embedded devices and PCs over a local network.
At the moment, there does not appear to be a simple and user-friendly TCP socket component available in Flowcode.
Example Application
1 PC acting as a TCP server
20 ESP32 devices acting as TCP clients
Each ESP32 sends approximately 100 kB of measurement data once per hour
The PC collects, stores, and processes the data
TCP is an ideal solution for this type of application because it provides reliable, ordered data transmission without packet loss.
Suggested Features
TCP Client
Connect(IP Address, Port)
Disconnect()
SendData()
ReceiveData()
ConnectionStatus()
TCP Server
StartServer(Port)
StopServer()
AcceptClient()
SendData()
ReceiveData()
ClientCount()
For SendData and ReceiveData I would only specify those three.
Sending and receiving via UART and Bluetooth in this way can be maintained.
Benefits for Flowcode Users
Easy integration of ESP32 projects into existing networks
Communication with PCs, industrial PCs, Raspberry Pi systems and
Simplified development of IoT and Industry 4.0 applications
No need to create custom C code or external networking libraries
Support for multi-device data collection and monitoring systems
Additional Use Case
Communication Between Two Flowcode Applications
Another valuable use case would be communication between two Flowcode applications running on separate computers.
Example:
Flowcode Application A running on PC 1
Flowcode Application B running on PC 2
Communication over Ethernet, Wi-Fi, or a local network using TCP sockets
Possible applications include:
It could also be a great help for this post.
So Obvious.......
https://flowcode.co.uk/forums/viewtopic.php?t=3756
Data exchange between two Flowcode-based systems
Remote monitoring and control
Communication between operator and machine interfaces
Testing and simulation environments
TCP Socket Component for Flowcode, Embedded and PC-App
-
stefan.erni
- Valued Contributor
- Posts: 1269
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 237 times
- Been thanked: 252 times
-
chipfryer27
- Valued Contributor
- Posts: 2031
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 444 times
- Been thanked: 669 times
Re: TCP Socket Component for Flowcode, Embedded and PC-App
Hi Stefan
What's wrong with the Network Comms component? I use it to create a link to whatever / wherever is hosting my service etc and will be used in the "So Obvious" post. Well unless something better comes along
Regards
What's wrong with the Network Comms component? I use it to create a link to whatever / wherever is hosting my service etc and will be used in the "So Obvious" post. Well unless something better comes along
Regards
-
stefan.erni
- Valued Contributor
- Posts: 1269
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 237 times
- Been thanked: 252 times
Re: TCP Socket Component for Flowcode, Embedded and PC-App
Hi Lian
Thanks for the information.
I assume you mean the MQTT client. Yes, it's practical and convenient for measurement data and is also very well documented.
You can install your own local broker or use one from the internet.
https://www.flowcode.co.uk/resources/da ... xample.pdf
The disadvantage is that you need a broker and that a data array is not transferred as efficiently.
"Limited data format support: JSON is available, but BSON is not supported."
With the TCP Sockets:
Should it be possible to handle small data arrays like data[30] as well as large ones like data[12000] of integers.
Very fast if both programs are on the same computer or on the same network.
No broker needed.
Of course, I have no idea how complicated that is.
Thanks for the information.
I assume you mean the MQTT client. Yes, it's practical and convenient for measurement data and is also very well documented.
You can install your own local broker or use one from the internet.
https://www.flowcode.co.uk/resources/da ... xample.pdf
The disadvantage is that you need a broker and that a data array is not transferred as efficiently.
"Limited data format support: JSON is available, but BSON is not supported."
With the TCP Sockets:
Should it be possible to handle small data arrays like data[30] as well as large ones like data[12000] of integers.
Very fast if both programs are on the same computer or on the same network.
No broker needed.
Of course, I have no idea how complicated that is.
-
chipfryer27
- Valued Contributor
- Posts: 2031
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 444 times
- Been thanked: 669 times
Re: TCP Socket Component for Flowcode, Embedded and PC-App
Hi Stefan
No, I meant creating a link using the Network Comms component.
Using it I can connect to my server / whatever and transfer.
Regards
No, I meant creating a link using the Network Comms component.
Using it I can connect to my server / whatever and transfer.
Regards