Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi, I am about to write a program to listen and read data from /dev/ttyS0 and write the data to /dev/ttyS1 after processing. Also, the same time I need to listen to /dev/ttyS1 and write to /dev/ttyS0 if any data arrived at /dev/ttyS1.
Can you please give me your idea to implement this.
We have a medical device which has a PDA (windowsCE) as a client and a server (ELAN SC520 microcontroller and linux 2.4) which controlls a set of sensors. The server reads the sensors over RS-232 (/dev/ttyS1) and it will process the data and send it the PDA over RS232 (/dev/ttyS0). Meantime, the PDA will send some command to the server to controll the sensor over /dev/ttyS0 and also it will send some configuration files (.ini, .txt, .dat) to the server. Server will process the data received from PDA (/dev/ttySo) and it will send it to sensor board (/dev/ttyS1).
I am able to read and write data over /dev/ttyS0 and /dev/ttyS1. (The credit goes to you).
Now, the problem is how can I differentiate the data which I am getting from /dev/ttyS0 is whether it is a plain text or a file?. If it is a plain text, I have to process and send it /dev/ttyS1 and if it is a file then I need to copy it to a path.
One idea would be to use techniques similar to dialup modems and Bulletin Board Systems (BBS). Dial up modems use an escape sequence when differentiating between commands and data. The escape code is +++. To hangup the commamd is +++ATH.
So if uploading a file you would first send an attention command to the controller and then something similar to the zmodem or ymodem protocols. It basically transmits the file name, and number of bytes and the data.
1. You mean I need to send the data something like this
In this case, how can I set the buffer size in the controller?
2. Or I need to use some other protocols (ymodem/zmodem)?
But our kernel provides very limited functions and protocols.
We have pppd running on the controller.
3. Is it possible to to upload files using PPP? If so, how can I do it? Do you have any documents or books on that?