Solved

Linux Programming - Serial Link

Posted on 2004-04-05
5
465 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

696 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