How to set Pre-Filter for my MC3300?

// Expert user has replied.
r roberto cottone 3 years 8 months ago
122 1 0

This is my current config for RFID :
---------------------------------------------
// set trigger mode as rfid so scanner beam will not come
reader.Config.setTriggerMode(ENUM_TRIGGER_MODE.RFID_MODE, true);
// set start and stop triggers
reader.Config.setStartTrigger(triggerInfo.StartTrigger);
reader.Config.setStopTrigger(triggerInfo.StopTrigger);
// power levels are index based so maximum power supported get the last one
// general
MAX_POWER = reader.ReaderCapabilities.getTransmitPowerLevelValues().length - 1;
// set antenna configurations
Antennas.AntennaRfConfig config = reader.Config.Antennas.getAntennaRfConfig(1);
config.setTransmitPowerIndex(MAX_POWER);
config.setrfModeTableIndex(0);
config.setTari(0);
reader.Config.Antennas.setAntennaRfConfig(1, config);
// Set the singulation control
Antennas.SingulationControl s1_singulationControl = reader.Config.Antennas.getSingulationControl(1);
s1_singulationControl.setSession(SESSION.SESSION_S0);
s1_singulationControl.Action.setInventoryState(INVENTORY_STATE.INVENTORY_STATE_A);
s1_singulationControl.Action.setSLFlag(SL_FLAG.SL_ALL);
reader.Config.Antennas.setSingulationControl(1, s1_singulationControl);
// delete any prefilters
reader.Actions.PreFilters.deleteAll();
------------------------------------------------------
With above config, my reader is scan tag successfully.
Now I want to set pre-filter to scan only tag (GRAI96) which start with "E2801160600002", others are reject by machine.
--------------------------------------
I've tried using this code :
String tag = "E2801160600002";
// Add state aware pre-filter
PreFilters filters = new PreFilters();
PreFilters.PreFilter filter = filters.new PreFilter();
filter.setAntennaID((short) 1);// Set this filter for Antenna ID 1
// hex value tag
filter.setTagPattern(tag);// Tags which starts with passed pattern
filter.setTagPatternBitCount(tag.length() * 4);
filter.setBitOffset(32); // skip PC bits (always it should be in bit length)
filter.setMemoryBank(MEMORY_BANK.MEMORY_BANK_EPC);
filter.setFilterAction(FILTER_ACTION.FILTER_ACTION_STATE_AWARE); // use state aware singulation
filter.StateAwareAction.setTarget(TARGET.TARGET_INVENTORIED_STATE_S0); // inventoried flag of session S1 of matching tags to B
filter.StateAwareAction.setStateAwareAction(STATE_AWARE_ACTION.STATE_AWARE_ACTION_NOT_INV_B); // NOT INV B OR NOT DSRT SL
// not to select tags that match the criteria
try {
reader.Actions.PreFilters.add(filter);
} catch (InvalidUsageException e) {
e.printStackTrace();
} catch (OperationFailureException e) {
e.printStackTrace();
}
------------------------------------------
But this seem not working, reader allow every tags. I think there's a problem in my filter config because I don't understand about filter action or state aware, etc...
So how I config pre-filter with above setting?

CONTACT
Can’t find what you’re looking for?