I recently bought myself a smart-card reader in order to fool around with the MyKAD (Malaysian National Identity Card). The main reason for this is to figure out how to read the information contained within the MyKAD. I went online to find myself an OpenSC compatible reader and got myself one for just under RM 23. Next, I found some information about MyKAD APDU on a Lowyat forum along with the associated data file offsets.
The result is the following shell script that dumps all the MyKAD information onto the screen. OpenSC automatically detects the MyKAD as an EMV compatible card.
#!/bin/sh
AP_JPN="00:A4:04:00:0A:A0:00:00:00:74:4A:50:4E:00:10"
DF_PAGE1="C8:32:00:00:05:08:00:00:A0:00"
PR_PAGE1="CC:00:00:00:08:01:00:01:00:E9:00:A0:00"
SZ_PAGE1="CC:06:00:00:A0"
DF_PAGE4="C8:32:00:00:05:08:00:00:90:00"
PR_PAGE4="CC:00:00:00:08:04:00:01:00:03:00:90:00"
SZ_PAGE4="CC:06:00:00:90"
opensc-tool -v -s $AP_JPN \
-s $DF_PAGE1 -s $PR_PAGE1 -s $SZ_PAGE1 \
-s $DF_PAGE4 -s $PR_PAGE4 -s $SZ_PAGE4 2>/dev/null
All it took was 8 lines of shell script and it would dump all the MyKAD information onto the screen, raw. All that is needed now is some extra processing magic to slice up the data into its constituent parts. Imagine, all this without a single like of C/C++ code and under RM25!
would u mind telling me which smartcard reader are u using? i would like to develop a linux based mykad reader
I don’t know which one it is. It’s just a nameless brandless cheapo reader.
Hi sir,
This is Mubashir Hussain from Pakistan , I’m IT student over here @ BMIC College Maluri, Cheras. Sir i want to submit my final assignment about Mycard EZ100PU with source code in vb 6.0, kindly you can help me out I’m will to pay you, i have already device i try my level best but fail
I would suggest that you put in more effort for your project instead.
http://mykad.codeplex.com
Sir, i need vb6.0 if any one can help me kindly contact me
Can i know the source code in php language…
No. Here’s the python source.
https://github.com/sybreon/mykadspr
What i mean is coding php to get data from mykad reader..
Hi
I would like to ask u
What type and which brand of my card reader do u have like
Ez100 pu or Rocky card reader 2000
U want to connect his card with php?
Email me with further details
Csmdsoft@gmail.com
do you know how to powerup mykad before send apdu command?
The power-up is done by the reader itself.
i received value of 20 20 20 20 20 20 ……. 90 00. any idea how to convert to the text based on data table of mykad?
have u done it on android? i have a problem for power-up and send apdu. im using the same apdu
the opensc link is invalid.
i have scdump.c from lowyat but wanted to edit and compile again but gets error message. all i need is to read and store the details in a text file.