Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PUT/GET APDU for JC2.1

843851Sep 23 2008 — edited Oct 3 2008
Hi there,
How can one store a 16byte value on the SE?. Is there any code examples here ?. I saw many examples to store a single byte called value and inc/dec that one. But I want to store a 16digit number, read and write the same from a midlet and the applet. I tried the examples at http://www.wrankl.de/Javacard/PGDATAJava.txt it works for me on the simulated card. But if I try to do the same on the NFC, I am able to store the data, but when I read it, I get the error 6703 - wrong length.
APDU used: 
send_apdu -sc 0 -APDU 00DA004003313233 // To put data
send_apdu -sc 0 -APDU 00CA00400003;    // to get data
the error I get is,
Response <-- 6700
send_APDU() returns 0x80206700 (6700: Wrong length.)
the above works fine when simulated. How can I read what I stored and how can I update what I stored !?!

I am using the Omnikey cardman reader, GPShell to upload applets to the Nokia 6131 NFC and communicate with the installed applets.

Would be grateful for a reply
cheers
Dom

Edited by: DomElion on Sep 23, 2008 8:54 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2008
Added on Sep 23 2008
5 comments
626 views