BlockErase Operations Tutorial

RFID SDK for MAUI 2.0.4.192

Applicable Devices : ALL

Overview

This Tutorial provides a walk-through of the steps to perform Block-Erase MAUI RFID SDK

Create the Project

  • Start by creating a new project in Visual Studio. For help, see the Create Project.
  • Refer Hello RFID to prepare basic setup to work with RFID Reader and then follow this guide

Details

Tag Access operations are performed on a specific tag or applied on tags that match a specific Access-Filter. If no Access-Filter is specified, the Access Operation is performed on all tags in the field of view of chosen antennas. This section covers the Simple Tag Access operation on a specific tag which is in the field of view of any of the antennas of the connected RFID reader.

Setting it up

BlockErase Access operation is to erase a block(word/bytes) form specified memory bank.

Performing BlockErase operation

BlockErase Access operation is to erase a block(word/bytes) form specified memory bank.


TagData tagData = new TagData();
String tagId = "1234ABCD00000000000025B1";
TagAccess.BlockEraseAccessParams blockEraseAccessParams = new
    TagAccess.BlockEraseAccessParams(tagAccess);
blockEraseAccessParams.AccessPassword=0;
blockEraseAccessParams.MemoryBank=(MEMORY_BANK.MemoryBankUser); // user memory bank
blockEraseAccessParams.Offset=0; // start erasing from word offset 0
blockEraseAccessParams.Count=8; // number of words to erase
MConnectedReader.Actions.TagAccess.BlockEraseWait(tagId, blockEraseAccessParams,null, tagData);
                                                                                                                            

Grab the results

blockEraseWait returns result in TagData


Log.d(TAG, " Data Masked " + tagData.getMemoryBankData());

Closer look

  • tagData.OpStatus returns success or error code as ACCESS_OPERATION_STATUS
  • tagData.OpCode provides type of access operation performed

What's Next

  • Change the setCount and setOffset as per requirement
  • Use access password setAccessPassword to perform operation on protected memorybank