Skip to main content

set_operating_mode

ReferenceAudience: API consumerUse: configure the reader's RFID operating mode

Overview​

set_operating_mode configures the reader's RFID operating mode — the profile, advanced RF configuration, tag access operations, radio start/stop triggers, the Gen2 query, select pre-filters, and tag-metadata reporting flags. It is a state-changing control-plane (CTRL) command. It is a partial, merging update: you send only the sub-objects you want to change and they merge into the current mode. Read the result back with get_operating_mode.

accessOperations arm destructive tag operations (WRITE / LOCK / KILL) that execute on the next inventory — KILL and PERMANENT_LOCK are irreversible. See the danger callout in Notes and Caveats before sending.

This is a CTRL-endpoint command, published on the control endpoint (<tenantId>/CTRL/clients/cmnd/<serial>) and answered only there (not on the MGMT/MDM channel). This requires an active CTRL endpoint (config_endpoint, epType: CTRL, activate: true); without one, you get no response.

Set the regulatory region first. Before you start an RFID inventory, make sure the reader’s regulatory region is configured: the reader does not transmit until it is, and the region is set outside MQTT with 123RFID Desktop or 123RFID Mobile. Use get_current_region to verify the current region.

Details​

PropertyValue
Interaction PatternRequest / Response (partial-merge configuration)
State ChangeSTATE-CHANGING (arms access ops; changes RF config)
ReversibilityREVERSIBLE / VOLATILE (reset to default on reboot, or re-send to change)
Required Request Fieldscommand, requestId (operatingMode.operatingModes is optional in the contract; send it with the aspects to set)
Applies ToEndpoint: Control (CTRL). Reader: RFD40 series, RFD90 series
API VersionV1.1 (API Version Reporting)
Relatedget_operating_mode, control_operation, config_endpoint, reboot

When to Use​

Use set_operating_mode to configure how the reader reads (and acts on) tags:

  • Select a profile — CYCLE_COUNT (read as many unique tags as possible), DENSE_READERS (multiple readers in proximity), OPTIMAL_BATTERY (best battery life), BALANCED_PERFORMANCE (default; balances performance and battery life), or ADVANCED (custom link-profile settings via advancedConfigurations). FAST_READ (maximum read speed within short range) is enumerated but not currently supported.
  • Tune the radio — transmit power, link profile, session, dynamic power (ADVANCED).
  • Compose triggers — radioStartConditions / radioStopConditions (trigger, delay, tag/time/cycle stops).
  • Shape inventory — Gen2 query and up to 32 select pre-filters.
  • Choose reporting — tagMetaDataToEnable flags.
  • Arm tag operations — accessOperations (READ/WRITE/ACCESS/LOCK/KILL) that run on the next inventory. Handle with care (see the danger note).

Topic Mapping​

MessageDirectionTopicNote
RequestApp → Reader<tenantId>/CTRL/clients/cmnd/<serial>On the control endpoint. Requires an active CTRL endpoint.
ResponseReader → App<tenantId>/CTRL/clients/resp/<serial>Correlated reply; the in-payload requestId links the twin topics.

Topics follow the pattern <tenantId>/<topic>/<serial> — the tenant id assigned to you at provisioning (a slot you fill in, never a literal), the base topic you configure on the endpoint, and the reader's serial number, which the reader appends itself in its model-prefixed form (for example RFD40-212735201D0053). App → Reader means your app publishes and the reader subscribes; Reader → App means the reader publishes and your app subscribes.

Control commands are answered only on the CTRL endpoint.

If control commands time out, confirm a CTRL endpoint is active (get_endpoint_config → activeEndpoints) and activate one with config_endpoint if needed. The mode cannot be changed while an inventory is running (code 11).

See Topics and Channels.

Key Fields​

  • operatingModes.profiles (request) — the RF profile; ADVANCED requires advancedConfigurations. FAST_READ is the first member of the enum but is not currently supported, and data events are not supported while the sled is in it.
  • operatingModes.accessOperations (request) — ⚠️ armed tag operations (destructive; see the danger note).
  • operatingModes.select (request) — up to 32 Gen2 pre-filters.
  • operatingModes.query / radioStartConditions / radioStopConditions (request) — inventory shaping and trigger semantics.
  • operatingModes.tagMetaDataToEnable (request) — which metadata fields the reader reports on each read. The switch-to-field mapping is on dataEVT.
  • response.code (response) — read this to determine success vs failure; the contract requires it; note the reported success-path omission (see Response Payload) and the partial-apply-on-error behavior (see Request Semantics). See Response Codes.

Request Payload​

The envelope is command, requestId, and the operatingMode payload. Send only the operatingModes sub-objects you want to change. For a basic inventory, start with Profile setting: it sets only the RF profile. Set operating mode also sets advanced RF settings and arms tag access operations (READ, WRITE, ACCESS, LOCK), which run on the next inventory START; send it only when you want those operations. Pick a configuration section below; the Example and Schema update together. Use the Schema tab for the full field reference and the Example tab for the concrete payload.

Request payload
Example: basic inventory: profile only
{
"command": "set_operating_mode",
"requestId": "1286",
"operatingMode": {
"operatingModes": {
"profiles": "BALANCED_PERFORMANCE"
}
}
}

Request Semantics​

Merge. set_operating_mode is cumulative: it updates only the aspects present in the payload and leaves all others intact — it is not a full replacement. For example, sending only radioStartConditions changes the triggers while preserving profiles, query, select, accessOperations, and tagMetaDataToEnable. Send {profiles: "BALANCED_PERFORMANCE"} alone to reset the profile without touching anything else. Because merges accumulate, armed accessOperations persist across later partial sets until you overwrite them or reboot. Confirm the resulting merged mode with get_operating_mode.

  • The singular operatingMode wrapper around the plural operatingModes object is the schema-defined shape. The command's operatingMode property carries a wrapper holding exactly one member, operatingModes, and every worked example nests it that way — the double nesting is intentional and unique to this command (see the Glossary). The contract marks neither level required and does not forbid unrecognized properties, so a flattened or renamed payload still validates — but it does not carry the operating mode where the schema defines it. Send the nested shape exactly as shown.
  • An error response can leave the mode partially applied. An error response (e.g. 101 "Error in processing command") can leave the mode partially applied — always verify the result with get_operating_mode rather than assuming a 101 changed nothing.
  • ADVANCED requires advancedConfigurations; limits are enforced. profiles: ADVANCED without advancedConfigurations returns code 22. select supports up to 32 pre-filters (code 24 if exceeded); an overlong select.tagPattern returns 28; WRITE data that is too large or mismatched returns 31 / 32. FAST_READ is enumerated but not currently supported, and configuring FAST_READ disables data events.

Response Payload​

set_operating_mode returns a status-only envelope — command, requestId, apiVersion, and response.

Response payload
{
"command": "set_operating_mode",
"requestId": "abc123",
"apiVersion": "V1.1",
"response": {
"code": 0,
"description": "Success"
}
}

The contract requires response.code. Readers have been reported to omit it on a successful reply, returning just response: { "description": "Success" } — treat that as success too. See Success without a code.

As reported, a successful set can arrive with code omitted. This form does not validate against the contract; the reply with code: 0 above is the documented form:

Response — success reported without code (not accepted by the contract)
{
"command": "set_operating_mode",
"requestId": "1286",
"apiVersion": "V1.1",
"response": {
"description": "Success"
}
}

Response Codes​

set_operating_mode returns response.code. The codes applicable to this command are below; for the full table see the Response Codes and Correlation and Request/Response Pairing.

CodeDescription
0Success — the mode was applied. (Readers have been reported to omit code on this reply — see above.)
11Inventory in progress (IOT_ERROR_INVENTORY_IN_PROGRESS) — the mode cannot be changed while an inventory is running. Stop it with control_operation first.
22Advanced configuration not set (IOT_CTRL_ADVANCED_PROFILE_NOT_SET) — profiles: ADVANCED was sent without advancedConfigurations.
23Invalid enum value (IOT_ERROR_INVALID_ENUM) — a field (e.g. profiles, operationType, a Gen2 enum) is outside its allowed set.
24Max 32 prefilters limit exceeded (IOT_ERROR_PREFILTERS_LIMIT_EXCEEDED) — more than 32 select entries.
28Tag match pattern length exceeded (IOT_ERROR_TAG_MATCH_PATTERN_LENGTH_EXCEEDED) — a select.tagPattern is too long.
31Max write length exceeded (IOT_ERROR_MAX_WRITE_LENGTH_EXCEEDED) — a WRITE data block is too large.
32Write data length mismatch (IOT_ERROR_WRITE_DATA_LENGTH_MISMATCH) — a WRITE data length does not match its length.
101Default error (Error in processing command) — a generic failure. Note: a 101 can still leave the mode partially applied — read back with get_operating_mode to see what took effect.

Examples​

Publish set_operating_mode over the CTRL endpoint; the device replies with the status envelope under Response Payload. Every request example in the contract is in the Configuration section dropdown under Request Payload: the full ADVANCED configuration (Set operating mode, which arms READ, WRITE, ACCESS and LOCK operations with the default password 00000000), and one partial set per section. Profile setting is also the way to return the profile to its default.

A generic failure returns code 101 (which may still partially apply — read back to confirm):

Response — error (code 101)
{
"command": "set_operating_mode",
"requestId": "1286",
"apiVersion": "V1.1",
"response": {
"code": 101,
"description": "Error in processing command"
}
}

Notes and Caveats​

Armed access operations execute on the next inventory — and the payload carries their password

accessOperations (WRITE, LOCK, KILL) are stored by set_operating_mode and executed against tags on the next inventory START — not immediately. KILL permanently disables a tag; LOCK with PERMANENT_LOCK/PERMANENT_UNLOCK is irreversible; WRITE overwrites tag memory. Because partial sets merge, armed operations persist until you overwrite the accessOperations array (with a benign or empty set) or reboot. A profile-only set — or any partial set that omits accessOperations — does not clear them. Do this before running an inventory that should not trigger them. Each armed operation also carries accessOperations[].config.password, an 8-hex-char (32-bit) access/lock/kill password you send (default 00000000) — mask it in shared artifacts. The device stores it but never echoes it back (get_operating_mode returns it empty). This command carries no broker/Wi-Fi credentials.

  • Volatile and CTRL-only. The operating mode resets to default on reboot, and the command is answered only on the CTRL endpoint (see Topic Mapping).
  • FAST_READ is enumerated but not currently supported. FAST_READ is the first member of the profiles enum, and the schema glosses it as "Configures the radio for maximum read speed within short range. (Currently not supported)". The command description repeats the restriction and extends it to the event plane: "When RFD40/90 sled is configured to FAST_READ profile, data events are not currently supported. On reboot the set configurations will be lost and the device will go back to default operating mode." Treat FAST_READ as unavailable, and expect no dataEVT traffic while the sled is in that profile.

Configure with set_operating_mode, then verify with get_operating_mode (especially after a 101), and run the inventory with control_operation. For the concept-level view, see Operating Mode.

Related: 📕 get_operating_mode · 📕 control_operation · 📕 config_endpoint · 📕 reboot · 📕 Response Codes

Was this helpful?