1SG_GET_CONFIG(8) SG3_UTILS SG_GET_CONFIG(8)
2
3
4
6 sg_get_config - send SCSI GET CONFIGURATION command (MMC-4 +)
7
9 sg_get_config [--brief] [--current] [--help] [--hex] [--inner-hex]
10 [--list] [--raw] [--readonly] [--rt=RT] [--starting=FC] [--verbose]
11 [--version] DEVICE
12
14 Sends a SCSI GET CONFIGURATION command to DEVICE and decodes the
15 response. The response includes the features and profiles of the
16 device. Typically these devices are CD, DVD, HD-DVD and BD players
17 that may (but not necessarily) have media in them. These devices may
18 well be connected via ATAPI, USB or IEEE 1394 transports. In such cases
19 they are "SCSI" devices only in the sense that they use the
20 "Multi-Media command" set (MMC). MMC is a specialized SCSI command set
21 whose definition can be found at http://www.t10.org .
22
23 This utility is based on the MMC-4 and later draft standards. See sec‐
24 tion 5 on "Features and Profile for Multi_Media devices" for more
25 information on specific feature parameters and profiles. The manufac‐
26 turer's product manual may also be useful.
27
28 Since modern DVD and BD writers support many features and profiles, the
29 decoded output from this utility can be large. There are various ways
30 to cut down the output. If the --brief option is used only the feature
31 names are shown and the feature parameters are not decoded. Alterna‐
32 tively if only one feature is of interest then this combination of
33 options is appropriate: "--rt=2 --starting=FC". Another possibility is
34 to show only the features that are relevant to the media in the drive
35 (i.e. "current") with the "--rt=1" option.
36
38 Arguments to long options are mandatory for short options as well.
39
40 -b, --brief
41 show the feature names but don't decode the parameters of those
42 features. When used with --list outputs known feature names but
43 not known profile names.
44
45 -c, --current
46 output features marked as current. This option is equivalent to
47 '--rt=1'.
48
49 -h, --help
50 output the usage message then exit.
51
52 -H, --hex
53 output the response in hex (don't decode response).
54
55 -i, --inner-hex
56 decode to the feature name level then output each feature's data
57 in hex.
58
59 -l, --list
60 list all known feature and profile names. Ignore the device name
61 (if given). Simply lists the feature names and profiles (fol‐
62 lowed by their hex values) that this utility knows about. If
63 --brief is also given then only feature names are listed.
64
65 -q, --readonly
66 opens the DEVICE read-only rather than read-write which is the
67 default. The Linux sg driver needs read-write access for the
68 SCSI GET CONFIGURATION command but other access methods may
69 require read-only access.
70
71 -r, --rt=RT
72 where RT is the field of that name in the GET CONFIGURATION cdb.
73 Allowable values are 0, 1, 2, or 3 . The command's action also
74 depends on the value given to the --starting=FC option. The
75 default value is 0. When RT is 0 then all features, regardless
76 of currency, are returned (whose feature code is greater than or
77 equal to FC given to --starting=). When RT is 1 then all current
78 features are returned (whose feature code is greater than or
79 equal to FC). When RT is 2 then the feature whose feature code
80 is equal to FC, if any, is returned. When RT is 3 the response
81 is reserved (probably yields an "illegal field in cdb" error).
82 To simplify the meanings of the RT values are:
83 0 : all features, current on not
84 1 : only current features
85 2 : only feature whose code is FC
86 3 : reserved
87
88 -R, --raw
89 output response in binary (to stdout). Note that the short form
90 is -R unlike most other utilities in this package that use -r
91 for this action.
92
93 -s, --starting=FC
94 where FC is the feature code value. This option works closely
95 with the --rt=RT option. The FC value is in the range 0 to 65535
96 (0xffff) inclusive. Its default value is 0. A value prefixed
97 with "0x" (or a trailing 'h') is interpreted as hexadecimal.
98
99 -v, --verbose
100 increase the level of verbosity, (i.e. debug output).
101
102 -V, --version
103 print the version string and then exit.
104
106 There are multiple versions of the MMC (draft) standards: MMC [1997],
107 MMC-2 [2000], MMC-3 [2002], MMC-4 and MMC-5. The first three are now
108 ANSI INCITS standards with the year they became standards shown in
109 brackets. The draft immediately prior to standardization can be found
110 at http://www.t10.org . In the initial MMC standard there was no GET
111 CONFIGURATION command and the relevant information was obtained from
112 the "CD capabilities and mechanical status mode page" (mode page 0x2a).
113 It was later renamed the "MM capabilities and mechanical status mode
114 page" and has been made obsolete in MMC-4 and MMC-5. The GET CONFIGURA‐
115 TION command was introduced in MMC-2 and has become a replacement for
116 that mode page. New features such as support for "BD" (blue ray) media
117 type can only be found by using the GET CONFIGURATION command. Hence
118 older CD players may not support the GET CONFIGURATION command in which
119 case the "MM capabilities ..." mode page can be checked with
120 sdparm(8), sginfo(8) or sg_modes(8).
121
122 In the 2.4 series of Linux kernels the DEVICE must be a SCSI generic
123 (sg) device. In the 2.6 series block devices can also be specified. For
124 example "sg_get_config /dev/hdc" will work in the 2.6 series kernels as
125 long as /dev/hdc is an ATAPI device. In the 2.6 series external DVD
126 writers attached via USB could be queried with "sg_get_config
127 /dev/scd1" for example.
128
130 The exit status of sg_get_config is 0 when it is successful. Otherwise
131 see the sg3_utils(8) man page.
132
134 Written by Douglas Gilbert.
135
137 Report bugs to <dgilbert at interlog dot com>.
138
140 Copyright © 2004-2012 Douglas Gilbert
141 This software is distributed under a FreeBSD license. There is NO war‐
142 ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
143 POSE.
144
146 sginfo(8), sg_modes(8), sg_inq(8), sg_prevent(8), sg_start(8) [all in
147 sg3_utils], sdparm(8)
148
149
150
151sg3_utils-1.35 December 2012 SG_GET_CONFIG(8)