[fpc-pascal] Serial to TCP gateway in FPC?

Paul Breneman Paul2006 at BrenemanLabs.com
Mon Jun 19 01:16:05 CEST 2017


On 06/18/2017 03:04 AM, Bo Berglund wrote:
> I need to implement a serial to TCP gateway in order to communicate
> between a Windows based control software and a system controller box.
> The software and the controller only talk serial to each other and the
> protocol is proprietary and binary.
> Now I have a situation where the controller is on a remote location
> many thousands of km away from here.
> I have managed to get some help on the remote site to hook up the
> controller serial port to a serial to USB cable plugged into a
> Raspberry Pi, which I can reach via VPN from here. So I installed
> serial2net on the RPi, making it publish the serial port as a TCP port
> (#2091). This part works OK, so whatever is sent on the TCP socket
> connection gets transferred to the RS232 serial line and vice versa.
> 
> So far so good, but now I also need some kind of serial port to TCP
> converter on the Windows 7 PC I use in my end, which is handling the
> VPN connection.
> 
> So I wonder if there are any FPC examples around for conversion serial
> to TCP (where the TCP part is a client rather than a server), which
> can compile on Windows. I cannot use any RPi in this end because I
> cannot get the RPi to connect by VPN to the remote location...
> 
> Ready made example or suggestions on how to go about writing a
> converter in FPC are welcome!

Why do you need FPC code?  Here are free drivers that work in Windows:
   http://com0com.sourceforge.net/



More information about the fpc-pascal mailing list