Overview
This page covers the Impinj Gen2X features available through the SDK: Protected Mode, Unprotected Mode, Enable Visibility, Disable Visibility, Tag Focus, Tag Quieting and Fast ID. These features require Impinj Gen2X tags and Gen2X-enabled Zebra RFID Readers.
Protected Mode
Protected mode is a feature that renders a tag invisible to an RFID reader unless the reader first provides the correct 32-bit PIN/Password. By default, the password is set to 0. Users can set the password using a tag write operation and retrieve it with a tag read operation.
This method attempts to place a specified RFID tag into its protected mode. In this mode, the tag will not be visible to a reader.
- (SRFID_RESULT)protectTag:(NSString*)tagID withTagData:(srfidTagData **)tagData withPassword:(NSString*)password aStatusMessage:(NSString**)statusMessage
{
if (apiInstance != nil)
{
return [apiInstance enableTagProtection:readerID tagID:tagID tagData:tagData password:password statusMessage:statusMessage];
}
return SRFID_RESULT_FAILURE;
}
Unprotected Mode
This method takes a specified RFID tag out of its protected mode, so that the tag is visible to a reader again. Provide the password that is set on the tag.
- (SRFID_RESULT)unprotectTag:(NSString*)tagID withTagData:(srfidTagData **)tagData withPassword:(NSString*)password aStatusMessage:(NSString**)statusMessage
{
if (apiInstance != nil)
{
return [apiInstance disableTagProtection:readerID tagID:tagID tagData:tagData password:password statusMessage:statusMessage];
}
return SRFID_RESULT_FAILURE;
}
Enable Visibility
Makes tags in protected mode visible to the reader. The method sets a pre-filter that contains the tag password, so that an inventory includes the protected tags that use this password.
- (SRFID_RESULT)enableVisibilityTag:(NSString*)password aStatusMessage:(NSString**)statusMessage
{
if (apiInstance != nil)
{
return [apiInstance enableTagVisibility:readerID password:password statusMessage:statusMessage];
}
return SRFID_RESULT_FAILURE;
}
Disable Visibility
Makes protected tags invisible to the reader again. The method clears the pre-filters of the reader, including the one that Enable Visibility set.
- (SRFID_RESULT)disableVisibilityTag:(NSString*)password aStatusMessage:(NSString**)statusMessage
{
if (apiInstance != nil)
{
return [apiInstance disableTagVisibility:readerID aPassword:password statusMessage:statusMessage];
}
return SRFID_RESULT_FAILURE;
}
Tag Focus
TagFocus allows readers to silence already-inventoried tags to reduce redundant reads, allowing a reader to focus on weak tags that are typically the last to be found. Set the boolean value to true to enable tag focus mode and false to disable it. Tag focus mode targets tags inventoried in SESSION S1.
- (SRFID_RESULT)enableTagFocus:(BOOL)enableTagFocus aStatusMessage:(NSString**)statusMessage {
if (apiInstance != nil)
{
return [apiInstance setTagFocus:readerID enable:enableTagFocus statusMessage:statusMessage];
}
return SRFID_RESULT_FAILURE;
}
Set the below singulation settings before running inventory when tag focus is enabled
Set Singulation for Tag Focus
-(void)setSingulationForTagFocus {
SRFID_SLFLAG sl_flag = SRFID_SLFLAG_ALL;
SRFID_SESSION session = SRFID_SESSION_S1;
SRFID_INVENTORYSTATE inv_state = SRFID_INVENTORYSTATE_A;
srfidSingulationConfig *config = [[srfidSingulationConfig alloc] init];
[config setSlFlag:sl_flag];
[config setSession:session];
[config setTagPopulation:200];
[config setInventoryState:inv_state];
NSString *response = @"";
SRFID_RESULT resultSingulation = [self setSingulationConfigurationTagFocus:config status:&response];
if (resultSingulation == SRFID_RESULT_SUCCESS)
{
NSLog(@"SRFID_RESULT_SUCCESS");
}else{
NSLog(@"SRFID_RESULT_Fail");
}
}
Set Singulation Configuration for Tag Focus
The setSingulationConfigurationTagFocus:status: method applies a singulation configuration and tries again once if the request times out or fails.
- (SRFID_RESULT)setSingulationConfigurationTagFocus: (srfidSingulationConfig*)singulationConfiguration status:(NSString **)statusMessage
{
SRFID_RESULT srfid_result = SRFID_RESULT_FAILURE;
for(int i = 0; i < 2; i++)
{
srfid_result = [apiInstance srfidSetSingulationConfiguration:readerID aSingulationConfig:singulationConfiguration aStatusMessage:statusMessage];
if ((srfid_result != SRFID_RESULT_RESPONSE_TIMEOUT) && (srfid_result != SRFID_RESULT_FAILURE)) {
break;
}
}
return srfid_result;
}
Tag Quieting
Tag quieting allows readers to silence already-inventoried tag subpopulations and thereby declutter complex enterprise tag environments. This technique is particularly suitable for applications that require reading the same tag multiple times as quickly as possible without the overhead of reading extraneous tags.
Tag quiet mask enums that are supported are:
typedef NS_ENUM(NSInteger, SRFID_ENUM_TAGQUIET_MASK) {
ENUM_TAGQUIET_MASK_S0B,
ENUM_TAGQUIET_MASK_S2B,
ENUM_TAGQUIET_MASK_S3B,
ENUM_TAGQUIET_MASK_SL_ASSERT,
ENUM_TAGQUIET_MASK_S0A,
ENUM_TAGQUIET_MASK_S2A,
ENUM_TAGQUIET_MASK_S3A,
ENUM_TAGQUIET_MASK_SL_DEASSERT,
ENUM_TAGQUIET_MASK_UNKNOWN
};
The user can provide up to three valid combinations. A valid combination cannot contain two enums that use the same session.
NSMutableArray<NSNumber *> *tagQuietMaskArrayType1 = [NSMutableArray array];
[tagQuietMaskArrayType1 addObject:@(ENUM_TAGQUIET_MASK_S0B)];
[tagQuietMaskArrayType1 addObject:@(ENUM_TAGQUIET_MASK_S2B)];
[tagQuietMaskArrayType1 addObject:@(ENUM_TAGQUIET_MASK_S3B)];
NSMutableArray<NSNumber *> *tagQuietMaskArrayType2 = [NSMutableArray array];
[tagQuietMaskArrayType2 addObject:@(ENUM_TAGQUIET_MASK_S2B)];
[tagQuietMaskArrayType2 addObject:@(ENUM_TAGQUIET_MASK_SL_ASSERT)];
NSMutableArray<NSNumber *> *tagQuietMaskArrayType3 = [NSMutableArray array];
[tagQuietMaskArrayType3 addObject:@(ENUM_TAGQUIET_MASK_S2B)];
[tagQuietMaskArrayType3 addObject:@(ENUM_TAGQUIET_MASK_S3B)];
Enable Tag Quiet
-(SRFID_RESULT)enableTagQuiet:(BOOL)status message:(NSString**)statusMessage {
if (apiInstance != nil)
{
NSMutableArray<NSNumber *> *tagQuietMaskArray = [NSMutableArray array];
[tagQuietMaskArray addObject:@(ENUM_TAGQUIET_MASK_S3B)];
SRFID_RESULT resultTagQuiet = SRFID_RESULT_FAILURE;
if (status){
resultTagQuiet = [apiInstance setTagQuiet:readerID masks:tagQuietMaskArray enumTarget:SRFID_SELECTTARGET_SL action:SRFID_SELECTACTION_INV_A__OR__ASRT_SL statusMessage:statusMessage];
srfidSingulationConfig *singulationConfig = [[srfidSingulationConfig alloc] init];
SRFID_SLFLAG sl_flag = SRFID_SLFLAG_DEASSERTED;
SRFID_SESSION session = SRFID_SESSION_S2;
SRFID_INVENTORYSTATE inv_state = SRFID_INVENTORYSTATE_AB_FLIP;
[singulationConfig setSlFlag:sl_flag];
[singulationConfig setSession:session];
[singulationConfig setInventoryState:inv_state];
NSString *response2 = @"";
SRFID_RESULT resultSingulation = [self setSingulationConfigurationTagFocus:singulationConfig status:&response2];
if (resultSingulation == SRFID_RESULT_SUCCESS)
{
NSLog(@"SRFID_RESULT_SUCCESS SingulationConfig");
}else{
NSLog(@"SRFID_RESULT_Fail SingulationConfig");
}
}
else
{
resultTagQuiet = [apiInstance setTagQuiet:readerID masks:tagQuietMaskArray enumTarget:SRFID_SELECTTARGET_SL action:SRFID_SELECTACTION_INV_B__OR__DSRT_SL statusMessage:statusMessage];
}
return resultTagQuiet;
}
return SRFID_RESULT_FAILURE;
}
Fast ID
FastID enables the impinj tags to backscatter their EPC and TID in a single response for inventory.
- (SRFID_RESULT) configureFastID:(BOOL)enableFastID status:(NSString **)statusMessage{
if (apiInstance != nil)
{
return [apiInstance setFastID:readerID enable:enableFastID statusMessage:statusMessage];
}
return SRFID_RESULT_FAILURE;
}