Hello all
I did get an IBM LTO 6 lately and was having trouble setting it in automatic drive online Mode. After a lot of reading of the barely available documentation and lending an oscilloscope from a friend, I was able to put things together and get the drive to work without an library. Hopefully I am able to save someone on this planet some time and struggle by sharing my documentation.
In the first place I did get an RS-422-USB cable with an screw terminal, but due to the undocumented pinout of the JST-SH 10 Pin connector I wasn’t successful in establishing an communication (maybe just bad luck).
The second step was to search out the circuit board and check the components. There I found an chip from TI, which is similar to this one THVD1451. TI has an great documentation for its components! https://www.ti.com/product/THVD1451
Perspective from the Drive Side ( Issue #1)
(The drive is Top Down on these pictures, the Top is on the table)
(The drive is in the position bottom to table, perspective from above) Cabeling colors are from top to bottom:
- white
- grey
- purple
- blue
- green
- yellow
- orange
- red
- brown
- black
Following the Electrical Pathways I was assuming the following cabling:
- Receive:
- A → Yellow OR Orange
- B → Orange OR Red
- Send:
- Z → Red OR Brown
- Y → Brown OR Black
With the help of the oscilloscope it was possible to evaluate, although it was the fist time for me utilizing one.
Now I knew i was receiving signals on the YELLOW and the ORANGE Cables. The RS422 standard specifies differential signaling. In the picture above you can see the signals switching polarity which is causing an increased amplitude at the receiving side. I am not an electrical engineer and therefor can’t go any deeper in detail.
But what was it I was receiving? There would come the IBM Library/Drive Interface Specification in handy. http://t10.org/ftp/t10/document.02/02-022r0.pdf
There are the Control Characters which did appear 0x02 and 0x03 for Start an End of Text.
The middle Part seemed to be the Message for a Config_Request. To see them it is crucial to set the drive in non-polled Mode with the dip switches on the back. I have set them all to OFF.
Packets does have the following format:
So this would make sense for an drive that was took out of an library. At page 30 is a description of the Interface Scenarios. The drive is operation in an non-polled Mode due to the dip switch. This means the drive is initiating the handshaking process and asking for a config.
To fulfill the handshake we need to “craft” an package. From Page 16 on is the description how an Set_Config message should look like.
And a useful information was in the interface scenario on Page 30.
If we would just craft the package with the first 54 bytes, we would be firmware independent.
Still we do not know what the sending cables are. The good news is there are packets we can try to send to the library which are outside of the package protocol, meaning we don’t need start-text, length, checksum, end-text, acknowledgments, or byte stuffing. If we send just hex 00 to the drive, we should receive something with “I” “B” “M”.
If you remember the lines I assumed as sending line have been:
- Z → Red OR Brown
- Y → Brown or Black
It turn out to be:
-
Z → Red
-
Y → Brown
-
Ground is Black.
After connecting Red to TxD+, Brown to TxD- and Black to GND on our RS-422-USB Adapter, we are ready to send the Set_Config package to the drive. The setting we try to accomplish is to set Bit 3 in Byte 53 to 0. This would allow the drive to raise the SCSI or Fiber Channel Ports without the need of receiving an Set_Config Package every time it powers up.
If we where successful, the drive would send and Acknowledge 0x06 an reboot like stated in the Scenario for Startup Process.
How to build the Package is described on the Pages 11 and 12 in the LDI Specification.
For transmitting the package I did use the following script:
#!/bin/bash
stty -F /dev/ttyUSB0 speed 38400 -cstopb -parenb -echo
while read -r line
do
echo -en “$line” > /dev/ttyUSB0
done < “$1”
Save this as echo_hex and change the mode to execute
chmod +x ./echo_hex
Then we need an file with the hex code. Just name it code for example.
\x02\x00\x36\xAC\x01\x00\x00\x00\x01\xFF\xF2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE6\x03
Then we can issue the command
./echo_hex code
and see the Packages 0x06 0x03, for ACK and ETX on the receiving side.
Now the drive is rebooting and we can see the Link online. This qaucli is a command from qlogic (MARVELL) which in my case produced the HP Branded FC Card.
Also lsscsi is outputting the Tape now.
SUMMARY
- Set all DIP Switches on the drive to off.
- Connect the RS-422-USB Adapter as follows:
- TxD+ → Red
- TxD- → Brown
- RxD+ → Yellow
- RxD- → Orange
- GND → Black
- Send the Package to the drive:
\x02\x00\x36\xAC\x01\x00\x00\x00\x01\xFF\xF2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE6\x03
- Drive restarts and goes online to SCSI or Fibre Channel automatically.