B4R Question How to start two tcp servers and make them communicate with each other?

amorosik

Expert
Licensed User
aaa_mobile_data_transfer_system.png


I currently have a system for transferring data from a mobile PC (a boat, DeviceA), to a second mobile PC (another boat, DeviceB)
DeviceA must send data to DeviceB can use both the rs232 serial port and a tcp/udp client connection to any tcp server
Same thing for DeviceB, it can receive data either from the rs232 port or it can activate a tcp/udp client connection to any tcp server
The problem underlying the direct connection between DeviceA and DeviceB lies in the fact that the individual devices use a mobile telephone connection to connect to the Internet and usually the various mobile telephone operators assign an always different external address, therefore the hypothesis of having DeviceA communicate directly with DeviceB is not viable
Or rather it would be practicable but using systems like DynDns or similar, which however have an update time that does not allow us to have a continuous connection
Currently the system used to solve the problem of connecting DeviceA with DeviceB is to use a pc3 on a site with a fixed internet line and equipped with a static wan ip address In the pc3 computer the VSPE program is launched which basically allows you to activate two tcp servers to put them in communication DeviceA simply connects as tcp client to pc3 on 90.10.10.10:1111, DeviceB connects as tcp client on 90.10.10.10:1111 and that's it
Everything works as desired and it is also possible to monitor the data flow from pc3 because the program allows you to view the incoming/outgoing data from the single port
Ok, the question is: how to replace the pc3 + Vspe with a similar device, but simpler, which allows the same functionality?
What card would you recommend to use for this purpose?

Remember that the required features are:
- n.2 distinct tcp servers (arduino board or similar with ethernet port)
- being able to make the two tcp servers communicate in the sense that the incoming data from one must go to the other
- be able to monitor the incoming/outgoing data flow from any of the two existing tcp servers (probably with other pc connected to the board)
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Replace pc3+vspe with raspberry pi + MQTT
This will be easier for both devices A+B for long durable stable connection with a little tiny memory usage
TCP for Arduino will be memory consuming approach
 
Upvote 0

amorosik

Expert
Licensed User
Replace pc3+vspe with raspberry pi + MQTT
This will be easier for both devices A+B for long durable stable connection with a little tiny memory usage
TCP for Arduino will be memory consuming approach

Ok go for the Raspberry
Do you know any programs ready to do this?
Or better focus on B4J code to be installed on Raspberry?
 
Upvote 0
Top