Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error & Status Types

This chapter catalogues every error and status enum in zigbee-rs, organised by stack layer from bottom (MAC) to top (BDB). Use the hex codes to correlate with Zigbee specification tables and on-the-wire values.


MAC Layer

MacError

Crate: zigbee-mac · Spec ref: IEEE 802.15.4 status codes

General-purpose error returned by MAC primitives. No numeric discriminants — these are Rust-only symbolic values.

VariantMeaning
NoBeaconNo beacon received during an active or passive scan
InvalidParameterA primitive was called with an out-of-range parameter
RadioErrorThe radio hardware reported an unrecoverable error
ChannelAccessFailureCSMA-CA failed — the channel remained busy for all back-off attempts
NoAckNo acknowledgement frame was received after transmission
FrameTooLongThe assembled MPDU exceeds the PHY maximum frame size
UnsupportedThe requested operation is not supported by this radio backend
SecurityErrorFrame security processing (encryption / MIC) failed
TransactionOverflowThe indirect-transmit queue is full
TransactionExpiredAn indirect frame was not collected before the persistence timer expired
ScanInProgressA scan request was issued while another scan is already active
TrackingOffSuperframe tracking was lost (beacon-enabled networks)
AssociationDeniedThe coordinator denied the association request
PanAtCapacityThe coordinator indicated the PAN is at capacity
OtherCatch-all for unmapped / unknown errors
NoDataA data request (poll) returned no pending frame within the timeout

AssociationStatus

Crate: zigbee-mac · File: primitives.rs · Spec ref: IEEE 802.15.4 Table 83

Returned by the coordinator in an Association Response command.

VariantCodeMeaning
Success0x00Association was successful
PanAtCapacity0x01PAN is at capacity — no room for new devices
PanAccessDenied0x02Access to the PAN is denied

RadioError (platform-specific)

Each radio backend defines its own RadioError enum. The variants are similar but not identical across platforms.

CC2340 backend

VariantMeaning
TxFailedTransmission failed (generic)
ChannelBusyCCA indicated a busy channel
NoAckNo acknowledgement from the receiver
TimeoutOperation timed out
HardwareErrorRadio hardware fault

BL702 backend

VariantMeaning
CcaFailureClear Channel Assessment failure — channel is busy
TxAbortedTX was aborted by hardware
HardwareErrorRadio hardware error during TX
InvalidFrameFrame too long or too short
CrcErrorReceived frame failed CRC check
NotInitializedRadio driver has not been initialized
VariantMeaning
CcaFailureCCA failure — channel is busy
TxAbortedTX was aborted
HardwareErrorRadio hardware error
InvalidFrameFrame too long or too short
CrcErrorReceived frame failed CRC check
NotInitializedRadio not initialized

RclCommandStatus (CC2340 only)

Crate: zigbee-mac · File: cc2340/driver.rs

Low-level Radio Control Layer status on the CC2340.

VariantCodeMeaning
Idle0x0000Command is idle
Active0x0001Command is currently executing
Finished0x0101Command completed successfully
ChannelBusy0x0801CCA failed — channel busy
NoAck0x0802No acknowledgement received
RxErr0x0803Receive error
Error0x0F00Generic hardware error

Lmac154TxStatus (BL702 only)

Crate: zigbee-mac · File: bl702/driver.rs

TX completion status from the BL702 lower-MAC.

VariantCodeMeaning
TxFinished0Transmission completed successfully
CsmaFailed1CSMA-CA procedure failed
TxAborted2TX was aborted
HwError3Hardware error

NWK Layer

NwkStatus

Crate: zigbee-nwk · Spec ref: Zigbee spec Table 3-70

VariantCodeMeaning
Success0x00Operation completed successfully
InvalidParameter0xC1A parameter was out of range or invalid
InvalidRequest0xC2The request is invalid in the current state
NotPermitted0xC3Operation not permitted (e.g. security policy)
StartupFailure0xC4Network startup (formation or join) failed
AlreadyPresent0xC5An entry already exists (e.g. duplicate address)
SyncFailure0xC6Synchronisation with the parent lost
NeighborTableFull0xC7The neighbour table has no room for a new entry
UnknownDevice0xC8The specified device is not in the neighbour table
UnsupportedAttribute0xC9NIB attribute identifier is not recognized
NoNetworks0xCANo networks were found during the scan
MaxFrmCounterReached0xCCThe outgoing frame counter has reached its maximum
NoKey0xCDNo matching network key found for decryption
BadCcmOutput0xCECCM* encryption / decryption produced invalid output
RouteDiscoveryFailed0xD0Route discovery did not find a path to the destination
RouteError0xD1A routing error occurred (e.g. link failure)
BtTableFull0xD2The broadcast transaction table is full
FrameNotBuffered0xD3A frame could not be buffered for later transmission
FrameTooLong0xD4The NWK frame exceeds the maximum allowed size

RouteStatus

Crate: zigbee-nwk · File: routing.rs

Internal status of a routing table entry.

VariantMeaning
ActiveRoute is valid and in use
DiscoveryUnderwayRoute discovery has been initiated
DiscoveryFailedRoute discovery completed without finding a route
InactiveRoute exists but is not currently active
ValidationUnderwayRoute is being validated (e.g. many-to-one route)

APS Layer

ApsStatus

Crate: zigbee-aps · Spec ref: Zigbee spec Table 2-27

VariantCodeMeaning
Success0x00Request executed successfully
AsduTooLong0xA0ASDU is too large and fragmentation is not supported
DefragDeferred0xA1A fragmented frame could not be defragmented at this time
DefragUnsupported0xA2Device does not support fragmentation / defragmentation
IllegalRequest0xA3A parameter value was out of range
InvalidBinding0xA4UNBIND request failed — binding table entry not found
InvalidParameter0xA5GET/SET request used an unknown attribute identifier
NoAck0xA6APS-level acknowledged transmission received no ACK
NoBoundDevice0xA7Indirect (binding) transmission found no bound devices
NoShortAddress0xA8Group-addressed transmission found no matching group entry
TableFull0xA9Binding table or group table is full
UnsecuredKey0xAAFrame was secured with a link key not in the key table
UnsupportedAttribute0xABGET/SET request used an unsupported attribute identifier
SecurityFail0xADAn unsecured frame was received when security was required
DecryptionError0xAEAPS frame decryption or authentication failed
InsufficientSpace0xAFNot enough buffer space for the requested operation
NotFound0xB0No matching entry in the binding table

ZCL Layer

ZclStatus

Crate: zigbee-zcl · Spec ref: ZCL Rev 8, Table 2-12

VariantCodeMeaning
Success0x00Operation completed successfully
Failure0x01Generic failure
NotAuthorized0x7ESender is not authorized for this operation
ReservedFieldNotZero0x7FA reserved field in the frame was non-zero
MalformedCommand0x80The command frame is malformed
UnsupClusterCommand0x81Cluster-specific command is not supported
UnsupGeneralCommand0x82General ZCL command is not supported
UnsupManufacturerClusterCommand0x83Manufacturer-specific cluster command is not supported
UnsupManufacturerGeneralCommand0x84Manufacturer-specific general command is not supported
InvalidField0x85A field in the command contains an invalid value
UnsupportedAttribute0x86The specified attribute is not supported on this cluster
InvalidValue0x87The attribute value is out of range or otherwise invalid
ReadOnly0x88Attribute is read-only and cannot be written
InsufficientSpace0x89Not enough space to fulfil the request
DuplicateExists0x8AA duplicate entry already exists
NotFound0x8BThe requested element was not found
UnreportableAttribute0x8CThe attribute does not support reporting
InvalidDataType0x8DThe data type does not match the attribute’s type
InvalidSelector0x8EThe selector (index) for a structured attribute is invalid
WriteOnly0x8FAttribute is write-only and cannot be read
InconsistentStartupState0x90Startup attribute set is inconsistent
DefinedOutOfBand0x91Value was already defined by an out-of-band mechanism
Inconsistent0x92Supplied values are inconsistent
ActionDenied0x93The requested action has been denied
Timeout0x94The operation timed out
Abort0x95Operation was aborted
InvalidImage0x96OTA image is invalid
WaitForData0x97Server is not ready — try again later
NoImageAvailable0x98No OTA image is available for this device
RequireMoreImage0x99More image data is required to continue
NotificationPending0x9AA notification is pending delivery
HardwareFailure0xC0Hardware failure on the device
SoftwareFailure0xC1Software failure on the device
CalibrationError0xC2Calibration error
UnsupportedCluster0xC3The cluster is not supported

ZclFrameError

Crate: zigbee-zcl · File: frame.rs

Errors during ZCL frame parsing.

VariantMeaning
TooShortBuffer too short to contain a valid ZCL header
PayloadTooLargePayload exceeds maximum buffer size
InvalidFrameTypeFrame type bits are invalid / reserved

OtaImageError

Crate: zigbee-zcl · File: clusters/ota_image.rs

Errors when parsing an OTA Upgrade image header.

VariantMeaning
TooShortData too short for the OTA header
BadMagicMagic number does not match the OTA file identifier
UnsupportedVersionHeader version is not supported
BadHeaderLengthHeader length field does not match actual data
ImageTooLargeImage size exceeds available storage

ZDO Layer

ZdpStatus

Crate: zigbee-zdo · Spec ref: Zigbee spec Table 2-96

Returned in every ZDP response frame. Also aliased as ZdoStatus.

VariantCodeMeaning
Success0x00Request completed successfully
InvRequestType0x80The request type is invalid
DeviceNotFound0x81The addressed device could not be found
InvalidEp0x82The endpoint is invalid or not active
NotActive0x83The endpoint is not in the active state
NotSupported0x84The requested operation is not supported
Timeout0x85The operation timed out
NoMatch0x86No descriptor matched the request
TableFull0x87The internal table (binding, etc.) is full
NoEntry0x88No matching entry was found
NoDescriptor0x89The requested descriptor is not available

ZdoError

Crate: zigbee-zdo · File: lib.rs

Errors originating from ZDO internal processing.

VariantMeaning
BufferTooSmallSerialisation buffer is too small for the frame
InvalidLengthInput data is shorter than the frame format requires
InvalidDataA parsed field contains a reserved or invalid value
ApsError(ApsStatus)The underlying APS layer returned an error (wraps ApsStatus)
TableFullAn internal fixed-capacity table is full

BDB Layer

BdbStatus

Crate: zigbee-bdb · Spec ref: BDB spec Table 4

VariantCodeMeaning
Success0x00Commissioning completed successfully
InProgress0x01Commissioning is currently in progress
NotOnNetwork0x02Node is not on a network (required for this operation)
NotPermitted0x03Operation is not supported by this device type
NoScanResponse0x04No beacons received during network steering
FormationFailure0x05Network formation failed
SteeringFailure0x06Network steering failed after all retries
NoIdentifyResponse0x07No Identify Query response during Finding & Binding
BindingTableFull0x08Binding table full or cluster matching failed
TouchlinkFailure0x09Touchlink commissioning failed or is not supported
TargetFailure0x0ATarget device is not in identifying mode
Timeout0x0BThe operation timed out

BdbCommissioningStatus

Crate: zigbee-bdb · File: attributes.rs · Spec ref: BDB spec Table 4

Attribute value recording the result of the last commissioning attempt. Similar to BdbStatus but used as a persistent attribute rather than a one-shot return value.

VariantCodeMeaning
Success0x00Last commissioning attempt succeeded (default)
InProgress0x01Commissioning is in progress
NoNetwork0x02Device is not on a network
TlTargetFailure0x03Touchlink target failure
TlNotAddressAssignment0x04Touchlink address assignment failure
TlNoScanResponse0x05Touchlink scan received no response
NotPermitted0x06Operation not permitted for this device type
SteeringFormationFailure0x07Network steering or formation failed
NoIdentifyQueryResponse0x08Finding & Binding received no Identify response
BindingTableFull0x09Binding table is full
NoScanResponse0x0ANo scan response received

Runtime / Support

StartError

Crate: zigbee-runtime · File: event_loop.rs

High-level errors from device start / join / leave operations.

VariantMeaning
InitFailedBDB initialization failed
CommissioningFailedBDB commissioning (steering or formation) failed

FirmwareError

Crate: zigbee-runtime · File: firmware_writer.rs

Errors during OTA firmware write operations.

VariantMeaning
EraseFailedFlash erase operation failed
WriteFailedFlash write operation failed
VerifyFailedVerification failed (hash or size mismatch)
OutOfRangeOffset is out of range for the firmware slot
ImageTooLargeFirmware slot is not large enough for the image
ActivateFailedActivation failed (e.g. boot flag not set)
HardwareErrorFlash hardware error

NvError

Crate: zigbee-runtime · File: nv_storage.rs

Non-volatile storage errors.

VariantMeaning
NotFoundRequested item was not found
FullStorage is full
BufferTooSmallItem is too large for the provided buffer
HardwareErrorHardware error during read or write
CorruptData corruption detected