Solved

Linux Programming - Serial Link

Posted on 2004-04-05
5
455 Views
Last Modified: 2008-03-06
Hi,

I need to use a serial link between 2 computers for a homework at school (XMODEM protocol implementation); since I'm not in the mood of buying a serial cable, I want to know if it's possible to emulate it, on the same computer (i.e. by using devices /dev/ttyS0 and /dev/ttyS1 to simulate the local and the remote port of the serial link. Anything I write in one I should be able to read from another.). Are there any drivers/programs to do this?

Thanks in advance.
0
Comment
Question by:Dragon_Krome
  • 2
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
Alf666 earned 500 total points
ID: 10759219
Use /dev/ttyq? and /dev/ptyq?. They are inter-connected.

For example : /dev/ttyqf and /dev/ptyqf.

0
 
LVL 4

Expert Comment

by:oumer
ID: 10759335
Everything (almost) you want to know about serial programming could be found
http://www.easysw.com/~mike/serial/serial.html
0
 
LVL 5

Author Comment

by:Dragon_Krome
ID: 10759360
oumer, thanks for the link, but it's not a matter of programming the serial port, but emulating a virtual link.

Alf666: I'm looking at this /dev/ttyq? and /dev/ptyq? stuff, it's interesting and might be just what I need, but I'm not yet able to transfer a file via XMODEM. Seems the ptyq? must be opened first... Still looking into this.
0
 
LVL 5

Author Comment

by:Dragon_Krome
ID: 10759435
Thanks for the answer Alf , I had no idea about this stuff, but it works! Earlier i had troubles because of a badly coded comm program. :)
0
 
LVL 9

Expert Comment

by:Alf666
ID: 10759448
Yes. The pty is the slave and must be opened first. Then the tty.
It's a bit kludgy to use, but damn useful.

I don't remember though if they can pseudo-handle hardware signaling. It's been too long since I've played with this last :-)
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question