Information about an SD card is encoded in its internal card registries. One of these is the Card Identification (CID) Register, a 16 byte code that contains information that uniquely identifies the SD card, including the card serial number (PSN), manufacturer ID number (MID) and manufacture date (MDT). The CID register is set when the card is manufactured and cannot be changed after it is set. (According to SD card specification the information is only to be written once, however if a card does not conform to the specification this information could be changed!)
One way to read the CID is to use a laptop with an SD card slot. Card readers in laptops are usually connected directly through the PCI bus (or IDE bus). This will not work through a USB card reader because the command to retrieve the card information is intercepted and not understood by card readers. Not all computers with built-in card slots will work, some internal card readers are connected through a USB bus.
Assuming you have the proper hardware, there are several methods you can use to get the card information. With Linux, reading the internal SD card information is simple. Insert the card and look under
/sys/block/mmcblk0/device/ (this location may change depending on your device). You will see several attributes available that include the CID register and the information inside it.
The following information is stored in the CID:
|Manufacturer ID||MID||manfid||Assigned by SD-3C, LLC.|
|OEM/Application ID||OID||oemid||Identifies the card OEM and/or the card contents. Assigned by SD-3C, LLC.|
|Product Name||PNM||name||5 characters long (ASCII)|
|Product Revision||PRV||hwrev, fwrev||Two binary coded decimal (BCD) digits. Each is four bits. The PRV is in the form x.y. The PRV can also be found by using the hwrev and fwrev, where x=hwrev and y=fwrev|
|Serial Number||PSN||serial||This 32 bit field is intended to be read as an unsigned integer|
|Manufacture Date Code||MDT||date||Manufacture date is stored in the form yym (offset from 2000)|
|CRC7 checksum||CRC||7 bit code used for checking errors in the card register|
* these are the attribute titles used when mounting the card in Linux
For more information, refer to the SD Association Simplified Specifications.
The CID information can be helpful in identifying counterfeit memory cards. We include the CID data in our SD card reviews so you may compare it with your cards.