Lanner Digital Input User Manual

Lanner Digital Input/Output and Management Utility
Implementation Manual
Rev 1.0 September 20, 2011
Software User Manual Version 1.0
Rev Date Changes
1.0.1 March 30, 2011 Initial version
This document contains propriet ary i nformation of Lanner Electronics Inc. –and is not to be disclosed or used except in accordance with applicable agreements.
Copyright © 2011. All Rights Reserved.
Copyright© 2011 Lanner Electronics Inc. All rights reserved. The information in this document is proprietary and confidential to Lanner Electronics Inc. No part of t his docu ment m ay be re produce d in any form or by any m eans or u sed to make an y de rivative work (such as translat ion, tra nsform at ion, or adaptation) without the express written consent of Lanner Electronics Inc. Lanner Electronics Inc. reserves the right to revise this document and to make changes in content from time to time without obligation on the part of Lanner Electronics Inc. to provide noti fi cat i o n of suc h revi si o n or c hange.
The information in this document is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Lanner Electronics Inc. Lanner Electronics Inc. assumes no responsibility or liability for any errors or inaccuracies that may appear in this document or any software that may be provided in association with this document.
ii
Software User Manual Version 1.0
Table of Contents
AABBOOUUTT TTHHIISS DDOOCCUUMMEENNTT......................................................................................................................................................................................................................................................2
PPUURRPPOOSSEE..........................................................................................................................................................................................................................................................................................................2
IINNTTEENNDDEEDD AAUUDDIIEENNCCEE................................................................................................................................................................................................................................................................2
CCOONNVVEENNTTIIOONNSS UUSSEEDD..................................................................................................................................................................................................................................................................2
CCHHAAPPTTEERR 11.
1.1 FEATURES OF LANNER DIO AND OTHER MANAGEMENT UTILITIES PROVIDED BY GPIO ...............................................3
CCHHAAPPTTEERR 22.
2.1 DIO INSTALLATION ON LINUX......................................................................................................................................5
2.2 DIO INSTALLATION ON FREEBSD................................................................................................................................6
. IINNTTRROODDUUCCTTIIOONN............................................................................................................................................................................................................................33
. BBUUIILLDDIINNGG AANNDD IINNSSTTAALLLLIINNGG TTHHEE PPRROOGGRRAAMM............................................................................................................................55
2
2
2
2
2.3 OTHER MANAGEMENT UTILITIES INSTALLATION..........................................................................................................7
2.4 WINDOWS INSTALLATION.............................................................................................................................................9
.
CCHHAAPPTTEERR 33.
3.1 VIA THE COMMAND LINE...........................................................................................................................................15
3.2 VIA THE DEMO PROGRAM ON WINDOWS ...................................................................................................................20
AAPPPPEENNDDIIXX AA.. RREEGGIISSTTEERR AADDDDRREESSSSEESS..............................................................................................................................................................................................225
EEXXEECCUUTTIINNGG TTHHEE SSAAMMPPLLEE PPRROOGGRRAAMM..............................................................................................................................................115
5
5
About this document Purpose
The purpose of this document is to provide implementation information for Lanner Digital input/output and other hardware management functionalities.
Intended audience
This document is for individuals who install and configure embedded and industrial platforms with the above mentioned functionality.
Conventions used
Following are all the special characters and typographical conventions used in this manual:
Convention Meaning
Press Enter Means press the Enter or Return key or
its equivalent on your computer.
Note Introduces important additional
information.
Caution Warns that a failure to follow the
recommended procedure could result in loss of data or damage to equipment.
2
Software User Manual Version 1.0
Chapter 1. Introduction
1.1 Features of Lanner DIO and other management utilities provided by GPIO
Lanner 's DIO (Digital Input/Output) is a general purpose input/output (GPIO). They are dedicated general-purpose pins that can be configured as either inputs or outputs. When configured as an output, you can write to an internal register to control the state driven on the output pin. When configured as an input, you can detect the state of the input by reading the state of an internal register. These pins are provided by Intel PCH chipset (like ICH7) or other Super I/O chips such as Fintek F81865 or Winbond 83627UHG. Depending on the chipsets used, commands and available functions vary. Here we list some common features:
z DIO (Digital Input/output): Lanner DIO utility (via both command line and GUI) is
a simple program which is designed to test or alter the state of the input/output pins, i.e., switching between high and low.
z PIO: Programmable Input/Output pins. It can be utilized as a LED indicator for
showing the operating state of the designated software or a specific function (such as the wireless LAN or GPS) of the device.
z Status LED/RunLED (for system operating s tatus)
/AlarmLED/GPS_LED/WirelessLED: Those LED’s behavior can be controlled by programming the GPIO pins. The availability of specific LED functions varies depending on the products.
z Hardware Monitor: The hardware monitor is a system health supervision tool. It
monitors several critical parameters in PC hardware, including power supply voltages, fan speeds, temperatures, and CPU voltage, etc.
z CaseOpen: Caseopen detection detect whether the computer case has been
opened and possibly tampered with. The sample code provided can be used to enable/disable/reset this function.
3
Software User Manual Version 1.0
z Software Reset Button: On most of Lanner Network platforms, the reset button
can be programmed to support either a hardware reset (i.e., shutdown and then start the device again) or a software reset (i.e., rest a software to its default setting). Note that a proper hardware jumper setting is required for this function to work (refer to the product’s User Manual for more information).
z Redundant Power Supply Function: We provide a sample program which can be
used to check the status (i.e., normal or failed) of the power supply.
The following shows the directory of the sample programs in the Driver and Manual CD: On Linux ( HW directory means Hardware monitor, sled directory means status LED,
sw_btn means software Reset Button, sw_bp means watchdog/bypass utility, and rdd_pwr means redundant power supply)
On the Windows:
4
Software User Manual Version 1.0
Chapter 2. Building and Installing the Program
2.1 DIO Installation on Linux
Note:
The OS supported by Lanner LCM function include platforms based on Linux Kernel series 2.4.x and Linux Kernel series 2.6.x, and DOS. For installation on DOS, refer to the Readme file contained within the pro gram.
Build To build program source code on Linux platform, use the following steps as a
guideline:
1. Copy the proper makefile from the Driver and Manual CD to your system:
#Makefile.linux
2. Set the access mode with these two parameters by editing the Makefile.linux directly: DIRECT_IO_ACCESS= [0|1] (enter either 1 or 0) (enter either 1 or 0). Refer to the next section on Install for more details on access mode.
3. Type make to build source code:
#make Makefile (Note: omit the file extensions)
4. After the source code is compiled, the executable program s (DIO_TST) and the driver (dio_drv[k]o) will appear in the bin sub-directory.
5
Software User Manual Version 1.0
Install
The installation procedures depend on the access mode that you have set by using the above mentioned method.
If you have set DIRECT_IO_ACCESS=1, driver installation is not necessary. Proceed to the next section on executing the Lanner DIO program.
If you have set DIRECT_IO_ACCESS=0, Lanner DIO driver needs to be installed. Install the driver and create a node in the /dev directory as shown in the following example:
#insmod dio_drv.[k]o #mknod /dev/dio_drv c 244 0
Note: For descriptions of the command, refer to the Readme file contained within the prog ram.
2.2 DIO Installation on FreeBSD
Build
Use the script file Makefile.bsd to build the source code. After compiling, you will get driver file dio_drv.[k]o and test file DIO_TST in the same folder.
1. Copy the proper makefile from the Driver and Manual CD to your system
2. Set the access mode with these two parameters by editing the Makefile.bsd directly: DIRECT_IO_ACCESS= [0|1] (enter either 1 or 0) Refer to the next section on Install for more details on access mode.
3. Type make to build source code:
#make Makefile (Note: omit the file extensions)
4. After the source code is compiled, the executable program s (DIO_TST) and the driver (dio_drv[k]o) will appear in the bin sub-directory.
6
Software User Manual Version 1.0
Note: The OS supported by Lanner DIO function includes platforms based on FreeBSD 8.0
Install
The installation procedures depend on the access mode that you have set in the Makefile.bsd.
If you have set DIRECT_IO_ACCESS=1, driver installation is not necessary. Proceed to the next section on executing the Lanner DIO program.
If you have set DIRECT_IO_ACCESS=0, Lanner DIO driver needs to be installed. Install the driver and create a node in the /dev directory as shown in the following example:
Insert the module by: #kldload -v ./dio_drv.ko
2.3 Other Management utilities Installation
Follow the same procedures as mentioned above but use the appropriate driver name and major number instead, for instance, use driver sled_drv.[k]o and major number 240 for Status LED function. Use driver wd_drv.[k]o and major number 241 for watchdog timer. Refer to the Readme file contained within the program for more information.
Hardware Monitor with Linux lm-sensors: The lm-sensor is an essential tool for monitoring the hardware health of Linux systems. It
supports a wide range of monitoring devices including I2C/SMBus hardware monitoring chips, features integrated in Super I/O chips or south bridges, thermal sensors integrated in CPU, and so on. Lanner has tested and verified the use of lm-sensors (version 3.3.0) on our products. For more information and downloading the lm sensors program, visit: http://www.lm-sensors.org.
Use the following steps as a guideline to run the sample program (you will need to have the root privilege to run this program :
7
Loading...