1SG_GET_CONFIG(8) SG3_UTILS SG_GET_CONFIG(8)
2
3
4
6 sg_get_config - sends a SCSI GET CONFIGURATION command (MMC-4 +)
7
9 sg_get_config [--brief] [--current] [--help] [--hex] [--inner-hex]
10 [--list] [--raw] [--rt=RT] [--starting=FC] [--verbose] [--version]
11 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 -r, --rt=RT
66 where RT is the field of that name in the GET CONFIGURATION cdb.
67 Allowable values are 0, 1, 2, or 3 . The command's action also
68 depends on the value given to the --starting=FC option. The
69 default value is 0. When RT is 0 then all features, regardless
70 of currency, are returned (whose feature code is greater than or
71 equal to FC given to --starting=). When RT is 1 then all current
72 features are returned (whose feature code is greater than or
73 equal to FC). When RT is 2 then the feature whose feature code
74 is equal to FC, if any, is returned. When RT is 3 the response
75 is reserved (probably yields an "illegal field in cdb" error).
76 To simplify the meanings of the RT values are:
77 0 : all features, current on not
78 1 : only current features
79 2 : only feature whose code is FC
80 3 : reserved
81
82 -R, --raw
83 output response in binary (to stdout). Note that the short form
84 is -R unlike most other utilities in this package that use -r
85 for this action.
86
87 -s, --starting=FC
88 where FC is the feature code value. This option works closely
89 with the --rt=RT option. The FC value is in the range 0 to 65535
90 (0xffff) inclusive. Its default value is 0. A value prefixed
91 with "0x" (or a trailing 'h') is interpreted as hexadecimal.
92
93 -v, --verbose
94 increase the level of verbosity, (i.e. debug output).
95
96 -V, --version
97 print the version string and then exit.
98
100 There are multiple versions of the MMC (draft) standards: MMC [1997],
101 MMC-2 [2000], MMC-3 [2002], MMC-4 and MMC-5. The first three are now
102 ANSI INCITS standards with the year they became standards shown in
103 brackets. The draft immediately prior to standardization can be found
104 at http://www.t10.org . In the initial MMC standard there was no GET
105 CONFIGURATION command and the relevant information was obtained from
106 the "CD capabilities and mechanical status mode page" (mode page 0x2a).
107 It was later renamed the "MM capabilities and mechanical status mode
108 page" and has been made obsolete in MMC-4 and MMC-5. The GET CONFIGURA‐
109 TION command was introduced in MMC-2 and has become a replacement for
110 that mode page. New features such as support for "BD" (blue ray) media
111 type can only be found by using the GET CONFIGURATION command. Hence
112 older CD players may not support the GET CONFIGURATION command in which
113 case the "MM capabilities ..." mode page can be checked with
114 sdparm(8), sginfo(8) or sg_modes(8).
115
116 In the 2.4 series of Linux kernels the DEVICE must be a SCSI generic
117 (sg) device. In the 2.6 series block devices can also be specified. For
118 example "sg_get_config /dev/hdc" will work in the 2.6 series kernels as
119 long as /dev/hdc is an ATAPI device. In the 2.6 series external DVD
120 writers attached via USB could be queried with "sg_get_config
121 /dev/scd1" for example.
122
124 The exit status of sg_get_config is 0 when it is successful. Otherwise
125 see the sg3_utils(8) man page.
126
128 Written by Douglas Gilbert.
129
131 Report bugs to <dgilbert at interlog dot com>.
132
134 Copyright © 2004-2008 Douglas Gilbert
135 This software is distributed under a FreeBSD license. There is NO war‐
136 ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
137 POSE.
138
140 sginfo(8), sg_modes(8), sg_inq(8), sg_prevent(8), sg_start(8) [all in
141 sg3_utils], sdparm(8)
142
143
144
145sg3_utils-1.27 November 2008 SG_GET_CONFIG(8)