public class RFIDManager
extends java.lang.Object
new keyword, use static method
getInstance to get (or create new) instance
of this class.| Constructor and Description |
|---|
RFIDManager()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
BlockErase(int length,
int membank,
int offset,
java.lang.String password,
int blockMode)
Commands tag(s) to erase (zero-fill) several blocks in memory bank.
|
int |
BlockWrite(int length,
int membank,
int offset,
java.lang.String writeData,
java.lang.String password,
int blockMode)
Commands tag(s) to write several blocks in memory bank.
|
int |
ClearAllSearchList()
Clears all list items used by
RFIDManager.MultiSearch(). |
int |
ClearSearchList(int index,
int cnt)
Clears a series of list items used by
RFIDManager.MultiSearch(). |
void |
Close()
Closes current interface of the RFID reader.
|
void |
ConnectBTDevice(java.lang.String macAddress,
java.lang.String deviceName)
Connects to the RFID reader in the Bluetooth mode.
|
void |
DisconnectBTDevice()
Disconnects from the RFID reader in the Bluetooth mode.
|
java.lang.String |
GetAllChannel()
Queries a list of enabled channels.
|
int |
GetAntSelect(AntSelect antSelect)
Queries a configuration for multiple antennas (UART only).
|
java.lang.String |
GetAvailableRegion()
Queries a set of available regions (UART only).
|
int |
GetBatteryState()
Queries the performance state of battery in RFID reader.
|
int |
GetBattLevel()
Queries current battery level of RFID reader.
|
java.lang.String |
GetBtDevice()
Gets the name of the connected RFID reader (Bluetooth only).
|
java.lang.String |
GetBtMacAddr()
Gets the MAC address of the connected RFID reader (Bluetooth only).
|
int |
GetBuzzerVol()
Gets the buzzer volume of RFID reader.
|
int |
GetChannelState(ChannelState channelState)
Queries availability of a channel.
|
int |
GetChargingState()
Queries whether the battery of RFID reader is charging.
|
void |
GetCustomIntentConfig(CustomIntentConfig customIntentConfig)
Queries a configuration for custom intent.
|
int |
GetDataFormat()
Queries tag ID format followed by
RFIDManager.StartInventory() or tag
accessing commands. |
int |
GetFastID()
Queries FastID™ feature setting of RFID reader.
|
java.lang.String |
GetFwVersion()
Gets the firmware version of RFID reader.
|
static RFIDManager |
getInstance()
Returns (or creates) a singleton instance of RFID Manager.
|
int |
GetInventoryParam(ParamOfInvent paramOfInvent)
Queries parameters used by
RFIDManager.StartInventory(). |
int |
GetInventoryReportFormat_ext(ReportFormatOfInvent_ext reportFormatOfInvent_ext)
Queries the extension report format of RFID inventory (UART only).
|
int |
GetInventoryReportFormat(ReportFormatOfInvent reportFormatOfInvent)
Queries the report format of RFID inventory.
|
int |
GetLinkProfile()
Queries the RF transceiver link profile of RFID reader.
|
int |
GetMaxPower()
Queries the Max. Tx power supported by RFID reader.
|
int |
GetOperationMode(ModeOfInvent moi)
Queries the inventory settings of RFID reader.
|
java.lang.String |
GetPrefix()
Queries a prefix string.
|
int |
GetResultType()
Queries current result notification type.
|
int |
GetSearchList_ext(int index)
Queries an item in the tag list used by
RFIDManager.MultiSearch(). |
int |
GetSearchList()
Queries an entire list of tags used by
RFIDManager.MultiSearch(). |
int |
GetSelMask(SelConfig selConfig)
Queries tag selection filter.
|
java.lang.String |
GetSuffix()
Queries a suffix string.
|
int |
GetTagFocus()
Queries TagFocus™ feature setting of RFID reader.
|
int |
GetTerminatorType()
Queries current type of the terminator.
|
int |
GetTimer()
Gets the internal timer value of RFID reader.
|
int |
GetTxCycle(TxCycle txCycle)
Queries Tx ON and OFF durations.
|
int |
GetTxDataFormat()
Queries the report format followed by a
RFIDManager.StartInventory() command. |
int |
GetTxPower()
Queries current Tx power modifier value of RFID reader.
|
int |
GetVibState()
Queries the vibration setting value of RFID reader.
|
boolean |
IsOpened()
Queries whether the RFID reader is opened.
|
int |
KillTag(java.lang.String killPwd)
Command RFID reader to kill (disable permanently) tag.
|
int |
LockTag(int lockMask,
int lockEnable,
java.lang.String ACS_PWD)
Command RFID reader to lock or unlock memory in tag.
|
int |
MultiSearch()
Commands RFID reader to search tags constrained by list of tag IDs.
|
int |
Open(int openDevice)
Opens an interface of the RFID reader. (should be called explicitly before using any other RFID APIs).
|
int |
PermaLockTag(int lockMask,
int lockEnable,
java.lang.String ACS_PWD)
Command RFID reader to lock or unlock memory in tag permanently.
|
int |
ReadTag(int length,
int membank,
int offset,
java.lang.String ACS_PWD)
Command RFID reader to read memory of tag.
|
boolean |
RegisterRFIDCallback(RFIDCallback callback)
Registers a callback handler to be invoked when RFID reader state is changed.
|
int |
SetAntSelect(AntSelect antSelect)
Modifies a configuration for multiple antennas (UART only).
|
int |
SetBuzzerVol(int volume)
This function sets the buzzer volume of RFID reader.
|
int |
SetChannelState(ChannelState channelState)
Enables (or disables) a channel.
|
void |
SetCustomIntentConfig(CustomIntentConfig customIntentConfig)
Modifies a configuration for custom intent.
|
int |
SetDataCase(int datacase)
Modifies the letter case format when reading data from RFID tag.
|
int |
SetDataFormat(int index)
Modifies tag ID format followed by
RFIDManager.StartInventory() or tag
accessing commands. |
int |
SetDefaultConfig()
Initializes the RFID reader to the default configuration.
|
int |
SetDeviceBaudrate(int baudrate)
Modifies the baud rate for UART connection (UART only).
|
int |
SetFastID(int enable)
Enables or disables FastID™ feature of RFID reader.
|
int |
SetInventoryParam(ParamOfInvent paramOfInvent)
Modifies parameters used by
RFIDManager.StartInventory(). |
int |
SetInventoryReportFormat_ext(ReportFormatOfInvent_ext reportFormatOfInvent_ext)
Modifies the extension report format of RFID inventory (UART only).
|
int |
SetInventoryReportFormat(ReportFormatOfInvent reportFormatOfInvent)
Modifies the report format of RFID inventory
|
int |
SetLinkProfile(int profile)
Modifies the RF transceiver link profile of RFID reader.
|
int |
SetOperationMode(ModeOfInvent moi)
Modifies the inventory settings of RFID reader.
|
int |
SetPrefix(java.lang.String prefix)
Modifies a prefix string.
|
int |
SetRegion(java.lang.String region)
Modifies region setting for a device (UART only).
|
void |
SetResultType(int resultType)
Modifies the result notification type.
|
int |
SetSearchList(int index,
int length,
java.lang.String tagId)
Modifies a list of tags-of-interest used by
RFIDManager.MultiSearch(). |
int |
SetSelMask(SelConfig selConfig)
Commands tags to mark themselves "selected" according to filter.
|
int |
SetSuffix(java.lang.String suffix)
Modifies a suffix string.
|
int |
SetTagFocus(int enable)
Enables or disables TagFocus™ feature of RFID reader.
|
void |
SetTerminatorType(int teminatorType)
Modifies type of the terminator.
|
int |
SetTimer(int time)
Sets the internal timer value of RFID reader.
|
int |
SetTriggerMode(int mode)
Modifies the trigger mode.
|
int |
SetTxCycle(TxCycle txCycle)
Modifies Tx ON and OFF durations.
|
int |
SetTxDataFormat(int index)
Modifies the report format followed by a
RFIDManager.StartInventory() command. |
int |
SetTxPower(int pwr)
Modifies Tx power modifier value of RFID reader.
|
int |
SetVibState(int on)
Modifies the vibration setting value of RFID reader.
|
int |
SingleSearch(int length,
java.lang.String tagId,
int threshold,
int step)
Commands RFID reader to search a tag constrained by tag ID.
|
int |
StartInventory()
Command RFID reader to starts inventory tagging.
|
int |
Stop()
Command RFID reader to stop ongoing command.
|
boolean |
UnregisterRFIDCallback(RFIDCallback callback)
Unregisters a callback handler that was registered.
|
int |
UpdateFirmware(java.io.File fwFile)
Updates firmware for RFID reader (UART only).
|
int |
WildcardSearch(int length,
java.lang.String tagId)
Commands RFID reader to search tags constrained by wildcards
('*' or '?') patterns.
|
int |
WriteTag(int length,
int membank,
int offset,
java.lang.String ACS_PWD,
java.lang.String writeData)
Command RFID reader to write memory of tag.
|
public RFIDManager()
new keyword,
use the static method getInstance to get instance
of this class.getInstance(void)public static RFIDManager getInstance()
new keyword, use this method to get
instance of this class.public boolean RegisterRFIDCallback(RFIDCallback callback)
callback - The handler class which implements callback methods defined by RFIDCallback.true if registration is successful;
false otherwisepublic boolean UnregisterRFIDCallback(RFIDCallback callback)
callback - The handler class which implements callback methods
defined by RFIDCallback.true if unregistration is successful;
false otherwisepublic void ConnectBTDevice(java.lang.String macAddress,
java.lang.String deviceName)
macAddress
and deviceName) via Bluetooth.
To check whether the connection is finished in success or not,
register a handler which implements call back method
RFIDCallback.onNotifyChangedState(int) beforehand.
For successful connection, the state will be given as
device.common.rfid.RFIDConst.DeviceState.BT_CONNECTED.
Otherwise, the state device.common.rfid.RFIDConst.DeviceState.BT_CONNECT_FAILED will be given.
Warning: Calling this method closes Bluetooth connection
(currently establishing and already established).macAddress - the hardware address of the RFID reader to connect todeviceName - the device name of the RFID reader to connect topublic void DisconnectBTDevice()
public int Open(int openDevice)
RFIDManager.Close() and close any current (existing) interface
before opening a new interface.
For Bluetooth type RFID reader:RFIDManager.ConnectBTDevice(java.lang.String, java.lang.String)
and make sure the connection is successfully established.openDevice - the device type to connect.RFIDConst.DeviceType.DEVICE_BT
for Bluetooth connection.device.commond.rfid.RFIDConst.DeviceType#DEVICE_USB
for USB connection.RFIDConst.DeviceType.DEVICE_UART
for UART connection.RFIDConst.CommandErr.SUCCESS
for success in opening interface;
RFIDConst.CommandErr.OPEN_FAILED
otherwise.RFIDManager.IsOpened()public void Close()
public boolean IsOpened()
RFIDManager.Open(int)public java.lang.String GetBtDevice()
RFIDManager.GetBtDevice()public java.lang.String GetBtMacAddr()
RFIDManager.GetBtMacAddr()public int SetDefaultConfig()
| Parameter | Default value |
|---|---|
| Beep Volume | Max (2) |
| Vibrator | Disable (0) |
| Report State | Trigger / Low Battery |
| Report Battery | Disable |
| TX Cycle | On: 60ms, Off: 140ms(30%) |
| TX Power | 0db (Max Power) |
| Session | Session_1 (1) |
| Q value | 5(32 tags) |
| Target | Target_A (0) |
| MASK | Disable |
| LINK Profile | 1 |
| FastID | Disable |
| Tag Focus | Disable |
| Data Format | PC+EPC+CRC (0) |
| Transmission Format | Data As Is (0) |
| Prefix Data | NULL (0) |
| Suffix Data | NULL (0) |
| RFID Data Case | Lower (0) |
RFIDConst.CommandErr.SUCCESS
for success in parameter configuration,
RFIDConst.CommandErr.COMM_ERR
otherwisepublic java.lang.String GetFwVersion()
public int GetTimer()
RFIDConst.CommandErr.COMM_ERR for
communication problem.RFIDManager.SetTimer(int)public int SetTimer(int time)
time - initial timer value to set. Valid range is:
0 ~ 0xFFFFFFFF (unit: msec)
RFIDConst.CommandErr.SUCCESS
for success in setting;
RFIDConst.CommandErr.COMM_ERR
otherwise.RFIDManager.GetTimer()public int GetBuzzerVol()
RFIDConst.DeviceConfig.BUZZER_HIGH
: buzzer volume is set to high.RFIDConst.DeviceConfig.BUZZER_LOW
: buzzer volume is set to low.RFIDConst.DeviceConfig.BUZZER_MUTE
: buzzer volume is set to muted.RFIDConst.CommandErr.COMM_ERR
: communication error.RFIDManager.SetBuzzerVol(int)public int SetBuzzerVol(int volume)
volume - the buzzer volume to set.RFIDConst.DeviceConfig.BUZZER_HIGHRFIDConst.DeviceConfig.BUZZER_LOWRFIDConst.DeviceConfig.BUZZER_MUTERFIDConst.CommandErr.SUCCESS
for success in setting.RFIDConst.CommandErr.COMM_ERR
for communication error.RFIDConst.CommandErr.WRONG_PARAM
for invalid argument.#GetBuzzerVol(void)public int GetBattLevel()
RFIDConst.CommandErr.COMM_ERR
if communication error.public int StartInventory()
RFIDCallback.onNotifyReceivedPacket(device.common.rfid.RecvPacket).
The report may include ID, time, and RSSI of the identified tag.
Use RFIDManager.SetInventoryReportFormat(device.common.rfid.ReportFormatOfInvent) to configure format of the report.
This method uses existing (or default) options.
To override existing (or default) options, call RFIDManager.SetOperationMode(device.common.rfid.ModeOfInvent)
before invoking this method.
Alternatively, RFIDManager.StartInventory_ext(int, int, int) not only starts inventory
tagging, but also provides several input arguments for option overriding.
For more information on the options, visit RFIDManager.SetOperationMode(device.common.rfid.ModeOfInvent).public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.SetOperationMode(device.common.rfid.ModeOfInvent),
RFIDManager.GetOperationMode(device.common.rfid.ModeOfInvent),
RFIDManager.StartInventory_ext(int, int, int)public int Stop()
public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
public int GetInventoryReportFormat(ReportFormatOfInvent reportFormatOfInvent)
reportFormatOfInvent - the container for query result.
public class ReportFormatOfInvent implements Parcelable {
public int time;
// whether the report includes internal timer value.
// 1 means enabled and 0 means disabled.
public int rssi;
// whether the report includes RSSI value.
// 1 means enabled and 0 means disabled.
}
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.SetInventoryReportFormat(device.common.rfid.ReportFormatOfInvent)public int SetInventoryReportFormat(ReportFormatOfInvent reportFormatOfInvent)
reportFormatOfInvent - defines settings on report format of inventory.
public class ReportFormatOfInvent implements Parcelable {
public int time;
// whether it include internal timer value.
// 1 means enabled and 0 means disabled.
public int rssi;
// whether it include rssi value.
// 1 means enabled and 0 means disabled.
}
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetInventoryReportFormat(device.common.rfid.ReportFormatOfInvent)public int GetSelMask(SelConfig selConfig)
RFIDManager.StartInventory_ext(int, int, int) method with select mode
(or exclusion select mode) results in responses from only tags marked
as "selected" (or doesn't marked as "selected").selConfig - the container for query result.
public class SelConfig {
public int index;
// index for the filter. Up to 8 filters can be saved.
// value is from 0 to 7.
public int length;
// length of the selectData (unit: bit).
// for example, if selectData="ABCD", then set length to 16
// (=4 bits × 4 characters).
// value is from 0 to 255, where 0 disables current filter.
public int memBank;
// a memory bank in the tag where this filter will be applied to
// 0 means RESERVED
// 1 means EPC
// 2 means TID
// 3 means USER
public int offset;
// an offset from the beginning of the memory bank where this
// filter will be applied to (unit: bit).
// value is from 0 to 255
public String selectData;
// a filter value in a string of hexadecimal digits.
// Note: common prefixes for hexadecimal notation, such as "0x",
// are not necessary.
public int target;
// a flag in a tag.
// tags receiving select command invoked by RFIDManager.SetSelMask(device.common.rfid.SelConfig)
// may modify its "inventoried" or "select" flag according to
// action parameter.
// 0, 1, 2 and 3 mean "inventoried" flag for session 0, 1, 2
// and 3, respectively
// 4 means "select" flag
// For more information, refer to section "6.3.2.12.1.1 Select"
// in EPC UHF RFID G2 Standard document, available at
// https://www.gs1.org/standards/epc-rfid/uhf-air-interface-protocol
public int action;
// a rule to modify a flag (designated by target) in tags
// value is from 0 to 7
// For more information, refer to "Table 6-30: Tag response to Action parameter"
// in EPC UHF RFID G2 Standard document, available at
// https://www.gs1.org/standards/epc-rfid/uhf-air-interface-protocol
}
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error while querying
RFIDManager.SetSelMask(device.common.rfid.SelConfig)public int SetSelMask(SelConfig selConfig)
RFIDManager.GetSelMask(device.common.rfid.SelConfig).selConfig - tag selection filter
public class SelConfig {
public int index;
index for the select list that users set.
available from 0 to 7.
public int length;
length of the data that users set(unit. bit).
available from 0 to 7. 0 means disable.
public int memBank;
memory bank of the tag with data.
0 means RESERVED bank
1 means EPC bank
2 means TID bank
3 means USER bank
public int offset;
offset of the data in the memory bank(unit. bit).
available from 0 to 255
public String selectData;
data that users set
public int target;
default 4 to use select mode
public int action;
whether include or exclude tag
0 means include single tag
1 means include multi tag
4 means exclude single tag
}
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error while querying
RFIDManager.GetSelMask(device.common.rfid.SelConfig)public int ReadTag(int length,
int membank,
int offset,
java.lang.String ACS_PWD)
RFIDManager.SetSelMask(device.common.rfid.SelConfig) is used to define
which tag (or a group of tags) is affected by this command.
To check current selection mask, use RFIDManager.GetSelMask(device.common.rfid.SelConfig).
The return value of this method does NOT contain a read result. The read result can be obtained via notifications, such as:
The read result includes content in the memory, followed by a tag ID, delimited by comma(","). For example, if data "abcd" has been read from a tag which EPC ID is "0x1234", then return format will be "abcd,e=1234". To check or modify tag ID format for read result, useRFIDManager.GetDataFormat() or RFIDManager.SetDataFormat(int).
To check and modify type of notification for read result, use
RFIDManager.GetResultType() or RFIDManager.SetResultType(int).length - the length of data that users want to read.
value is from 1 to 255 (unit: word).membank - the memory bank of the tag to read.
0 // RESERVED bank 1 // EPC bank 2 // TID bank 3 // USER bank
offset - an offset from the beginning of the memory bank.
value is from 0 to 255 (unit: word).ACS_PWD - the access password.
Both decimal or hexadecimal notation is allowed. A string starting "0x"
will be interpreted as hexadecimal number.public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.WriteTag(int, int, int, java.lang.String, java.lang.String),
RFIDManager.SetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetDataFormat(),
RFIDManager.SetDataFormat(int),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int WriteTag(int length,
int membank,
int offset,
java.lang.String ACS_PWD,
java.lang.String writeData)
RFIDManager.SetSelMask(device.common.rfid.SelConfig) is used to define
which tag (or a group of tags) is affected by this command.
To check current selection mask, use RFIDManager.GetSelMask(device.common.rfid.SelConfig).
The return value of this method does NOT contain a write result. The write result can be obtained via notifications, such as:
The write result from tag includes"e=", followed by a tag
ID from accessed tag.
e=[tag ID]To check or modify tag ID format for write result, use
RFIDManager.GetDataFormat() or RFIDManager.SetDataFormat(int).
To check and modify type of notification for write result, use
RFIDManager.GetResultType() or RFIDManager.SetResultType(int).length - the length of data that users want to write.
value is from 0 to 255 (unit: word).membank - the memory bank of the tag to write.
0 // RESERVED bank 1 // EPC bank 2 // TID bank 3 // USER bank
offset - an offset from the beginning of the memory bank.
value is from 0 to 255 (unit: word).ACS_PWD - the access password.
Both decimal or hexadecimal notation is allowed. A string starting "0x"
will be interpreted as hexadecimal number.writeData - the data to write. This value will be handled as
hexadecimal and prefix "0x" is not necessary.public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.ReadTag(int, int, int, java.lang.String),
RFIDManager.SetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetDataFormat(),
RFIDManager.SetDataFormat(int),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int KillTag(java.lang.String killPwd)
RFIDManager.SetSelMask(device.common.rfid.SelConfig) is used to define
which tag (or a group of tags) is affected by this command.
To check current selection mask, use RFIDManager.GetSelMask(device.common.rfid.SelConfig).
The return value of this method does NOT contain a kill result. The kill result can be obtained via notifications, such as:
The kill result from tag includes"e=", followed by a tag
ID from accessed tag.
e=[tag ID]To check or modify tag ID format for kill result, use
RFIDManager.GetDataFormat() or RFIDManager.SetDataFormat(int).
To check and modify type of notification for kill result, use
RFIDManager.GetResultType() or RFIDManager.SetResultType(int).killPwd - the kill password. It must not 0.public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted
RFIDManager.KillTag(java.lang.String),
RFIDManager.SetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetDataFormat(),
RFIDManager.SetDataFormat(int),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int LockTag(int lockMask,
int lockEnable,
java.lang.String ACS_PWD)
| bit location | memory location |
|---|---|
| 9 | User |
| 8 | N/A |
| 7 | TID |
| 6 | N/A |
| 5 | EPC |
| 4 | N/A |
| 3 | Access password |
| 2 | N/A |
| 1 | Kill password |
| 0 | N/A |
lockMask as 0x220,
and set lockEnable as 0x200.
Tag selection mask defined by RFIDManager.SetSelMask(device.common.rfid.SelConfig) is used to define
which tag (or a group of tags) is affected by this command.
To check current selection mask, use RFIDManager.GetSelMask(device.common.rfid.SelConfig).
The return value of this method does NOT contain a kill result. The kill result can be obtained via notifications, such as:
The kill result from tag includes"e=", followed by a tag
ID from accessed tag.
e=[tag ID]To check or modify tag ID format for kill result, use
RFIDManager.GetDataFormat() or RFIDManager.SetDataFormat(int).
To check and modify type of notification for kill result, use
RFIDManager.GetResultType() or RFIDManager.SetResultType(int).lockMask - a bit mask to mark which memory to apply lockEnable.
A memory location marked as zero bit in the mask will be ignored.
A memory location marked as non-zero bit in the mask will be processed
as lockEnable.lockEnable - a bit mask to lock or unlock.
A zero bit at the valid bit location will unlock corresponding memory location.
A non-zero bit at the valid bit location will lock corresponding memory location.ACS_PWD - the access password.
Both decimal or hexadecimal notation is allowed. A string starting "0x"
will be interpreted as hexadecimal number.public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.SetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetDataFormat(),
RFIDManager.SetDataFormat(int),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int PermaLockTag(int lockMask,
int lockEnable,
java.lang.String ACS_PWD)
| bit location | memory location |
|---|---|
| 9 | User |
| 8 | N/A |
| 7 | TID |
| 6 | N/A |
| 5 | EPC |
| 4 | N/A |
| 3 | Access password |
| 2 | N/A |
| 1 | Kill password |
| 0 | N/A |
lockMask as 0x220,
and set lockEnable as 0x200.
Tag selection mask defined by RFIDManager.SetSelMask(device.common.rfid.SelConfig) is used to define
which tag (or a group of tags) is affected by this command.
To check current selection mask, use RFIDManager.GetSelMask(device.common.rfid.SelConfig).
The return value of this method does NOT contain a kill result. The kill result can be obtained via notifications, such as:
The kill result from tag includes"e=", followed by a tag
ID from accessed tag.
e=[tag ID]To check or modify tag ID format for kill result, use
RFIDManager.GetDataFormat() or RFIDManager.SetDataFormat(int).
To check and modify type of notification for kill result, use
RFIDManager.GetResultType() or RFIDManager.SetResultType(int).lockMask - a bit mask to mark which memory to apply lockEnable.
A memory location marked as zero bit in the mask will be ignored.
A memory location marked as non-zero bit in the mask will be processed
as lockEnable.lockEnable - a bit mask to lock or unlock.
A zero bit at the valid bit location will unlock corresponding memory location.
A non-zero bit at the valid bit location will lock corresponding memory location.ACS_PWD - the access password.
Both decimal or hexadecimal notation is allowed. A string starting "0x"
will be interpreted as hexadecimal number.public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.SetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetDataFormat(),
RFIDManager.SetDataFormat(int),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int GetInventoryParam(ParamOfInvent paramOfInvent)
RFIDManager.StartInventory().paramOfInvent - the container for query result.
public class ParamOfInvent {
public int session;
// Determines how long the flags in tags expires.
// The flags includes inventoried flags, which is referred in
// inventoryFlag parameter.
// Refer to "Table 6-20. Tag flags and persistence values"
// from UHF RFID standard[1] for more information.
public static final int SESSION_0 = 0; // None
public static final int SESSION_1 = 1; // from 500 msecs to 5 secs
public static final int SESSION_2 = 2; // more than 2 secs
public static final int SESSION_3 = 3; // more than 2 secs
public int q;
// Determines a tag response probability (=1/2Q).
// Adjust this value in consideration of tag population.
// Larger Q value is recommended for a large number of
// (or dense) tags.
// Smaller Q value is recommended for a few number of
// (or sparse) tags.
// Refer to "Inventorying Tag populations" section from UHF
// RFID standard[1] for more information.
available from 0 to 15.
public int inventoryFlag;
// Filter tags by inventoried flag at selected session.
// A tag has four independent inventoried flags for each session.
// Each flag can represent one of binary states "A" or "B".
// Refer to "Sessions and inventoried flags" section from UHF
// RFID standard[1] for more information.
public static final int TARGET_A = 0;
// only tags with inventoried flag "A" are identified.
public static final int TARGET_B = 1;
// only tags with inventoried flag "B" are identified.
public static final int TARGET_AB = 2;
// only tags with inventoried flag "A" or "B "are identified. * }
[1] "EPC Radio-Frequency Identity Protocols Generation-2 UHF RFID,
Specification for RFID Air Interface Protocol for Communications at
860 MHz - 960 MHz," Version 2.1, EPC Global, Jul. 2018.public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.SetInventoryParam(device.common.rfid.ParamOfInvent)public int SetInventoryParam(ParamOfInvent paramOfInvent)
RFIDManager.StartInventory().paramOfInvent - parameters used during inventory.
public class ParamOfInvent {
public int session;
// Determines how long the flags in tags expires.
// The flags includes inventoried flags, which is referred in
// inventoryFlag parameter.
// Refer to "Table 6-20. Tag flags and persistence values"
// from UHF RFID standard[1] for more information.
public static final int SESSION_0 = 0; // None
public static final int SESSION_1 = 1; // from 500 msecs to 5 secs
public static final int SESSION_2 = 2; // more than 2 secs
public static final int SESSION_3 = 3; // more than 2 secs
public int q;
// Determines a tag response probability (=1/2Q).
// Adjust this value in consideration of tag population.
// Larger Q value is recommended for a large number of
// (or dense) tags.
// Smaller Q value is recommended for a few number of
// (or sparse) tags.
// Refer to "Inventorying Tag populations" section from UHF
// RFID standard[1] for more information.
available from 0 to 15.
public int inventoryFlag;
// Filter tags by inventoried flag at selected session.
// A tag has four independent inventoried flags for each session.
// Each flag can represent one of binary states "A" or "B".
// Refer to "Sessions and inventoried flags" section from UHF
// RFID standard[1] for more information.
public static final int TARGET_A = 0;
// only tags with inventoried flag "A" are identified.
public static final int TARGET_B = 1;
// only tags with inventoried flag "B" are identified.
public static final int TARGET_AB = 2;
// only tags with inventoried flag "A" or "B "are identified.
}
[1] "EPC Radio-Frequency Identity Protocols Generation-2 UHF RFID,
Specification for RFID Air Interface Protocol for Communications at
860 MHz - 960 MHz," Version 2.1, EPC Global, Jul. 2018.public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetInventoryParam(device.common.rfid.ParamOfInvent)public int GetTxPower()
MaxPower - modifier).
Increasing TX power also increases power consumption from battery.MaxPower.RFIDManager.SetTxPower(int),
RFIDManager.GetMaxPower()public int SetTxPower(int pwr)
MaxPower - pwr).pwr - Tx power modifier value in dB scale.
The higher the pwr is, the weaker the Tx power of RFID reader will be.
Value range is from 0 to MaxPower.public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetTxPower(),
RFIDManager.GetMaxPower()public int GetMaxPower()
public int GetTxCycle(TxCycle txCycle)
RFIDManager.SetTxCycle(device.common.rfid.TxCycle).txCycle - the container for query result.
public class TxCycle implements Parcelable {
public int onTime;
// Tx ON duration
// available from 40 to 400 (unit: msec)
public int offTime;
// Tx OFF duration
// available from 0 to 255 (unit: msec)
}
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error while querying
RFIDManager.SetTxCycle(device.common.rfid.TxCycle)public int SetTxCycle(TxCycle txCycle)
RFIDManager.GetTxCycle(device.common.rfid.TxCycle).txCycle - Tx ON and OFF duration
public class TxCycle implements Parcelable {
public int onTime;
// Tx ON duration
// available from 40 to 400 (unit: msec)
public int offTime;
// Tx OFF duration
// available from 0 to 255 (unit: msec)
}
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetTxCycle(device.common.rfid.TxCycle)public java.lang.String GetAllChannel()
RFIDManager.GetChannelState(device.common.rfid.ChannelState).
To enable or disable a channel, use RFIDManager.SetChannelState(device.common.rfid.ChannelState).RFIDManager.GetChannelState(device.common.rfid.ChannelState),
RFIDManager.SetChannelState(device.common.rfid.ChannelState)public int GetChannelState(ChannelState channelState)
RFIDManager.GetAllChannel().
To enable or disable a channel, use RFIDManager.SetChannelState(device.common.rfid.ChannelState).channelState - the container for query result.
public class ChannelState implements Parcelable {
public int channelIndex;
// channel index to check
public int enable;
// 1 means enabled and 0 means disabled.
}
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error while querying
RFIDManager.GetAllChannel(),
RFIDManager.SetChannelState(device.common.rfid.ChannelState)public int SetChannelState(ChannelState channelState)
RFIDManager.GetAllChannel().
To check whether a channel is enabled, use RFIDManager.GetChannelState(device.common.rfid.ChannelState).channelState - channel status.
public class ChannelState implements Parcelable {
public int channelIndex;
// channel index to check
public int enable;
// 1 means enabled and 0 means disabled.
}
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetAllChannel(),
RFIDManager.GetChannelState(device.common.rfid.ChannelState)public int GetLinkProfile()
RFIDManager.SetLinkProfile(int).public static final int LINK_PROFILE_0 = 0; public static final int LINK_PROFILE_1 = 1; public static final int LINK_PROFILE_2 = 2; public static final int LINK_PROFILE_3 = 3;
| Profile index | Modulation | DeModulation | Frequency(KHz) | DataRate(kbps) |
|---|---|---|---|---|
| 0 | DSB-ASK | FM0 | 40 | 40 |
| 1 | PR-ASK | Miller Subcarrier 4 | 250 | 32.5 |
| 2 | PR_ASK | Miller Subcarrier 4 | 300 | 75 |
| 3 | DSB-ASK | FM0 | 400 | 400 |
RFIDConst.CommandErr.COMM_ERR
is returned.RFIDManager.SetLinkProfile(int)public int SetLinkProfile(int profile)
RFIDManager.GetLinkProfile().profile - link profile index.
public static final int LINK_PROFILE_0 = 0; public static final int LINK_PROFILE_1 = 1; public static final int LINK_PROFILE_2 = 2; public static final int LINK_PROFILE_3 = 3;
| Profile index | Modulation | DeModulation | Frequency(KHz) | DataRate(kbps) |
|---|---|---|---|---|
| 0 | DSB-ASK | FM0 | 40 | 40 |
| 1 | PR-ASK | Miller Subcarrier 4 | 250 | 32.5 |
| 2 | PR_ASK | Miller Subcarrier 4 | 300 | 75 |
| 3 | DSB-ASK | FM0 | 400 | 400 |
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetLinkProfile()public int GetVibState()
RFIDManager.SetVibState(int).
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.RFIDConst.CommandErr.COMM_ERR if an
error occurred during communication to RFID reader.RFIDManager.SetVibState(int)public int SetVibState(int on)
RFIDManager.GetVibState().
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.on - vibration setting value.
0 means vibrator is disable 1 means vibrator is enable
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetVibState()public int SetTriggerMode(int mode)
mode - the trigger mode
0 means RFID mode 1 means Barcode Scanner mode
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
public int GetBatteryState()
0 // battery replacement is necessary 1 // battery is in good condition
RFIDConst.CommandErr.COMM_ERR is returned if
communication error is occurred.public int GetChargingState()
0 // battery is NOT charging. 1 // battery is charging.
RFIDConst.CommandErr.COMM_ERR is returned if
communication error is occurred.public int SingleSearch(int length,
java.lang.String tagId,
int threshold,
int step)
The return value of this method does NOT contain search result. The result can be obtained via notifications, such as:
The search result includes a tag ID, followed by TX power of the reader, delimited by comma(","). The tag ID is a joined string of PC and EPC.[tag ID],p=[power]To check and modify type of notification for the search result, use
RFIDManager.GetResultType() or RFIDManager.SetResultType(int).
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.length - the length of tagId.tagId - the ID (PC + EPC) of the targeted tag to find for.threshold - the lower bound of TX power (unit. dBm).step - the amount of TX power to be reduced
(unit. dBm).public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
public int MultiSearch()
RFIDManager.GetSearchList()
or RFIDManager.SetSearchList(int, int, java.lang.String).
The return value of this method does NOT contain a search result. The search list can be obtained via notifications, such as:
The search result includes an index of the list to which the found tag is applied, followed by a tag ID, delimited by colon(":"). The tag ID is a joined string of PC and EPC.[index]:[tag ID]To check and modify type of notification for the list of tag found, use
RFIDManager.GetResultType() or RFIDManager.SetResultType(int).
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetSearchList(),
RFIDManager.SetSearchList(int, int, java.lang.String),
RFIDManager.GetSearchList_ext(int),
RFIDManager.ClearSearchList(int, int),
RFIDManager.ClearAllSearchList(),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int WildcardSearch(int length,
java.lang.String tagId)
The return value of this method does NOT contain a search result. The search result can be obtained via notifications, such as:
The search result is a string notation of tag IDs, one tag per line. The tag ID is a joined string of PC and EPC. To check and modify type of notification for the list of tag found, useRFIDManager.GetResultType() or RFIDManager.SetResultType(int).
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.length - the length of pattern tagId
(unit: characters).tagId - the tag ID (PC + EPC) pattern to search for.
The pattern may includes wildcards ('*' and '?').
Filtering rule is as below.
* matches any String
? matches any single character
ex) 12345678*
123?5678?
public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.WildcardSearch(int, java.lang.String),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int GetSearchList()
RFIDManager.MultiSearch().
The return value of this method does NOT contain the list. The list can be obtained via notifications, such as:
To check and modify type of notifications, useRFIDManager.GetResultType() or RFIDManager.SetResultType(int).
A notification includes an item index followed by a tag ID,
delimited by colon(":").
The tag ID is a joined string of PC and EPC.
[index]:[tag ID]NOTE: This method is incompatible with UART-based RFID readers, such as PM500.
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetSearchList_ext(int),
RFIDManager.SetSearchList(int, int, java.lang.String),
RFIDManager.GetSearchList_ext(int),
RFIDManager.SetSearchList(int, int, java.lang.String),
RFIDManager.ClearSearchList(int, int),
RFIDManager.ClearAllSearchList(),
RFIDManager.MultiSearch()public int GetSearchList_ext(int index)
RFIDManager.MultiSearch().
The return value of this method does NOT contain the list item. The list item can be obtained via notifications, such as:
To check and modify type of notifications, useRFIDManager.GetResultType() or RFIDManager.SetResultType(int).
A notification includes an item index followed by a tag ID,
delimited by colon(":").
The tag ID is a joined string of PC and EPC.
[index]:[tag ID]NOTE: This method is incompatible with UART-based RFID readers, such as PM500.
index - the item index to query for.
available from 0 to 49
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetSearchList(),
RFIDManager.SetSearchList(int, int, java.lang.String),
RFIDManager.GetSearchList(),
RFIDManager.SetSearchList(int, int, java.lang.String),
RFIDManager.ClearSearchList(int, int),
RFIDManager.ClearAllSearchList(),
RFIDManager.MultiSearch()public int SetSearchList(int index,
int length,
java.lang.String tagId)
RFIDManager.MultiSearch().
RFIDManager.MultiSearch()
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.index - the item index to modify.
available from 0 to 49
length - the length of tagId.
available from 4 to 36 (unit: characters)
tagId - the tag ID (PC and EPC) to look for.public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetSearchList(),
RFIDManager.GetSearchList_ext(int),
RFIDManager.ClearSearchList(int, int),
RFIDManager.ClearAllSearchList(),
RFIDManager.MultiSearch()public int ClearSearchList(int index,
int cnt)
RFIDManager.MultiSearch().
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.index - the starting index of list item.
available from 0 to 49 (default = 0)
cnt - the number of items to clear from the starting index.
available from 1 to 50 (default = 50)
For example, ClearSearchList(2, 3) clears three items in
a row from the second item. In other words, it clears the 2nd, 3rd,
and 4th item.public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetSearchList_ext(int),
RFIDManager.GetSearchList(),
RFIDManager.SetSearchList(int, int, java.lang.String),
RFIDManager.ClearAllSearchList(),
RFIDManager.MultiSearch()public int ClearAllSearchList()
RFIDManager.MultiSearch().
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetSearchList_ext(int),
RFIDManager.GetSearchList(),
RFIDManager.SetSearchList(int, int, java.lang.String),
RFIDManager.ClearSearchList(int, int),
RFIDManager.MultiSearch()public int BlockWrite(int length,
int membank,
int offset,
java.lang.String writeData,
java.lang.String password,
int blockMode)
RFIDManager.SetSelMask(device.common.rfid.SelConfig) is used to define
which tag (or a group of tags) is affected by this command.
To check current selection mask, use RFIDManager.GetSelMask(device.common.rfid.SelConfig).
Use with caution and carefully design tag selection mask,
so as not to overwrite precious data in unwanted tag(s) by mistake.
The return value of this method does NOT contain responses from tags. The responses from tags can be obtained via:
To check and modify type of notification for tag responses, useRFIDManager.GetResultType() or RFIDManager.SetResultType(int).
A response from tag includes "e=", followed by a tag ID
from accessed tag.
e=[tag ID]To check or modify tag ID format for responses, use
RFIDManager.GetDataFormat() or RFIDManager.SetDataFormat(int).length - the number of blocks to write.
available from 1 to 64 (unit: word)
membank - the memory bank where the target blocks for write
are located.
0 // RESERVED
1 // EPC
2 // TID
3 // USER
offset - an offset from the beginning of the memory bank.
available from 0 to 255 (unit: word)
writeData - the data to write.password - the access password.blockMode - the block write unit.
0 // auto detect (default)
1 // force one word block write
2 // force two word block write
public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.BlockErase(int, int, int, java.lang.String, int),
RFIDManager.SetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetTxDataFormat(),
RFIDManager.SetTxDataFormat(int),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int BlockErase(int length,
int membank,
int offset,
java.lang.String password,
int blockMode)
RFIDManager.SetSelMask(device.common.rfid.SelConfig) is used to define
which tag (or a group of tags) is affected by this command.
To check current selection mask, use RFIDManager.GetSelMask(device.common.rfid.SelConfig).
Use with caution and carefully design tag selection mask,
so as not to erase precious data in unwanted tag(s) by mistake.
The return value of this method does NOT contain responses from tags. The responses from tags can be obtained via:
To check and modify type of notification for tag responses, useRFIDManager.GetResultType() or RFIDManager.SetResultType(int).
A response from tag includes "e=", followed by a tag ID
from accessed tag.
e=[tag ID]To check or modify tag ID format for responses, use
RFIDManager.GetDataFormat() or RFIDManager.SetDataFormat(int).length - the number of blocks to delete.
available from 1 to 255 (unit: word)
membank - the memory bank where the target blocks for erase are
located
0 // RESERVED
1 // EPC
2 // TID
3 // USER
offset - an offset from the beginning of the memory bank.
available from 0 to 255 (unit: word)
password - the access password.blockMode - the block erase unit.
0 // auto detect (default)
1 // force one word block erase
2 // force two word block erase
public final static int SUCCESS = 0; // command successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.BlockWrite(int, int, int, java.lang.String, java.lang.String, int),
RFIDManager.SetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetSelMask(device.common.rfid.SelConfig),
RFIDManager.GetTxDataFormat(),
RFIDManager.SetTxDataFormat(int),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int GetTagFocus()
RFIDManager.SetTagFocus(int).
TagFocus is a proprietary chip technology made by Impinj.
TagFocus is a registered trademark of Impinj, Inc.RFIDConst.CommandErr.COMM_ERR if error
occurred.
0 // TagFocus feature is disabled
1 // TagFocus feature is enabled
RFIDManager.SetTagFocus(int)public int SetTagFocus(int enable)
RFIDManager.GetTagFocus().
TagFocus is a proprietary chip technology made by Impinj.
TagFocus is a registered trademark of Impinj, Inc.enable - flag.
0 // disables TagFocus feature
1 // enables TagFocus feature
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetTagFocus()public int GetFastID()
RFIDManager.SetFastID(int).
FastID is a proprietary chip technology made by Impinj.
FastID is a registered trademark of Impinj, Inc.RFIDConst.CommandErr.COMM_ERR if error
occurred.
0 // FastID feature is disabled
1 // FastID feature is enabled
RFIDManager.SetFastID(int)public int SetFastID(int enable)
RFIDManager.GetFastID().
FastID is a proprietary chip technology made by Impinj.
FastID is a registered trademark of Impinj, Inc.enable - flag.
0 // disables FastID feature
1 // enables FastID feature
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetFastID()public int GetDataFormat()
RFIDManager.StartInventory() or tag
accessing commands.
Tag accessing commands are:
RFIDManager.ReadTag(int, int, int, java.lang.String)RFIDManager.WriteTag(int, int, int, java.lang.String, java.lang.String)RFIDManager.KillTag(java.lang.String)RFIDManager.LockTag(int, int, java.lang.String)RFIDManager.PermaLockTag(int, int, java.lang.String)RFIDManager.BlockWrite(int, int, int, java.lang.String, java.lang.String, int)RFIDManager.BlockErase(int, int, int, java.lang.String, int)RFIDManager.SetDataFormat(int).
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.RFIDConst.CommandErr.COMM_ERR if
communication error.
public static final int PC_EPC_CRC = 0; // PC + EPC + CRC public static final int PC_EPC = 1; // PC + EPC public static final int EPC_CRC = 2; // EPC + CRC public static final int EPC_ONLY = 3; // EPC
RFIDManager.SetDataFormat(int)public int SetDataFormat(int index)
RFIDManager.StartInventory() or tag
accessing commands.
Tag accessing commands are:
RFIDManager.ReadTag(int, int, int, java.lang.String)RFIDManager.WriteTag(int, int, int, java.lang.String, java.lang.String)RFIDManager.KillTag(java.lang.String)RFIDManager.LockTag(int, int, java.lang.String)RFIDManager.PermaLockTag(int, int, java.lang.String)RFIDManager.BlockWrite(int, int, int, java.lang.String, java.lang.String, int)RFIDManager.BlockErase(int, int, int, java.lang.String, int)RFIDManager.GetDataFormat().
NOTE: This method is incompatible with UART-based RFID readers,
such as PM500.index - the tag ID format.
public static final int PC_EPC_CRC = 0; // PC + EPC + CRC public static final int PC_EPC = 1; // PC + EPC public static final int EPC_CRC = 2; // EPC + CRC public static final int EPC_ONLY = 3; // EPC
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetDataFormat()public int GetTxDataFormat()
RFIDManager.StartInventory() command.
To modify current report format, use RFIDManager.SetTxDataFormat(int).RFIDManager.SetPrefix(java.lang.String) or RFIDManager.SetSuffix(java.lang.String).public static final int TAG_DATA = 0; // no prefix, no suffix. Tag data only. public static final int PREFIX_TAG_DATA = 1; // prefix followed by tag data. public static final int TAG_DATA_SUFFIX = 2; // tag data followed by suffix. public static final int PREFIX_TAG_DATA_SUFFIX = 3; // tag data enclosed by both prefix and suffix.
RFIDManager.SetTxDataFormat(int),
RFIDManager.GetPrefix(),
RFIDManager.GetSuffix()public int SetTxDataFormat(int index)
RFIDManager.StartInventory() command.
To check current report format, use RFIDManager.GetTxDataFormat().RFIDManager.SetPrefix(java.lang.String) or RFIDManager.SetSuffix(java.lang.String).index - the report format.
public static final int TAG_DATA = 0; // no prefix, no suffix. Tag data only. public static final int PREFIX_TAG_DATA = 1; // prefix followed by tag data. public static final int TAG_DATA_SUFFIX = 2; // tag data followed by suffix. public static final int PREFIX_TAG_DATA_SUFFIX = 3; // tag data enclosed by both prefix and suffix.
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetTxDataFormat(),
RFIDManager.SetPrefix(java.lang.String),
RFIDManager.SetSuffix(java.lang.String)public java.lang.String GetPrefix()
RFIDManager.GetTxDataFormat() is equal to
RFIDConst.RFIDConfig.TX_FORMAT_PREFIX_TAG_DATA_SUFFIX
or
RFIDConst.RFIDConfig.TX_FORMAT_PREFIX_TAG_DATA.
To modify the current prefix string, use RFIDManager.SetPrefix(java.lang.String).RFIDManager.GetTxDataFormat() or
RFIDManager.SetTxDataFormat(int).RFIDManager.SetPrefix(java.lang.String),
RFIDManager.GetTxDataFormat(),
RFIDManager.SetTxDataFormat(int)public int SetPrefix(java.lang.String prefix)
RFIDManager.GetTxDataFormat() is equal to
RFIDConst.RFIDConfig.TX_FORMAT_PREFIX_TAG_DATA_SUFFIX
or
RFIDConst.RFIDConfig.TX_FORMAT_PREFIX_TAG_DATA.
To check the current prefix string, use RFIDManager.GetPrefix().RFIDManager.GetTxDataFormat() or
RFIDManager.SetTxDataFormat(int).prefix - a prefix string.public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetPrefix(),
RFIDManager.GetTxDataFormat(),
RFIDManager.SetTxDataFormat(int)public java.lang.String GetSuffix()
RFIDManager.GetTxDataFormat() is equal to
RFIDConst.RFIDConfig.TX_FORMAT_PREFIX_TAG_DATA_SUFFIX
or
RFIDConst.RFIDConfig.TX_FORMAT_TAG_DATA_SUFFIX.
To modify the current suffix string, use RFIDManager.SetSuffix(java.lang.String).RFIDManager.GetTxDataFormat() or
RFIDManager.SetTxDataFormat(int).RFIDManager.SetSuffix(java.lang.String),
RFIDManager.GetTxDataFormat(),
RFIDManager.SetTxDataFormat(int)public int SetSuffix(java.lang.String suffix)
RFIDManager.GetTxDataFormat() is equal to
RFIDConst.RFIDConfig.TX_FORMAT_PREFIX_TAG_DATA_SUFFIX
or
RFIDConst.RFIDConfig.TX_FORMAT_TAG_DATA_SUFFIX.
To check the current suffix string, use RFIDManager.GetSuffix().RFIDManager.GetTxDataFormat() or
RFIDManager.SetTxDataFormat(int).suffix - a suffix string.public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetSuffix(),
RFIDManager.GetTxDataFormat(),
RFIDManager.SetTxDataFormat(int)public int SetDataCase(int datacase)
datacase - letter case format.
0 // use lower case (default)
1 // use upper case
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
public int GetOperationMode(ModeOfInvent moi)
moi - the container for query result.
public class ModeOfInvent {
public int single;
0 means continuous mode
1 means single mode
public int select;
0 means non-select mode(default)
2 means exclusion select mode
3 means selece mode
public int timeout;
0 means infinite(default)
available from 1 to 0xFFFFFFFF(unit. msec)
}
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.SetOperationMode(device.common.rfid.ModeOfInvent)public int SetOperationMode(ModeOfInvent moi)
RFIDManager.GetOperationMode(device.common.rfid.ModeOfInvent).moi - the inventory settings.
public class ModeOfInvent {
public int single;
0 means continuous mode
1 means single mode
public int select;
0 means non-select mode(default)
2 means exclusion select mode
3 means selece mode
public int timeout;
0 means infinite(default)
available from 1 to 0xFFFFFFFF(unit. msec)
}
| Option name | Description | Default value |
|---|---|---|
| Single | Single
- inventory process stops as soon as the RFID reader identifies a tag.
continuous
- inventory process continues until invocation of RFIDManager.Stop() or
timeout. |
continuous |
| Select | Non-select mode - no selection filter is applied. All tags respond.
Exclusion select mode - selection filter is applied negatively.
Tags DOES NOT satisfying selection filter specified by
RFIDManager.SetSelMask(device.common.rfid.SelConfig) will respond.
Select mode - selection filter is applied positively. Only tags satisfying
selection filter specified by RFIDManager.SetSelMask(device.common.rfid.SelConfig) will respond.
|
Non-select mode |
| Timeout | 0 (=infinite)1 to 0xFFFFFFFF (unit: ms) |
0(=infinite) |
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error
RFIDManager.GetOperationMode(device.common.rfid.ModeOfInvent)public int GetResultType()
RFIDManager.SetResultType(int).RFIDConst.CommandErr.COMM_ERR if an error
occurred during communication to RFID reader.
public static final int RFID_RESULT_CALLBACK = 0; public static final int RFID_RESULT_KBDMSG = 1; public static final int RFID_RESULT_COPYPASTE = 2; public static final int RFID_RESULT_CUSTOM_INTENT = 4;
RFIDManager.SetResultType(int),
RFIDManager.GetCustomIntentConfig(device.common.rfid.CustomIntentConfig),
RFIDManager.SetCustomIntentConfig(device.common.rfid.CustomIntentConfig)public void SetResultType(int resultType)
RFIDManager.GetResultType().resultType - means the result notification type.
public static final int RFID_RESULT_CALLBACK = 0; public static final int RFID_RESULT_KBDMSG = 1; public static final int RFID_RESULT_COPYPASTE = 2; public static final int RFID_RESULT_CUSTOM_INTENT = 4;
RFIDManager.GetResultType(),
RFIDManager.GetCustomIntentConfig(device.common.rfid.CustomIntentConfig),
RFIDManager.SetCustomIntentConfig(device.common.rfid.CustomIntentConfig)public int GetTerminatorType()
RFIDManager.StartInventory()RFIDManager.ReadTag(int, int, int, java.lang.String)RFIDManager.WriteTag(int, int, int, java.lang.String, java.lang.String)RFIDManager.LockTag(int, int, java.lang.String)RFIDManager.KillTag(java.lang.String)RFIDManager.PermaLockTag(int, int, java.lang.String)RFIDManager.SingleSearch(int, java.lang.String, int, int)RFIDManager.MultiSearch()RFIDManager.WildcardSearch(int, java.lang.String)RFIDManager.GetSearchList()RFIDManager.GetSearchList_ext(int)RFIDManager.BlockWrite(int, int, int, java.lang.String, java.lang.String, int)RFIDManager.BlockErase(int, int, int, java.lang.String, int)RFIDManager.SetTerminatorType(int).RFIDConst.CommandErr.COMM_ERR if
communication error occurred.
public static final int RFID_TERMINATOR_NONE = 0; public static final int RFID_TERMINATOR_SPACE = 1; public static final int RFID_TERMINATOR_TAB = 2; public static final int RFID_TERMINATOR_LF = 3; public static final int RFID_TERMINATOR_TAB_LF = 4;
RFIDManager.SetTerminatorType(int)public void SetTerminatorType(int teminatorType)
RFIDManager.StartInventory()RFIDManager.ReadTag(int, int, int, java.lang.String)RFIDManager.WriteTag(int, int, int, java.lang.String, java.lang.String)RFIDManager.LockTag(int, int, java.lang.String)RFIDManager.KillTag(java.lang.String)RFIDManager.PermaLockTag(int, int, java.lang.String)RFIDManager.SingleSearch(int, java.lang.String, int, int)RFIDManager.MultiSearch()RFIDManager.WildcardSearch(int, java.lang.String)RFIDManager.GetSearchList()RFIDManager.GetSearchList_ext(int)RFIDManager.BlockWrite(int, int, int, java.lang.String, java.lang.String, int)RFIDManager.BlockErase(int, int, int, java.lang.String, int)RFIDManager.GetTerminatorType().teminatorType - type of the teminator to be used in reader-to-host communication.
public static final int RFID_TERMINATOR_NONE = 0; public static final int RFID_TERMINATOR_SPACE = 1; public static final int RFID_TERMINATOR_TAB = 2; public static final int RFID_TERMINATOR_LF = 3; public static final int RFID_TERMINATOR_TAB_LF = 4;
RFIDManager.GetTerminatorType()public int GetInventoryReportFormat_ext(ReportFormatOfInvent_ext reportFormatOfInvent_ext)
reportFormatOfInvent_ext - the container for query result.
public class ReportFormatOfInvent_ext implements Parcelable {
public int time;
// whether the report includes internal timer value.
// 1 means enabled and 0 means disabled.
public int rssi;
// whether the report includes RSSI value.
// 1 means enabled and 0 means disabled.
public int channel;
// whether the report includes channel value.
// 1 means enabled and 0 means disabled.
public int temp;
// whether the report includes temperature value of the reader.
// 1 means enabled and 0 means disabled.
public int phase;
// whether the report includes phase of the identified tag.
// 1 means enabled and 0 means disabled.
public int ant;
// whether the report includes which antenna identified the tag.
// 1 means enabled and 0 means disabled.
}
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error public final static int NOT_SUPPORTED = -8; // this function cannot work on devices other than UART-based reader
ReportFormatOfInvent_ext,
RFIDManager.SetInventoryReportFormat_ext(device.common.rfid.ReportFormatOfInvent_ext)public int SetInventoryReportFormat_ext(ReportFormatOfInvent_ext reportFormatOfInvent_ext)
reportFormatOfInvent_ext - defines settings on report format of inventory.
public class ReportFormatOfInvent_ext implements Parcelable {
public int time;
// whether the report includes internal timer value.
// 1 means enabled and 0 means disabled.
public int rssi;
// whether the report includes RSSI value.
// 1 means enabled and 0 means disabled.
public int channel;
// whether the report includes channel value.
// 1 means enabled and 0 means disabled.
public int temp;
// whether the report includes temperature value of the reader.
// 1 means enabled and 0 means disabled.
public int phase;
// whether the report includes phase of the identified tag.
// 1 means enabled and 0 means disabled.
public int ant;
// whether the report includes which antenna identified the tag.
// 1 means enabled and 0 means disabled.
}
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error public final static int NOT_SUPPORTED = -8; // this function cannot work on devices other than UART-based reader
ReportFormatOfInvent_ext,
RFIDManager.GetInventoryReportFormat_ext(device.common.rfid.ReportFormatOfInvent_ext)public int SetDeviceBaudrate(int baudrate)
baudrate - the baud rate (unit: bps).
Supported baud rates are:
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error public final static int NOT_SUPPORTED = -8; // this function cannot work on devices other than UART-based reader
public int GetAntSelect(AntSelect antSelect)
antSelect - the container for query result.
public class AntSelect {
public int ant_1;
configuration for antenna #1.
1 means enabled and 0 means disabled.
public int ant_2;
configuration for antenna #2.
1 means enabled and 0 means disabled.
}
public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error while querying public final static int NOT_SUPPORTED = -8; // this function cannot work on devices other than UART-based reader
AntSelect,
RFIDManager.SetAntSelect(AntSelect)public int SetAntSelect(AntSelect antSelect)
antSelect - defines configuration of each antennas.
AntSelect type is as below.
public class AntSelect {
public int ant_1;
configuration for antenna #1.
1 means enabled and 0 means disabled.
public int ant_2;
configuration for antenna #2.
1 means enabled and 0 means disabled.
}
public final static int SUCCESS = 0; // modification successful public final static int COMM_ERR = -1; // communication has been interrupted by error public final static int NOT_SUPPORTED = -8; // this function cannot work on devices other than UART-based reader
AntSelect,
RFIDManager.GetAntSelect(AntSelect)public java.lang.String GetAvailableRegion()
RFIDManager.SetRegion(String)
NOTE: This method is only compatible with UART-based RFID readers,
such as PM500.RFIDManager.SetRegion(String)public int SetRegion(java.lang.String region)
region - a region should be one in the list of available regions,
which can be retrieved via RFIDManager.GetAvailableRegion().
It uses upper case only.public final static int SUCCESS = 0; // query successful public final static int COMM_ERR = -1; // communication has been interrupted by error while querying public final static int NOT_SUPPORTED = -8; // this function cannot work on devices other than UART-based reader
RFIDManager.GetAvailableRegion()public void GetCustomIntentConfig(CustomIntentConfig customIntentConfig)
RFIDManager.GetResultType(), RFIDManager.SetResultType(int)).
Use this method to know how to configure an intent filter for your app.customIntentConfig - the container for query result.
public class CustomIntentConfig {
public String action;
public String category;
// action and category are used to define intent filter for your app.
public String extraRfidData;
// a name (key) to get extra data from an intent received.
// the extra data may contain EPC ID of a tag, RSSI, and more.
}
RFIDManager.SetCustomIntentConfig(device.common.rfid.CustomIntentConfig),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public void SetCustomIntentConfig(CustomIntentConfig customIntentConfig)
RFIDManager.GetResultType(), RFIDManager.SetResultType(int)).
Use this method to modify custom intent configuration.customIntentConfig - defines custom intent configuration.
CustomIntentConfig type is as below.
public class CustomIntentConfig {
public String action;
public String category;
// action and category are used to define intent filter for your app.
public String extraRfidData;
// a name (key) to get extra data from an intent received.
// the extra data may contain EPC ID of a tag, RSSI, and more.
}
RFIDManager.GetCustomIntentConfig(device.common.rfid.CustomIntentConfig),
RFIDManager.GetResultType(),
RFIDManager.SetResultType(int)public int UpdateFirmware(java.io.File fwFile)
throws java.io.IOException,
java.io.FileNotFoundException
fwFile - an firmware file to load.public final static int SUCCESS = 0; // update successful public final static int FW_NOT_EXISTED = -9; // firmware file does not exist public final static int NOT_SUPPORTED = -8; // model does not support firmware update by this method public final static int OPEN_FAILED = -2; // failed to open UART communication to RFID module public final static int FW_UPDATE_FAILED = -10; // an error occurred while updating firmware
java.io.IOExceptionjava.io.FileNotFoundException