Archived:Retrieving memory card unique ID using Symbian C++
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
Article Metadata
Tested with
Devices(s): All (S60 3rd Ed)
Compatibility
Platform(s): S60 3rd Edition, S60 3rd Edition FP1, S60 3rd Edition FP2
Article
Created: User:Technical writer 1
(August 23, 2007, updated November 13, 2007)
Last edited: hamishwillee
(14 Jun 2012)
Description
The unique serial number from the MMC card identification register (CID) can be retrieved with the following function (if supported by the media):
TInt RFs::GetMediaSerialNumber( TMediaSerialNumber &aSerialNum, TInt aDrive );
Solution
RFs::GetMediaSerialNumber() returns 16 bytes (128 bits) which are a copy of the card's CID register, defined as follows:
| Description | Field | Width | CID bits |
| Manufacturer ID | MID | 8 | [127:120] |
| OEM/Application ID | OID | 16 | [119:104] |
| Product name | PNM | 40 | [103:64] |
| Product revision | PRV | 8 | [63:56] |
| Product serial number | PSN | 32 | [55:24] |
| Reserved | - | 4 | [23:20] |
| Manufacturing date | MDT | 12 | [19:8] |
| CRC7 checksum | CRC | 7 | [7:1] |
| Not used, always 1 | - | 1 | [0:0] |


Whilst article claims this supported on S60 1st + 2nd editions, the f32file.h hdr for 7.0s, 8.0a, 8.1a SDKs does not actually contain the method. Looks like its a Symbian OS 9 (S60 3rd edition) only feature.
Thank you for your feedback. The article has been updated.
Forum Nokia KB 13:56, 13 November 2007 (EET)