Reply
Posts: 0

How can the serial number be extracted from an SD card?

Under Linux I have found the sg3-utils that send SCSI instructions to devices.  I was running various commands on the device (/dev/sdc and /dev/sg3) trying to get any response from the SD card, but I was only getting responses from USB connected reader.  I had read that the sg_raw  command allowes for sending arbitrary HEX formatted commands to a device, though none seemed to pass through the reader to the SD card itself (I tried the binary commands that where listed in the MMC spec and the SD spec).

 

When looking at the linux drivers for MMCs and SD cards (sd_mod, mmc_core) it seems that if the mmc_core driver were to be used to interface with the card, the serial number (cid.serial in 'mmc.c' in mmc_core) would be obtained during the card initialization period.  Would this be the case?  And if so, is it possible to force the mmc_core driver to pass through the USB card reader and be used directly with the SD card?  Are there any PCI MMC/SD card readers that would be able to have lower level access to the cards?

 

Thank you in advance.

 

Information:

Card readers:

  • Promaster Digital SD/MMC Card Reader
  • Realtek USB 2.0 Card Reader

SD cards:

  • SanDisk 2.0 GB SD card
  • SanDisk 128 MB SD card
  • Kingmax Platinum 256 MB SD card
  • Kingston 2.0 GB SD card
  • Adata Suber SD Duo 1.0 GB

Operating systems:

  • Fedora 9
  • Backtrack 4

I had the same results with each combination of card reader/SD card.

Posts: 0

Re: How can the serial number be extracted from an SD card?

Do a DIR command in MS-DOS 

Posts: 0

Re: How can the serial number be extracted from an SD card?

Thank you for the response.

 

I am able to get unique 'Volume Serial Numbers' from the SD card when using the dir command in MS-DOS, though this number changes every time the card is formatted:

 

 I:\>dir
 Volume in drive I is WIPED
 Volume Serial Number is C688-0DDD
        ... CARD IS FORMATTED ...
I:\>dir
 Volume in drive I is CLEAN
 Volume Serial Number is 40F4-0355
       ... CARD IS FORMATTED ...
I:\>dir
 Volume in drive I is WIPED
 Volume Serial Number is 2409-16E7
       ...

 

 I would like to be able to get a unique serial number for the card itself, not of the volume or partition inside the disk.

 

Posts: 0

Re: How can the serial number be extracted from an SD card?

Yes that's right. The hardware serial number would be hard to identify since the SD card does not have a direct communication to the caomputer. The only visible hardware serial would be the reader's.