Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linux Programming - Serial Link

Posted on 2004-04-05
5
Medium Priority
?
478 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

618 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