Skip to main content
Visitor II
May 2, 2022
Solved

Cannot read after Gen2 Select with ST25RU3993

  • May 2, 2022
  • 1 reply
  • 833 views

Hi ST,

We are currently adapting ST code into a Linux device driver and we have some issues with the Gen2 Select option: We are able to:

  1. Perform inventory rounds and list all the tags present in range of the antenna
  2. Read/Write EPC, TID and USER data when finding a tag and getting its handle during the inventory.
  3. Send a Select command to select only one tag by its EPC with startTagConnection function.

After selecting the tag, we can call gen2AccessTag

function and we are able to retrieve the tag handle 100% of time, but when trying to read data from memory banks just after that, we succeed only 5% of time (95% of time we get a ERR -33 (chip no response), or a ERR -35 (err chip preamble)).

More details about the code:

For each tag we want to select, we set the selParams

global variable accordingly:

selParams[0].mode = STUHFL_D_GEN2_SELECT_MODE_CLEAR_AND_ADD;
selParams[0].target = STUHFL_D_GEN2_TARGET_SL;
selParams[0].action = 0;
selParams[0].memoryBank = STUHFL_D_GEN2_MEMORY_BANK_EPC;
memcpy(selParams[0].mask, tag->epc.data, tag_size);
selParams[0].maskBitPointer = 32; // CRC + PC = 32 bits, EPC starts at 33rd, so index 32
selParams[0].maskBitLength = 8 * tag_size;
selParams[0].truncation = 0;
numSelects = 1;

Then, we follow the commands done in ST Gen2_Read

function:

  • Call startTagConnection to send the Select command and retrieve the only tag that answers;
  • Call gen2AccessTag to bring the tag to the Secured state if needed;
  • Call gen2ReadFromTag to read data, the same way we are able to read during inventory rounds (cf. case n°2 of what we are currently able to do).

Can you guide us towards a solution ?

Thanks,

Thomas

    This topic has been closed for replies.
    Best answer by TCrav.1

    Hello ST,

    I found my problem, I was doing a single inventory round after Selection, but the Q value was too high. Since I wanted to select only one tag each time, I put Q to 0 and it works like a charm!

    Regards,

    Thomas

    1 reply

    TCrav.1AuthorAnswer
    Visitor II
    May 6, 2022

    Hello ST,

    I found my problem, I was doing a single inventory round after Selection, but the Q value was too high. Since I wanted to select only one tag each time, I put Q to 0 and it works like a charm!

    Regards,

    Thomas