×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Nokia 6212 maximum data APDU send

    Hi, i'm developing a midlet that communicates with the nokia 6212 secure element, i can send/get APDUs to/from the secure element when the data length is less than 256 byte.
    but one i want to send an apdu that contains data size 256 i get an IOexception : error communication 0x0f.
    could you please help me to overcome this problem .
    thx.
    PS: i'm using iso 14443 for sending APDUs

  2. #2
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Re: Nokia 6212 maximum data APDU send

    PS:
    - I'am working on a real device (not emulator)
    - i can send APDUs that data length is less than 253, the exception is catched for APDUs that data length is more than 254.
    - the exception is catched on the following command:
    Code:
    //data length is 256
    private static final byte[] APDUCommand = {(byte) 0x00, (byte) 0x00 ,(byte) 0x03 ,(byte) 0x00 ,(byte) 0x00,(byte)0xff, (byte)0x0a,(byte) 0x1b,...,(byte)0x0c};
              response = secureElementConnection.exchangeData(APDUCommand);

  3. #3
    Registered User
    Join Date
    Feb 2009
    Location
    Hagenberg, Austria
    Posts
    121

    Re: Nokia 6212 maximum data APDU send

    Hallo,

    Quote Originally Posted by javaCard View Post
    but one i want to send an apdu that contains data size 256 i get an IOexception : error communication 0x0f.
    256 is larger than one byte. Thus, you would need an extended length field in your APDU (i.e. Lc = '00 01 00' (hope this is the correct byte order)). At least with the Nokia 6131s that I have here, the ATR indicates that only single byte length fields are supported. I would expect this is the same with the Nokia 6212 as it uses the same secure element chip.

    br,
    Michael

  4. #4
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Re: Nokia 6212 maximum data APDU send

    thank you for your feedback,
    when i send the same apdu using jCOPshell i get status word :9000
    for APDUs that data length is 254 or 255 i get the same exception

  5. #5
    Registered User
    Join Date
    Feb 2009
    Location
    Hagenberg, Austria
    Posts
    121

    Re: Nokia 6212 maximum data APDU send

    Hallo,

    could you provide an example for such an APDU?

    The data packet you provided so far does not seem like a proper APDU:
    Code:
    private static final byte[] APDUCommand = {(byte) 0x00, (byte) 0x00 ,(byte) 0x03 ,(byte) 0x00 ,(byte) 0x00,(byte)0xff, (byte)0x0a,(byte) 0x1b,...,(byte)0x0c};
    Which is:
    Code:
    CLA = 0x00
    INS = 0x00
    P1 = 0x03
    P2 = 0x00
    Lc = 0xFF0A (= 65290 Byte)
    DATA = 0x1B,...,0x0C
    Or do I get something wrong here?

    br,
    Michael

  6. #6
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Re: Nokia 6212 maximum data APDU send

    my apdu has this form:
    CLA :0x00
    INS : 0x00
    P1 :0x03
    P2 :0x00
    Lc : 0xff // Lc is one byte because i'm using JC2.2.1 which does not support extended APDU
    // the complete data which length is 256
    data : (byte) 0x1B , (byte) 0xD4, (byte) 0x9E, (byte) 0x40, (byte) 0x26, (byte) 0x4A, (byte) 0x3A, (byte) 0xB6, (byte) 0x1C, (byte) 0xBB, (byte) 0x57, (byte) 0x03, (byte) 0x3B, (byte) 0x44, (byte) 0x27, (byte) 0xE8, (byte) 0x56, (byte) 0x51, (byte) 0xF2, (byte) 0x7E, (byte) 0x10, (byte) 0xD7, (byte) 0xC9, (byte) 0x1B, (byte) 0x44, (byte) 0xEB, (byte) 0x49, (byte) 0xFD, (byte) 0xAE, (byte) 0x89, (byte) 0xEE, (byte) 0x9F, (byte) 0x82, (byte) 0xCB, (byte) 0x8C, (byte) 0x16, (byte) 0xA8, (byte) 0x65, (byte) 0x6B, (byte) 0x1B, (byte) 0xD6, (byte) 0x6C, (byte) 0xE9, (byte) 0x65, (byte) 0x0D, (byte) 0x0F, (byte) 0x78, (byte) 0x00, (byte) 0xC8, (byte) 0x03, (byte) 0x96, (byte) 0x26, (byte) 0x6A, (byte) 0x12, (byte) 0x9E, (byte) 0x7C, (byte) 0x56, (byte) 0x0c, (byte) 0x49, (byte) 0xED, (byte) 0x7B, (byte) 0x1b, (byte) 0x03, (byte) 0x38, (byte) 0x69, (byte) 0xB3, (byte) 0x7D, (byte) 0xF3, (byte) 0x22, (byte) 0x66, (byte) 0x5F, (byte) 0xF5, (byte) 0x0D, (byte) 0xC3, (byte) 0x34, (byte) 0x30, (byte) 0xCF, (byte) 0xA4, (byte) 0x20, (byte) 0x73, (byte) 0x8F, (byte) 0xAC, (byte) 0x93, (byte) 0x61, (byte) 0xDF, (byte) 0x6B, (byte) 0x61, (byte) 0x58, (byte) 0x64, (byte) 0x65, (byte) 0x9F, (byte) 0x03, (byte) 0x69, (byte) 0x9D, (byte) 0xA3, (byte) 0x6C, (byte) 0xDE, (byte) 0x6F, (byte) 0x38, (byte) 0x24, (byte) 0x61, (byte) 0x3C, (byte) 0xDD, (byte) 0xD4, (byte) 0x55, (byte) 0x49, (byte) 0x4B, (byte) 0x6A, (byte) 0x5F, (byte) 0x99, (byte) 0xA0, (byte) 0x5C, (byte) 0xD9, (byte) 0x99, (byte) 0x26, (byte) 0x90, (byte) 0x4E, (byte) 0x18, (byte) 0xFF, (byte) 0x53, (byte) 0x77, (byte) 0xF3, (byte) 0x3C, (byte) 0xD1, (byte) 0x79, (byte) 0x2F, (byte) 0x1A, (byte) 0x05, (byte) 0x93, (byte) 0xD4, (byte) 0x9E, (byte) 0x40, (byte) 0x26, (byte) 0x4A, (byte) 0x3A, (byte) 0xB6, (byte) 0x1C, (byte) 0xBB, (byte) 0x57, (byte) 0x03, (byte) 0x3B, (byte) 0x44, (byte) 0x27, (byte) 0xE8, (byte) 0x56, (byte) 0x51, (byte) 0xF2, (byte) 0x7E, (byte) 0x10, (byte) 0xD7, (byte) 0xC9, (byte) 0x1B, (byte) 0x44, (byte) 0xEB, (byte) 0x49, (byte) 0xFD, (byte) 0xAE, (byte) 0x89, (byte) 0xEE, (byte) 0x9F, (byte) 0x82, (byte) 0xCB, (byte) 0x8C, (byte) 0x16, (byte) 0xA8, (byte) 0x65, (byte) 0x6B, (byte) 0x1B, (byte) 0xD6, (byte) 0x6C, (byte) 0xE9, (byte) 0x65, (byte) 0x0D, (byte) 0x0F, (byte) 0x78, (byte) 0x72, (byte) 0xC8, (byte) 0x03, (byte) 0x96, (byte) 0x26, (byte) 0x6A, (byte) 0x12, (byte) 0x9E, (byte) 0x7C, (byte) 0x56, (byte) 0x2B, (byte) 0x49, (byte) 0xED, (byte) 0x7B, (byte) 0xF5, (byte) 0x03, (byte) 0x38, (byte) 0x69, (byte) 0xB3, (byte) 0x7D, (byte) 0xF3, (byte) 0x22, (byte) 0x66, (byte) 0x5F, (byte) 0xF5, (byte) 0x0D, (byte) 0xC3, (byte) 0x34, (byte) 0x30, (byte) 0xCF, (byte) 0xA4, (byte) 0x20, (byte) 0x73, (byte) 0x8F, (byte) 0xAC, (byte) 0x93, (byte) 0x61, (byte) 0xDF, (byte) 0x6B, (byte) 0x61, (byte) 0x58, (byte) 0x64, (byte) 0x65, (byte) 0x9F, (byte) 0x03, (byte) 0x69, (byte) 0x9D, (byte) 0xA3, (byte) 0x6C, (byte) 0xDE, (byte) 0x6F, (byte) 0x38, (byte) 0x24, (byte) 0x61, (byte) 0x3C, (byte) 0xDD, (byte) 0xD4, (byte) 0x55, (byte) 0x49, (byte) 0x4B, (byte) 0x6A, (byte) 0x5F, (byte) 0x99, (byte) 0xA0, (byte) 0x5C, (byte) 0xD9, (byte) 0x99, (byte) 0x26, (byte) 0x90, (byte) 0x4E, (byte) 0x18, (byte) 0xFF, (byte) 0x53, (byte) 0x77, (byte) 0xF3, (byte) 0x3C, (byte) 0xD1, (byte) 0x79, (byte) 0x2F, (byte) 0x1A, (byte) 0x0C


    i'm using ISO 14443 for sending APDUs to the secure element

  7. #7
    Registered User
    Join Date
    Feb 2009
    Location
    Hagenberg, Austria
    Posts
    121

    Re: Nokia 6212 maximum data APDU send

    Quote Originally Posted by javaCard View Post
    Lc : 0xff // Lc is one byte because i'm using JC2.2.1 which does not support extended APDU
    Not with the example you showed before. There, your APDU clearly stated that you are using an extended (3 Byte) length field (first byte of Lc was zero). Anyways, as to my understanding you can't send more than 255 bytes of data in your command APDU without an extended length field.

    br,
    Michael

  8. #8
    Registered User
    Join Date
    Jun 2010
    Posts
    5

    Re: Nokia 6212 maximum data APDU send

    hmm, yeah you're rigth for my first post that was wrong, i made an error in copying the apdu
    the rigth apdu i'm sending is
    //data length is 256
    private static final byte[] APDUCommand = {(byte) 0x00, (byte) 0x00 ,(byte) 0x03 ,(byte) 0x00,(byte)0xff, (byte)0x0a,(byte) 0x1b,...,(byte)0x0c,(byte) 0x00};
    response = secureElementConnection.exchangeData(APDUCommand);
    the last 0x00 is for Le

  9. #9
    Registered User
    Join Date
    Feb 2009
    Location
    Hagenberg, Austria
    Posts
    121

    Re: Nokia 6212 maximum data APDU send

    Still I don't see how a Lc = 255 would allow you to send any data packet that is not 255 bytes long.

    br,
    Michael

Similar Threads

  1. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  2. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •