Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
The question is: how can I make the data written to the COM port to be available back for read immediately? In other words I need software loopback on com port.
Some briefing: I wrote an application that reads data sent by some industrial machine, parses it, and writes results somewhere. The problem is that it's not so easy to go to the customer place and get connected to that device in order to make application tests. So I need to simulate data being written to the port. That's why I bought a 9-pin COM socket, and connected the appropriate pins to each other to get COM port loopback device. Then I send data to the port
Code:
echo "data from deviceX" > /dev/ttyS0
and that line can be read by application. Everything works fine, but... I want to achieve the same functionality without that loopback device, cause first: my com port is always in use, but I need it for other purposes and second: I'm afraid to burn up my only com port on laptop with such experiments one day. Is this can be done with pipes and device files, if yes then how?
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it. subscribe
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe