National Instruments PCI-232/4 Isolated Tablet User Manual


 
© National Instruments Corporation 11 Using PCI Serial with Linux
one serial port. To change the baud base of your other serial ports, rerun
clockspeed with a different serial port number specified in the command
line. Enter the following to set the baud base. (In this example, high equals
a baud base of 460800 and low equals a baud base of 115200):
linux# setserial /dev/ttyS<
port number
> baud_base 115200
linux PCI-SERIAL#./clockspeed <
port number
> <
"high" or
"low"
>
For example, enter the following to select a baud base of 115200 for
/dev/ttyS4 and for /dev/ttyS5:
linux# setserial /dev/ttyS4 baud_base 115200
linux# setserial /dev/ttyS5 baud_base 115200
linux PCI-SERIAL# ./clockspeed 4 low
linux PCI-SERIAL# ./clockspeed 5 low
Enter the following to change the baud base back to 460800 for
/dev/ttyS4 and for /dev/ttyS5:
linux# setserial /dev/ttyS4 baud_base 460800
linux# setserial /dev/ttyS5 baud_base 460800
linux PCI-SERIAL# ./clockspeed 4 high
linux PCI-SERIAL# ./clockspeed 5 high
Test the Setup
After you connect the cables to the port (as shown in your PCI serial getting
started manual), run the
serialtest program (from the PCI-SERIAL
directory) to verify your setup. Make sure you specify two different ports
for the
serialtest program, as shown in the following:
linux PCI-SERIAL# ./serialtest <
receive port number
>
<
transmit port number
>
If the test is successful, it displays a SUCCESS message. If the test hangs,
press <ctrl-c> to exit the program, and continue to the next section,
Troubleshooting and Common Questions.
To test
/dev/ttyS4 and /dev/ttyS5, connect a cable between the
two ports and enter the following:
linux PCI-SERIAL# ./serialtest 4 5