Hello all,

I'm using pcsc-wrapper-2.0, gemplus-gpk-0.3.jar and 
gemplus-service-0.3.jar to access MPCOS-EMV. My reader is a ZeitControl 
Cybermouse Serial (ACR20S).

I created a dedicated file (:3F00:0300, no access conditions) and a 
transparent file (:3F00:0300:0303, 1024 bytes long, no access 
conditions) in my card using the GPK Pilot 2.00 tool.

Then, I executed a piece of code based on the write example presented at 
the begining of OCF Programmer's Guide, and I verified the results using 
GPK Pilot. As expected, the contents of the file was the string I wrote 
("This is a test.\nThank you."), followed by zeroes.

However, when I execute another piece of code based on the read example 
of OCF PG:

byte[] data = facs.read(file.getPath(), 0, file.getLength());

it returns a byte[] of length around 160, and its contents has nothing 
to do with what is in the card. Here is what it prints:

[B@1dfbff[B@750159[B@a7efd[B@6cd7d5[B@439a2d[B@3bad12[B@632c2d[B@60420f[B@540408[B@1a626f[B@65855a[B@1b9fb1[B@7934ad[B@70eed6[B@691f36[B@694e92[B@6b7859[B@30e280

Also, if I try to write other things, it uses the Write Binary command 
of the card, which according to MPCOS-EMV manual performs a logic OR 
operation between the data already on card and the data being written, 
instead of using the Update Binary command, which *replaces* the old 
data with the new data.

Does anybody know how to overcome these 2 problems?

Thank you,

Sergio Saad


---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to