Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

> MyKad Application, Need to capture data, how?

views
     
TSDannyl
post Oct 19 2006, 04:05 PM, updated 14y ago

what the fucuk-yimai
*******
Senior Member
6,102 posts

Joined: Jan 2003
From: Pokey Oaks



Hello, need some help here guys.

I am required to capture data from MyKads and store them. Are there any MyKad readers being sold? Do I need some kind of development kit in order to capture data from the reader to the PC? Has anyone done this before?

Thanks for any help.
mokona_modoki
post Oct 19 2006, 04:17 PM

Getting Started
**
Junior Member
267 posts

Joined: Jul 2006


Never built it before, but heard it from MyKad convention few years ago:
Card Readers' company name = tricubes
Brand is something like sekure (or so... forgot already)
moon*
post Oct 19 2006, 04:18 PM

Do you have a Honda?
********
Senior Member
11,925 posts

Joined: Jan 2003
From: KL / PJ



7-11 got sell those mykad readers..

n your astro decoder can check also..

i tink u switch to channel 800
let me look around
WaCKy-Angel
post Oct 19 2006, 04:20 PM

PeACe~~
********
All Stars
17,395 posts

Joined: Dec 2004
From: KL




QUOTE(Dannyl @ Oct 19 2006, 04:05 PM)
Hello, need some help here guys.

I am required to capture data from MyKads and store them.  Are there any MyKad readers being sold?  Do I need some kind of development kit in order to capture data from the reader to the PC?  Has anyone done this before?

Thanks for any help.
*
Yes there's mycard reader for sale..
If not mistaken i saw ppl post at LYN b4....or maybe its at http://www.lelong.com.my
narf03
post Oct 19 2006, 07:14 PM

Look at all my stars!!
*******
Senior Member
3,900 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


u just need reader or also the SDK ? the reader is cheap, but the SDK is expensive. There are few types of SDK as I know, the one which reads JPN data only or JPJ data also, cost like RM1K and RM1.5K.

I m not selling but used them b4 and still using now. The SDK is licensed to my company and it is private property, u need to purchase yourself. If not forgotten I did start a post b4 in CodeMaster long time ago about MyKad, try search and see if u can still found it.
xenon
post Oct 19 2006, 07:48 PM

On my way
****
Senior Member
501 posts

Joined: Jan 2005
From: Selangor

That MyKad thread in Codemasters long ago is lost.
And now I've figured out what the commands are to read the surface information. When I've time, I might write an article about it.
WaCKy-Angel
post Oct 19 2006, 09:29 PM

PeACe~~
********
All Stars
17,395 posts

Joined: Dec 2004
From: KL




Hmm i actually has a modem card reader....
A 28.8kbps modem which has card reader capabilities...
KLKS
post Oct 20 2006, 10:28 AM

Getting Started
**
Junior Member
286 posts

Joined: Jan 2003


some help to the thread starter would be where could he buy the SDK and/or some helpfull links. dont just say u have this n that. show some direction people!.

i just tried googling and found this link, they are a malaysian company
http://www.vericardsys.com

hope it helps smile.gif
WaCKy-Angel
post Oct 20 2006, 01:54 PM

PeACe~~
********
All Stars
17,395 posts

Joined: Dec 2004
From: KL




QUOTE(KLKS @ Oct 20 2006, 10:28 AM)
some help to the thread starter would be where could he buy the SDK and/or some helpfull links. dont just say u have this n that. show some direction people!.

i just tried googling and found this link, they are a malaysian company
http://www.vericardsys.com

hope it helps smile.gif
*
Lolz tats my ex company tongue.gif
Anyway....im not a teacher thats y i dont spoonfeed
zchong1022
post Oct 20 2006, 01:56 PM

New Member
*
Junior Member
17 posts

Joined: Dec 2004


QUOTE(Dannyl @ Oct 19 2006, 04:05 PM)
Hello, need some help here guys.

I am required to capture data from MyKads and store them.  Are there any MyKad readers being sold?  Do I need some kind of development kit in order to capture data from the reader to the PC?  Has anyone done this before?

Thanks for any help.
*
Hi, I did involve in a project which needs to retrive from Mykad and insert into database. You can check the IRIS reader of IRIS Smartcard Reader
The SCR21U
. Currenttly, Maxis Information Kiosk and Bodyshop are using Mykad reader for their own purpose, you can go and take a look.

URL = Link to the product page
ming1
post Oct 20 2006, 06:16 PM

Getting Started
**
Junior Member
252 posts

Joined: Jan 2005
is there any software to read mykad data?cause i have smart card reader for my pc but doesn;t have the softtware for it.
narf03
post Oct 21 2006, 02:16 AM

Look at all my stars!!
*******
Senior Member
3,900 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


QUOTE(ming1 @ Oct 20 2006, 06:16 PM)
is there any software to read mykad data?cause i have smart card reader for my pc but doesn;t have the softtware for it.
*
Do you think ppl design the MyKad reader for fun ?
Yes there are, but I bet your reader cant be supported.

This post has been edited by narf03: Oct 21 2006, 02:17 AM
KLKS
post Oct 22 2006, 07:58 AM

Getting Started
**
Junior Member
286 posts

Joined: Jan 2003


what makes u think that ? care to justify ?
narf03
post Oct 23 2006, 04:20 AM

Look at all my stars!!
*******
Senior Member
3,900 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


Cause the MyKad SDK has to work with the reader that it comes with. Its something like hardware come with driver, just little different, the SDK has been hardcoded to look for that particular type of reader. I think its for security purpose or avoid their SDK being widely distributed(they make no money).
KLKS
post Oct 23 2006, 08:24 AM

Getting Started
**
Junior Member
286 posts

Joined: Jan 2003


But it is possible for some1 to re-write the SDK implementation to work on other hardware devices (not the full sdk but just parts of it for reading data for example) correct ?

cos i know my dell keyboard (it comes with a smartcard reader) could detect the kind of chip the mykad uses.

a search on sf.net shows that there are such things around but just not for mykad's

http://sourceforge.net/search/?type_of_sea...words=smartcard
Malaysian
post Oct 23 2006, 08:28 AM

Regular
******
Senior Member
1,651 posts

Joined: Jan 2003
can we use the sdk and the writer to modify the data in mykad?


jayoscar
post Oct 23 2006, 01:15 PM

Casual
***
Junior Member
308 posts

Joined: Jul 2005
From: SK, Desa Serdang, Selangor

THe SDK Is A MUST cause the SDK consist the decrypt Key which decrypt the data on myKad, Actually almost all the card reader CAN useto write the data to it, just the encrypt scheme not implementted on the SDK.

So U may purchase the write SDK when u got enought Rights do that.

tongue.gif
jayoscar
post Oct 23 2006, 01:16 PM

Casual
***
Junior Member
308 posts

Joined: Jul 2005
From: SK, Desa Serdang, Selangor

Buy from IRIS Corp.

xenon
post Oct 24 2006, 10:25 PM

On my way
****
Senior Member
501 posts

Joined: Jan 2005
From: Selangor

Ok. I don't have time to complete my original MyKad reader program. Having difficulties with the dreaded user interface hell. So tonight I work on a quick-and-dirty console application in C. You need to use a hex editor to look at the output dump file. But, the basic information like name, IC no., are printed in the console too.

Not responsible if got damage blush.gif
Fail? Success? report here.

Two files in attachment unpack into the same files.
save the ".txt" as .zip.

This post has been edited by xenon: Jun 30 2007, 03:47 PM


Attached File(s)
Attached File  scdump.tar.gz ( 42k ) Number of downloads: 2957
Attached File  scdump.txt ( 17.66k ) Number of downloads: 2683
debiankl
post Oct 27 2006, 02:30 PM

On my way
Group Icon
Elite
577 posts

Joined: Dec 2004
From: Inside the CPU core stack register SP


Who has the copyright and license of MyKAD SDK?

If M'sian government is holder the above, then should this SDK be avaliabe to public to s/w developers for a minium fee at least? Just SDK that allow to capture data stored on the chip only.


razinq
post Nov 3 2006, 04:44 PM

New Member
*
Junior Member
4 posts

Joined: Dec 2005


QUOTE(xenon @ Oct 24 2006, 10:25 PM)
Ok. I don't have time to complete my original MyKad reader program. Having difficulties with the dreaded user interface hell. So tonight I work on a quick-and-dirty console application in C. You need to use a hex editor to look at the output dump file. But, the basic information like name, IC no., are printed in the console too.

Not responsible if got damage  blush.gif
Fail? Success? report here.
*
Xenon ... good laa you ... ive download your program and it works with my rm50 reader rclxms.gif Thanks alot ...
razinq
post Nov 3 2006, 04:46 PM

New Member
*
Junior Member
4 posts

Joined: Dec 2005


QUOTE(xenon @ Oct 24 2006, 10:25 PM)
Ok. I don't have time to complete my original MyKad reader program. Having difficulties with the dreaded user interface hell. So tonight I work on a quick-and-dirty console application in C. You need to use a hex editor to look at the output dump file. But, the basic information like name, IC no., are printed in the console too.

Not responsible if got damage  blush.gif
Fail? Success? report here.
*
Xenon ... good laa you ... ive download your program and it works with my rm50 reader rclxms.gif Thanks alot ...
razinq
post Nov 3 2006, 04:49 PM

New Member
*
Junior Member
4 posts

Joined: Dec 2005


Xenon
Ive download ur program, and it work with my rm50 reader rclxms.gif ... thanks buddy ...
xenon
post Apr 13 2007, 10:15 AM

On my way
****
Senior Member
501 posts

Joined: Jan 2005
From: Selangor

A few forumers asked me questions regarding reading of MyKad surface information. The answer is there is no encryption; it is just about knowing what (APDU) command to send.

There will be 5 APDU commands that I'll introduce. I name them as
1) Select Application
2) Get Response
3) Set Length
4) Select Info
5) Read Info

Instead of viewing a particular command to read "Name", another command to read "IC no.", it is better to interpret a sequence of 3 commands (Set Length, Select Info, Read Info) as "reading a section (or the whole) file". The fact is "Name", "IC no." etc are stored in fixed-length fields (padded on the right), and concatenated together (without separator) to form files.
For example,
"Name" stored in file jpn-1-1, offset 0x00E9, length 0x28
"IC no." stored in file jpn-1-1, offset 0x0111, length 0x0D
When you want to read "Name", you read jpn-1-1, offset 0x00E9, length 0x28.
When you want to read "IC no.", you read jpn-1-1, offset 0x0111, length 0x0D.
When you want to read both "Name" and "IC no.", you read jpn-1-1, offset 0x00E9, length 0x35.
Conversely, you can read only part of the field; if you want only first 6 digits of "IC no.", read jpn-1-1, offset 0x111, length 6.

Now, the first 2 commands, "Select Application" and "Get Response", are used to select either one of JPN, JPJ, IMM appplication. (Actually you can have 2 active at the same time by using logical channels, but that's a little bit advanced at this stage.) You must select an application after reset, and you'll do it only once except you want to change application.

Reader: 00 A4 04 00 0A A0 00 00 00 74 4A 50 4E 00 10 (Send 10 bytes data, expect receive 0 bytes)
Card : 61 05
Reader: 00 C0 00 00 05 (Send 0 bytes data, expect receive 5 bytes)
Card : 6F 03 82 01 38 90 00

"00 A4 04 00 0A" is the "CLA INS P1 P2 P3" for "Select Application". The data part of the APDU consists of 10 bytes: "A0 00 00 00 74 4A 50 4E 00 10". The "A0 00 00 00 74" and "00 10" parts are constant. "4A 50 4E" represents "JPN". Change to "JPJ" or "IMM" for those applications.
"00 C0 00 00 05" is the "CLA INS P1 P2 P3" for "Get Response". The 5 data bytes received is not significant, but you can verify whether it is successful.

That's the end of description of "Select Application" and "Get Response". Now move on to the 3 commands to read a section of file.

Example: read jpn-1-1, offset 0x00E9, length 0x28.
Reader: C8 32 00 00 05 08 00 00 28 00
Card : 91 08
Reader: CC 00 00 00 08 01 00 01 00 E9 00 28 00
Card : 94 28
Reader: CC 06 00 00 28
Card : 4D 59 20 4E 41 4D 45 20 20 20 20... 90 00

The 3 commands "Set Length", "Select Info", and "Read Info" are shown above. The colored parts are those which varies.
It seems from above that the maximum length will be 0xFF, so you'll have to break long file section (particularly when reading JPEG) into multiple reads (repeat the 3 commands with different length and offset). But actually, for advanced users, you can specify a length >= 0x0100, (provided you don't read past the end of file which results in no bytes returned,) in the "Set Length" and "Select Info". You only need multiple "Read Info", with the single byte length set to big a number (eg. 0xFF or 0xFC), except the last read. "Read Info" is just like retrieving out from a FIFO buffer, you can read however you want, but don't over-read it.

To read jpn-1-4, replace 01 00 01 00 to 04 00 01 00.

Those double byte "Offset" and "Length" are in little endian.

Tables
» Click to show Spoiler - click again to hide... «


» Click to show Spoiler - click again to hide... «


» Click to show Spoiler - click again to hide... «


Data types
» Click to show Spoiler - click again to hide... «

waykeong
post Apr 17 2007, 11:44 AM

New Member
*
Junior Member
34 posts

Joined: Feb 2005
Thanks for your guide. Btw, What those bytes received from card imply?

Reader: 00 A4 04 00 0A A0 00 00 00 74 4A 50 4E 00 10 (Send 10 bytes data, expect receive 0 bytes)
Card : 61 05
Reader: 00 C0 00 00 05 (Send 0 bytes data, expect receive 5 bytes)
Card : 6F 03 82 01 38 90 00

Reader: C8 32 00 00 05 08 00 00 28 00
Card : 91 08
Reader: CC 00 00 00 08 01 00 01 00 E9 00 28 00
Card : 94 28
Reader: CC 06 00 00 28
Card : 4D 59 20 4E 41 4D 45 20 20 20 20... 90 00
xenon
post Apr 17 2007, 12:22 PM

On my way
****
Senior Member
501 posts

Joined: Jan 2005
From: Selangor

I don't know. We can just guess. It is not required to know exactly what it means. Just know that what bytes should appear under no-error condition.

If you read ISO7816-3, you should know a little about SW1-SW2. A "90 00" generally means success.

Card : 61 05
This is the SW1-SW2. Probably means there are 5 bytes to be read using Get Response.

Card : 6F 03 82 01 38 90 00
"6F 03 82 01 38" is the 5 byte data. No idea what it means, seems to be constant for several cards I tested. "90 00" is SW1-SW2.

Card : 91 08
SW1-SW2. You can guess that it is expecting you to send 8 bytes data using the "CC 00 00 00 08" command.

Card : 94 28
SW1-SW2. Perhaps it means 28 bytes is ready in buffer. Proceed to use "CC 06 00 00 28"

Card : 4D 59 20 4E 41 4D 45 20 20 20 20... 90 00
Except the last 2 bytes which are the SW1-SW2, the 28 (hex) bytes are the data you just read. It is ISO8859/Windows charset/UTF8 text in this case. This is the data (the section of a file) that you wish to read. In this example, you read the name, "MY NAME".

This post has been edited by xenon: Apr 17 2007, 12:32 PM
stormchaser
post Apr 17 2007, 02:19 PM

love your neighbour, help serve society
****
Senior Member
590 posts

Joined: Jan 2003
From: far beyond lands..... Expired : Jan 2020
Reading data from MyKad is ok but if u need to write to Mykad or modify u need to have license. If u use your sdk to do illegal stuff, u will kena.
Ee_
post Apr 19 2007, 06:44 PM

Mehh
*****
Senior Member
852 posts

Joined: Sep 2004
From: Aurora



Woo.. MyKad APDU.. I think this is the first time I saw one on the internet. Thanks a lot to Xenon laugh.gif
waykeong
post Apr 20 2007, 09:35 PM

New Member
*
Junior Member
34 posts

Joined: Feb 2005
wonder how i can code those APDU commands using VB.net?
keith_hjinhoh
post Apr 21 2007, 10:47 AM

Need My Service?
*******
Senior Member
2,643 posts

Joined: Nov 2004
QUOTE(stormchaser @ Apr 17 2007, 02:19 PM)
Reading data from MyKad is ok but if u need to write to Mykad or modify u need to have license.  If u use your sdk to do illegal stuff, u will kena.
*
I dun think the reader that sell to our consumer has the ability to write data into mykad.
hungheykwun
post Apr 25 2007, 11:16 AM

Enthusiast
*****
Senior Member
998 posts

Joined: Sep 2005
From: Subang


u cant write to mykad even if u try. and if u try 3 times unsuccessfully, yr card will be blocked (cant read/write anymore)

to write, u need another perso card that only JPN has. and even if u have that , u would need the pin which is protected by a triple des encryption.

where can i buy a smart card reader & get some sample cards?

This post has been edited by hungheykwun: Apr 25 2007, 11:17 AM
Diligent Sloth
post Apr 25 2007, 11:32 AM

Lowyat VPN provider
*****
Senior Member
880 posts

Joined: Jul 2006
From: Sibu, Sarawak



I have yet to try modifying mykad data, perhaps one day I'll try.. (report my IC as missing and get a new one reissued).

I've still got an old smartcard writer back from the good 'ol days before astro changes to SECA2 sad.gif
hanazku
post Oct 2 2007, 02:05 PM

New Member
*
Newbie
2 posts

Joined: Aug 2007
hi i may be out of date to reply to you guys but i realy need your help esp xenon. u rock.. smile.gif

xenon u think u can develop a program using visual basic to retrieve mykad information? btw i bought my smart card reader (ACR30U). u thing this device works on your C program?

pls reply. msg me. @ email me: hanazku@yahoo.com

thanx
xenon
post Oct 2 2007, 07:38 PM

On my way
****
Senior Member
501 posts

Joined: Jan 2005
From: Selangor

All readers that are PC/SC compliant and get listed by Windows API SCardListReaders() will work.
KLKS
post Oct 2 2007, 08:55 PM

Getting Started
**
Junior Member
286 posts

Joined: Jan 2003


ever think of making an open-sourced SDK for people to use for free? would make for a good community project
cybpsych
post Dec 12 2007, 11:07 AM

---------------------
*********
All Stars
47,574 posts

Joined: Jan 2003
open-source SDK is not recommended as the MyKad commands is a property of Malaysian Government.

I've tried IRIS' SCR21U reader with SDK ... it works fine and able to output all public info from MyKad into my app.

maybe you should give IRIS a call wink.gif

Contact: 03-89960788
ling13140
post Dec 20 2007, 03:26 PM

Getting Started
**
Junior Member
85 posts

Joined: Dec 2007
can like this one ah?
LSG
post Jan 8 2008, 05:44 PM

New Member
*
Junior Member
41 posts

Joined: Jan 2003


QUOTE(xenon @ Oct 24 2006, 10:25 PM)
Ok. I don't have time to complete my original MyKad reader program. Having difficulties with the dreaded user interface hell. So tonight I work on a quick-and-dirty console application in C. You need to use a hex editor to look at the output dump file. But, the basic information like name, IC no., are printed in the console too.

Not responsible if got damage  blush.gif
Fail? Success? report here.

Two files in attachment unpack into the same files.
save the ".txt" as .zip.
*
hey can u send it to me? i cant seem to download it.

lsg.theoneandonly@gmail.com

thx
feiming
post Jan 9 2008, 12:15 AM

Getting Started
**
Junior Member
212 posts

Joined: Jan 2003
From: KL


QUOTE(cybpsych @ Dec 12 2007, 11:07 AM)
open-source SDK is not recommended as the MyKad commands is a property of Malaysian Government.

I've tried IRIS' SCR21U reader with SDK ... it works fine and able to output all public info from MyKad into my app.

maybe you should give IRIS a call wink.gif

Contact: 03-89960788
*
who owns the goverment??
LSG
post Jan 9 2008, 02:45 PM

New Member
*
Junior Member
41 posts

Joined: Jan 2003


QUOTE(xenon @ Oct 24 2006, 10:25 PM)
Ok. I don't have time to complete my original MyKad reader program. Having difficulties with the dreaded user interface hell. So tonight I work on a quick-and-dirty console application in C. You need to use a hex editor to look at the output dump file. But, the basic information like name, IC no., are printed in the console too.

Not responsible if got damage  blush.gif
Fail? Success? report here.

Two files in attachment unpack into the same files.
save the ".txt" as .zip.
*
works like a charm! kudos xenon!
note: i renamed scdump.exe.ren to scdump.exe
830808
post Mar 17 2008, 04:08 PM

New Member
*
Junior Member
29 posts

Joined: Nov 2006


Halo... may i know how those APDU command write in web appliation (asp.net)?


Fazli_Super
post Oct 25 2008, 12:19 AM

Getting Started
**
Junior Member
51 posts

Joined: Aug 2008
Hi Xenon, any idea how to read a mykid card? got a project to accomplish, but don't how to achieve this, i try your scdump it's work in windows, i am trying to make it work in Linux fedora, thanks!
xenon
post Oct 25 2008, 06:01 AM

On my way
****
Senior Member
501 posts

Joined: Jan 2005
From: Selangor

I don't have idea, because my family don't have have MyKid.
Fazli_Super
post Oct 27 2008, 05:58 PM

Getting Started
**
Junior Member
51 posts

Joined: Aug 2008
QUOTE(xenon @ Oct 25 2008, 06:01 AM)
I don't have idea, because my family don't have have MyKid.
*
thanks for your answer, if i got the way then i will share it here.
لادن
post Oct 28 2008, 06:40 PM

Getting Started
**
Junior Member
133 posts

Joined: Oct 2008
From: Waziristan, FATA



There are no MyKad data capture in market, only readers.

Please seek:
- http://smartcard.msc.com.my/Downloads.aspx?cat=myk
- http://www.wintek.com.my/SDK.html
- http://www.mykadpro.net/

Good luck!
Fazli_Super
post Nov 7 2008, 01:52 AM

Getting Started
**
Junior Member
51 posts

Joined: Aug 2008
but xenon sample was able to work !
jacq09
post Feb 26 2009, 01:28 PM

New Member
*
Newbie
2 posts

Joined: Feb 2009


Hi xenon,

Great job on the winscard code, really helped me a lot.

I have a problem here, i want to write the same code for reading mykad using vb.net. I got the connection, reader name and the ATR working, but i just couldn't get the rest. Could you please help me out here? I know it's been a long time since you've posted this post, but i'm bumped. I got -2146435068 for ReturnCode and my RxBuf returns all 0. Could you look through the code below n point out where i got it wrong? Appreciate it!

CODE

Public Sub checkCard()
           Dim SendRequest As SCARD_IO_REQUEST
           Dim RecvRequest As SCARD_IO_REQUEST
           Dim sTemp As String
           Dim icount As Integer

           SendRequest.dwProtocol = SCARD_PROTOCOL_T0
           SendRequest.cbPciLength = Len(SendRequest)
           RecvRequest.dwProtocol = SCARD_PROTOCOL_T0
           RecvRequest.cbPciLength = Len(RecvRequest)
           TxBuf = New Byte() {&H0, &HA4, &H4, &H0, &HA, &HA0, &H0, &H0, &H0, &H74, &H4A, &H50, &H4E, &H0, &H10}
           RxBufLen = 256

           ReturnCode = winSCard.SCardTransmit(hCard, SendRequest, TxBuf(0), 15, RecvRequest, RxBuf(0), RxBufLen)
           appendlog()
           filewriter.WriteLine("Return Code : " + ReturnCode)
           sTemp = ""
           For icount = 0 To 14
               sTemp = sTemp + Format(Hex(TxBuf(icount)), "") + " "
           Next icount
           filewriter.WriteLine("Send Buffer : " + sTemp)
           sTemp = ""
           For icount = 0 To RxBufLen - 1
               sTemp = sTemp + Format(Hex(RxBuf(icount)), "") + " "
           Next icount
           filewriter.WriteLine("Receive Buffer : " + sTemp)
           closeLog()
End Sub


xenon
post Feb 26 2009, 05:47 PM

On my way
****
Senior Member
501 posts

Joined: Jan 2005
From: Selangor

-2146435068 = 0x80100004 = SCARD_E_INVALID_PARAMETER

winSCard.SCardTransmit(hCard, SendRequest, TxBuf(0), 15, RecvRequest, RxBuf(0), RxBufLen)
I'm not sure how winSCard is implemented here. I suspect buffer pointers are not passed correctly. Be sure that they are addresses, not values. I can't comment much because I do not know Visual Basic syntax.

Do you have something that looks like this?
CODE
   Declare Function SCardTransmit Lib "winscard.dll" _
      (ByVal hCard As Int32, ByRef pioSendPci As SCARD_IO_REQUEST, _
      ByVal pbSendBuffer As Byte(), ByVal cbSendLength As Int32, _
      ByRef pioRecvPci As SCARD_IO_REQUEST, ByVal pbRecvBuffer As Byte(), _
      ByRef pcbRecvLength As Int32) As Int32


Another thing you can check is the value of hCard, make sure it is some valid value.
jacq09
post Feb 27 2009, 11:20 AM

New Member
*
Newbie
2 posts

Joined: Feb 2009


Thanks xenon, for your reply. I found out what went wrong though. The only difference I find with ur scdump.c code and mine is i send 2 different variable for the SCARD_IO_REQUEST and yours send the same. So it shud look like this.

QUOTE
winSCard.SCardTransmit(hCard, Request, TxBuf(0), 15, Request, RxBuf(0), RxBufLen)


And that got all the data from MyKad!! Superb!!



ROCKEY
post Mar 31 2009, 10:41 AM

Getting Started
**
Junior Member
189 posts

Joined: May 2007
xenon is great.. thanks for the coding.
razinq
post Apr 2 2009, 11:14 AM

New Member
*
Junior Member
4 posts

Joined: Dec 2005


yeah ... xenon rock.
From his scdump file, now im producing the java applet to read mykad from the web.
No need activeX. all platform can read with this applet.

notworthy.gif notworthy.gif notworthy.gif

This post has been edited by razinq: Apr 2 2009, 11:14 AM
christ_0205
post Apr 23 2009, 11:18 PM

Casual
***
Junior Member
328 posts

Joined: May 2006
From: Kuala Lumpur


Anyone have the full software to generate the data if yes can anyone share with me thanks in advance
Fazli_Super
post May 1 2009, 02:55 AM

Getting Started
**
Junior Member
51 posts

Joined: Aug 2008
no free lunch bang! already have the code and you can just get a smart card reader and read it. want extra, please hire people do for you then, or i think they are many expert and free lance in low yat.
cybpsych
post Jun 12 2009, 04:56 PM

---------------------
*********
All Stars
47,574 posts

Joined: Jan 2003
just to update: IRIS Corp Bhd's smartcard and smart PDA units are available RETAIL @ Cash&Carry IT, Amoda building, KL.

it's just in opposite of Berjaya Times Square, and right after you come down from the overhead bridge smile.gif
ttwangsa
post Aug 4 2009, 07:18 AM

On my way
****
Senior Member
618 posts

Joined: Oct 2005
From: Puchong, Selangor


i'm trying to do a dot net library for the smart card reader.
i'll post it when/(if?) its ready.


Added on August 8, 2009, 7:48 amok i've put it at github.
git@github.com:blacksnow666/jpnreader.git

its done in vb dot net

This post has been edited by ttwangsa: Aug 8 2009, 07:48 AM
abigoroth
post Nov 29 2009, 09:33 AM

Getting Started
**
Junior Member
65 posts

Joined: Mar 2006
From: Alor Setar


hi xenon n all ppl here,
I want to get a mykad reader for my project.
any recommendded smartcard reader device to buy? seller, model, brand + comment

thx

phlwnbertopeng
post Dec 9 2009, 10:32 AM

Getting Started
**
Junior Member
162 posts

Joined: Apr 2008
From: Indonesia


tricubes bro,u just try to get Secure or TCR 30,its cheap,no need to buy SDK,thanks


Added on December 9, 2009, 10:40 amI can develop any applications for MyKad,please check my website. Thanks

This post has been edited by phlwnbertopeng: Dec 9 2009, 10:40 AM
ttwangsa
post Mar 22 2010, 12:18 PM

On my way
****
Senior Member
618 posts

Joined: Oct 2005
From: Puchong, Selangor


i use ACR 38
aliqueamyrei
post Mar 23 2010, 08:30 AM

Casual
***
Junior Member
317 posts

Joined: Nov 2006
From: Piyu Piyu Piyu



Uh. Xenon is so cool. I am still not be able to code or read those hex and code stuff. Basic prog ok la.
lms2005
post Jun 3 2010, 09:10 PM

Regular
******
Senior Member
1,260 posts

Joined: May 2005
From: somewhere else
anyone try install scr21u at win7 not?

my driver can't installed.. it said cannot start...
cybpsych
post Jun 4 2010, 10:06 AM

---------------------
*********
All Stars
47,574 posts

Joined: Jan 2003
is this the driver u got? v1.0.3.0

http://www.iris.com.my/index.cfm?sc=91

http://www.iris.com.my/_repository/iris/do...r_Installer.zip
trulez
post Sep 20 2010, 04:23 PM

New Member
*
Newbie
1 posts

Joined: Sep 2010
Your explanation is looks tremendously promising. Mr.Xenon i just want to know whether could i work it out with SCR3310 card reader which ill be using in Visual studio and Mysql. Thank you. Your co-operation is appreciated.


Added on September 20, 2010, 4:56 pm
QUOTE(xenon @ Oct 24 2006, 10:25 PM)
Ok. I don't have time to complete my original MyKad reader program. Having difficulties with the dreaded user interface hell. So tonight I work on a quick-and-dirty console application in C. You need to use a hex editor to look at the output dump file. But, the basic information like name, IC no., are printed in the console too.

Not responsible if got damage  blush.gif
Fail? Success? report here.

Two files in attachment unpack into the same files.
save the ".txt" as .zip.
*
Hi Xenon..Just wanna ask, these codings are just to retrive the info only? how if i want to store the information in MySQL?

This post has been edited by trulez: Sep 20 2010, 04:56 PM
eone
post Jul 25 2011, 09:36 AM

Prime
*******
Senior Member
2,677 posts

Joined: Jan 2003
From: PutraCyberjaya



hi guys, currently I'm looking for the Biomatrix smartcard/mykad reader, anyone know how to get/buy it?
boom_bread
post Jul 25 2011, 09:57 AM

Casual
***
Junior Member
438 posts

Joined: Oct 2005
From: Damansara


QUOTE(eone @ Jul 25 2011, 09:36 AM)
hi guys, currently I'm looking for the Biomatrix smartcard/mykad reader, anyone know how to get/buy it?
*
Hi, as far as i know, there are 2 local companies that provide smartcard reader here, IRIS and Yasmin Teknologi. U will be provided with the SDK to read information from the card as well.

If u don't buy from them, there's other smart card reader in the market as well. Not sure about specific brand though, but its pretty sure u will need card datasheet for mykad (that is if u want to read from mykad) to know which information contains in specific address.

But if the SDK / sample application bundled already with the reader, then it will be a lot easier for u. nod.gif
eone
post Jul 25 2011, 10:06 AM

Prime
*******
Senior Member
2,677 posts

Joined: Jan 2003
From: PutraCyberjaya



QUOTE(boom_bread @ Jul 25 2011, 09:57 AM)
Hi, as far as i know, there are 2 local companies that provide smartcard reader here, IRIS and Yasmin Teknologi. U will be provided with the SDK to read information from the card as well.

If u don't buy from them, there's other smart card reader in the market as well. Not sure about specific brand though, but its pretty sure u will need card datasheet for mykad (that is if u want to read from mykad) to know which information contains in specific address.

But if the SDK / sample application bundled already with the reader, then it will be a lot easier for u.  nod.gif
*
Thanks, last time I bought the brand is Rocker, and I used opensource as reference to develop the apps, and luckily it works. But now I'm trying to get the quotation from IRIS on the Bio-matrix one, emailed to sales and marketing but no response. About the Yasmin Teknologi, do you know where it is and how to contact them? Or is there anywhere that i can order online?


Added on July 25, 2011, 12:34 pmiris and yasmin both no response, I wish I don't need to call them just to ask single quotation sweat.gif

This post has been edited by eone: Jul 25 2011, 12:34 PM
boom_bread
post Jul 27 2011, 09:51 AM

Casual
***
Junior Member
438 posts

Joined: Oct 2005
From: Damansara


Hi, sorry for the late reply.

I guess you know already how to contact IRIS side is it? It's www.iris.com.my. For Yasmin Teknologi, you can go to their website, www.yasmin.com.my. There's supposed to have contact page if I am not mistaken.

After that, maybe you can email or for fast response, directly call their sales manager / marketing. Good luck wink.gif
eone
post Jul 27 2011, 10:01 AM

Prime
*******
Senior Member
2,677 posts

Joined: Jan 2003
From: PutraCyberjaya



QUOTE(boom_bread @ Jul 27 2011, 09:51 AM)
Hi, sorry for the late reply.

I guess you know already how to contact IRIS side is it? It's www.iris.com.my. For Yasmin Teknologi, you can go to their website, www.yasmin.com.my. There's supposed to have contact page if I am not mistaken.

After that, maybe you can email or for fast response, directly call their sales manager / marketing. Good luck wink.gif
*
Yeah, got their emails the next day though, or maybe I opened the emails the next day rolleyes.gif, anyway, got a quotation from Iris and the price for a single device(bio matrix) with sdk kit cost a bomb! sweat.gif.. outside only selling the device for only usd50, and they quoted me myr5k...
boom_bread
post Jul 27 2011, 10:54 AM

Casual
***
Junior Member
438 posts

Joined: Oct 2005
From: Damansara


Well, have you seen feature of that device itself? Because they have several devices for the user. So, maybe you can ask for their quotation on simplest device which would only cater for your requirement.

Is it the same device you are referring on outside which priced usd50? MYR 5k is a bit high I guess, but like mentioned before, maybe they quote on high spec device? Try get the same device quotation from Yasmin Teknologi or any other biometric vendors.

My advice is, check whether device u ask for the quotation meets your requirement or not. biggrin.gif

This post has been edited by boom_bread: Jul 27 2011, 10:55 AM
eone
post Jul 27 2011, 11:27 AM

Prime
*******
Senior Member
2,677 posts

Joined: Jan 2003
From: PutraCyberjaya



Usd50 referred from links on previous page on this thread. I've asked with precise product code. Waiting from yasmin, they asked wether I involved in PATI system or something, replied no, then no response from them since.
boom_bread
post Jul 27 2011, 02:08 PM

Casual
***
Junior Member
438 posts

Joined: Oct 2005
From: Damansara


Well, that happened when client attempt to buy small capacity of their product. I mean, they should treat all clients the same.

Maybe u could try call them directly or resend the email.
hirota
post Aug 12 2011, 01:13 PM

Regular
******
Senior Member
1,900 posts

Joined: Jun 2005
sorry to bring up this old post, but this is a very helpful topic,
now i can read the (JPN_OrgName,original name), but some others mykad having 2 lines of fullname, any idea how to read the second line of the name?

thanks


Added on August 12, 2011, 4:39 pmok i managed to get it by reading the JPN_GMPCName

thanks ya

This post has been edited by hirota: Aug 12 2011, 04:39 PM
endau02
post Nov 6 2011, 01:03 PM

Look at all my stars!!
*******
Senior Member
3,169 posts

Joined: Jun 2009
From: Borlänge



is there any mykad reader can b polled by modbus protocol? means d reader will bcome d slave n d master (can b a pc or plc) poll some data from d reader
calvinchin
post Jan 30 2012, 06:26 PM

Getting Started
**
Junior Member
64 posts

Joined: Jan 2003
From: Cheras, KL


I previously worked with the MyKAD reader supplier VeriCardSys.com

They supply readers and customized SDKs that could read the MyKAD data...
They even provide sample VB codes showing how you could integrate your Windows application to the card reader.

Very easy to use.
I'm now trying to work with them to see how to get the readers to work with ASP.NET webpages.


narf03
post Jan 31 2012, 02:09 AM

Look at all my stars!!
*******
Senior Member
3,900 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


Wah, can u ppl check the DOB of this thread ? its 6 years old, please let it RIP and I am suggesting to staff to AUTOCLOSE all threads which is like 2 years old+, can see, can read, cant post, and when ppl want to ask something, they are suppose to start a new 1 and put a link to point back old thread, it is very annoying to start reading something so damn old again(yeah, for me, its again).
ck23
post Dec 1 2012, 03:29 PM

Enthusiast
*****
Senior Member
717 posts

Joined: Sep 2008


http://forum.lowyat.net/index.php?showtopic=2003950&hl=

I'm an authorised agent.

Please contact me for all IRIS products, including SDKs. Everything is available.

Good price guaranteed.

Mostly I ship to overseas.


Added on December 1, 2012, 3:30 pm
QUOTE(calvinchin @ Jan 30 2012, 06:26 PM)
I previously worked with the MyKAD reader supplier VeriCardSys.com

They supply readers and customized SDKs that could read the MyKAD data...
They even provide sample VB codes showing how you could integrate your Windows application to the card reader.

Very easy to use.
I'm now trying to work with them to see how to get the readers to work with ASP.NET webpages.
*
You may get from me. Price is guaranteed cheaper. Warranty claim is as fast as 5 working days.



This post has been edited by ck23: Dec 1 2012, 03:30 PM
Bright_Moon
post Dec 9 2012, 12:59 PM

New Member
*
Newbie
2 posts

Joined: Dec 2012
Hi all,

I need to develop a system using vb.net that reads mykad info and stores the information in the system database... For that, I need to purchase mykad card reader... I have searched the internet for mykad readers and found different companies offers such readers such as tricubes and rockey ... and in this post I found about the IRIS .. there is also this one:
http://www.lelong.com.my/smart-card-reader...2-12-Sale-P.htm

can any one plz advice me on the matter? which one should i go for?

I would also appreciate any advice in developing the system as it seems members replied to this post have ardy developed such system ...

Thank you so much in advance ..

This post has been edited by Bright_Moon: Dec 9 2012, 01:15 PM
TheSolver
post Dec 9 2012, 04:02 PM

Regular
******
Senior Member
1,086 posts

Joined: Jun 2011
I used to develop a system many years ago and my advice to you is make sure you get hold of the device SDKs and the program sample works. Mine was in Visual Basic and C/C++. That was before .net was not in widespread use. I got to tinker with the OLE or somethingX to be called by my application and the support from the company was poor. Now there are competing companies producing the gadgets, hopefully that has changed.
kwl1990
post Dec 10 2012, 02:54 PM

New Member
*
Junior Member
45 posts

Joined: Aug 2010


previously i have been implement myKad reader into my assignment (clinic system)... Actually, it is not very difficult... I just buy a card reader device it cost me around RM150.. and i get the SDK in java language for free from google about it... After i get the Device and SDK then what i need to do is to CODE and make some modify on the SDK... this is because the SDK is to read the data from myKad and i need to retrieve the data and save it into database... but 1 more thing that take time is to adding additional code to retrieve the image and then save it into database....
Bright_Moon
post Dec 11 2012, 12:18 PM

New Member
*
Newbie
2 posts

Joined: Dec 2012


Thanks all for the reply.. However, no one said something about the device... Can i understand from this that the device brand does not matter as long as it can read the mykad info and it has the SDK?

any one has vb.net code for developing such a program?

Thanks smile.gif
jimangman
post Apr 10 2013, 03:14 AM

New Member
*
Newbie
1 posts

Joined: Apr 2013
After months of research and development, i was able to fully integrate mykad and mykid reader into my web application.
just for your information, as per my experience, only selected smartcard reader will be able to read MyKID. and these readers comes with another small card namely SAM license (like SIM card). Without this card the OS within MyKID will simply lock itself and will return "Invalid Command Class" despite any APDU sent to it.

In my experiment, i used the SCR21U reader and suceeded the test.
Gastinel
post Oct 14 2013, 07:28 AM

New Member
*
Newbie
1 posts

Joined: Oct 2013


[quote=cybpsych,Jun 4 2010, 10:06 AM]
is this the driver u got? v1.0.3.0

http://www.iris.com.my/index.cfm?sc=91

http://www.iris.com.my/_repository/iris/do...r_Installer.zip
*


Is it not illegal to capture and store data from MyKad unless you are a Government Agency? And what happens to this data afterwards? What protection from misuse do we have? Has no one heard of identity theft? No wonder you can find MyKads for sale if it is so easy for unauthorised persons to read the data.




blackamikaze
post Nov 25 2013, 04:05 PM

Trooper Rank: BIG HEAD SERGEANT
*******
Senior Member
2,253 posts

Joined: Jul 2005
From: Bestine, the capital of Tatooine



QUOTE(xenon @ Apr 13 2007, 10:15 AM)
A few forumers asked me questions regarding reading of MyKad surface information. The answer is there is no encryption; it is just about knowing what (APDU) command to send.

There will be 5 APDU commands that I'll introduce. I name them as
1) Select Application
2) Get Response
3) Set Length
4) Select Info
5) Read Info

Instead of viewing a particular command to read "Name", another command to read "IC no.", it is better to interpret a sequence of 3 commands (Set Length, Select Info, Read Info) as "reading a section (or the whole) file". The fact is "Name", "IC no." etc are stored in fixed-length fields (padded on the right), and concatenated together (without separator) to form files.
For example,
"Name" stored in file jpn-1-1, offset 0x00E9, length 0x28
"IC no." stored in file jpn-1-1, offset 0x0111, length 0x0D
When you want to read "Name", you read jpn-1-1, offset 0x00E9, length 0x28.
When you want to read "IC no.", you read jpn-1-1, offset 0x0111, length 0x0D.
When you want to read both "Name" and "IC no.", you read jpn-1-1, offset 0x00E9, length 0x35.
Conversely, you can read only part of the field; if you want only first 6 digits of "IC no.", read jpn-1-1, offset 0x111, length 6.

Now, the first 2 commands, "Select Application" and "Get Response", are used to select either one of JPN, JPJ, IMM appplication. (Actually you can have 2 active at the same time by using logical channels, but that's a little bit advanced at this stage.) You must select an application after reset, and you'll do it only once except you want to change application.

Reader: 00 A4 04 00 0A A0 00 00 00 74 4A 50 4E 00 10  (Send 10 bytes data, expect receive 0 bytes)
Card  : 61 05
Reader: 00 C0 00 00 05 (Send 0 bytes data, expect receive 5 bytes)
Card  : 6F 03 82 01 38 90 00

"00 A4 04 00 0A" is the "CLA INS P1 P2 P3" for "Select Application". The data part of the APDU consists of 10 bytes: "A0 00 00 00 74 4A 50 4E 00 10". The "A0 00 00 00 74" and "00 10" parts are constant. "4A 50 4E" represents "JPN". Change to "JPJ" or "IMM" for those applications.
"00 C0 00 00 05" is the "CLA INS P1 P2 P3" for "Get Response". The 5 data bytes received is not significant, but you can verify whether it is successful.

That's the end of description of "Select Application" and "Get Response". Now move on to the 3 commands to read a section of file.

Example: read jpn-1-1, offset 0x00E9, length 0x28.
Reader: C8 32 00 00 05 08 00 00 28 00
Card  : 91 08
Reader: CC 00 00 00 08 01 00 01 00 E9 00 28 00
Card  : 94 28
Reader: CC 06 00 00 28
Card  : 4D 59 20 4E 41 4D 45 20 20 20 20... 90 00

The 3 commands "Set Length", "Select Info", and "Read Info" are shown above. The colored parts are those which varies.
It seems from above that the maximum length will be 0xFF, so you'll have to break long file section (particularly when reading JPEG) into multiple reads (repeat the 3 commands with different length and offset). But actually, for advanced users, you can specify a length >= 0x0100, (provided you don't read past the end of file which results in no bytes returned,) in the "Set Length" and "Select Info". You only need multiple "Read Info", with the single byte length set to big a number (eg. 0xFF or 0xFC), except the last read. "Read Info" is just like retrieving out from a FIFO buffer, you can read however you want, but don't over-read it.

To read jpn-1-4, replace 01 00 01 00 to 04 00 01 00.

Those double byte "Offset" and "Length" are in little endian.

Tables
» Click to show Spoiler - click again to hide... «


» Click to show Spoiler - click again to hide... «


» Click to show Spoiler - click again to hide... «


Data types
» Click to show Spoiler - click again to hide... «

*
awesome, thanks for the table. Really help me alot on my project
blackamikaze
post Nov 25 2013, 04:05 PM

Trooper Rank: BIG HEAD SERGEANT
*******
Senior Member
2,253 posts

Joined: Jul 2005
From: Bestine, the capital of Tatooine



sorry, reposted

This post has been edited by blackamikaze: Nov 25 2013, 04:45 PM
mze0007
post Jun 14 2015, 07:10 PM

New Member
*
Newbie
3 posts

Joined: Jun 2015
Hi,
My name is Mubashir Hussain from Pakistan I'm IT student of IT in BMIC College maluri. Sir i want to submit my final assignment about ez100pu with vb 6.0 and access, last couple of week i searching the source code but fail, sir i have device but don't know more about connect this device with vb 6.0. Moreover, if your good office help me out i will pay you.
0129703973
mze0007@gmail.com


mze0007
post Jun 14 2015, 07:11 PM

New Member
*
Newbie
3 posts

Joined: Jun 2015
QUOTE(razinq @ Nov 3 2006, 04:44 PM)
Xenon ... good laa you ... ive download your program and it works with my rm50 reader  rclxms.gif Thanks alot ...
*
Hi,
My name is Mubashir Hussain from Pakistan I'm IT student of IT in BMIC College maluri. Sir i want to submit my final assignment about ez100pu with vb 6.0 and MS access, last couple of week i searching the source code but fail, sir i have device but don't know more about connect this device with vb 6.0. Moreover, if your good office help me out i will pay you.
0129703973
mze0007@gmail.com

This post has been edited by mze0007: Jun 14 2015, 07:12 PM
mze0007
post Jun 14 2015, 07:18 PM

New Member
*
Newbie
3 posts

Joined: Jun 2015
QUOTE(blackamikaze @ Nov 25 2013, 04:05 PM)
awesome, thanks for the table. Really help me alot on my project
*
Hi,
My name is Mubashir Hussain from Pakistan I'm IT student of IT in BMIC College maluri. Sir i want to submit my final assignment about ez100pu with vb 6.0 and MS access, last couple of week i searching the source code but fail, sir i have device but don't know more about connect this device with vb 6.0. Moreover, if your good office help me out i will pay you.
0129703973
mze0007@gmail.com

matkewl
post Oct 24 2018, 12:07 PM

Getting Started
**
Junior Member
63 posts

Joined: Dec 2008


Hi guys, do you have any recommendation on mycard reader where I need to read the IC number from the IC and pass that value to a web based CRM solution. Does the Mycard reader available with this function? Kindly help
johagood
post Oct 25 2018, 01:35 AM

New Member
*
Junior Member
44 posts

Joined: May 2007


QUOTE(matkewl @ Oct 24 2018, 12:07 PM)
Hi guys, do you have any recommendation on mycard reader where I need to read the IC number from the IC and pass that value to a web based CRM solution. Does the Mycard reader available with this function? Kindly help
*
hi,

All my kad reader with PCSC compliance are able to read MYKad. In order to pass the data to web based CRM, you need to create local services and submit the data when the reader successful read mykad.
machine07
post Feb 21 2019, 04:52 PM

New Member
*
Newbie
7 posts

Joined: Oct 2018
QUOTE(xenon @ Apr 13 2007, 10:15 AM)
A few forumers asked me questions regarding reading of MyKad surface information. The answer is there is no encryption; it is just about knowing what (APDU) command to send.

There will be 5 APDU commands that I'll introduce. I name them as
1) Select Application
2) Get Response
3) Set Length
4) Select Info
5) Read Info

Instead of viewing a particular command to read "Name", another command to read "IC no.", it is better to interpret a sequence of 3 commands (Set Length, Select Info, Read Info) as "reading a section (or the whole) file". The fact is "Name", "IC no." etc are stored in fixed-length fields (padded on the right), and concatenated together (without separator) to form files.
For example,
"Name" stored in file jpn-1-1, offset 0x00E9, length 0x28
"IC no." stored in file jpn-1-1, offset 0x0111, length 0x0D
When you want to read "Name", you read jpn-1-1, offset 0x00E9, length 0x28.
When you want to read "IC no.", you read jpn-1-1, offset 0x0111, length 0x0D.
When you want to read both "Name" and "IC no.", you read jpn-1-1, offset 0x00E9, length 0x35.
Conversely, you can read only part of the field; if you want only first 6 digits of "IC no.", read jpn-1-1, offset 0x111, length 6.

Now, the first 2 commands, "Select Application" and "Get Response", are used to select either one of JPN, JPJ, IMM appplication. (Actually you can have 2 active at the same time by using logical channels, but that's a little bit advanced at this stage.) You must select an application after reset, and you'll do it only once except you want to change application.

Reader: 00 A4 04 00 0A A0 00 00 00 74 4A 50 4E 00 10  (Send 10 bytes data, expect receive 0 bytes)
Card  : 61 05
Reader: 00 C0 00 00 05 (Send 0 bytes data, expect receive 5 bytes)
Card  : 6F 03 82 01 38 90 00

"00 A4 04 00 0A" is the "CLA INS P1 P2 P3" for "Select Application". The data part of the APDU consists of 10 bytes: "A0 00 00 00 74 4A 50 4E 00 10". The "A0 00 00 00 74" and "00 10" parts are constant. "4A 50 4E" represents "JPN". Change to "JPJ" or "IMM" for those applications.
"00 C0 00 00 05" is the "CLA INS P1 P2 P3" for "Get Response". The 5 data bytes received is not significant, but you can verify whether it is successful.

That's the end of description of "Select Application" and "Get Response". Now move on to the 3 commands to read a section of file.

Example: read jpn-1-1, offset 0x00E9, length 0x28.
Reader: C8 32 00 00 05 08 00 00 28 00
Card  : 91 08
Reader: CC 00 00 00 08 01 00 01 00 E9 00 28 00
Card  : 94 28
Reader: CC 06 00 00 28
Card  : 4D 59 20 4E 41 4D 45 20 20 20 20... 90 00

The 3 commands "Set Length", "Select Info", and "Read Info" are shown above. The colored parts are those which varies.
It seems from above that the maximum length will be 0xFF, so you'll have to break long file section (particularly when reading JPEG) into multiple reads (repeat the 3 commands with different length and offset). But actually, for advanced users, you can specify a length >= 0x0100, (provided you don't read past the end of file which results in no bytes returned,) in the "Set Length" and "Select Info". You only need multiple "Read Info", with the single byte length set to big a number (eg. 0xFF or 0xFC), except the last read. "Read Info" is just like retrieving out from a FIFO buffer, you can read however you want, but don't over-read it.

To read jpn-1-4, replace 01 00 01 00 to 04 00 01 00.

Those double byte "Offset" and "Length" are in little endian.

Tables
» Click to show Spoiler - click again to hide... «


» Click to show Spoiler - click again to hide... «


» Click to show Spoiler - click again to hide... «


Data types
» Click to show Spoiler - click again to hide... «

*
Awesome post helped my with my project too. I found an APDU list but sort of incomplete: https://www.eftlab.co.uk/index.php/site-map...u-response-list.

I am using ACR38u cost around RM50 for a project simply written in Java file below. The code is quite messy rclxub.gif because I am just a student tongue.gif


Attached File(s)
Attached File  JavaCardReader.java.txt ( 6.84k ) Number of downloads: 61
turnmoil
post Feb 22 2019, 11:01 AM

Casual
***
Junior Member
405 posts

Joined: Jan 2003
From: The Miau Miaw Niau Miow Land


QUOTE(mze0007 @ Jun 14 2015, 07:18 PM)
Hi,
My name is Mubashir Hussain from Pakistan I'm IT student of IT in BMIC College maluri. Sir i want to submit my final assignment about ez100pu with vb 6.0 and MS access, last couple of week i searching the source code but fail, sir i have device but don't know more about connect this device with vb 6.0. Moreover, if your good office help me out i will pay you.
0129703973
mze0007@gmail.com
*
u find alot of help here
www.fiverr.com

 

Switch to:
| Lo-Fi Version
0.0914sec    10.43    6 queries    GZIP Disabled
Time is now: 18th November 2019 - 01:39 PM