Readonly
address16Readonly
configSeveral attributes are set by loadState
Readonly
deviceMaster table of all known devices on the network. mapping by network64
Readonly
indirectIndirect transmission for devices with rxOnWhenIdle set to false. Mapping by network64
The maximum observed LQI
The minimum observed LQI
Readonly
macCount of MAC NO_ACK reported by Spinel for each device (only present if any). Mapping by network16
Readonly
parserReadonly
pendingAssociations pending DATA_RQ from device. Mapping by network64
Readonly
routeCount of route failures reported by the network for each device (only present if any). Mapping by network16
The maximum observed RSSI
The minimum observed RSSI
Readonly
saveReadonly
sourcemapping by network16
Readonly
streamReadonly
writerThe length of time in seconds during which the trust center will allow joins. The value 0x00 and 0xff indicate that permission is disabled or enabled, respectively, without a specified time limit. 0xff is clamped to 0xfe for security reasons
If true, also allow association on coordinator itself. Ignored if duration 0.
05-3474-23 #3.6.1.10
Assumed valid if assocType === 0x00
If false, rejoin.
MAC capabilities
True if the device associating is a neighbor of the coordinator
Optional
denyOverride: booleanTreat as MACAssociationStatus.PAN_ACCESS_DENIED
Optional
allowOverride: booleanTreat as MACAssociationStatus.SUCCESS
Compute the median LQA for a device from recentLQAs
or using signalStrength
directly if device unknown.
If given, stores the computed LQA from given parameters in the recentLQAs
list of the device before computing median.
Used to retrieve address64
if not given (must be valid if 64 is not)
The address 64 of the device
Optional
signalStrength: numberRSSI. Optional (only use existing entries if not given)
Optional
signalQuality: numberLQI. Optional (only use existing entries if not given)
The number of recentLQAs
to keep for the device (only used if signal params given). Default: 10
The computed LQA
signalStrength
given.signalStrength
givenLQA_raw (c, r) = 255 * (c - c_min) / (c_max - c_min) * (r - r_min) / (r_max - r_min)
Optional
signalQuality: numberRevert allowing joins (keeps allowRejoinsWithWellKnownKey=true
).
Finds the best source route to the destination. Entries with relays with too many NO_ACK will be purged. Bails early if destination16 is broadcast. Throws if both 16/64 are undefined or if destination is unknown (not in device table). Throws if no route and device is not neighbor.
Set the Spinel properties required to start a 802.15.4 MAC network.
Should be called after start
.
The CCA (clear-channel assessment) threshold. NOTE: Currently not implemented in: ot-ti
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.
dBm (int8)
The radio receive sensitivity. This value can be used as lower bound noise floor for link metrics computation.
dBm (int8)
The transmit power of the radio.
dBm (int8)
Put the coordinator in Green Power commissioning mode.
Defaults to 180 if unspecified. Max 254. 0 means exit.
Check if a source route entry for the given address is already present.
If existingEntries
not given and address16 doesn't have any entries, always returns false.
The network address to check for
The entry to check
Optional
existingEntries: SourceRouteTableEntry[]If given, skip the retrieval from sourceRouteTable
and use these entries to check against instead
Load state from file system if exists, else save "initial" state. Afterwards, various keys are pre-hashed and descriptors pre-encoded.
Apply logistic curve on standard mapping to LQI range [0..255]
LQI = (MAC_SPEC_ED_MAX * (RSSIdbm - ED_RF_POWER_MIN_DBM)) / (ED_RF_POWER_MAX_DBM - ED_RF_POWER_MIN_DBM);
where MAC_SPEC_ED_MAX = 255
, ED_RF_POWER_MIN_DBM = -87
, ED_RF_POWER_MAX_DBM = -10
Logic optimizes code paths to try to avoid more parsing when frames will eventually get ignored by detecting as early as possible.
Process 802.15.4 MAC association request.
Process 802.15.4 MAC association response.
Process 802.15.4 MAC beacon request.
Process 802.15.4 MAC data request. Used by indirect transmission devices to retrieve information from parent.
05-3474-R #4.4.11.8
05-3474-R #4.4.11.9
05-3474-R #4.4.11.10
05-3474-R #4.4.11.3
05-3474-R #4.4.11.4 #4.4.5.2.3
05-3474-R #4.4.11.5
05-3474-R #4.4.11.1
05-3474-R #4.4.11.6
05-3474-R #4.4.11.2
05-3474-R #4.4.11.7
05-3474-23 #3.4.14 Optional
05-3474-23 #3.4.15 Optional
05-3474-R #3.4.11
05-3474-R #3.4.12
See 14-0563-19 #A.3.8.2
05-3474-R #3.4.4
05-3474-R #3.4.13
05-3474-R #3.4.8
05-3474-R #3.4.6 Optional
05-3474-R #3.4.7 Optional
05-3474-R #3.4.9 deprecated in R23, should no longer be sent by R23 devices
05-3474-R #3.4.5
05-3474-R #3.4.2
05-3474-R #3.4.1
05-3474-R #3.4.3
05-3474-R #3.4.10
Read the current network state in the save file, if any present.
Optional. For use in places where the state file has already been read.
Read the current network state in the save file, if any present.
Performs a software reset into bootloader. If up, will stop network before.
Remove the current state file and clear all related tables.
Will throw if state already loaded (should be called before start
).
Performs a STACK reset after resetting a few PHY/MAC properties to default. If up, will stop network before.
Format is:
Wraps ZigBee APS DATA sending for broadcast. Throws if could not send.
The broadcast address to send to [0xfff8..0xffff]
The APS counter of the sent frame.
Wraps ZigBee APS DATA sending for groupcast. Throws if could not send.
The group to send to
The APS counter of the sent frame.
Send 802.15.4 MAC association response
Send 802.15.4 MAC command
True if success sending
Send 802.15.4 MAC frame.
True if success sending. Undefined if set for indirect transmission.
Send 802.15.4 MAC frame without checking for need to use indirect transmission.
True if success sending
Wraps ZigBee APS DATA sending for unicast. Throws if could not send.
The APS counter of the sent frame.
Wraps ZigBee APS DATA sending for ZDO. Throws if could not send.
05-3474-R #4.4.11
expected to contain the full payload (including cmdId)
True if success sending (or indirect transmission)
05-3474-R #4.4.11.8
1-byte status code indicating the result of the operation. See Table 2.27
the type of key being verified
SHALL be the 64-bit extended address of the source device of the Verify-Key message
Send a ZigBee APS DATA frame. Throws if could not send.
The APS counter of the sent frame.
05-3474-R #4.4.11.3
parent
05-3474-R #4.4.11.4
SHALL be set to the key being requested
When the RequestKeyType field is 2 (that is, an application key), the partner address field SHALL contain the extended 64-bit address of the partner device that SHALL be sent the key. Both the partner device and the device originating the request-key command will be sent the key.
05-3474-R #4.4.11.4
SHALL be set to the key being requested
05-3474-R #4.4.11.5
SHALL contain the sequence number identifying the network key to be made active.
05-3474-R #4.4.11.1 #4.4.11.1.3.3
SHALL contain a link key that is shared with the device identified in the partner address sub-field
SHALL contain the address of the other device that was sent this link key
SHALL be set to 1 if the device receiving this packet requested this key. Otherwise, this sub-field SHALL be set to 0.
05-3474-R #4.4.11.1 #4.4.11.1.3.2
SHALL contain a network key
SHALL contain the sequence number associated with this network key
SHALL contain the address of the device which SHOULD use this network key If the network key is sent to a broadcast address, the destination address subfield SHALL be set to the all-zero string and SHALL be ignored upon reception.
05-3474-R #4.4.11.1
SHALL contain the link key that SHOULD be used for APS encryption
SHALL contain the address of the device which SHOULD use this link key
05-3474-R #4.4.11.6
SHALL be the 64-bit extended address of the device that is to receive the tunneled command
SHALL be the APS command payload to be sent to the destination
05-3474-R #4.4.11.2
device that SHALL be sent the update information
device whose status is being updated
device whose status is being updated
Indicates the updated status of the device given by the device64 parameter:
05-3474-R #4.4.11.7
type of key being verified
SHALL be the 64-bit extended address of the partner device that the destination shares the link key with
outcome of executing the specialized keyed hash function specified in section B.1.4 using a key with the 1-octet string ‘0x03’ as the input string The resulting value SHALL NOT be used as a key for encryption or decryption
expected to contain the full payload (including cmdId)
True if success sending (or indirect transmission)
05-3474-23 #3.4.15 Optional
the new 16-bit network address assigned, may be same as requestDest16
05-3474-R #3.4.3
NOTE: request
option always true
NOTE: removeChildren
option should not be used (mesh disruption)
if true, the device that is leaving from its current parent will rejoin the network
05-3474-R #3.4.8
set of link status entries derived from the neighbor table (SHALL be specific to the interface to be transmitted on) Links are expected sorted in ascending order by network address.
05-3474-R #3.4.7 Optional
new network address assigned to the rejoining device
05-3474-R #3.4.2, #3.6.4.5.2
SHALL be set to the network address of the first hop in the path back to the originator of the corresponding route request command frame
8-bit sequence number of the route request to which this frame is a reply
SHALL contain the 16-bit network address of the originator of the route request command frame to which this frame is a reply
SHALL always be the same as the value in the destination address field of the corresponding route request command frame
Optional
originator64: bigintSHALL be 8 octets in length and SHALL contain the 64-bit address of the originator of the route request command frame to which this frame is a reply. This field SHALL only be present if the originator IEEE address sub-field of the command options field has a value of 1.
Optional
responder64: bigintSHALL be 8 octets in length and SHALL contain the 64-bit address of the destination of the route request command frame to which this frame is a reply. This field SHALL only be present if the responder IEEE address sub-field of the command options field has a value of 1.
05-3474-R #3.4.1
intended destination of the route request command frame
Optional
destination64: bigintSHOULD always be added if it is known
05-3474-R #3.4.3
Optional
destination: numberDestination address (only if status is LINK_FAILURE or ADDRESS_CONFLICT)
Set the manufacturer code in the pre-encoded node descriptor
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
dBm (>= -128 and <= 127)
The transmit power of the radio. The value will be rounded down to a value that is supported by the underlying radio hardware.
dBm (>= -128 and <= 127)
Get the basic info from the RCP firmware and reset it.
https://datatracker.ietf.org/doc/html/draft-rquattle-spinel-unified#appendix-C.1
Should be called before formNetwork
but after resetNetwork
(if needed)
Start an energy scan. Cannot be used after state is loaded or network is up.
List of channels to scan
milliseconds per channel
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.
The channel to sniff on
Lookup synced with deviceTable, maps network address to IEEE address