McuMgrErrorCode

Almost all requests are responded to with an Mcu Manager return code in the response payload. This value determines whether the request has been successful (rc = 0) or has failed (rc != 0).

This return code is not supposed to be very descriptive and the actual error reason must be determined based on the request and error code. Since McuManager errors are vague and often the same error code could be caused by different reasons, the best way to debug errors here is step through the handler on the device to determine the cause.

List of possible error codes may be found here.

Entries

Link copied to clipboard

Success.

Link copied to clipboard

Unknown error.

Link copied to clipboard

The device has encountered an error due to running out of memory.

Link copied to clipboard

The request header/payload is malformed or payload values are incorrect.

Link copied to clipboard

Timeout error.

Link copied to clipboard

No entry was found for the request. This commonly means that the command group has not been enabled on the device, although the exact meaning.

Link copied to clipboard

The device is not currently in a state to handle the request.

Link copied to clipboard

The response is too large.

Link copied to clipboard

Command is not supported.

Link copied to clipboard

Corrupt.

Link copied to clipboard

Command blocked by processing of other command.

Link copied to clipboard

Access to specific function, command or resource denied.

Link copied to clipboard

Requested SMP protocol version is not supported (too old).

Link copied to clipboard

Requested SMP protocol version is not supported (too new).

Link copied to clipboard

User errors defined from 256 onwards.

Functions

Link copied to clipboard
@NotNull
open fun toString(): @NotNull String
Link copied to clipboard
open fun value(): Int
Link copied to clipboard
@NotNull
open fun valueOf(error: Int): @NotNull McuMgrErrorCode

open fun valueOf(name: String): McuMgrErrorCode

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.