{
    "content": [
        {
            "type": "text",
            "text": "# SG_GET_CONFIG (man)\n\n## NAME\n\nsggetconfig - send SCSI GET CONFIGURATION command (MMC-4 +)\n\n## SYNOPSIS\n\nsggetconfig  [--brief] [--current] [--help] [--hex] [--inner-hex] [--list] [--raw] [--read‐\nonly] [--rt=RT] [--starting=FC] [--verbose] [--version] DEVICE\n\n## DESCRIPTION\n\nSends a SCSI GET CONFIGURATION command to DEVICE and decodes the response. The  response  in‐\ncludes  the features and profiles of the device.  Typically these devices are CD, DVD, HD-DVD\nand BD players that may (but not necessarily) have media in them. These devices may  well  be\nconnected  via ATAPI, USB or IEEE 1394 transports. In such cases they are \"SCSI\" devices only\nin the sense that they use the \"Multi-Media command\" set (MMC).  MMC is  a  specialized  SCSI\ncommand set whose definition can be found at http://www.t10.org .\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (12 subsections)\n- **NOTES**\n- **EXIT STATUS**\n- **AUTHORS**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "SG_GET_CONFIG",
        "section": "",
        "mode": "man",
        "summary": "sggetconfig - send SCSI GET CONFIGURATION command (MMC-4 +)",
        "synopsis": "sggetconfig  [--brief] [--current] [--help] [--hex] [--inner-hex] [--list] [--raw] [--read‐\nonly] [--rt=RT] [--starting=FC] [--verbose] [--version] DEVICE",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-b",
                "long": "--brief",
                "arg": null,
                "description": "show the feature names but don't decode the parameters of those features. When used with --list outputs known feature names but not known profile names."
            },
            {
                "flag": "-c",
                "long": "--current",
                "arg": null,
                "description": "output features marked as current. This option is equivalent to '--rt=1'."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "output the usage message then exit."
            },
            {
                "flag": "-H",
                "long": "--hex",
                "arg": null,
                "description": "output the response in hex (don't decode response)."
            },
            {
                "flag": "-i",
                "long": "--inner-hex",
                "arg": null,
                "description": "decode to the feature name level then output each feature's data in hex."
            },
            {
                "flag": "-l",
                "long": "--list",
                "arg": null,
                "description": "list all known feature and profile names. Ignore the device name (if given). Simply lists the feature names and profiles (followed by their hex values) that this utility knows about. If --brief is also given then only feature names are listed."
            },
            {
                "flag": "-q",
                "long": "--readonly",
                "arg": null,
                "description": "opens the DEVICE read-only rather than read-write which is the default. The Linux sg driver needs read-write access for the SCSI GET CONFIGURATION command but other access methods may require read-only access."
            },
            {
                "flag": "-r",
                "long": "--rt",
                "arg": null,
                "description": "where RT is the field of that name in the GET CONFIGURATION cdb. Allowable values are 0, 1, 2, or 3 . The command's action also depends on the value given to the --start‐ ing=FC option. The default value is 0. When RT is 0 then all features, regardless of currency, are returned (whose feature code is greater than or equal to FC given to --starting=). When RT is 1 then all current features are returned (whose feature code is greater than or equal to FC). When RT is 2 then the feature whose feature code is equal to FC, if any, is returned. When RT is 3 the response is reserved (probably yields an \"illegal field in cdb\" error). To simplify the meanings of the RT values are: 0 : all features, current on not 1 : only current features 2 : only feature whose code is FC 3 : reserved"
            },
            {
                "flag": "-R",
                "long": "--raw",
                "arg": null,
                "description": "output response in binary (to stdout). Note that the short form is -R unlike most other utilities in this package that use -r for this action."
            },
            {
                "flag": "-s",
                "long": "--starting",
                "arg": null,
                "description": "where FC is the feature code value. This option works closely with the --rt=RT option. The FC value is in the range 0 to 65535 (0xffff) inclusive. Its default value is 0. A value prefixed with \"0x\" (or a trailing 'h') is interpreted as hexadecimal."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "increase the level of verbosity, (i.e. debug output)."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "print the version string and then exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "sginfo",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sginfo/8/json"
            },
            {
                "name": "sgmodes",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sgmodes/8/json"
            },
            {
                "name": "sginq",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sginq/8/json"
            },
            {
                "name": "sgprevent",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sgprevent/8/json"
            },
            {
                "name": "sgstart",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sgstart/8/json"
            },
            {
                "name": "sdparm",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sdparm/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-b --brief",
                        "lines": 3,
                        "flag": "-b",
                        "long": "--brief"
                    },
                    {
                        "name": "-c --current",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--current"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-H --hex",
                        "lines": 2,
                        "flag": "-H",
                        "long": "--hex"
                    },
                    {
                        "name": "-i --inner-hex",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--inner-hex"
                    },
                    {
                        "name": "-l --list",
                        "lines": 4,
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "-q --readonly",
                        "lines": 4,
                        "flag": "-q",
                        "long": "--readonly"
                    },
                    {
                        "name": "-r --rt",
                        "lines": 14,
                        "flag": "-r",
                        "long": "--rt"
                    },
                    {
                        "name": "-R --raw",
                        "lines": 3,
                        "flag": "-R",
                        "long": "--raw"
                    },
                    {
                        "name": "-s --starting",
                        "lines": 4,
                        "flag": "-s",
                        "long": "--starting"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "sggetconfig - send SCSI GET CONFIGURATION command (MMC-4 +)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "sggetconfig  [--brief] [--current] [--help] [--hex] [--inner-hex] [--list] [--raw] [--read‐\nonly] [--rt=RT] [--starting=FC] [--verbose] [--version] DEVICE\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Sends a SCSI GET CONFIGURATION command to DEVICE and decodes the response. The  response  in‐\ncludes  the features and profiles of the device.  Typically these devices are CD, DVD, HD-DVD\nand BD players that may (but not necessarily) have media in them. These devices may  well  be\nconnected  via ATAPI, USB or IEEE 1394 transports. In such cases they are \"SCSI\" devices only\nin the sense that they use the \"Multi-Media command\" set (MMC).  MMC is  a  specialized  SCSI\ncommand set whose definition can be found at http://www.t10.org .\n\nThis  utility is based on the MMC-4 and later draft standards. See section 5 on \"Features and\nProfile for MultiMedia devices\" for more information on specific feature parameters and pro‐\nfiles. The manufacturer's product manual may also be useful.\n\nSince  modern  DVD and BD writers support many features and profiles, the decoded output from\nthis utility can be large. There are various ways to cut down the output. If the --brief  op‐\ntion is used only the feature names are shown and the feature parameters are not decoded. Al‐\nternatively if only one feature is of interest then this combination of options is  appropri‐\nate:  \"--rt=2 --starting=FC\". Another possibility is to show only the features that are rele‐\nvant to the media in the drive (i.e. \"current\") with the \"--rt=1\" option.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "Arguments to long options are mandatory for short options as well.\n",
                "subsections": [
                    {
                        "name": "-b --brief",
                        "content": "show the feature names but don't decode the parameters of those features.   When  used\nwith --list outputs known feature names but not known profile names.\n",
                        "flag": "-b",
                        "long": "--brief"
                    },
                    {
                        "name": "-c --current",
                        "content": "output features marked as current. This option is equivalent to '--rt=1'.\n",
                        "flag": "-c",
                        "long": "--current"
                    },
                    {
                        "name": "-h --help",
                        "content": "output the usage message then exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-H --hex",
                        "content": "output the response in hex (don't decode response).\n",
                        "flag": "-H",
                        "long": "--hex"
                    },
                    {
                        "name": "-i --inner-hex",
                        "content": "decode to the feature name level then output each feature's data in hex.\n",
                        "flag": "-i",
                        "long": "--inner-hex"
                    },
                    {
                        "name": "-l --list",
                        "content": "list  all  known feature and profile names. Ignore the device name (if given).  Simply\nlists the feature names and profiles (followed by their hex values) that this  utility\nknows about. If --brief is also given then only feature names are listed.\n",
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "-q --readonly",
                        "content": "opens  the  DEVICE read-only rather than read-write which is the default. The Linux sg\ndriver needs read-write access for the SCSI GET CONFIGURATION command but other access\nmethods may require read-only access.\n",
                        "flag": "-q",
                        "long": "--readonly"
                    },
                    {
                        "name": "-r --rt",
                        "content": "where RT is the field of that name in the GET CONFIGURATION cdb.  Allowable values are\n0, 1, 2, or 3 . The command's action also depends on the value given to  the  --start‐\ning=FC  option. The default value is 0.  When RT is 0 then all features, regardless of\ncurrency, are returned (whose feature code is greater than or equal  to  FC  given  to\n--starting=).  When RT is 1 then all current features are returned (whose feature code\nis greater than or equal to FC). When RT is 2 then the feature whose feature  code  is\nequal  to  FC,  if  any, is returned.  When RT is 3 the response is reserved (probably\nyields an \"illegal field in cdb\" error). To simplify the meanings  of  the  RT  values\nare:\n0 : all features, current on not\n1 : only current features\n2 : only feature whose code is FC\n3 : reserved\n",
                        "flag": "-r",
                        "long": "--rt"
                    },
                    {
                        "name": "-R --raw",
                        "content": "output  response  in  binary  (to  stdout). Note that the short form is -R unlike most\nother utilities in this package that use -r for this action.\n",
                        "flag": "-R",
                        "long": "--raw"
                    },
                    {
                        "name": "-s --starting",
                        "content": "where FC is the feature code value. This option works closely with the --rt=RT option.\nThe  FC value is in the range 0 to 65535 (0xffff) inclusive. Its default value is 0. A\nvalue prefixed with \"0x\" (or a trailing 'h') is interpreted as hexadecimal.\n",
                        "flag": "-s",
                        "long": "--starting"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "increase the level of verbosity, (i.e. debug output).\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "content": "print the version string and then exit.\n",
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            "NOTES": {
                "content": "There are multiple versions of the MMC (draft) standards: MMC [1997],  MMC-2  [2000],   MMC-3\n[2002], MMC-4 and MMC-5. The first three are now ANSI INCITS standards with the year they be‐\ncame standards shown in brackets. The draft immediately prior to standardization can be found\nat  http://www.t10.org  .  In the initial MMC standard there was no GET CONFIGURATION command\nand the relevant information was obtained from the \"CD  capabilities  and  mechanical  status\nmode  page\" (mode page 0x2a). It was later renamed the \"MM capabilities and mechanical status\nmode page\" and has been made obsolete in MMC-4 and MMC-5. The GET CONFIGURATION  command  was\nintroduced  in  MMC-2  and  has become a replacement for that mode page. New features such as\nsupport for \"BD\" (blue ray) media type can only be found by using the GET CONFIGURATION  com‐\nmand.  Hence older CD players may not support the GET CONFIGURATION command in which case the\n\"MM capabilities ...\"  mode page can be checked with sdparm(8), sginfo(8) or sgmodes(8).\n\nIn the 2.4 series of Linux kernels the DEVICE must be a SCSI generic (sg) device. In the  2.6\nseries block devices can also be specified. For example \"sggetconfig /dev/hdc\" will work in\nthe 2.6 series kernels as long as /dev/hdc is an ATAPI device. In the 2.6 series external DVD\nwriters attached via USB could be queried with \"sggetconfig /dev/scd1\" for example.\n",
                "subsections": []
            },
            "EXIT STATUS": {
                "content": "The  exit  status of sggetconfig is 0 when it is successful. Otherwise see the sg3utils(8)\nman page.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Written by Douglas Gilbert.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Report bugs to <dgilbert at interlog dot com>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright © 2004-2012 Douglas Gilbert\nThis software is distributed under a FreeBSD license. There is NO warranty; not even for MER‐\nCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "sginfo(8), sgmodes(8), sginq(8), sgprevent(8), sgstart(8) [all in sg3utils], sdparm(8)\n\n\n\nsg3utils-1.35                              December 2012                           SGGETCONFIG(8)",
                "subsections": []
            }
        }
    }
}