Pc104 rocketport option, Configuring the rocketport pc104 serial ports – Comtrol DM ATS-LNX User Manual

Page 14

Advertising
background image

PC104 RocketPort Option

14

PC104 RocketPort Option

The PC104 RocketPort serial card is optional in the DeviceMaster ATS-LNX.

Note: This option can only be installed by Comtrol.

This section discusses the following topics:

Configuring the serial ports for your serial devices.

Connecting your serial devices to the ATS-LNX.

RocketPort quad- or octacable:

-

Connector pinouts

-

Building loopback plugs

-

Building cables (null-modem and straight-through).

Testing PC104 serial ports.

Configuring the RocketPort PC104 Serial Ports

Use one of the following methods if you need to configure any of the RocketPort
PC104 serial ports for RS-422 or RS-485 use.

Note: The device driver is installed and loads on demand when /dev/ttyRxx devices

are opened. The port default is RS-232.

The initial configuration used by the driver is specified in /etc/modules.conf:

options rocket board1=0x180 pc104_1=232,232,232,232,232,232,232,232

To change /dev/ttyR3 to RS-422, modify the options line like this:

options rocket board1=0x180 pc104_1=232,232,232,422,232,232,232,232

Changes to the options line in modules.conf will not take effect until the next
time the driver module is loaded. You may manually unload or load the driver:

# rmmod rocket
# modprobe rocket

The setrocket utility may be used to change the mode at anytime. Changes
made by setrocket are not persistent, that is, the next time the driver is loaded,
the setting reverts to those specified in the /etc/modules.conf file. An example of
setrocket usage is shown below:

# setrocket /dev/ttyR2 rs485
# setrocket /dev/ttyR5 rs232

To display the current configuration of a port, use setrocket with the device
name:

# setrocket /dev/ttyR4

Invoking setrocket with no arguments displays a summary of the options.

Note: Settings changes using setrocket are only valid during the current login

session.

An ioctl() call may be used to read or write the port configuration (this is what
is done by the setrocket utility):

#include "rocket.h"
void set485(int fd)

{

struct rocket_config config;

ioctl(fd, RCKP_GET_CONFIG, &config);

Advertising