Skip to main content
Visitor II
August 8, 2022
Solved

How do you get the total number of blocks that can be read/written in a multi block read/write command.

  • August 8, 2022
  • 1 reply
  • 1957 views

Hi,

I'm building a mobile application that integrates with ST25DV64KC and M24LR04E-R.

  • The maximum number of blocks is fixed at 256 for a "Read Multiple Blocks" command on a ST25DV64KC chip.
  • The maximum number of blocks is fixed at 32 assuming that they are all located in the same sector for a "Read Multiple Blocks" command on a M24LR04E-R.

Is there a command that returns the maximum number of blocks that can be read at one time, or is there a way I can learn which model of chip I'm reading, so that I can read the correct amount of blocks in a "Read Multiple Blocks" command. I can see some NFC Tag applications show an IC type which displays the model but I am unsure as to how to retrieve this information myself.

Any help would be gratefully received.

Kind Regards, Sam

    This topic has been closed for replies.
    Best answer by Damien G.

    Hello Sammy,

    Take a look at the Java ST25SDK and especially the example TagDiscovery.java file located in ST25SDK\integration\android\helper.

    A usage of TagDiscovery is explained in ST25SDK\integration\android\examples\ST25AndroidDemoApp, check out the documentation in ST25SDK\ST25AndroidDemoApp_software_guide.pdf.

    Once you have instantiated the correct class for your tag based on its ICRef (done for you in TagDiscovery with the tag's UID as parameter), you can use the API for the specific class:

    • PRODUCT_ST_M24LR04E_R will instantiate a M24LR04KTag object.
    • PRODUCT_ST_ST25DV64K_I or PRODUCT_ST_ST25DV64K_J will instantiate a ST25DVTag object

    For both classes, you can then use the following API of Type5Tag class:

    int getMaxReadMultipleBlocksReturned();

    that will return the maximum number of blocks depending on the tag's IC ref.

    Best regards,

    Damien

    1 reply

    Damien G.Answer
    ST Employee
    August 9, 2022

    Hello Sammy,

    Take a look at the Java ST25SDK and especially the example TagDiscovery.java file located in ST25SDK\integration\android\helper.

    A usage of TagDiscovery is explained in ST25SDK\integration\android\examples\ST25AndroidDemoApp, check out the documentation in ST25SDK\ST25AndroidDemoApp_software_guide.pdf.

    Once you have instantiated the correct class for your tag based on its ICRef (done for you in TagDiscovery with the tag's UID as parameter), you can use the API for the specific class:

    • PRODUCT_ST_M24LR04E_R will instantiate a M24LR04KTag object.
    • PRODUCT_ST_ST25DV64K_I or PRODUCT_ST_ST25DV64K_J will instantiate a ST25DVTag object

    For both classes, you can then use the following API of Type5Tag class:

    int getMaxReadMultipleBlocksReturned();

    that will return the maximum number of blocks depending on the tag's IC ref.

    Best regards,

    Damien

    Visitor II
    August 9, 2022

    Thanks Damien.

    You certainly pointed me in the right direction.

    It looks like you are using the tags identifier which is formatted in a specific way, as I suspected.

    The main thread to follow here is in TagHelper.class with the method TagHelper.ProductID identifyTypeVProduct, or similar method names for your chosen tag type.

    Thanks for the help!