Overview
This Tutorial provides a walk-through of the steps to perform Singulation configuration using RFID API3
Create The Project
- Start by creating a new project in Android Studio. For help, see the Android Studio tutorial.
- Refer Hello RFID to prepare basic setup to work with RFID Reader and then follow this guide
Details
Singulation refers to the method of identifying an individual Tag in a multiple-Tag environment. RFID readers could support State-Aware or State-Unaware pre-filtering (or singulation) which is indicated by the boolean flag IsTagInventoryStateAwareSingulationSupported in the ReaderCapabilities class. In order to filter tags that match a specific condition, it is necessary to use the tag-sessions and their states (setting the tags to different states based on match criteria - reader.Actions.PreFilters.add) so that while performing inventory, tags can be instructed to participate (singulation - reader.Config.Antennas.setSingulationControl) or not participate in the inventory based on their states.
Sessions and Inventoried Flags
Tags provide four sessions (denoted S0, S1, S2, and S3) and maintain an independent inventoried flag for each session. Each of the four inventoried flags has two values, denoted A and B. These inventoried flag of each session can be set to A or B based on match criteria using method
Setting it up
The function getSingulationControl retrieves the current settings of the singulation control from the reader for the given Antenna ID. To set the singulation control settings, the setSingulationControl method is used. The following settings can be configured:
- Session: Session number to use for inventory operation.
- Tag Population: An estimate of the tag population in view of the RF field of the antenna.
- Tag Transit Time: An estimate of the time a tag typically remains in the RF field.
- State Aware Singulation Action: The action includes the Inventory state and SL flag. The action can be used if only the reader supports this capability.
// Get Singulation Control for the antenna 1
Antennas.SingulationControl singulationControl;
singulationControl = reader.Config.Antennas.getSingulationControl(1);
// Set Singulation Control for the antenna 1
Antennas.SingulationControl singulationControl;
singulationControl.setSession(SESSION.SESSION_S0);
singulationControl.setTagPopulation((short) 30);
singulationControl.Action.setSLFlag(SL_FLAG.SL_ALL);
singulationControl.Action.setInventoryState(INVENTORY_STATE.INVENTORY_STATE_A);
reader.Config.Antennas.setSingulationControl(1, singulationControl);
Closer look
- Singulation is essential part in selecting specific tag or group of tags
setSession
andsetInventoryState
requires to be matching with Pre-filter settings to get required results
What's Next
- Use
setSession
to check behaviour under different session configuration - Use
setInventoryState
to check behaviour under different inventory state flag