×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57

    Opening an ISO14443Connection

    In the JSR 257 specification there is an example regarding opening an ISO14443Connection. I have tried this example on the 6131 NFC but get an IOException "Connection error 0x2" when I try to open an ISO14443Connection:
    ISO14443Connection smc = (ISO14443Connection) Connector.open(url)

    The target is detected as an "javax.microedition.contactless.sc.ISO14443Connection" ( if (classes[i].equals(Class.forName ("javax.microedition.contactless.sc.ISO14443Connection"))) ) by the phone, So I don't quit get what the problem is, any suggestions?


    Br,

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    38

    Re: Opening an ISO14443Connection

    Is the exception thrown from the Connector.open() or from the following smc.exchangeData()
    call? If it is from the exchangeData then the code refers to APDU response.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57

    Re: Opening an ISO14443Connection

    Thanks for the prompt response!

    The IOException is thrown when the "connector.open" command is executed.
    As you can see in the code snip, I have some "control" strings written to the phone display depending on the result of the "open" command and, in this case, the program exits with the IOException just before evaluating the "open" result.

    ************* Code snip ***********************

    if (classes[i].equals(Class.forName("javax.microedition.contactless.sc.ISO14443Connection")))
    {
    frm.append("Detected!");
    String url = target.getUrl(classes[i]);
    // Open connection to external smart card
    ISO14443Connection smc = (ISO14443Connection) Connector.open(url);
    if (smc != null)
    {
    frm.append("Connected");
    }
    else
    {
    frm.append("Not connected");
    }
    .
    .
    .

  4. #4
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    38

    Re: Opening an ISO14443Connection

    The error suggests that the other device was no longer in the field.
    Can you try to keep the other card in the field a little longer.

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57

    Re: Opening an ISO14443Connection

    The target and the phone is hold close together the whole time and this is done long time after the IOException occurred.

    Is there any authentication being done at this time (my expectations is that there is not)?

    It so happens that I am able to see the APDU's send from the phone and from the target. It seams that the phone (before my targetDetected() is invoked) sends an "Select Application" APDU with a DESFire ISO AID (0xd2 0x76 0x00 0x00 0x85 0x01 0x00). The target response APDU is 0x6a 0x82 ("Application not found"). Program control is then given to my MIDlets targetDetected(), with the result previously described.

    I don't know if this information is of any value, but I just thought you should know.

  6. #6
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    38

    Re: Opening an ISO14443Connection

    I am not an expert on APDU traffic but I was told that the type of message exchange
    would be normal. What type of card do you use? Also what version of the phone
    firmare do you have? If possible, try to use other cards to see what happens.

  7. #7
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57

    Re: Opening an ISO14443Connection

    The firmware on the phone is version 3.12 (using the *#0000# procedure) and the 6131 NFC SDK is version 1.1

    The card is actually an ISO14443 Type 4 tag/card emulator, basically an NXP PN532 chip configured as target. Now, before you conclude that the emulator is the problem, ;o)
    I would like to mention that this emulator configured as an NFC Forum Type 4 Tag with a "Smart Poster Record" (bookmark) works fine with the native NFC functionality on the 6131 NFC phone.

    So, again, I can't see why the connector.open() function fails, just because I am running custom code?

  8. #8
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57

    Re: Opening an ISO14443Connection

    tsavinen: Don't you have any futher comments on this subject?

    BR

  9. #9
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    38

    Re: Opening an ISO14443Connection

    Unfortunately I cannot reproduce your problem. I am still waiting comments
    from other people, that is why I haven't replied yet.

  10. #10
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    57

    Smile Re: Opening an ISO14443Connection

    Apparently, changing the SENS_RES setting, on the target side, from "0x03 0x44" to "0x03 0x04" made a lot of difference in the connection setup. Things are working now and the 14443 connection is open.

    Is the Nokia 6131 limited to a 106 kbps connection?
    If not, how do I force a 424 kbps connection?

    br,

  11. #11
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    38

    Re: Opening an ISO14443Connection

    Good. I was getting bit desperate as I could not reproduce your problem.
    I even wrote a MIDlet that tried to listen / open connections in all possible
    combinations but nothing produced your symptoms. Except removing the card
    from the field too quickly.

    6131 NFC supports only 106 kbps connection. Don't try to force it for more :-).

  12. #12
    Registered User
    Join Date
    Feb 2008
    Posts
    35

    Re: Opening an ISO14443Connection

    Hi,

    I try to send apdu to sc typeB and I receive java.io.IOException on smc.exchangeData(). the connection opening (ISO14443Connection smc = (ISO14443Connection) Connector.open(url)) seems ok (no exception throwed)

    Have you an idea about the problem.

  13. #13
    Registered User
    Join Date
    Apr 2004
    Location
    Vienna
    Posts
    321

    Re: Opening an ISO14443Connection

    Hi, could you propably explain what you mean by "apdu to sc typeB". (acutally the secure element is a type A in the 6131 ...)

    Cheers, geri-m

  14. #14
    Registered User
    Join Date
    Feb 2008
    Posts
    35

    Re: Opening an ISO14443Connection

    The goal is to send APDU to a external smartcard (sc) type B. After opening connection, I use exchangeData method to send the command and I receive an IOException. After investigation, I observe that a reset will be send by the handset after the sending of the input command meaning perhaps the card answers too slowly to the handset. I don't know if the conclusion is true. Have you an idea?

    Thanks

  15. #15
    Registered User
    Join Date
    Apr 2004
    Location
    Vienna
    Posts
    321

    Re: Opening an ISO14443Connection

    mhm, that's strange. Are you sure it's a type-B Card? as far as i'm concerend, the Nokia 6131 does not read these types of tags ...

    cheers, geri-m

Similar Threads

  1. ISO14443Connection Security Exception
    By Alex_Polt in forum Near Field Communication
    Replies: 37
    Last Post: 2009-07-21, 09:08
  2. Problems opening an ISO14443Connection
    By GiSeAl in forum Near Field Communication
    Replies: 7
    Last Post: 2007-06-26, 11:49
  3. JSR 257 - ISO14443Connection
    By fido_9706 in forum Mobile Java Tools & SDKs
    Replies: 6
    Last Post: 2007-03-27, 15:15
  4. opening a socket connection
    By bhatti81 in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2003-07-16, 10:08
  5. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46

Posting Permissions

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