zigbee-on-host
    Preparing search index...
    Index

    Constructors

    Properties

    apsHandler: APSHandler

    APS layer handler

    context: StackContext

    Centralized stack context holding all shared state

    macHandler: MACHandler

    MAC layer handler

    nwkGPHandler: NWKGPHandler

    NWK GP layer handler

    nwkHandler: NWKHandler

    NWK layer handler

    parser: OTRCPParser = ...
    writer: OTRCPWriter = ...

    Accessors

    Methods

    • Set the Spinel properties required to start a 802.15.4 MAC network.

      Should be called after start.

      Returns Promise<void>

    • Recommended format: STACK-NAME/STACK-VERSION[BUILD_INFO][; OTHER_INFO]; BUILD_DATE_AND_TIME Encoded as a zero-terminated UTF-8 string.

      Returns Promise<string>

    • The CCA (clear-channel assessment) threshold. NOTE: Currently not implemented in: ot-ti

      Returns Promise<number>

      dBm (int8)

    • The current RSSI (Received signal strength indication) from the radio. This value can be used in energy scans and for determining the ambient noise floor for the operating environment.

      Returns Promise<number>

      dBm (int8)

    • The radio receive sensitivity. This value can be used as lower bound noise floor for link metrics computation.

      Returns Promise<number>

      dBm (int8)

    • Returns Promise<[major: number, minor: number]>

      [SPINEL_PROTOCOL_VERSION_THREAD_MAJOR, SPINEL_PROTOCOL_VERSION_THREAD_MINOR]

    • Logic optimizes code paths to try to avoid more parsing when frames will eventually get ignored by detecting as early as possible. HOT PATH: This method is called for every incoming frame. Optimizations:

      • Early bail-outs to minimize processing
      • Inline-able operations
      • Minimal allocations in critical paths

      Parameters

      Returns Promise<void>

    • Performs a software reset into bootloader. If up, will stop network before.

      Returns Promise<void>

    • Remove the current state file and clear all related tables.

      Will throw if state already loaded (should be called before start).

      Returns Promise<void>

    • Performs a STACK reset after resetting a few PHY/MAC properties to default. If up, will stop network before.

      Returns Promise<void>

    • Wraps Zigbee APS DATA sending for broadcast. Throws if could not send.

      Parameters

      • payload: Buffer
      • profileId: number
      • clusterId: number
      • dest16: number

        The broadcast address to send to [0xfff8..0xffff]

      • destEp: number
      • sourceEp: number

      Returns Promise<number>

      The APS counter of the sent frame.

    • Wraps Zigbee APS DATA sending for groupcast. Throws if could not send.

      Parameters

      • payload: Buffer
      • profileId: number
      • clusterId: number
      • group: number

        The group to send to

      • sourceEp: number

      Returns Promise<number>

      The APS counter of the sent frame.

    • Wraps Zigbee APS DATA sending for unicast. Throws if could not send.

      Parameters

      • payload: Buffer
      • profileId: number
      • clusterId: number
      • dest16: number
      • dest64: bigint | undefined
      • destEp: number
      • sourceEp: number

      Returns Promise<number>

      The APS counter of the sent frame.

    • Wraps Zigbee APS DATA sending for ZDO. Throws if could not send.

      Parameters

      • payload: Buffer
      • nwkDest16: number
      • nwkDest64: bigint | undefined
      • clusterId: number

      Returns Promise<[number, number]>

      • The APS counter of the sent frame.
      • The ZDO counter of the sent frame.
    • The CCA (clear-channel assessment) threshold. Set to -128 to disable. The value will be rounded down to a value that is supported by the underlying radio hardware. NOTE: Currently not implemented in: ot-ti

      Parameters

      • ccaThreshold: number

        dBm (>= -128 and <= 127)

      Returns Promise<void>

    • The transmit power of the radio. The value will be rounded down to a value that is supported by the underlying radio hardware.

      Parameters

      • txPower: number

        dBm (>= -128 and <= 127)

      Returns Promise<void>

    • Parameters

      • payload: Buffer
      • timeout: number = 10000

      Returns Promise<void>

    • Start sniffing. Cannot be used after state is loaded or network is up. WARNING: This is expected to run in the "run-and-quit" pattern as it overrides the onStreamRawFrame function.

      Parameters

      • channel: number

        The channel to sniff on

      Returns Promise<void>