Python SCSI diagnostic tools using ASPI or SCSIPASSTHROUGH under Windows
Samuel Schulenburg
samschul@pacbell.net
31 Mar 2002 12:41:37 -0800
I have posted the combined ASPI and SCSIPASSTHROUGH libraries for
Python at the following URL:
http://starship.python.net/crew/samschul/
This release supports Python version 2.2 only. Future releases will
follow the updates to the Python Library's. the main features of this
open source release are:
1) Any machine the supports ASPI will execute the ASPIPy libraries.
2) All Windows machines WindowsNT -> WindowsXP that support the
SCSIPASSTHROUGH interface will execute the SCSIPy libraries.
3) Both libraries are available at any time or together under python
for example issueing the following Python commands will interface to
either library:
ISSUE COMAMND TO START SCSI
>>> import scsi as Scsi
scsi.py
Copyright 2002 by Samuel W. Schulenburg
13555 Colony Ave.
San Martin Calif.
USA
samschul@pacbell.net
SCSI Python library loaded verson: scsi.py 0.9 03/20/03
Type help for command line help functions, or use IDLE help menu
File SCSI0.log allready exists: Do you want to append or delete A/D d
SCSIPython Version 0.9 03/19/2002
Windows high performance clock detected
File SCSI1.log allready exists: Do you want to append or delete A/D d
SCSIPython Version 0.9 03/19/2002
Windows high performance clock detected
File SCSI2.log allready exists: Do you want to append or delete A/D d
SCSIPython Version 0.9 03/19/2002
Windows high performance clock detected
----Device Characteristics---
Claimed = 1
DeviceID = 0
DeviceInquery = Maxtor 94098U8 FA50
DeviceName = \\.\Physicaldrive0
DriverName = atapi
TID = 0
LUN = 0
MaxLBA = 80041247
SectorSize = 512
------------------------------
----Device Characteristics---
Claimed = 1
DeviceID = 1
DeviceInquery = Maxtor 53073U6 DAC1
DeviceName = \\.\Physicaldrive1
DriverName = atapi
TID = 1
LUN = 0
MaxLBA = 60030431
SectorSize = 512
------------------------------
----Device Characteristics---
Claimed = 1
DeviceID = 2
DeviceInquery = SEAGATE ST118273N 6244
DeviceName = \\.\Physicaldrive2
DriverName = aic78xx
TID = 0
LUN = 0
MaxLBA = 35566479
SectorSize = 512
------------------------------
The default DeviceID will be 2
Error Loging has been enabled:
CDB 12 00 00 00 FF 00
SCSIPython Version 0.9 03/19/2002
SEAGATE ST118273N 6244LP633950
NOW ISSUE COMMAND TO START ASPI
>>import aspi as Aspi
aspi.py
Copyright 1999 by Samuel W. Schulenburg
13555 Colony Ave.
San Martin Calif.
USA
samschul@pacbell.net
ASPI Python library loaded verson: aspi.py 2.0 07/03/00
Type help for command line help functions, or use IDLE help menu
Host adapter driver = ATAPI
Drives are attached
Host adapter # 0 SCSI ID # 7
Host adapter driver = ATAPI
Drives are not attached
Host adapter # 1 SCSI ID # 7
Host adapter driver = AIC78XX
Drives are attached
Host adapter # 2 SCSI ID # 7
Select which host adapter do you want to use, Enter host adapter
number 2
0 SEAGATE ST118273N 6244LP633950
1 Drive not present
2 Drive not present
3 Drive not present
4 Drive not present
5 Drive not present
6 Drive not present
8 Drive not present
9 Drive not present
10 Drive not present
11 Drive not present
12 Drive not present
13 Drive not present
14 Drive not present
File SCSI0.log allready exists: Do you want to append or delete A/D d
ASPIPython Version 2.3 01/20/2002
Windows high performance clock detected
CDB 12 00 00 00 FF 00
ASPIPython Version 2.3 01/20/2002
SEAGATE ST118273N 6244LP633950
>>Scsi.io6r(0x12,0x00,0,0,0xff,0)
CDB 12 00 00 00 FF 00
(0, 65392, 144)
>>Scsi.displaybuff(1)
Read Buffer Data = for drive #02
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
--------------------------------------------------
0000:|00 00 02 02 8B 00 00 1E 53 45 41 47 41 54 45 20 ........SEAGATE.
0010:|53 54 31 31 38 32 37 33 4E 20 20 20 20 20 20 20 ST118273N.......
0020:|36 32 34 34 4C 50 36 33 33 39 35 30 00 00 00 00 6244LP633950....
0030:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0050:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0060:|00 43 6F 70 79 72 69 67 68 74 20 28 63 29 20 31 .Copyright.(c).1
0070:|39 39 38 20 53 65 61 67 61 74 65 20 41 6C 6C 20 998.Seagate.All.
0080:|72 69 67 68 74 73 20 72 65 73 65 72 76 65 64 20 rights.reserved.
0090:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00A0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00B0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00C0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00D0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00E0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00F0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>>Aspi.io6(0x12,0x00,0,0,0xff,0)
CDB 12 00 00 00 FF 00
(0, 0, 65536)
>>Aspi.displaybuff(1)
Read Buffer Data = for drive #00
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
--------------------------------------------------
0000:|00 00 02 02 8B 00 00 1E 53 45 41 47 41 54 45 20 ........SEAGATE.
0010:|53 54 31 31 38 32 37 33 4E 20 20 20 20 20 20 20 ST118273N.......
0020:|36 32 34 34 4C 50 36 33 33 39 35 30 00 00 00 00 6244LP633950....
0030:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0050:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0060:|00 43 6F 70 79 72 69 67 68 74 20 28 63 29 20 31 .Copyright.(c).1
0070:|39 39 38 20 53 65 61 67 61 74 65 20 41 6C 6C 20 998.Seagate.All.
0080:|72 69 67 68 74 73 20 72 65 73 65 72 76 65 64 20 rights.reserved.
0090:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00A0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00B0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00C0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00D0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00E0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00F0:|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>>
Enjoy:
Samuel Schulenburg