Date: Sun, 3 Feb 2008 22:51:22 -0800 From: Jeremy Chadwick <koitsu@FreeBSD.org> To: Ganbold <ganbold@micom.mng.net> Cc: FreeBSD Stable Mailing List <freebsd-stable@freebsd.org> Subject: Re: /dev/cuad0: Device busy Message-ID: <20080204065122.GA92674@eos.sc1.parodius.com> In-Reply-To: <47A6B2AB.2060308@micom.mng.net> References: <47A69A66.2080109@micom.mng.net> <20080204063023.GA91789@eos.sc1.parodius.com> <47A6B2AB.2060308@micom.mng.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 04, 2008 at 02:37:31PM +0800, Ganbold wrote: > Jeremy Chadwick wrote: >> On Mon, Feb 04, 2008 at 12:53:58PM +0800, Ganbold wrote: >> >>> Hi, >>> >>> I'm trying to use serial port but the system says device busy. >>> >>> daemon# cu -l /dev/cuad0 -s 9600 >>> /dev/cuad0: Device busy >>> link down >>> >> >> Does the same happen if you do `cu -l ttyd0 -s 9600`? >> > > It works and fstat shows: > > daemon# fstat /dev/cuad0 > USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME > daemon# fstat /dev/ttyd0 > USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME > root cu 5574 3 /dev 41 crw------- ttyd0 rw > /dev/ttyd0 > root cu 5573 3 /dev 41 crw------- ttyd0 rw > /dev/ttyd0 > daemon# > > Is it expected behaviour? As far as I know, yes. On all of our machines which utilise getty(8) on ttyd0 (as listed in /etc/ttys): $ grep ttyd0 /etc/ttys ttyd0 "/usr/libexec/getty std.115200" xterm on secure $ fstat /dev/ttyd0 USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME root getty 37376 0 /dev 36 crw------- ttyd0 rw /dev/ttyd0 root getty 37376 1 /dev 36 crw------- ttyd0 rw /dev/ttyd0 root getty 37376 2 /dev 36 crw------- ttyd0 rw /dev/ttyd0 Additionally, see Section 23.2.5 of the below document: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serial.html Personally, I never understood the concept of "dial-in" and "call-out" devices on FreeBSD. I ran BBS software for years on both Apple II hardware and PC hardware; there was no distinction between such devices. A serial port is a serial port. Chances are I'm not understanding why there's a distinction, but there doesn't appear to be any explanation of why there's a distinction within manpages or the handbook... -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080204065122.GA92674>