Sending User-defined CDB's and Sequences of CDB's
There are two methods available to send any user defined CDB to a device – User Defined CDB, which allows to define and send one CDB at time, and CDB Sequencer , allows you to send sequences of the CDBs that you have defined.
This paper will describe how to use these two functions, using a “legal” and an “illegal” form of the SCSI INQUIRY command for illustration.
User Defined CDB
The User Defined CDB function is accessed from either the Command menus, or by selecting a device and then right-clicking to bring up the Quick Commands menu.
Once you choose the User Defined CDB function you will see this screen:
The SCSI Commands lists CDBs that have already been defined – you may add your own CDBs to this list by defining the CDB and then using the Add CDB and Save CDB File to add the new CDB to the SCSI Commands list.
To use a CDB from the list just double-click on the command. The CDB information will be filled out so you can see the CDB bytes, the data direction, etc.
For instance, here we have double-clicked on the Inquiry CDB in the SCSI Commands list:
We can now issue this command to our currently selected peripheral device by clicking the Send CDB button
We see the results of sending the CDB in the CDB Result window – in this case the CDB completed without error
Now we will illustrate how to define your own CDB, and what happens when a CDB fails, by defining an “illegal” CDB. We set some reserved bits in byte 2 of the CDB, and now when the CDB is issued the results show a Check Condition and the resulting sense data.
You can view the results of all CDBs that have been issued by clicking on the View Results button – here is the View Results window showing the previous good and bad Inquiry CDB results:
If there is data associated with your CDB you can view or edit it using the Buffers button – here is the data returned by the Inquiry CDB:
Summary
The User Defined CDB function enables you to send any CDB to a device and view the results. CDBs defined in this function can be saved into the SCSI Command files. The SCSI Command file is also used by the next function we will describe – the CDB Sequencer .
CDB Sequencer
The CDB Sequencer uses the CDBs that are defined in the SCSI Commands file, and allows you to issue the CDB by simply typing its name into the Command Entry window. The example below show that we typed in “inquiry” and the CDB Sequencer found and issued the CDB to the currently selected device. Note the highlighted areas which show that you can specify a number of bytes of returned data to view, and also note that the time to complete the CDB is also displayed.
If you can't remember the name of a CDB that you created, just click the View Available Commands button as shown below – then double-click on a CDB to choose it
You can repeat a command by entering the CDB name, followed by a comma, then the number of times you want the CDB repeated. For example – here we are sending 1000 Inquiry commands:
When a command fails the Command Results window will display the sense data associated with the failure:
Notice the Command History window at the bottom of the screen – all commands issued are added into this history list. Single or multiple commands can be highlighted in the Command History window, then when you click the Execute button the sequence of CDBs will be issued. These sequences of commands may be saved and reloaded, allowing you to create specific sequences of CDBs and play them back at any time.
Summary
The CDB Sequencer function enables you to build up a sequence of any CDBs and send them to a device.
|