Solved

Linux Programming - Serial Link

Posted on 2004-04-05
5
443 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

777 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