Subject: Re: Internal modem setup
To: Frederick Bruckman <fb@enteract.com>
From: Herb Peyerl <hpeyerl@beer.org>
List: port-i386
Date: 06/11/2000 08:00:52
Frederick Bruckman <fb@enteract.com>  wrote:
 > On Sun, 11 Jun 2000, Steven M. Bellovin wrote:
 > > In message <Pine.NEB.4.21.0006110645270.4937-100000@fiona.home>, Frederick Bruc
 > > kman writes:
 > > >On Sun, 11 Jun 2000, Frederick Bruckman wrote:
 > > >
 > > >Make that tty02, or whatever the modem detected as: com2 -> tty02.
 > > >
 > > Um -- isn't com2 tty01?  DOS devices have 1-origin names; Unix devices 
 > > uses 0-origin.
 > 
 > fredb@fiona-> grep ^com /var/run/dmesg.boot
 > com0 at pnpbios0 index 14 (PNP0501)
 > com0: io 3f8-3ff, irq 4
 > com0: ns16550a, working fifo
 > 
 > and that's tty00. Don't ask _me_ why NetBSD uses com-anything. :-)


'com' being the name of the device NS 8250/16450/16550 driver. The
first instance of any driver is '0'.  com0 == tty00.   This doesn't
necessarily correspond to the DOS name 'COM1:' since I think DOS
declares 'COM1:' to be the device at 0x3f8,4 and COM2 0x2f8,3.
If DOS doesn't see a device at 0x3f8,4 but sees a device at 0x2f8,3,
then you'll have a COM2: but not a COM1:... NetBSD will then call
that COM2: device 'tty00'.