Device Tray Open!

Mike Berhan mikeb at bustrace.com
Wed Oct 19 14:55:08 PDT 2005


* From the T10 Reflector (t10 at t10.org), posted by:
* "Mike Berhan" <mikeb at bustrace.com>
*
Hello,

> Is there any way I could check whether a device tray is open? I have
> tried ReadDiscInformation over an open try device and hoped that it
> would return me error "MEDIUM NOT PRESENT - TRAY OPEN" but it always
> return "MEDIUM NOT PRESENT".

You could try issuing a "Get Event/Status Notification" CDB with a
Notification Class Request of "Media."  CDB of:

4A 01 00 00 10 00 00 00 08 00

The Door or Tray Open bit (bit 0 of byte 5) should be 1 if the tray is open.
I suppose there are some drives out there that do not support this
notification class (Media), or perhaps not support it properly.  A quick
test on two devices here shows proper behavior.  Your mileage may vary.

Regards,

Mike Berhan
http://www.bustrace.com

*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org





More information about the T10 mailing list