USB to serial adapter

Matthias Apitz guru at unixarea.de
Mon May 25 09:20:44 UTC 2015


El día Saturday, May 02, 2015 a las 11:42:45PM +0200, Polytropon escribió:

> On Sat, 2 May 2015 16:55:00 +0200, Matthias Apitz wrote:
> > I have an old VT100 terminal and want this connect to a laptop running
> > FreeBSD which has only USB ports (just for fun to participate in some
> > Vintage Computer Festival). Anybody knows a good adapter which works
> > with our uplcom(4) driver?
> 
> I'd be interested in that topic, too. I have the DEC vt101
> which still works (tested with _real_ serial port), but
> as serial ports are vanishing on desktops, and are being
> nonexistent on laptops, this would be a nice recipe to
> have in order to bring a piece of museum art back to life.

I have it connected today via the USB-to-serial adapter and it is mostly
working fine;

the /etc/ttys line is:
cuaU0   "/usr/libexec/getty std.9600"   vt102   on secure

what is working:

- I can login as 'root' and run for hours something like 'ls -lR /'
  (just to check the serial output)

what is not working:

- if I login as any other unpriv user (and I created a new one for this)
  it hangs after presenting the /etc/motd file; it just hangs

login: valentin
Password: .....

Last login: ....
FreeBSD 11.0-CURRENT (GENERIC) #1 r276659M: Tue Apr 28 15:50:23 CEST 2015

Welcome to FreeBSD!

(hanging)

a ps shows:

2293 U0  Is+    0:00,05 login [pam] (login)
2294 U0  I+     0:00,01 -sh (sh)

and when I fire up a truss command on the shell proc it gives the output
below and the session on the VT102 goes on and all is working fine.

What could cause this?

Thanks

	matthias

# truss -p 2294 2>> tty.txt
# cat tty.txt
ioctl(0,TIOCGETA,0xbfbfed00)			 = 0 (0x0)
fcntl(0,0x11,0xa)				 = 10 (0xa)
ioctl(10,TIOCGPGRP,0xbfbfed34)			 = 0 (0x0)
getpgrp()					 = 2293 (0x8f5)
sigaction(SIGTSTP,0x0,{ SIG_IGN SA_RESTART ss_t }) = 0 (0x0)
sigaction(SIGTTOU,0x0,{ SIG_IGN 0x0 ss_t })	 = 0 (0x0)
sigaction(SIGTTIN,0x0,{ SIG_IGN 0x0 ss_t })	 = 0 (0x0)
sigaction(SIGTTIN,{ SIG_DFL 0x0 ss_t },0x0)	 = 0 (0x0)
setpgid(0x0,0x8f6,0xa,0x0,0xbfbfee00,0xbfbfed70) = 0 (0x0)
ioctl(10,TIOCSPGRP,0xbfbfed34)			 = 0 (0x0)
__getcwd("/usr/home/valentin",256)		 = 0 (0x0)
stat("/var/mail/valentin",{ mode=-rw------- ,inode=1767799,size=0,blksize=32768 }) = 0 (0x0)
open("/etc/profile",O_CLOEXEC,00)		 = 3 (0x3)
read(3,"# $FreeBSD: head/etc/profile 208"...,1024) = 616 (0x268)
read(3,0x28879600,1024)				 = 0 (0x0)
close(3)					 = 0 (0x0)
open("/home/valentin/.profile",O_CLOEXEC,00)	 = 3 (0x3)
read(3,"# $FreeBSD: head/share/skel/dot."...,1024) = 810 (0x32a)
stat("/usr/games/fortune",{ mode=-r-xr-xr-x ,inode=1365149,size=18808,blksize=32768 }) = 0 (0x0)
eaccess(0x28889438,0x1,0x0,0x2,0x4e,0x14d49d)	 = 0 (0x0)
geteuid()					 = 1002 (0x3ea)
fork()						 = 2300 (0x8fc)
setpgid(0x8fc,0x8fc,0x0,0x1,0x0,0x0)		 ERR#13 'Permission denied'
wait4(-1,{ EXITED,val=0 },WUNTRACED|WCONTINUED,0x0) = 2300 (0x8fc)
ioctl(10,TIOCSPGRP,0xbfbfeb98)			 = 0 (0x0)
read(3,0x28879600,1024)				 = 0 (0x0)
close(3)					 = 0 (0x0)
open("/home/valentin/.shrc",O_CLOEXEC,00)	 = 3 (0x3)
read(3,"# $FreeBSD: head/share/skel/dot."...,1024) = 971 (0x3cb)
issetugid(0x281f7000,0x2814b41e,0x28148eee,0x281491ee,0x28,0x2814785e) = 0 (0x0)
open("/home/valentin/.editrc",O_RDONLY,0666)	 ERR#2 'No such file or directory'
read(3,0x28879600,1024)				 = 0 (0x0)
close(3)					 = 0 (0x0)
wait4(-1,0xbfbfecc4,WNOHANG|WUNTRACED|WCONTINUED,0x0) ERR#10 'No child processes'
stat("/var/mail/valentin",{ mode=-rw------- ,inode=1767799,size=0,blksize=32768 }) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGWINCH,0x0)		 = 0 (0x0)
ioctl(0,TIOCGWINSZ,0xbfbfeca8)			 = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGWINCH,0x0)		 = 0 (0x0)
ioctl(0,TIOCGWINSZ,0xbfbfec58)			 = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
fstat(2,{ mode=crw------- ,inode=117,size=0,blksize=4096 }) = 0 (0x0)
ioctl(2,TIOCGETA,0xbfbfeac0)			 = 0 (0x0)
write(2,"$ ",2)					 = 2 (0x2)
ioctl(0,TIOCGETA,0x2880d4d4)			 = 0 (0x0)
ioctl(0,TIOCSETAW,0x2880d4a8)			 = 0 (0x0)
read(0,"l",1)					 = 1 (0x1)
write(2,"l",1)					 = 1 (0x1)
read(0,"s",1)					 = 1 (0x1)
write(2,"s",1)					 = 1 (0x1)
read(0,"\n",1)					 = 1 (0x1)
write(2,"\n",1)					 = 1 (0x1)
ioctl(0,TIOCSETAW,0x2880d47c)			 = 0 (0x0)
stat("/sbin/ls",0xbfbfeb48)			 ERR#2 'No such file or directory'
stat("/bin/ls",{ mode=-r-xr-xr-x ,inode=963101,size=27268,blksize=32768 }) = 0 (0x0)
fork()						 = 2301 (0x8fd)
setpgid(0x8fd,0x8fd,0x200,0x1,0x0,0x0)		 = 0 (0x0)
wait4(-1,{ EXITED,val=0 },WUNTRACED|WCONTINUED,0x0) = 2301 (0x8fd)
ioctl(10,TIOCSPGRP,0xbfbfeba8)			 = 0 (0x0)
wait4(-1,0xbfbfecc4,WNOHANG|WUNTRACED|WCONTINUED,0x0) ERR#10 'No child processes'
stat("/var/mail/valentin",{ mode=-rw------- ,inode=1767799,size=0,blksize=32768 }) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGWINCH,0x0)		 = 0 (0x0)
ioctl(0,TIOCGWINSZ,0xbfbfeca8)			 = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGWINCH,0x0)		 = 0 (0x0)
ioctl(0,TIOCGWINSZ,0xbfbfec58)			 = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
write(2,"$ ",2)					 = 2 (0x2)
ioctl(0,TIOCGETA,0x2880d4d4)			 = 0 (0x0)
ioctl(0,TIOCSETAW,0x2880d4a8)			 = 0 (0x0)
read(0,"l",1)					 = 1 (0x1)
write(2,"l",1)					 = 1 (0x1)
read(0,"s",1)					 = 1 (0x1)
write(2,"s",1)					 = 1 (0x1)
read(0," ",1)					 = 1 (0x1)
write(2," ",1)					 = 1 (0x1)
read(0,"/",1)					 = 1 (0x1)
write(2,"/",1)					 = 1 (0x1)
read(0,"t",1)					 = 1 (0x1)
write(2,"t",1)					 = 1 (0x1)
read(0,"m",1)					 = 1 (0x1)
write(2,"m",1)					 = 1 (0x1)
read(0,"p",1)					 = 1 (0x1)
write(2,"p",1)					 = 1 (0x1)
read(0,"\n",1)					 = 1 (0x1)
write(2,"\n",1)					 = 1 (0x1)
ioctl(0,TIOCSETAW,0x2880d47c)			 = 0 (0x0)
fork()						 = 2302 (0x8fe)
setpgid(0x8fe,0x8fe,0x200,0x1,0x0,0x0)		 = 0 (0x0)
wait4(-1,{ EXITED,val=0 },WUNTRACED|WCONTINUED,0x0) = 2302 (0x8fe)
ioctl(10,TIOCSPGRP,0xbfbfeba8)			 = 0 (0x0)
wait4(-1,0xbfbfecc4,WNOHANG|WUNTRACED|WCONTINUED,0x0) ERR#10 'No child processes'
stat("/var/mail/valentin",{ mode=-rw------- ,inode=1767799,size=0,blksize=32768 }) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGWINCH,0x0)		 = 0 (0x0)
ioctl(0,TIOCGWINSZ,0xbfbfeca8)			 = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGWINCH,0x0)		 = 0 (0x0)
ioctl(0,TIOCGWINSZ,0xbfbfec58)			 = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0)		 = 0 (0x0)
write(2,"$ ",2)					 = 2 (0x2)
ioctl(0,TIOCGETA,0x2880d4d4)			 = 0 (0x0)
ioctl(0,TIOCSETAW,0x2880d4a8)			 = 0 (0x0)

-- 
Matthias Apitz, guru at unixarea.de, http://www.unixarea.de/ +49-170-4527211    +49-176-38902045
"Wenn der Mensch von den Umständen gebildet wird, so muß man die Umstände menschlich bilden."
"Si el hombre es formado por las circunstancias entonces es necesario formar humanamente
las circunstancias", Karl Marx in Die heilige Familie / La sagrada familia (MEW 2, 138)


More information about the freebsd-questions mailing list