National Instruments PCI-232/4 Isolated Benutzerhandbuch
Using PCI Serial with Linux
4
www.natinst.com
Quick Start
This section is for experienced Linux users who are familiar with the
lspci
and
setserial
tools. If you are not familiar with either of these
1.
If you do not have enough available serial devices (
/dev/ttyS*
) for
each port on your multiport interface, create a new serial device by
entering the following:
entering the following:
linux# cd /dev
linux /dev# ./MAKEDEV ttyS<
port number>
2.
Find the port address, IRQ, and memory assignment of your PCI serial
interface by enter the following:
interface by enter the following:
linux# lspci -v -n -d 1093:*
3.
Assign the serial driver to your devices. Make sure you precede the
port addresses with
port addresses with
0x
.
•
For a PCI-232 interface, enter the following:
linux# setserial /dev/ttyS<
port number> uart
16550a port <
port address> irq <irq>
^fourport
•
For a PCI-485 interface, which supports a higher
baud_base
of
460.8K at startup, enter the following:
linux# setserial /dev/ttyS<
port number> uart
16550a port <
port address> irq <irq>
baud_base 460800 ^fourport
4.
Enable the PCI interrupt on your interface. To use
intenable
(from
the
PCI-SERIAL
directory) to enable interrupts on your PCI serial
interface, enter the following:
linux PCI-SERIAL#
./intenable <
pci memory address
found in lspci>
5.
If you have a PCI-485 interface, set the transceiver mode for each serial
port. Refer to the section
port. Refer to the section
for more
information about selecting a PCI-485 transceiver mode.
6.
After you connect a cable between the two ports, test the setup by
running
running
serialtest
(from the
PCI-SERIAL
directory).
linux#
./serialtest <
receive port number> <transmit
port number>