Status codes are sent from the NCP to the host via PROP_LAST_STATUS
using the CMD_VALUE_IS
command to indicate the return status of a previous command. As with any response, the TID field of the FLAG byte is used to correlate the response with the request.
Note that most successfully executed commands do not indicate a last status of STATUS_OK
. The usual way the NCP indicates a successful command is to mirror the property change back to the host. For example, if you do a CMD_VALUE_SET
on PROP_PHY_ENABLED
, the NCP would indicate success by responding with a CMD_VALUE_IS
for PROP_PHY_ENABLED
. If the command failed, PROP_LAST_STATUS
would be emitted instead.
See (#prop-last-status) for more information on PROP_LAST_STATUS
.
STATUS_OK
: Operation has completed successfully.STATUS_FAILURE
: Operation has failed for some undefined reason.STATUS_UNIMPLEMENTED
: The given operation has not been implemented.STATUS_INVALID_ARGUMENT
: An argument to the given operation is invalid.STATUS_INVALID_STATE
: The given operation is invalid for the current state of the device.STATUS_INVALID_COMMAND
: The given command is not recognized.STATUS_INVALID_INTERFACE
: The given Spinel interface is not supported.STATUS_INTERNAL_ERROR
: An internal runtime error has occurred.STATUS_SECURITY_ERROR
: A security or authentication error has occurred.STATUS_PARSE_ERROR
: An error has occurred while parsing the command.STATUS_IN_PROGRESS
: The operation is in progress and will be completed asynchronously.STATUS_NOMEM
: The operation has been prevented due to memory pressure.STATUS_BUSY
: The device is currently performing a mutually exclusive operation.STATUS_PROP_NOT_FOUND
: The given property is not recognized.STATUS_PACKET_DROPPED
: The packet was dropped.STATUS_EMPTY
: The result of the operation is empty.STATUS_CMD_TOO_BIG
: The command was too large to fit in the internal buffer.STATUS_NO_ACK
: The packet was not acknowledged.STATUS_CCA_FAILURE
: The packet was not sent due to a CCA failure.STATUS_ALREADY
: The operation is already in progress or the property was already set to the given value.STATUS_ITEM_NOT_FOUND
: The given item could not be found in the property.STATUS_INVALID_COMMAND_FOR_PROP
: The given command cannot be performed on this property.STATUS_RESET_POWER_ON
STATUS_RESET_EXTERNAL
STATUS_RESET_SOFTWARE
STATUS_RESET_FAULT
STATUS_RESET_CRASH
STATUS_RESET_ASSERT
STATUS_RESET_OTHER
STATUS_RESET_UNKNOWN
STATUS_RESET_WATCHDOG