Have a Question?
Print

00002: Introduction to the Openport program

Title:

Introduction to the Openport program

Description:

Openport is a Unix script that can be used to set communications parameters on a serial port. This is not the only way, the operating system vendor may have other suggested methods. BASIS authored the script and distributes it with all Unix based products. 

The script uses the current tty device (serial device) and grabs the stty (communication settings) then attempts to set the stty of the target tty device. It uses the current stty for comparison for a “good” stty. The typical problems when a user is attempting to set the stty via automated system startup scripts are that he does not have a current tty device so the part of the script that “grabs” the stty of the current device will fail. 

The example Openport script in the manual shows the redirection of /dev/tty–this would be where the good stty would come from if the user was running the script from the operating system prompt (i.e., root). 

To set this to run without a terminal, the example should be changed to reference the device that you are attempting to set. So, the example should be changed to reference $1. This will allow the “grab” section to have something to grab from when run from an environment where no current tty device exists. 

The user may be using a system startup script he modified to have the Openport script executed on system startup. Again using Openport is his choice–if his operating system provides another means to set the serial communications parameters on a device, he can use that instead. 



Last Modified: 10/25/1998 Product: PRO/5 Operating System: Unix

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top