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

Errors

Public errors are small typed enums in ROHI terms. Platform crates map every vendor error into them; raw vendor errors never reach higher layers. Messages never contain secrets.

DomainTypeWhereVariants / meaning
Wi-FiWifiErrorrohi-netNotConfigured, Busy (command queue full / scan in flight), Timeout, ScanFailed, NetworkNotFound, AuthenticationFailed, AssociationFailed, DhcpFailed, Disconnected, InvalidConfig, DriverError
IP data planeNetErrorrohi-netNetworkUnavailable, DnsFailed, ConnectFailed, NoSocketAvailable, ConnectionReset, Timeout, Backend; implements embedded_io_async::Error
BLEBleErrorrohi-netDisconnected (returned once per connection end), BufferTooSmall, Busy, DriverError
Wireless runtimeWirelessErrorrohi-net-espAlreadyTaken, BleInit
Configuration storeConfigError<E>, SectionErrorrohi-configsee Configuration store › Errors
IdentityIdentityErrorrohi-identityNotProvisioned and key/signature errors, see Device identity
Configuration serviceServiceErrorfirmware configUnavailable, StorageHealthy, Store, Section, Encode
MeasurementsMeasurementServiceErrorrohi-halBusy (only try_snapshot)
SensorsSensorErrorCode, DriverErrorrohi-haldomain error codes reported in SensorEvent::Error
Control servicesServiceErrorrohi-controlInvalidArgument, NotFound, NotSupported, Busy, Unavailable, Internal, IdentityNotProvisioned, IdentityAlreadyProvisioned
Control protocolErrorCoderohi-control-protoINVALID_ARGUMENT, NOT_FOUND, NOT_SUPPORTED, BUSY, UNAVAILABLE, PERMISSION_DENIED, INTERNAL, IDENTITY_NOT_PROVISIONED, IDENTITY_ALREADY_PROVISIONED
FramingFrameErrorrohi-control-blebad version, invalid/duplicate/missing fragment, changed header, oversize, length mismatch

Distinguishing “network unavailable” from other failures

NetError::NetworkUnavailable means the network cannot carry traffic (Wi-Fi not configured or connecting, DHCP incomplete, link lost); DnsFailed and ConnectFailed are only reported while the network is up. Use the Wi-Fi status (Networking) to wait for readiness before retrying.

Mapping at the control boundary

SourceControl ServiceErrorProtocol ErrorCode
WifiError::NotConfiguredNotFoundNOT_FOUND
WifiError::BusyBusyBUSY
WifiError::InvalidConfigInvalidArgumentINVALID_ARGUMENT
WifiError::Timeout, ScanFailedUnavailableUNAVAILABLE
other WifiErrorInternalINTERNAL
configuration store unavailableUnavailableUNAVAILABLE
other configuration failuresInternalINTERNAL
missing capability–NOT_SUPPORTED
link policy denies a mutation–PERMISSION_DENIED