SCSI Pass Through JNI helper product overview
The SCSI Pass Through JNI (SPT JNI) software package provides the programmatic interface
for Java applications on the Windows and Linux operating system platforms for handling SCSI
adapters and devices. For Windows operating system platform the native SCSI Pass Through
(SPT) programmatic interface is used. For Linux operating system platform the native SCSI
Generic (SG) programmatic interface is used.
The package allows Java application to enumerate SCSI host bus adapters and SCSI devices,
and to execute SCSI commands for the SCSI devices. Programmatic interface of the package is
simple and introduces no limitation on the CDB and data structure. The maximum size of data is
limited by the maximum transfer length parameter of the SCSI host bus adapter and depends
on the adapter model and type. For Windows 8 and later operating system platforms the large
CDB (up to 256 bytes) and bidirectional data transfer are supported. The maximum sense data
length is 255 bytes. The package gives the Java application all the advantages of handling the
SCSI devices at relatively low system level. The package does not depend on the type of host
bus adapter and handles all types of adapters (SCSI, Fibre Channel, iSCSI, etc) in the same
unified way. The package is relatively compact and requires minimum of disk space and
memory.
The package is available in binary and source forms. Binary forms include compiled
modules for the most popular Windows and Linux operating system platforms. The
source code can be used for building the binary modules and for further modifications
without any restriction. The binary and source forms are free and can be distributed
to any party.
Package features include the following.
- Host bus adapter (HBA) enumeration. The application gets the array with identifiers of installed HBAs. Then the application selects the HBA by the identifier and gets the HBA capabilities and enumerates the devices that are connected to HBA.
- SCSI device enumeration. The package offers two methods of device enumeration. The first method enumerates all the devices for selected HBA and returns the array of device information units. The second method enumerates all the devices of selected type (disk, tape drive, CD/DVD, and media changer) and returns the array of device information units. The device information unit includes the device parameters (device object name, HBA number, bus number, target ID, and LUN) and identification data (vendor ID, product ID, and revision level).
- Rescanning the SCSI bus for selected HBA. Application can rescan SCSI bus(es) for selected HBA. During the rescan operation the SCSI bus is reset (not supported for some newest HBA and bus types) and the operating system updates the internal list of connected devices. Then the application can enumerate the new set of devices.
- SCSI command execution. The application can execute SCSI commands using legacy and extended command requests. For legacy command request the CDB size is limited by 16 bytes and bidirectional transfer is not supported. For Windows 8 and later operating system platforms the application can execute extended command requests that support large CDBs and bidirectional data transfer.
- Sense data support. The package supports sense data of up to 255 bytes size. The fixed format sense data and descriptor format sense data are parsed transparently and the most important fields (sense key, additional sense code, and additional sense code qualifier) are returned to the application. The raw sense data are also available to the application.
- Large CDB support. For Windows 8 and later operating system platforms the extended command requests with CDB of up to 256 bytes size are supported. The HBA reports the support of extended command requests in its capabilities and the application should analyze them before making extended command request with large CDB.
- Bidirectional data support. For Windows 8 and later operating system platforms the extended command requests with both input and output data are supported. The HBA reports the support of extended command requests in its capabilities and the application should analyze them before making extended command request with bidirectional data transfer.
- 32-bit and 64-bit operating system support. The package supports both x86 and x64 Windows and Linux operating system platforms and JRE versions. The package capacity should match the JRE capacity.
- Sample Java application that demostrates the use of classes and methods for all operations.
The Java source code of the package was developed using JDK version 1.8.
More information on the Java programming language can be found on the
Java Technology site.