On FreeBSD, I'm looking for a way to list serial communication devices.
The computer has two of them installed: An on-board serial console (
ttyS0), and an internal analog modem.
I can find out about the internal modem with
# pciconf -lbcevV pci0:5:8:0 none0@pci0:5:8:0: class=0x078000 card=0x8d881043 chip=0x270214f1 rev=0x01 hdr=0x00 vendor = 'Conexant Systems, Inc.' class = simple comms bar  = type Memory, range 32, base 0xd1000000, size 65536, enabled bar  = type I/O Port, range 32, base 0xa800, size 8, enabled cap 01 = powerspec 2 supports D0 D3 current D0
So that's clearly the modem, I can tell by the vendor ID, which is consistent with the chip on my Conexant RD01-D270 internal analog modem.
dmidecode -t connector lets me find this:
Handle 0x000F, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: COM1 Internal Connector Type: 9 Pin Dual Inline (pin 10 cut) External Reference Designator: External Connector Type: DB-9 male Port Type: Serial Port 16450 Compatible
So this is clearly the on-board serial interface.
The problem is this: which devices are they? I can assume rather safely, that the on-board serial interface is
/dev/ttyS0, but that is just a guess. Actually, since this is FreeBSD, it'll be
/dev/console, probably. But which one is the modem? I assume this would be a serial console or dialer, which would be
/dev/cuau0, this is - again - just a guess, though.
Is there a reliable way to find this out, without guessing, etc?