cancel
Showing results for 
Search instead for 
Did you mean: 

Issue read/write block after 255 (0xFF)

adria
Associate

Hi, we have a problem in our NFC app implementation in React Native. NFC card is st25dv64k-I

We use library react-native-nfc-manager to read/write single block and works good. The problem here is when we need to do it with a block greater than 255.

We think that is for the "hexadecimal limit" because 0xFF = 255 but 0x100 = 256 and we read/write in a different block that you want. Operation works good but return a bad block info.

We test it with ST25 tap NFC app and works good, writing in the 256 block and after that, with our app, read 30 blocks starting from 255 block and we get correct 256 block output.

We are using this operations:

- Single read: NfcManager.transceive([0x20, 0x23, ...nfcUid, 255]);

- Multiple read: NfcManager.transceive([0x20, 0x23, ...nfcUid, 255, 0x30]);

const newBlockData = [0,0,0,0,1]

- Single write:  NfcManager.transceive([0x20, 0x21, ...nfcUid, 255,...newBlockData])

Our goal is to write in block 305 byte 0 value 1.

Thank you very much

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions

Hi adria,

 

all docs of these commands can be found in the datasheets of ST25DV/TV.

BR, Ulysses

View solution in original post

3 REPLIES 3
Ulysses HERNIOSUS
ST Employee

Hi adria,

some hints: In above example you are using 0x23 for both single read and Multiple read but command code is 0x20 for read single!

 

Besides for reading/writing higher blocks on ST25DV64K: Please check the DS, you will need to use Extended Read/Write block functions (command codes 0x30, 0x31, 0x33,...). 

BR, Ulysses

Hi Ulysses,

Yes i do read single operation with 0x20, i made a typo. Thank you.

Can you provide an example/documentation for using extended read/write block functions like 0x30, 0x31 etc? Thank you for your reply

Hi adria,

 

all docs of these commands can be found in the datasheets of ST25DV/TV.

BR, Ulysses