The following crude example is cobbled together using IO::Socket and Device::SerialPort. It seems to work on CentOS 5.2 and may give you some ideas for solving your problem.
| [reply] [d/l] |
Since you've asked a general question, I'll give you a general answer.
I'd say, rather than asking for a complete solution, you could build your solution from the blocks you already have. So, make a script that does the tcp/ip bit, then once that's working, do the com port stuff. If you have tcp servers and serial loggers to pick over, that should be all you need.
Once you get started and you have more questions, post 'em.
--Pileofrogs
| [reply] |
The trivial case is easy with something like POE, but how do you plan to handle flow control? For example, what will you do if your 100 megabit/sec network device provides data faster than you can write to your 115.2 kilobit/sec serial device?
Your description implies that flow control won't be a problem in the other direction, but we don't know whether the client has its own timing requirements or bandwidth limits. For all we know, your client may also be attached to a serial device.
The trivial case won't preserve timing, which can often be an issue with serial data. If timing is important to you, this will complicate the TCP application protocol.
The timing problem gets significantly worse if your serial device doesn't support flow control at all.
| [reply] |