LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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.

Notices

Reply
 
Search this Thread
Old 05-15-2009, 06:58 PM   #1
rtspitz
Member
 
Registered: Jan 2005
Location: germany
Distribution: suse, opensuse, debian, others for testing
Posts: 307

Rep: Reputation: 32
pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp


Here it goes:

I remember that quite some time ago I could pair 2 programs like "screen" or "minicom" using /dev/ptyp master and a corresponding /dev/ttyp slave device. These devices are gone for some time now.

Nowadays I think I have to start one of these accessing /dev/ptmx and a slave device is automatically created as /dev/pts/<something>. This auto-create seems to work.

The problem I have is that although I have rw permissions on the devices, no data is going through and I get an error.

Example:

- screen /dev/ptmx
- /dev/pts/X is created with proper perms
- screen /dev/pts/X

--> "I/O error, no pty found" or similar.



Help ;-)
 
Old 12-02-2011, 01:41 PM   #2
ypeels
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Rep: Reputation: Disabled
"workaround"

Better late than never? Reproduced here because I had a hard time finding this link:

socat PTY,link=COM8 PTY,link=COM9

This creates COM8 and COM9 as appropriate symbolic links in the current working directory; now you can open two new terminal windows in the same directory and type

screen COM8
screen COM9

and the two terminals will now be communicating. Notice that unlike pty/tty, you don't have to worry about starting up the master first anymore! (COM8 and COM9 both point to "slave" /dev/pts entities). Also, dare I point out that once socat has been called, this is just as user-friendly as com0com in Windows??
 
1 members found this post helpful.
Old 12-02-2011, 02:07 PM   #3
rtspitz
Member
 
Registered: Jan 2005
Location: germany
Distribution: suse, opensuse, debian, others for testing
Posts: 307

Original Poster
Rep: Reputation: 32
Thanks for the late (haha) follow up.

I had completely forgotten about this. I started to dig through the man-pages myself, but I didn't want to go and write C-code just for a local loop-back. And I got pretty upset about the fact that the non-multiplexed way was removed - apparently (to me) without adding a way to manage the multiplexer using something like bash.

I will remember 'socat' for the future for sure.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenSUSE x86_64 does not mount /dev/tape (or /dev/st0 or /dev/nst0) yankeeinga Linux - Newbie 6 08-21-2008 12:51 PM
using flash drive changes device /dev/sr0 to /dev/sr1 for mapping to /dev/pktcdvd/0? lugoteehalt Linux - Software 3 10-24-2007 10:27 AM
/dev/audio, /dev/dsp and /dev/mixer missing in Debian Etch 1337_penguin Debian 2 04-11-2007 11:33 AM
Where is /dev/ttyp* and /dev/pty* on RH 4.0 ? ThomasRonshof Linux - Software 3 08-30-2006 01:56 PM
Kernel config options (/dev, /dev/pts) jrdioko Slackware 5 08-22-2005 01:25 AM


All times are GMT -5. The time now is 07:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration