×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    6

    Some doubts about 6131 emulator and internal mifare 4k

    Hello

    I am working with 6131-s emulator and I feel a bit confused about it.

    (I'm using NFC SDK 1.1).


    1. Running MFStandardExampleMidlet example I increment the counter but the changes don`t persist between emulator executions. Always start the counter from 2.

    2. Based on the example that comes in programmers guide (page 14), I did a midlet that writes some data in the internal mifare 4k. The midlet runs aparently without any problems , but the data writed doesn`t persist in the internal mifare, subsequent reads returns null. The code is the same of the example.

    3. The Emulator has an icon that represents the internal mifare 4k, if you click that icon with the right button, some options appear giving you the chance to change the internal mifare settings. If you click in the "edit card" option you can change the data path.

    I suppose that file is used to read the internal mifare startup configuration and to persist user changes. Ok . Following these suppositions, I made some samples that obtain a sector and writes some bytes in a data block . The changes made are not saved in the file that "data path" points to.



    Looks like the emulator ignores that file. I can't see changes made by an user, editing the file with notepad.



    Code:

    String internalUrl = System.getProperty("internal.mf.url");
    conn = (MFStandardConnection) Connector.open(internalUrl);
    screen.append("Connected to internal tag.\n");

    if (conn==null){
    return;
    }

    screen.append("Nº Bloques del mifare "+conn.getBlockCount()+"\n");
    screen.append("Nº Sectores del mifare "+conn.getSectorCount()+"\n");

    byte [] k = { (byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff,(byte)0xff };

    byte [] data = {(byte)0x1, (byte)0x2, (byte)0x3};

    MFKey.KeyA key=new MFKey.KeyA(k);
    MFSector sector=conn.getSector(10);
    MFBlock bloque=sector.getBlock(0);
    bloque.write(key,data,0);

    conn.close();




    I Need some help with those questions . Thanks in advance.

    (Sorry for my english)

  2. #2
    Regular Contributor
    Join Date
    Mar 2007
    Location
    Helsinki, Finland
    Posts
    91

    Re: Some doubts about 6131 emulator and internal mifare 4k

    In order to save your data on the simulated internal 4k tag after closing the emulator, you have to use the "Save" option available when you right-click on the tag.

    You might have done that already (I am not sure) and you are anyway right about some of the issues you described - the data is not saved on the tag all the time. We have logged this as an issue with the current version and it will be fixed for future releases of the SDK.

    However, I have done some tests and I noticed that if you use the "Save" option (by right-clicking on the tag) after you exit your MIDlet (and while emulator is still running) the data is saved almost every time and you are able to use it again after closing and re-opening the emulator.

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

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    6

    Re: Some doubts about 6131 emulator and internal mifare 4k

    Yes, I tried saving data as you said, but it did not save any info. Probably I did not the save in the order you say (i do not remember well). I will try.

    Anyway, thank you very much for the answer. I'll waiting for the next versión of sdk with impatience... :-)

  4. #4
    Registered User
    Join Date
    Sep 2005
    Posts
    21

    Re: Some doubts about 6131 emulator and internal mifare 4k

    Hi,

    Could you please post the full code for writing/reading datas into the internal Mifare of Nokia 6131.

    Did you happen to check the same on the real device(Nokia 6131)?

Posting Permissions

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