Configuration Security Session via RF not working
I am working with the ST25DV tags. I have generated a capability container, TLV Header and Terminator and construct a well-formed NDEF message with 5 records. I am able to read/write single/multiple blocks and perform most actions that i need in interacting or editing the NDEF records themselves.
I am now trying to split the user memory into different sections so that I can lock down RF write of the first 3 records and leave the last 2 records open for both RF read/write.
I am currently testing on Android and attempting to open a configuration security session. I am using the react-native-nfc-manager to help me handle some of the lower level aspects of working with these tags.
Here is a simplified version of my function:
async function openSecuritySessionAndroid() {
if (promptRef.current) {
await NfcManager.cancelTechnologyRequest();
await sleep(100);
promptRef.current.show('Ready to Scan');
await NfcManager.requestTechnology([NfcTech.NfcV]);
}
try {
const iso15693Handler = NfcManager.nfcVHandler;
const flags = 0x02;
const commandCode = 0x26;
// Send the Reset to Ready command
const response = await iso15693Handler.transceive([flags, commandCode]);
console.log('Reset to Ready Response:', response);
} catch (error) {
console.warn('Error resetting tag to ready:', error);
}
try {
const flags = 0x02;
const commandCode = 0xb3;
const passwordNumber = 0x00;
const rfPassword0 = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00];
const response = await NfcManager.nfcVHandler.transceive([
flags,
commandCode,
passwordNumber,
...rfPassword0,
]);
console.log('Security Session Opened on Android:', response);
} catch (error) {
console.warn('Error opening security session on Android:', error);
}
await NfcManager.cancelTechnologyRequest();
}When I run this and scan the tag, I am getting the following error, which I understand as meaning that I have not been able to open a configuration security session.
Reset to Ready Response: [0]
LOG Security Session Opened on Android: [1, 2]I have tested with many tags that I do not think are locked in any way. When I use the NFC Tap app to look at the Area Security Status, there is 1 Area and it is read/write Not Protected. Also LockCFG is also 00h.
Greatly appreciate any help with regards to this.
