Software Installation
Sealevel Systems
8.Ultra
Page
6
Linux Device Driver Installation
The source code is in .tar.gz format, type "tar xzvf filename.tar.gz" to extract the files and refer to the INSTALL file
in the extracted directory. If you have downloaded an RPM file compatible with your system, type "rpm -i
filename.rpm" to install the software. To implement a virtual serial port in Linux, use the SeaLINK virtual serial
port module, provided in the software installation.
1.
Configuration
•
Before you can access a serial port, you must “install” it to the client computer. Launch the
“SeaLINK Configuration” console utility by typing “/usr/sbin/sealinkcfg”. If your device is on the
local network, you should see it listed. Type ‘i’ followed by the number of the hub in the list
(probably “i 1”) to install it. If your device is not listed, type 'n' and follow the prompts to tell the
software about your device.
•
When finished configuring ports, type ‘q’ to quit. The SeaLINK driver must be restarted (or
started for the first time), so type either “/sbin/sealink restart” or “/sbin/sealink start”. If one gives
you an error, try the other one.
2.
Usage Details
•
Once a device has been installed, it can be accessed through the character devices “/dev/ttySL[0-
n]”, where ‘n’ is the number of ports on your device minus one. For example, “echo hello >
/dev/ttySL0” will send the ASCII characters “hello” to the first serial port on your device, while
“echo hello > /dev/ttySL2” will do the same for the third serial port.
•
The /dev/ttySL devices are designed to communicate with a virtualized a serial port, so programs
can access them just like a /dev/ttyS port using the termios functions (see the man page for
termios). Note that unlike a normal serial port, SeaLINK serial ports can only be opened by one
program at a time. This is done to ensure that the correct client receives the correct data/signals.
Raw Data Sockets
Raw Data Sockets are probably the easiest way for a software developer to control a serial port, but provide the least
control from a software standpoint. You can simply open a socket to the device on the Raw Data TCP port
corresponding to the serial port you want and stream data back and forth. The data will not be inspected or modified
in any way. This method provides the least control because serial port functions such as baud rate and modem
control signals cannot be monitored or changed programmatically. However, Raw Data is platform-independent and
requires no software installation. If your purposes do not require dynamic serial port control, Raw Data may be the
most efficient choice for you.
1.
Configuration
•
Since Raw Data does not allow for programmatic changing of serial port controls, the serial ports
must be configured before use via the onboard web server (see the section Web Configuration).
From the Port Settings page, configure the ports to the desired settings and click Submit at the
bottom of the page. The serial ports will automatically be set to these defaults when opened
Selection).
2.
Usage Details
•
To access a serial port using Raw Data mode, open a TCP socket to the device’s IP address on
port 4760, which corresponds to the serial port on the device.
Only one client can open each serial port at a time. All further socket requests to a TCP port will be denied.