Skip to main content

Crate zigbee_host

Crate zigbee_host 

Source
Expand description

§zigbee-host

A Zigbee coordinator host.

The NCP runs the mesh; this crate runs the coordinator’s application:

  • Formation with caller-supplied keys (NetworkSettings): resume the NCP’s network when it matches, form it when the NCP has none, and refuse (never silently wipe) when the NCP runs another network.
  • Trust center: Zigbee 3.0 unique link keys (hashed from a random root key), install codes (install_code), and a join policy that can require install codes or turn away pre-3.0 devices.
  • Interview (interview): node and simple descriptors, the Basic cluster, then binding and reporting configuration from the cluster library’s defaults and IAS zone enrollment; resumable per step.
  • Reports and commands from devices as HostEvents, with default responses and the Time cluster answered.
  • Device store (store): one JSON file, written atomically and only when a device record changes, batched.
  • Backup and restore (backup) in the open coordinator backup format: network key and frame counter, PAN ids, channel, coordinator IEEE address and trust center link keys, restorable onto a new coordinator of either family.
  • Topology (topology) from last-hop link quality, route records and neighbor-table scans.
  • Probe (probe): what NCP is on a port, read-only and bounded.

The NCP sits behind the Adapter trait: EzspAdapter for Silicon Labs EmberZNet 7.4 and 8.x, ZnpAdapter for Texas Instruments Z-Stack 3, DeconzAdapter for dresden elektronik ConBee and RaspBee, and AnyAdapter to choose at run time.

Features: host (everything above), probe with serial alone for a small detection tool, serial to open ports by name.

Part of zigbee-bridge, maintained by Pulzar. See the user guide, the library guide and the API documentation.

License: MIT.

Re-exports§

pub use adapter::Adapter;
pub use adapter::AdapterEvent;
pub use adapter::AdapterInfo;
pub use adapter::Beacon;
pub use adapter::JoinPolicy;
pub use adapter::NetworkInfo;
pub use adapter::NetworkSettings;
pub use adapter::StartMode;
pub use adapter::StartOutcome;
pub use any_adapter::AnyAdapter;
pub use backup::Backup;
pub use deconz_adapter::DeconzAdapter;
pub use device::Device;
pub use device::InterviewStage;
pub use error::HostError;
pub use ezsp_adapter::random_network;
pub use ezsp_adapter::EzspAdapter;
pub use probe::NcpIdentity;
pub use probe::NcpKind;
pub use probe::ProbeError;
pub use znp_adapter::ZnpAdapter;

Modules§

adapter
The boundary between the host and a network co-processor family.
any_adapter
An Adapter for whichever coordinator family is on the port, chosen at run time.
backup
Network backups in the open coordinator backup format (version 1), the JSON format several Zigbee hosts share, so a backup names everything a replacement coordinator needs: the network key and its frame counter, the PAN ids and channel, the coordinator’s IEEE address and the trust center’s link keys.
deconz_adapter
The Adapter for dresden elektronik ConBee and RaspBee coordinators over the deCONZ serial protocol.
device
What the host knows about each device.
error
Host errors.
ezsp_adapter
The Adapter for Silicon Labs EmberZNet NCPs over EZSP.
install_code
Zigbee 3.0 install codes and the AES-MMO hash that turns one into a link key (Zigbee specification B.6; Base Device Behavior 10.1).
interview
The interview: learn what a new device is, then configure it.
ota
Zigbee OTA upgrade images and a directory of them.
port
Open a coordinator’s port by name: a serial device, or tcp://host:port for network-attached coordinators and the simulator.
probe
What NCP is on a port.
store
The device store: one JSON file, written atomically and only when a device record changes, batched so a burst of changes is one write.
topology
The mesh as the coordinator sees it: links between devices, from the last hop of every message, from route records, and from neighbor-table scans. Passive sources cost nothing on the air; scans are explicit.
znp_adapter
The Adapter for Texas Instruments Z-Stack 3 coordinators over ZNP.

Structs§

FrameLink
How a frame arrived.
Host
A running coordinator host. Clones share it.
HostConfig
Host settings.
OtaOffer
A device’s firmware and what the image directory has for it.
RawZcl
A ZCL frame for Host::zcl_raw.

Enums§

HostEvent
What happened on the network.

Constants§

HOST_ENDPOINT
The host’s endpoint, which devices bind to.