2018-05-07 11:26 PM
st25ru3993 the program demo
void gen2Select(gen2SelectParams_t *p)
{ buf_[i] |= ((p->truncation<<3)&0x08); /* Truncate */}
how to use p->truncation,i do not known its meaning.
Solved! Go to Solution.
2018-06-04 12:43 AM
The truncation is implemented based on Gen2 standard, from Gen2 2.0.1 protocol standard document, 6.3.2.12.1.1 (Description of mandatory Select command):
[...]Truncate indicates whether a Tag’s backscattered reply shall be truncated to those EPC bits that follow
Mask. If an Interrogator asserts Truncate, and if a subsequent Query specifies Sel=10 or Sel=11, then a
matching Tag shall truncate its ACK reply to the portion of the EPC immediately following Mask, followed
by a PacketCRC[...]
In other words it is used to reduce the payload size of the tag reply by masking part of its EPC ID.
In our firmware the truncation parameter for select is set via a GUI command:
In selectTag(),
appl_commands.c
:
selParams[idx].truncation = cmdBuffer.rxData[7];
In the current GUI there is no control to set the truncation, but the functionality behind is done.
An example setting of truncation could be done e.g. by adding the following
line
to the code:In STReader::selectTag(),
STReader.cpp
:
TagSelect selCmd(TagSelect::Clear_and_add);
selCmd.setTarget(m_Session);
selCmd.setAction(m_Action);
selCmd.setAddr(m_Addr);
selCmd.setTruncation(1);
2018-06-04 12:43 AM
The truncation is implemented based on Gen2 standard, from Gen2 2.0.1 protocol standard document, 6.3.2.12.1.1 (Description of mandatory Select command):
[...]Truncate indicates whether a Tag’s backscattered reply shall be truncated to those EPC bits that follow
Mask. If an Interrogator asserts Truncate, and if a subsequent Query specifies Sel=10 or Sel=11, then a
matching Tag shall truncate its ACK reply to the portion of the EPC immediately following Mask, followed
by a PacketCRC[...]
In other words it is used to reduce the payload size of the tag reply by masking part of its EPC ID.
In our firmware the truncation parameter for select is set via a GUI command:
In selectTag(),
appl_commands.c
:
selParams[idx].truncation = cmdBuffer.rxData[7];
In the current GUI there is no control to set the truncation, but the functionality behind is done.
An example setting of truncation could be done e.g. by adding the following
line
to the code:In STReader::selectTag(),
STReader.cpp
:
TagSelect selCmd(TagSelect::Clear_and_add);
selCmd.setTarget(m_Session);
selCmd.setAction(m_Action);
selCmd.setAddr(m_Addr);
selCmd.setTruncation(1);