Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Registered User B_T's Avatar
    Join Date
    Apr 2007
    Posts
    1
    Hi,

    Would it be possible to open a Mifare connection (com.nokia.nfc.nxp.mfstd) to internal secure element?

    And,
    Do you have any timeline for the release of 6131 software update for the respective connection name inconsistencies between the phone and the sdk.

    Kind regards

    B.

  2. #2
    Regular Contributor tdelazzari's Avatar
    Join Date
    Feb 2007
    Location
    France
    Posts
    56
    Bump!
    Same question here. How do we communicate from a MIDlet with the internal MIFARE card ?
    Can we make it with JetZ API ? How ? Is there a method in the SDK ?

  3. #3
    Regular Contributor Raluca_'s Avatar
    Join Date
    Mar 2007
    Location
    Helsinki, Finland
    Posts
    91
    Quote Originally Posted by B_T
    Hi,

    Would it be possible to open a Mifare connection (com.nokia.nfc.nxp.mfstd) to internal secure element?
    You can open a MiFare connection to the internal secure element by using the “internal.mf.url” system property, as described below:

    String uri = System.getProperty("internal.mf.url");
    MFStandardConnection mfConn = (MFStandardConnection) Connector.open(uri);
    Raluca Cindrea
    Helsinki, Finland
    www.nokia.com/nfc

  4. #4
    Registered User SomeoneSI's Avatar
    Join Date
    Apr 2007
    Posts
    4
    Does this "internal.mf.url" has set value in emulator? Must be in emulator used any other internal. value if I want to connect with MFStandardConnection?

    When I try to connect I get error "invalid parameter" which is ok because internal.mf.url is null. I was using the same code but with try/catch part.

  5. #5
    Regular Contributor yakdogan's Avatar
    Join Date
    Mar 2003
    Posts
    53
    Quote Originally Posted by Raluca_
    You can open a MiFare connection to the internal secure element by using the “internal.mf.url” system property, as described below:

    String uri = System.getProperty("internal.mf.url");
    MFStandardConnection mfConn = (MFStandardConnection) Connector.open(uri);
    Hi Raluka,

    The system property "internal.mf.url" is not set in \lib\system.config file.

    I set it to value:
    internal.mf.url: nfc:mf;type=iso4a;mode=internal (is it the correct url?)

    and Connector.open(uri) throws also an Exception. Any idea ?

    Best regards.

  6. #6
    Regular Contributor geri-m's Avatar
    Join Date
    Apr 2004
    Location
    Vienna
    Posts
    321
    The URI looks fine to me. Which Exception is thrown? In case it is a security exception: you do need to have your midlet signed with a valid certificate from a CA with a root certificate in the mobile in order to access the Secure element. this is a security policy for the 6131. See this thread for further information: http://discussion.forum.nokia.com/fo...d.php?t=104752

  7. #7
    Regular Contributor yakdogan's Avatar
    Join Date
    Mar 2003
    Posts
    53
    Quote Originally Posted by geri-m
    The URI looks fine to me. Which Exception is thrown? In case it is a security exception: you do need to have your midlet signed with a valid certificate from a CA with a root certificate in the mobile in order to access the Secure element. this is a security policy for the 6131. See this thread for further information: http://discussion.forum.nokia.com/fo...d.php?t=104752
    It is the IOException. I testet couple times. But before IOException, an another java.lang.ClassNotFoundException occurs.

    It seems to me i miss the implementer classes of package "com.nokia.nfc.nxp.mfstd"
    (e.g. Class MFStandardConnectionImpl).
    The emulator.jar is in my Java Build Path.

    Best regards.

  8. #8
    Regular Contributor geri-m's Avatar
    Join Date
    Apr 2004
    Location
    Vienna
    Posts
    321
    @Raluca_: I'm not sure about this piece of code:
    MFStandardConnection mfConn = (MFStandardConnection) Connector.open(uri);
    The MFStandardConnection is not an extended "TagConnection" Class (comes form javax.microedition.io.Connection) like the ISO14443Connection, the NDEFConnection or the PlainTagConnection. Are you sure this is correct?

  9. #9
    Regular Contributor yakdogan's Avatar
    Join Date
    Mar 2003
    Posts
    53
    No, I'm not sure.

    I read the release notes and it says:

    New features:
    - Virtual card simulator: The virtual card
    simulator can simulate various types of TAGs and
    secure elements (Smart Cards). The preconfigured
    TAGs are based on: NXP UL/Type 2, NXP 1K and
    NXP 4K Tags. The preconfigured Smart cards are
    based on: JCOP 3.1 Smart Card.
    ---------
    I believe, this release doesn't support to access internal Mifare card from a MIDlet or from Java Card Applet. I hope I am wrong.

    Best regards:

  10. #10
    Regular Contributor geri-m's Avatar
    Join Date
    Apr 2004
    Location
    Vienna
    Posts
    321
    Well I suppose "NXP 1K and NXP 4K Tags" are Mifare. I'm going to try it out tomorrow in the office. I'll keep you in the loop.

  11. #11
    Regular Contributor Raluca_'s Avatar
    Join Date
    Mar 2007
    Location
    Helsinki, Finland
    Posts
    91
    The system property "internal.mf.url" is not set in \lib\system.config file.

    I set it to value:
    internal.mf.url: nfc:mf;type=iso4a;mode=internal (is it the correct url?)
    You are right, the system property is missing from the configuration file and even if you add the correct url (which is “nfc:rf;type=mf;mode=internal”), you won’t be able to open the connection on the emulator. This is an issue in the current SDK version and it will be fixed in future releases.

    Once this is fixed, the following code will work for opening a connection to the MiFare side of the internal Secure Element:

    String uri = System.getProperty("internal.mf.url");
    MFStandardConnection mfConn = (MFStandardConnection) Connector.open(uri);

    Also, due to a bug on the phone software side, using the MiFare Standard connection on the phone is currently not working – this will be fixed on the phone side during next software updates.

    Thank you for your patience in dealing with this.
    Raluca Cindrea
    Helsinki, Finland
    www.nokia.com/nfc

  12. #12
    Regular Contributor tdelazzari's Avatar
    Join Date
    Feb 2007
    Location
    France
    Posts
    56
    Quote Originally Posted by Raluca_
    this will be fixed on the phone side during next software updates.

    How to update the phone software ? using the menu Settings > Phone > Phone updates ?

    Thanks
    Finalist, First European NFC Competition 2007
    2nd Prize Research Track, NFC Forum Global Competition 2008
    NFC Project Manager at the University of Nice Sophia-Antipolis, France
    http://tdelazzari.blogspot.com

  13. #13
    Regular Contributor Raluca_'s Avatar
    Join Date
    Mar 2007
    Location
    Helsinki, Finland
    Posts
    91
    The emulator included in the new Nokia 6131 NFC SDK version 1.1 now also simulates the internal Mifare 4k tag of the Nokia 6131 NFC device. The simulated internal Mifare 4k can be configured to use a simulated Mifare 4k card or a real Mifare 4k tag/a real Nokia 6131 NFC device placed in an external card reader.

    Section 3.1 - Internal Mifare 4k - in the Nokia 6131 NFC SDK User's Guide provides more information on how to use the simulated internal tag.

    This new release also includes a MFStandardExample MIDlet that demonstrates how to connect to the internal tag of the Nokia 6131 NFC and also how to use MFStandardConnection to access the application directory.

    I hope you will find this helpful.
    Raluca Cindrea
    Helsinki, Finland
    www.nokia.com/nfc

  14. #14
    Regular Contributor geri-m's Avatar
    Join Date
    Apr 2004
    Location
    Vienna
    Posts
    321
    Good job guys! Here some code that reads the UID and the Manufaturer out of the Block0.

    Code:
    import javax.microedition.io.Connector;
    import java.io.IOException;
    import com.nokia.nfc.nxp.mfstd.*;
    
    try
    {
    MFStandardConnection conn;
    uri = System.getProperty("internal.mf.url");
    conn = (MFStandardConnection)Connector.open(uri);
    MFManufacturerBlock block = conn.getManufacturerBlock();
    byte[] uid = block.getUID();
    byte[] man = block.getManufacturerData();
    conn.close();
    }
    catch(IOException e)
    {
    System.out.println("MF-Error: " + e.toString());
    }
    This stuff also works in the emulator using an external Omnikey reader and an NXP-Mifare/JCOP card. Unfortunatly reading the manfacturer returns an empty byte[]-Array ...
    Last edited by geri-m; 2007-07-04 at 13:45.

  15. #15
    Registered User nepivoda's Avatar
    Join Date
    Aug 2007
    Posts
    7
    I tried connecting to internal Mifare tag in 6131, and although I can get connection (only once, but that's probably another story), I'm unable to create MAD, read any data etc. (I'm getting "Write error" when creating MAD.)
    I also tried reading data from internal tag with external Mifare reader, but I cannot log in - neither A0A1...A5, zeroes, FFs nor D3F7s work.
    Writing to normal Mifare card works and I can read saved contents fine with A0..A5 and D3F7s keys. I can also create MAD etc. in emulator.
    Any idea what's wrong? My phone's software is 5.11, RM-216.

Page 1 of 2 12 LastLast

Similar Threads

  1. Secure Connection Nokia N70
    By stevied20 in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2006-04-15, 19:53
  2. Setting up a secure socket connection
    By esu78 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-02-03, 14:23
  3. problem with secure connection
    By wadim in forum OMA DM/DS/CP
    Replies: 2
    Last Post: 2003-12-24, 00:53
  4. Error Message: Connect to unknown server using secure connection.
    By WhileTrue in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2003-06-08, 09:34
  5. Can't make secure connection using WTLS
    By BGarfield in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2002-08-15, 14:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved