NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Getty on USB serial port



thor0505%comcast.net@localhost ("William D. Jones") writes:

>ttyU0   "/usr/libexec/getty default"    vt100   on secure
>However, this change had no effect and I didn't see any output on the system 
>attached at the other end of the USB serial port upon rebooting.

Here this just works. Setup:

RPI3 running NetBSD with a dual USB/Serial adapter:

| uplcom0 at uhub2 port 1
| uplcom0: Prolific Technology Inc. (0x67b) USB-Serial Controller D (0x2303), rev 1.10/4.00, addr 5
| ucom0 at uplcom0
| uplcom1 at uhub2 port 2
| uplcom1: Prolific Technology Inc. (0x67b) USB-Serial Controller D (0x2303), rev 1.10/4.00, addr 6
| ucom1 at uplcom1

In /etc/ttys:
ttyU0   "/usr/libexec/getty default"    unknown on secure
ttyU1   "/usr/libexec/getty default"    unknown off secure

After a reboot, there are two getty processes. One for console and one
for ttyU0.

| root    821  0.0  0.2  4920 1464 ttyE0 Is+   7:09AM 0:00.01 /usr/libexec/getty default console 
| root    493  0.0  0.2  4976 1520 ttyU0 Is+   7:09AM 0:00.01 /usr/libexec/getty default ttyU0 


A laptop running NetBSD with a single USB/Serial adapter. The default
baudrate for both sides is 9600. Both are connected through a null-modem
cable. Running 'cu -l /dev/ttyU3' shows the getty login:

| NetBSD/evbarm (egghed) (ttyU0)
| 
| login: root
| Password:
| Last login: Thu Sep  7 07:10:34 2017 from 10.28.5.17 on pts/0
| Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
|     The NetBSD Foundation, Inc.  All rights reserved.
| Copyright (c) 1982, 1986, 1989, 1991, 1993
|     The Regents of the University of California.  All rights reserved.
| 
| NetBSD 8.99.2 (EGGHED) #62: Mon Sep 4 23:11:25 CEST 2017
...


A critical part is the null-modem cable, as it also has to connect
the handshake and flow control signals. If those signals are not
used correctly, you can try to disable the functionality in /etc/ttys
with the 'softcar' and/or 'local' flags. You may also tell cu (or
whatever terminal program you use) to ignore modem handshake and
flow control.


-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index