Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
SDN 101: An Introduction to Software Defined Networking
Discover the advantages of SDN.
SDN has quickly become one of the hottest trends in IT. But not all SDN solutions offer real software-defined functionality. As more enterprises consider SDN, they want to know, “What is SDN? And what are the real benefits?” If you're ready to explore the advantages of SDN, and want to know how it should be implemented within your enterprise, start by reading our introductory white paper.
Click Here to receive this Complete Guide absolutely free.
I am setting up a test involving 2 machines. brezhnev - a headless Slackware 9 server, and alexis, a battered old laptop with Slack 8.1. I aim to simulate a situation where alexis will be used to monitor the serial port on a P(A)BX. In this test I will present dummy data to ttyS0 on brezhnev, and read it over a null modem cable into a file on alexis.
I have so far managed to set up brezhnev to look for a login on his first serial port when he boots, by including the following line in his /etc/inittab:
s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
I fire up minicom on alexis, configure it, reboot brezhnev and when he comes back up, I get a login. I am then able to dump data out onto brezhnev's serial port with the following command:
root@brezhnev:$ cat logfile > /dev/ttyS0
The contents are dumped into the login screen within minicom on alexis. This indicates that the serial comms are working between the two, but I would like to script the interaction to make it run automatically and inifnitely.
My latest attempt involved installing the UUCP slackware package and using the 'cu' utility. The command below initiates a connection:
cu -l /dev/ttyS0 --parity=none -s9600
And then I have to issue the command '~c' to download a file from brezhnev. From that point, all data echo'd to brezhnev's ttyS0 is visible to alexis, however, this still isn't automated, because I have to issue the '~c' command. I have tried hacking together a PERL script - it works as far as making the connection, but I can't maintain the dialogue (don't know what else to call it) to send this final command to the process.
Does anyone have any idea of how I could script this UUCP solution, or of another way to develop a script to check the serial port on an infinite loop for data - and then do something with it... ?