chvt utility and device node symlinks

Clint Thomas cthomas at Soneticom.com
Tue Mar 20 17:06:23 UTC 2007


What about a program that runs from within the same linux terminal you are sitting on, but allows me to communicate to another device as if it were in another terminal? My serial console is on ttyS0, and I want to open a comm link to a new serial device. I though I read that agetty or another program might be able to do this, but do you recommend anything in particular?

CT


-----Original Message-----
From: Denis Vlasenko [mailto:vda.linux at googlemail.com]
Sent: Mon 3/19/2007 5:33 PM
To: busybox at busybox.net
Cc: Clint Thomas
Subject: Re: chvt utility and device node symlinks
 
On Monday 19 March 2007 22:10, Clint Thomas wrote:
> I want to use the chvt utility in busybox so that I can connect to
> another device I have on the system through serial. My problem is that

What exactly do you want? You sit on e.g. ttyS0 and want
to give a command and magically start working on ttyS1??
But it is not possible, you are physically connected to ttyS0!

> chvt looks specifically for a /dev/ttyX where X is the argument passed
> to chvt as a number. The device I want to talk to is /dev/tts/X, so I
> tried making a symlink to it like this
> 
> ln -s /dev/tts/X /dev/ttyX

chvt's purpose is to switch Linux virtual consoles
on a physically the same harware where they are multiplexed -
PC screen. It does this using ioctl:

ioctl(3, VT_WAITACTIVE, 0x2)

It will never work for any other tty devices, I think, because
they are not sharing the same hardware, like VTs do.
--
vda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20070320/93cffbff/attachment-0001.htm 


More information about the busybox mailing list