SD Card security features - Read CID, use Password to lock the card

Two of the security features of the SD cards are the CID (Card ID) and the card password.

The card ID is unique to each card and it is read only.

The card password can be used to lock the card usinge a 16byte password.

How can I use this SD card features on .netmf or gadgeteer?

1 Like

These are not implemented and you would need to create your own interface from the ground up to use them.

Reading out the CID could be made possible with Registry access.

For the password, I don’t know how that works, but if you need to unlock the card only once after applying power, it should be possible to.

You’ll have to implement low-level communication with the card to read out that info though.

I’m doing this in RLP, this is the part that extracts CID:


/*---- Card is 'ready' state ----*/
if (!send_cmd(CMD2, 0, 2, resp)) goto di_fail;	/* Enter ident state */
for (n = 0; n < 4; n++) bswap_cp(&CardInfo[n * 4 + 16], &resp[n]);	/* Save CID */