Tag Configuration
File Access & Communication Mode
changeFileSettings(fileNo, options)
Change access rights and communication mode (auth: the file’s change key, automatic). fileNo is 1, 2, or 3.
options.commMode—'plain','mac', or'full'.options.readAccess/writeAccess/readWriteAccess/changeAccess— each 0–4,'free', or'never'.options.preserveSDM(defaultfalse) — keep existing SDM config.
const res = await tag.changeFileSettings(2, { commMode: 'plain', readAccess: 'free', writeAccess: 0 });Returns
Show return object
{ success: true, data: { fileNo: 2, settings: { commMode: 'plain', readAccess: 'free', writeAccess: 0, readWriteAccess: 'free', // omitted in the call → keeps the file's current value changeAccess: 0, // omitted in the call → keeps the file's current value preserveSDM: false } }, duration: 22}Authentication & UID Modes
enableLRP()
Switch the tag to LRP authentication. Requires Key 0 in EV2 mode (automatic).
const res = await tag.enableLRP();Returns
{ success: true, data: { configured: true }, duration: 18}enableRandomUID()
Enable random-UID mode. After this, the real UID requires getCardUID() with authentication.
const res = await tag.enableRandomUID();Returns
{ success: true, data: { configured: true }, duration: 16}Tamper & Brute-Force Protection
configureTagTamper(ttStatusKey?)
Set up TagTamper detection (TagTamper variant; Key 0, automatic). ttStatusKey (default 0) is the key for getTTStatus (0–4 or 'free').
const res = await tag.configureTagTamper(0);Returns
{ success: true, data: { ttStatusKey: 0 }, duration: 27}configureFailedAuthLimit(options?)
Brute-force protection via a failed-authentication counter (auth: Key 0, automatic).
options.totalFailureLimit(default1000) — max failures before blocking (1–65535).options.decreaseOnSuccess(default10) — counter decrement on success (1–65535).options.enabled(defaulttrue).
const res = await tag.configureFailedAuthLimit({ totalFailureLimit: 100, decreaseOnSuccess: 1 });Returns
{ success: true, data: { configuration: { totalFailureLimit: 100, decreaseOnSuccess: 1, enabled: true } }, duration: 31}