I've come across license systems that are somehow tied to the storage medium. While basing this on the UUID on the filesystem is fairly straightforward, I do not believe this is the case (see below). A typic example of this behaviour goes as follows:
I've observed the following behavior:
This leads me to conclude that there is a way of getting a unique id of the CF card somehow. How can one achieve this in linux?
PS: I've purposefully left out any details of the product itself, as I'm wondering more in general terms how a system like this can build a unique id of the CF card.
The card will have lots of information registered in a read-only manner.
The article Reading Internal SD Card Information has this to say :
Internal SD Card Information
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!)
How to read the CID from an SD card
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.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments