Skip to main content

Response Codes

ReferenceAudience: MQTT API integratorsUse: look up any command response.code — its meaning, cause, recommended fix, and which commands return it

Overview​

Every reply to a command carries a response object with a numeric code and a human-readable description. This page lists every code: what it means, why it occurs, what to do, and which commands can return it.

code is a closed set. Only the values in the catalog are defined, so treat any other value as an unrecognized reply and log it.

Response codes come only from the reader, inside a command reply. They are separate from the return codes that MQTT 3.1.1 defines for CONNACK and SUBACK, and from errors that your MQTT client library raises. Events never carry a response code.

The catalog and the matrix are generated from the MQTT API contract.

The Response Object​

Response object
{
"code": 0,
"description": "Success"
}

How to Read a Code​

Decide the outcome from response in this order:

  • code is 0, or code is absent and description is "Success": the command succeeded. The contract requires code, but readers have been reported to omit it on a successful reply; error replies always include it. See Success Without a Code.
  • code is 1: the reader accepted the request and is still working on it. Only set_os, reboot, and install_certificate return it. See Asynchronous Commands.
  • code is 101: a default error, returned when no more specific code applies.
  • Any other code: the command did not succeed. Use the code's cause and recommended action in the catalog.

Don't parse description: its wording can change between firmware builds.

The catalog gives each code its cause and recommended action. When the fix takes more than one step, these guides walk through it:

CodesWhere the fix is
10, 25, 26, 27, 33, 35, 37 (endpoint configuration)Endpoint Configuration and Recover from Configuration Problems
15 to 20 (Wi-Fi profiles)Network Configuration
9, 21, 29, 30, 34, 36 (certificates)Certificate Management
4, 8, 13, 14 (firmware updates)Device Lifecycle and Recover from Firmware Problems
5, 11, 12, 22, 24, 28 (inventory and radio settings)Configure Advanced Radio Settings
31, 32 (tag writes)Read and Write Tag Memory
No reply at allCommands Get No Response

To decide in code what to do with a reply, including when to retry, see Message Envelopes and Correlation and Duplicates and Retries.

Before you retry after an error, apply the contract's rule: retry only when the recommended action names a condition that can change without changing your request, such as waiting, stopping an inventory, or charging the reader. Otherwise change the request first. See Duplicates and Retries.

Response Code Catalog​

Every code in ascending order, with 101 last. Kind follows from the code: 0 is success, 1 is an asynchronous acceptance, 101 is the catch-all, and every other code is an error. Applies to lists the commands in this reference that can return the code.

CodeKindMeaningIoT status codeCauseRecommended actionApplies to
0SuccessSuccessIOT_STATUS_SUCCESSCommand executed successfullyNo action requiredAll commands
1Accepted (async)Command payload is acceptedIOT_STATUS_CMD_PAYLOAD_ACCEPTEDThe device accepted the payload and is processing it asynchronouslyWait for a follow-up event or poll status to confirm completionset_os, reboot, install_certificate
2ErrorInvalid payloadIOT_ERROR_INVALID_PAYLOADThe JSON payload is malformed or contains invalid field valuesValidate the payload against the command schema and correct any errorsset_wifi, delete_wifi_profile
3ErrorNot able to retrieve informationIOT_ERROR_INFO_NOT_AVAILABLEThe device could not gather the requested information at this timeRetry the command after a short delay; if persistent, reboot the deviceget_status, get_endpoint_config, get_wifi, get_eth, get_current_region, get_installed_certificates, get_operating_mode, get_post_filter
4ErrorFirmware update in progressIOT_STATUS_FW_UPDATE_IN_PROGRESSA firmware update is already running on the deviceWait for the current update to complete before sending another set_os commandset_os
5ErrorCan't reboot device, inventory in progressIOT_ERROR_IN_REBOOT_INVENTORY_IN_PROGRESSAn RFID inventory operation is currently activeStop the inventory with control_operation before rebootingreboot
6ErrorRegion is not configuredIOT_STATUS_REGION_NOT_CONFIGUREDNo regulatory region has been set on the deviceConfigure the region before attempting to connectcloud_connect
7ErrorInterface is not availableIOT_ERROR_INTERFACE_NOT_AVAILABLEThe requested network interface is not present or not enabledVerify the device has the required network interface and that it is enabledcloud_connect
8ErrorInsufficient flash sizeIOT_ERROR_LOW_FLASH_SIZENot enough free flash storage to download the firmware fileFree up flash space or use a smaller firmware packageset_os
9ErrorFile not foundIOT_STATUS_FILE_NOT_FOUNDThe specified file or certificate could not be found on the device or serverVerify the file path or URL is correct and the file existsinstall_certificate, delete_certificate, get_installed_certificates, set_os
10ErrorConfiguration already existsIOT_ERROR_CONFIG_ALREADY_EXISTAn endpoint or configuration with the same name already existsDelete the existing configuration first or use a different nameconfig_endpoint
11ErrorInventory in progressIOT_ERROR_INVENTORY_IN_PROGRESSAn RFID inventory operation is currently runningStop the current inventory before starting a new operation or changing the modecontrol_operation, set_operating_mode
12ErrorNo Radio Operation in ProgressIOT_ERROR_NO_RADIO_OP_IN_PROGRESSA stop command was sent but no radio operation is currently activeNo action required — the radio is already idlecontrol_operation
13ErrorFirmware update FailedIOT_ERROR_FW_UPDATE_FAILThe firmware download or installation failedCheck the firmware URL, network connectivity, and retry the updateset_os
14ErrorBattery is low, Cannot update firmwareIOT_ERROR_FW_UPDATE_FAIL_LOW_BATTERYBattery charge is too low to safely perform a firmware updateCharge the device or connect to external power before retryingset_os
15ErrorWIFI Error - SSID not foundIOT_ERROR_SSID_NOT_FOUNDThe specified Wi-Fi SSID does not exist in saved profilesVerify the SSID name is correct and that the profile has been savedset_wifi, delete_wifi_profile
16ErrorWIFI Error - Cannot delete active SSIDIOT_ERROR_DELETE_ACTIVE_SSIDThe Wi-Fi profile being deleted is the currently connected networkDisconnect from the network or connect to a different SSID before deletingdelete_wifi_profile
17ErrorWIFI Error - SSID missedIOT_ERROR_SSID_MISSEDThe required SSID field is missing from the payloadInclude the SSID field in the command payloadset_wifi, delete_wifi_profile
18ErrorWIFI Error - SSID already existIOT_ERROR_SSID_ALREADY_EXISTA Wi-Fi profile with this SSID is already saved on the deviceDelete the existing profile first or update it instead of creating a new oneset_wifi
19ErrorWIFI Error - SSID count overflowIOT_ERROR_SSID_LIMIT_OVERFLOWThe maximum number of saved Wi-Fi profiles has been reachedDelete an unused Wi-Fi profile before adding a new oneset_wifi
20ErrorWifi is not supportedIOT_ERROR_WIFI_INTER_NOT_SUPPORTEDThe device hardware does not have a Wi-Fi interfaceUse Ethernet or another supported interface for network connectivityset_wifi
21ErrorCertificate not foundIOT_ERROR_CERT_NOT_FOUNDThe specified certificate is not installed on the deviceVerify the certificate name and install it using install_certificate if neededdelete_certificate, get_installed_certificates, install_certificate
22ErrorAdvanced configuration not setIOT_CTRL_ADVANCED_PROFILE_NOT_SETThe operating mode requires an advanced profile that has not been configuredConfigure the advanced profile settings before setting the operating modeset_operating_mode
23ErrorInvalid enum valueIOT_ERROR_INVALID_ENUMA field value does not match any of the allowed enum optionsCheck the schema for allowed values and correct the fieldconfig_endpoint, set_wifi, install_certificate, control_operation, set_operating_mode, set_post_filter
24ErrorMax 32 prefilters limit exceededIOT_ERROR_PREFILTERS_LIMIT_EXCEEDEDMore than 32 prefilter rules were specifiedReduce the number of prefilter rules to 32 or fewerset_operating_mode
25ErrorMax 3 publish topics exceededIOT_ERROR_PUBLISH_TOPICS_EXCEEDEDMore than 3 publish topics were specified in the endpoint configurationReduce the number of publish topics to 3 or fewerconfig_endpoint
26ErrorMax 1 subscribe topic exceededIOT_ERROR_SUBSCRIBE_TOPIC_EXCEEDEDMore than 1 subscribe topic was specified in the endpoint configurationUse only 1 subscribe topic per endpointconfig_endpoint
27ErrorInvalid tenant ID lengthIOT_ERROR_INVALID_TENANTID_LENGTHThe tenant ID exceeds the maximum allowed character lengthShorten the tenant ID to within the allowed limitconfig_endpoint
28ErrorTag match pattern length exceededIOT_ERROR_TAG_MATCH_PATTERN_LENGTH_EXCEEDEDThe tag match pattern string exceeds the maximum allowed lengthShorten the tag match pattern to within the allowed limitset_operating_mode
29ErrorUrl missing for HTTP sourceIOT_ERROR_URL_MISSINGThe URL for the HTTP source is missingProvide a valid URL for the HTTP sourceinstall_certificate
30ErrorCertificate content missing for direct sourceIOT_ERROR_CERT_CONTENT_MISSINGThe certificate content is missing for the direct sourceProvide the required certificate content for the direct sourceinstall_certificate
31ErrorMax write length exceededIOT_ERROR_MAX_WRITE_LENGTH_EXCEEDEDThe maximum write length for the certificate has been exceededEnsure the certificate size is within the allowed limit.set_operating_mode
32ErrorWrite data length mismatchIOT_ERROR_WRITE_DATA_LENGTH_MISMATCHThe length of the data being written does not match the expected lengthEnsure the data length matches the length value added on payload if field given.set_operating_mode
33ErrorEndpoint already configuredIOT_ERROR_ENDPOINT_ALREADY_CONFIGUREDAn endpoint with the same configuration already exists on the deviceDelete the existing endpoint configuration first or modify it instead of creating a new oneconfig_endpoint
34ErrorCertificate base64 decode failedIOT_ERROR_CERT_BASE64_DECODE_FAILEDThe base64 encoded certificate content could not be decodedEnsure the certificate content is correctly base64 encoded and try againinstall_certificate
35ErrorCan't modify an active endpointIOT_ERROR_CANT_MODIFY_ACTIVE_ENDPOINTAn attempt was made to modify an endpoint that is currently activeDeactivate the endpoint before making modificationsconfig_endpoint
36ErrorMissing client key or client certificateIOT_MISSING_CLIENT_KEY_OR_CERTWhen client certificate and its client key are not sent together for installationAlways install client certificate with its keyinstall_certificate
37ErrorInvalid verification type for MQTT TLSIOT_INVALID_MQTT_TLS_VERIFICATION_TYPEThe verification type specified for MQTT TLS is can't be NONESpecify a valid verification type for MQTT TLS such as verify host, verify peer or verify host and peerconfig_endpoint
101Catch-allDefault error—This is an error code for unknown or unhandled errors. It is a catch-all for any error that does not have a specific code assigned.Investigate the error and take appropriate action based on the context.All commands

Codes by Command​

The codes each command can return. Every command can also return 0 and 101, which are included in each row.

CommandResponse codes
get_version0 · 101
get_status0 · 3 · 101
get_current_region0 · 3 · 101
get_eth0 · 3 · 101
get_wifi0 · 3 · 101
set_wifi0 · 2 · 15 · 17 · 18 · 19 · 20 · 23 · 101
delete_wifi_profile0 · 2 · 15 · 16 · 17 · 101
get_endpoint_config0 · 3 · 101
config_endpoint0 · 10 · 23 · 25 · 26 · 27 · 33 · 35 · 37 · 101
get_installed_certificates0 · 3 · 9 · 21 · 101
install_certificate0 · 1 · 9 · 21 · 23 · 29 · 30 · 34 · 36 · 101
delete_certificate0 · 9 · 21 · 101
config_events0 · 101
set_os0 · 1 · 4 · 8 · 9 · 13 · 14 · 101
reboot0 · 1 · 5 · 101
get_operating_mode0 · 3 · 101
set_operating_mode0 · 11 · 22 · 23 · 24 · 28 · 31 · 32 · 101
get_post_filter0 · 3 · 101
set_post_filter0 · 23 · 101
control_operation0 · 11 · 12 · 23 · 101

Notes and Caveats​

  • Codes 6 and 7 are defined but no published command returns them. They are kept because response codes are a fixed numeric sequence, and removing one would renumber the rest.
  • Codes 31 and 32 concern tag write length in set_operating_mode. The cause text for code 31 mentions a certificate, which does not fit a tag write; go by the code's name.
  • A command with no row-specific codes, such as get_version or config_events, returns only 0 and 101.
  • A reply with code 1 is not a result. Subscribe to the event topic before you send set_os or install_certificate, and wait for the outcome. reboot sends no outcome event.
  • No reply is not a code. A misspelled command value, an oversized message, or a full command queue can produce no reply at all. See What Happens to a Malformed Command.
Was this helpful?