andy_roddam
andy_roddam

Reputation: 461

ISO15693 customCommands & password protection not working

I have been trying to set password protection for the ICODE SLIX.

The data set here at dataset.

I am using the NfcManager.iso15693HandlerIOS.customCommand() as I am currently developing on IOS.

The react-native-nfc-manager has been fantastic to work with type 2 tags. But really running into problems on setting password protection for the type 5 tags.

As i understand it, I need to follow the following steps to add password protection to ISO15693 tags.

Generate random number Set password Write password Lock password Enable password protection Here is an example of a command that I am using just to generate a random number.

try {
    const tag = await NfcManager.getTag();
    const icMfgCode = 0x04; // Assuming NXP's manufacturer code
    const uidBytes = tag?.id.match(/.{1,2}/g).map(byte => parseInt(byte, 16));
    const response = await NfcManager.iso15693HandlerIOS.customCommand({
      flags: 0x02,
      commandCode: 0xb2,
      data: [icMfgCode, ...uidBytes],
    });

    console.log('response for random number:', response);
  } catch (error) {
    console.error('Failed to get random password:', error);
  } finally {
    NfcManager.cancelTechnologyRequest().catch(err => console.error(err));
  }

Request Format

This is the structure for the command as defined by the product data sheet.

Upvotes: 0

Views: 161

Answers (0)

Related Questions