• No results found

KickStart 3. The Remote Maintenance Board. The UNIX Interfacing Guide

N/A
N/A
Protected

Academic year: 2022

Share "KickStart 3. The Remote Maintenance Board. The UNIX Interfacing Guide"

Copied!
10
0
0

Loading.... (view fulltext now)

Full text

(1)

KickStart 3

The Remote Maintenance Board

The UNIX Interfacing Guide

(2)

KickStart 3

The Remote Maintenance Board The UNIX Interfacing Guide

Copyright 1994 by

Landmark Research International Corp.

703 Grand Central Street Clearwater, FL 34616

U.S.A. (800) 683-6696

Int’l (813) 443-1331

Tech Support (800) 683-0854

FAX (813) 443-6603

Printed in the United States of America ALL RIGHTS RESERVED

DOCUMENT #MAN - UNIX - 102694A

(3)

INTERFACING WITH UNIX

Due to the growing numbers of PCs using UNIX, KickStart 3 has been designed to interface with UNIX as well as DOS. By providing an I/O based interface between KickStart 3 and application software, KickStart 3 can use either operating system. The interface was designed to be as simple as possible in order to provide full utilization of the board’s capabilities with a minimal amount of difficulty. The amount and fre- quency of data and messages that are sent between application and KickStart 3 are relatively small. In addition, using a simplified interface limits significantly the possibility of interference with other devices residing in the PC.

The interface developed for KickStart 3 requires only a single I/O port at address 180. All interface between KickStart 3 and application software travels through this port. The key to this single threaded interface is the decoding and latching of data provided by KickStart 3. Whenever an I/O Write of address 180 Hex is placed on the PC bus, the data is latched and

stored on KickStart 3 into the Semaphore Out Latch. When- ever an I/O Read of address 180 Hex is placed on the PC bus, the data from the Semaphore-In Latch is placed on the PC data bus by KickStart 3. This design provides separate and distinct semaphore in/out handling. In other words, there is never a chance that the application would write data to port 180 and then read back the data that was written. There is also no possibility to overwrite data that is being provided by KickStart 3 with a command from the application.

The UNIX interface and DOS interface operate in very similar ways. The three components in the UNIX interface are:

1. Device Driver 2. RMBCMD 3. Daemon

2 KickStart 3

(4)

The only significant difference between UNIX and DOS is the use of a Device Driver, which performs the necessary I/O writes and reads. These I/O writes and reads cannot be accomplished directly from within UNIX, as opposed to DOS, where those writes and reads can be carried out directly.

The Device Driver

In UNIX, the device driver is a collection of subroutines and data within the UNIX kernel that constitutes the software interface to an I/O device, such as a disk or tape drive or a special graphics display.

When the UNIX kernel recognizes that a particular action is re- quired, it calls the appropriate driver routine. Only a device driver can respond to device interrupts. The principal interface detween a device driver and the rest of the UNIX kernel consists of a set of standard entry points. The names of the entry points and the operations they perform must conform to UNIX rules.

Because UNIX is run in the Protected Mode, this privileged Device Driver is linked to the UNIX kernel. The kernel is a program that controls the resources of a computer and allocates them among its users. Once the device driver has been linked and installed, it will always be present with KickStart 3. The purpose of the device driver is to provide a mechanism by which application programs can interface with KickStart 3. The driver allows the application pro- grams to have access to items such as the ability to read the tem- perature, check the voltages, send a message to KickStart 3, set user passwords, change phone numbers when necessary, etc. The driver has the privileges necessary to write and read to I/O port 180, which is the port used by KickStart 3 for data transmission.

The Device Driver provided was developed for AT&T UNIX System V, and might not work for other variants of UNIX. Consult your

UNIX system documentation for device driver installation instruc- tions.

(5)

RMBCMD - RMB COMMAND

This program was specifically designed to allow the user to access any of the information or data that is contained within KickStart 3, such as the temperature, power voltages, etc. The user can enter com- mands telling the KickStart 3 to query certain items. For example,

TEMP?

The RMBCMD only functions when the PC is operational. If UNIX is running, then RMBCMD can run.

RMBCMD Password

Validation

Get User Commands

Parse and Validate Commands

Issue KS3 Semaphores

Get KS3 Results and report

Standard In Standard Out

RMBCMD Flowchart

There are two distinct levels of operation in RMBCMD. The two levels are separated by passwords. The first level of operation is User level. There is a User level password which must be typed before RMBCMD will continue. A directory of commands is revealed if the password is correctly entered. They are as follows:

4 KickStart 3

(6)

ACTION?

ALARM?

CONTACTS?

EVENT?

ID?

MSGN?

MODEM?

OPSYS?

PHONE2?

RMBSTATE?

STYLE?

TEMP?

TIME?

ACTIONFLAG?

BIOS?

DATE?

FANS?

INIT?

MSGNUM?

NAME?

PANICMSG?

POSTCODES?

SANITY?

TEMP1?

TEMPMAX?

UPS?

ADDR?

BOOTTIMEOUT?

DIALOUT?

FORCEBEE?

MSGALL?

MSGSPACE?

OK?

PHONE1?

REV?

SANITYTIME?

TEMP2?

TEMPMIN?

VOLTS?

CLS DIR DUMP

EXIT HELP LS

MANAGER USER

This list of case insensitive query commands are the only com- mands which can be accessed at this User level.

One of the above commands, " MANAGER", allows you to enter the next level of operation - the Supervisory level. Access to this level requires a password also. If you enter this password correctly, the listing of commands available expands. The user, now a Supervisory user, can change items configured in KickStart 3, such as the passwords, phone numbers, actions, etc. Also, as a Supervisory user, you can type in the command "USER " and return to the previous User level of operation.

The list below contains the case insensitive commands available to a Supervisor level user.

ACTION=

ALARM!

CLEARALARM!

CONFIGURE!

FANS=

INIT=

MSGCLEARALL!

OPEN!

ACTIONFLAG=

BIOS=

CLEAREVENT!

DATE=

FORCEBEE=

MODEM=

MSGCLEARN!

OPSYS=

ADDR=

BOOTTIMEOUT=

CLOSE!

DIALOUT=

ID=

MSG=

NAME=

PANICMSG=

POWEROFF!

(7)

REBOOT!

SETPW1!

TEMPMAX=

UPS=

SANITY=

SETPW2!

TEMPMIN=

VOLTS=

SANITYTIME=

STYLE=

TIME=

Please see Chapter 4 for more information on the above RMB Commands.

There is a special command available for users interfacing with UNIX. It is defined below.

Command: UNIX!

Description: This command will allow the user of the UNIX version of RMBCMD to execute UNIX commands from within the program. See your UNIX documentation for detail about valid UNIX commands.

Parameter: a valid UNIX command Example: UNIX! who | sort

6 KickStart 3

(8)

The Daemon

The third program available when interfacing with UNIX is the Daemon. It runs continuously in the background and is initiated from the time UNIX begins running. Once again, if the PC is not working, then UNIX cannot run and therefore, the Daemon cannot either.

Two functions are the responsibility of the Daemon:

The Daemon issues the MAIL? semaphore and checks for responses starting with:

MSG_OUT REBOOT UNIX_CMD

Please see Chapter 9 for more information on Semaphores.

The second responsibility of the Daemon is to issue a sanity semaphore to KickStart 3 at a predetermined interval. This interval is set by the user during configuration.

At the end of each interval, the Daemon issues a message to KickStart 3, telling it that all is OK. Just a reminder - these two functions of the Daemon take place behind the scenes.

(9)

UNIX Deamon

Check for KS3 Messages

Daemon Flow

Issue Sanity Semaphore to KS3

NOTE: The "Sound speaker" Actions (10. . .19) and "Write message"

Actions (20. . .29) use the same buffer to store strings sent in response to MAIL?. Thus, they should not be used in the same Action list.

Remotely connecting to UNIX

In general, KickStart 3 will react to emergency conditions regardless of the operating system but will interact with UNIX only via the Daemon/Device Driver, because UNIX takes total control of the entire interrupt system and does not give it back.

Logging Off:

Due to the nature of the board, when a remote user connected to the PC through KickStart 3‘s modem logs off, the phone connec- tion is not automatically dropped. This differs from most standard Unix modems. The remote user can, of course, drop the connec- tion should he wish.

8 KickStart 3

(10)

General Interface Design: UNIX Version

Application Program

Open Ioctl Close

Device Driver

I n p u t Output

Semophore I/O Port

SEMOUT SEMIN

KickStart 3 Hardware

KickStart 3/UNIX Interface

References

Related documents

Major findings were that the majority (63.1 %) of the public school districts in the United States had at least one student enrolled in either a fully online or blended course; that

Using the Table of Affinities, give to persons, places or animals other things from the affinity list for at least nine consecutive weeks. For more serious problems, perform

For the poorest farmers in eastern India, then, the benefits of groundwater irrigation have come through three routes: in large part, through purchased pump irrigation and, in a

The primary aim of this work was, therefore, to improve risk stratification on an individual basis for members of both hereditary pancreatitis and familial pancreatic cancer

Purdue University as they transitioned into the workplace, and the second study focused on 7 first-year students transitioning to engineering degree coursework.. Additionally, a

The purpose of the I Comprehensive Mental Health Plan for Andalusia (2003-2007) (10) is to meet the mental health needs of people living in the region by reorientating existing

おかあさん お母さん okaasan mother おとうさん お父さん otoosan father おねえさん お姉さん oneesan older sister おにいさん お兄さん oniisan older brother

'Your Professor wanted to see the Toruk,' Abdul replied quietly. 'Four men died, but your Professor was happy. He saw the Toruk's claw marks. Now he is well~known. He is famous.'..