cancel
Showing results for 
Search instead for 
Did you mean: 

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

SammyTheHand
Associate

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

1 ACCEPTED SOLUTION

Accepted Solutions
Damien G.
ST Employee

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

View solution in original post

2 REPLIES 2
Damien G.
ST Employee

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

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!