ZigBee Device Object (ZDO) functions included in the stack.

See ZigBee Device Object for documentation.

License#

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

/***************************************************************************/ 
#ifndef SILABS_ZIGBEE_DEVICE_STACK_H
#define SILABS_ZIGBEE_DEVICE_STACK_H

EmberStatus emberNetworkAddressRequest(EmberEUI64 target,
                                       bool reportKids,
                                       uint8_t childStartIndex);

EmberStatus emberIeeeAddressRequest(EmberNodeId target,
                                    bool reportKids,
                                    uint8_t childStartIndex,
                                    EmberApsOption options);

EmberStatus emberIeeeAddressRequestToTarget(EmberNodeId discoveryNodeId,
                                            bool reportKids,
                                            uint8_t childStartIndex,
                                            EmberApsOption options,
                                            EmberNodeId targetNodeIdOfRequest);

EmberStatus emberEnergyScanRequest(EmberNodeId target,
                                   uint32_t scanChannels,
                                   uint8_t  scanDuration,
                                   uint16_t scanCount);

#ifdef DOXYGEN_SHOULD_SKIP_THIS
EmberStatus emberSetNetworkManagerRequest(EmberNodeId networkManager,
                                          uint32_t activeChannels);
#else
#define emberSetNetworkManagerRequest(manager, channels)  \
  (emberEnergyScanRequest(EMBER_SLEEPY_BROADCAST_ADDRESS, \
                          (channels),                     \
                          0xFF,                           \
                          (manager)))
#endif

#ifdef DOXYGEN_SHOULD_SKIP_THIS
EmberStatus emberChannelChangeRequest(uint8_t channel);
#else
#define emberChannelChangeRequest(channel)                \
  (emberEnergyScanRequest(EMBER_SLEEPY_BROADCAST_ADDRESS, \
                          BIT32(channel),                 \
                          0xFE,                           \
                          0))
#endif

EmberStatus emberSendDeviceAnnouncement(void);

EmberStatus emberSendParentAnnouncement(void);

uint8_t emberGetLastStackZigDevRequestSequence(void);

void emberSetZDOConfigurationMode(bool enabled);

void emberSetPendingNetworkUpdateChannel(uint8_t channel);

void sl_set_device_capability_extension_field_for_zigbee_virtual_device(boolean attach_tlv, uint16_t capability_extension_bitmask);


#define NETWORK_ADDRESS_REQUEST 0x0000u
#define NETWORK_ADDRESS_RESPONSE 0x8000u
#define IEEE_ADDRESS_REQUEST 0x0001u
#define IEEE_ADDRESS_RESPONSE 0x8001u

//            <node descriptor: 13> <tlvs: varies>
//
//  Node Descriptor field is divided into subfields of bitmasks as follows:
//      (Note: All lengths below are given in bits rather than bytes.)
//            Logical Type:                     3
//            Complex Descriptor Available:     1
//            User Descriptor Available:        1
//            (reserved/unused):                3
//            APS Flags:                        3
//            Frequency Band:                   5
//            MAC capability flags:             8
//            Manufacturer Code:               16
//            Maximum buffer size:              8
//            Maximum incoming transfer size:  16
//            Server mask:                     16
//            Maximum outgoing transfer size:  16
//            Descriptor Capability Flags:      8
//     See ZigBee document 053474, Section 2.3.2.3 for more details.
#define NODE_DESCRIPTOR_REQUEST 0x0002u
#define NODE_DESCRIPTOR_RESPONSE 0x8002u

//     See ZigBee document 053474, Section 2.3.2.4 for more details.
#define POWER_DESCRIPTOR_REQUEST 0x0003u
#define POWER_DESCRIPTOR_RESPONSE 0x8003u

#define SIMPLE_DESCRIPTOR_REQUEST 0x0004u
#define SIMPLE_DESCRIPTOR_RESPONSE 0x8004u

#define ACTIVE_ENDPOINTS_REQUEST 0x0005u
#define ACTIVE_ENDPOINTS_RESPONSE 0x8005u

#define MATCH_DESCRIPTORS_REQUEST 0x0006u
#define MATCH_DESCRIPTORS_RESPONSE 0x8006u

#define END_DEVICE_ANNOUNCE 0x0013u
#define END_DEVICE_ANNOUNCE_RESPONSE 0x8013u

#define SYSTEM_SERVER_DISCOVERY_REQUEST 0x0015u
#define SYSTEM_SERVER_DISCOVERY_RESPONSE 0x8015u

#define PARENT_ANNOUNCE 0x001Fu
#define PARENT_ANNOUNCE_RESPONSE 0x801Fu

#define FIND_NODE_CACHE_REQUEST 0x001Cu
#define FIND_NODE_CACHE_RESPONSE 0x801Cu

#define END_DEVICE_BIND_REQUEST 0x0020u
#define END_DEVICE_BIND_RESPONSE 0x8020u

#define CLEAR_ALL_BINDINGS_REQUEST 0x002Bu
#define CLEAR_ALL_BINDINGS_RESPONSE 0x802Bu

#define UNICAST_BINDING 0x03u
#define UNICAST_MANY_TO_ONE_BINDING 0x83u
#define MULTICAST_BINDING 0x01u

#define BIND_REQUEST 0x0021u
#define BIND_RESPONSE 0x8021u
#define UNBIND_REQUEST 0x0022u
#define UNBIND_RESPONSE 0x8022u

#define LQI_TABLE_REQUEST 0x0031u
#define LQI_TABLE_RESPONSE 0x8031u

#define ROUTING_TABLE_REQUEST 0x0032u
#define ROUTING_TABLE_RESPONSE 0x8032u

#define BINDING_TABLE_REQUEST 0x0033u
#define BINDING_TABLE_RESPONSE 0x8033u

#define LEAVE_REQUEST 0x0034u
#define LEAVE_RESPONSE 0x8034u

#define LEAVE_REQUEST_REMOVE_CHILDREN_FLAG 0x40u
#define LEAVE_REQUEST_REJOIN_FLAG 0x80u

#define PERMIT_JOINING_REQUEST 0x0036u
#define PERMIT_JOINING_RESPONSE 0x8036u

#define NWK_UPDATE_REQUEST 0x0038u
#define NWK_UPDATE_RESPONSE 0x8038u

#define NWK_UPDATE_ENHANCED_REQUEST 0x0039u
#define NWK_UPDATE_ENHANCED_RESPONSE 0x8039u

#define NWK_UPDATE_IEEE_JOINING_LIST_REQUEST 0x003Au
#define NWK_UPDATE_IEEE_JOINING_LIST_REPONSE 0x803Au

#define NWK_UNSOLICITED_ENHANCED_UPDATE_NOTIFY 0x803Bu


#define BEACON_SURVEY_REQUEST 0x003Cu
#define BEACON_SURVEY_RESPONSE 0x803Cu

#define KEY_NEGOTIATION_REQUEST 0x0040u
#define KEY_NEGOTIATION_RESPONSE 0x8040u

#define AUTHENTICATION_TOKEN_REQUEST 0x0041u
#define AUTHENTICATION_TOKEN_RESPONSE 0x8041u

#define AUTHENTICATION_LEVEL_REQUEST      0x0042u
#define AUTHENTICATION_LEVEL_RESPONSE     0x8042u

#define SET_CONFIGURATION_REQUEST      0x0043u
#define SET_CONFIGURATION_RESPONSE     0x8043u

#define GET_CONFIGURATION_REQUEST      0x0044u
#define GET_CONFIGURATION_RESPONSE     0x8044u

#define KEY_UPDATE_REQUEST 0x0045u
#define KEY_UPDATE_RESPONSE 0x8045u

#define SECURITY_DECOMMISSION_REQUEST 0x0046u
#define SECURITY_DECOMMISSION_RESPONSE 0x8046u

#define SECURITY_CHALLENGE_REQUEST      0x0047u
#define SECURITY_CHALLENGE_RESPONSE     0x8047u

#define COMPLEX_DESCRIPTOR_REQUEST 0x0010u
#define COMPLEX_DESCRIPTOR_RESPONSE 0x8010u
#define USER_DESCRIPTOR_REQUEST 0x0011u
#define USER_DESCRIPTOR_RESPONSE 0x8011u
#define DISCOVERY_REGISTER_REQUEST 0x0012u
#define DISCOVERY_REGISTER_RESPONSE 0x8012u
#define USER_DESCRIPTOR_SET 0x0014u
#define USER_DESCRIPTOR_CONFIRM 0x8014u
#define NETWORK_DISCOVERY_REQUEST 0x0030u
#define NETWORK_DISCOVERY_RESPONSE 0x8030u
#define DIRECT_JOIN_REQUEST 0x0035u
#define DIRECT_JOIN_RESPONSE 0x8035u

#define DISCOVERY_CACHE_REQUEST 0x0012u
#define DISCOVERY_CACHE_RESPONSE 0x8012u

#define CLUSTER_ID_RESPONSE_MINIMUM 0x8000u


#endif // SILABS_ZIGBEE_DEVICE_STACK_H

Network and IEEE Address Request/Response#

Defines for ZigBee device profile cluster IDs follow. These include descriptions of the formats of the messages.Note that each message starts with a 1-byte transaction sequence number. This sequence number is used to match a response command frame to the request frame that it is replying to. The application shall maintain a 1-byte counter that is copied into this field and incremented by one for each command sent. When a value of 0xff is reached, the next command shall re-start the counter with a value of 0x00.Network request: <transaction sequence number: 1> <EUI64:8> <type:1> <start index:1>IEEE request: <transaction sequence number: 1> <node ID:2> <type:1> <start index:1> <type> = 0x00 single address response, ignore the start index = 0x01 extended response -> sends kid's IDs as wellResponse: <transaction sequence number: 1> <status:1> <EUI64:8> <node ID:2> <ID count:1> <start index:1> <child ID:2>*

#define
NETWORK_ADDRESS_REQUEST 0x0000u
#define
NETWORK_ADDRESS_RESPONSE 0x8000u
#define
IEEE_ADDRESS_REQUEST 0x0001u
#define
IEEE_ADDRESS_RESPONSE 0x8001u

Node Descriptor Request/Response#

Request: <transaction sequence number: 1> <node ID:2> <tlvs: varies> Response: <transaction sequence number: 1> <status:1> <node ID:2>// <node descriptor: 13> <tlvs: varies>//// Node Descriptor field is divided into subfields of bitmasks as follows:// (Note: All lengths below are given in bits rather than bytes.)// Logical Type: 3// Complex Descriptor Available: 1// User Descriptor Available: 1// (reserved/unused): 3// APS Flags: 3// Frequency Band: 5// MAC capability flags: 8// Manufacturer Code: 16// Maximum buffer size: 8// Maximum incoming transfer size: 16// Server mask: 16// Maximum outgoing transfer size: 16// Descriptor Capability Flags: 8// See ZigBee document 053474, Section 2.3.2.3 for more details.

#define
NODE_DESCRIPTOR_REQUEST 0x0002u
#define
NODE_DESCRIPTOR_RESPONSE 0x8002u

Power Descriptor Request / Response#

Request: <transaction sequence number: 1> <node ID:2> Response: <transaction sequence number: 1> <status:1> <node ID:2> <current power mode, available power sources:1> <current power source, current power source level:1>// See ZigBee document 053474, Section 2.3.2.4 for more details.

#define
POWER_DESCRIPTOR_REQUEST 0x0003u
#define
POWER_DESCRIPTOR_RESPONSE 0x8003u

Simple Descriptor Request / Response#

Request: <transaction sequence number: 1> <node ID:2> <endpoint:1>Response: <transaction sequence number: 1> <status:1> <node ID:2> <length:1> <endpoint:1> <app profile ID:2> <app device ID:2> <app device version, app flags:1> <input cluster count:1> <input cluster:2>* <output cluster count:1> <output cluster:2>*

#define
SIMPLE_DESCRIPTOR_REQUEST 0x0004u
#define
SIMPLE_DESCRIPTOR_RESPONSE 0x8004u

Active Endpoints Request / Response#

Request: <transaction sequence number: 1> <node ID:2>Response: <transaction sequence number: 1> <status:1> <node ID:2> <endpoint count:1> <endpoint:1>*

#define
ACTIVE_ENDPOINTS_REQUEST 0x0005u
#define
ACTIVE_ENDPOINTS_RESPONSE 0x8005u

Match Descriptors Request / Response#

Request: <transaction sequence number: 1> <node ID:2> <app profile ID:2> <input cluster count:1> <input cluster:2>* <output cluster count:1> <output cluster:2>*Response: <transaction sequence number: 1> <status:1> <node ID:2> <endpoint count:1> <endpoint:1>*

#define
MATCH_DESCRIPTORS_REQUEST 0x0006u
#define
MATCH_DESCRIPTORS_RESPONSE 0x8006u

End Device Announce and End Device Announce Response#

Request: <transaction sequence number: 1> <node ID:2> <EUI64:8> <capabilities:1>No response is sent.

#define
END_DEVICE_ANNOUNCE 0x0013u
#define
END_DEVICE_ANNOUNCE_RESPONSE 0x8013u

System Server Discovery Request / Response#

This is broadcast and only servers which have matching services respond. The response contains the request services that the recipient provides.Request: <transaction sequence number: 1> <server mask:2>Response: <transaction sequence number: 1> <status (== EMBER_ZDP_SUCCESS):1> <server mask:2>

#define
SYSTEM_SERVER_DISCOVERY_REQUEST 0x0015u
#define
SYSTEM_SERVER_DISCOVERY_RESPONSE 0x8015u

Parent Announce and Parent Announce Response#

This is broadcast and only servers which have matching children respond. The response contains the list of children that the recipient now holds.Request: <transaction sequence number: 1> <number of children:1> <child EUI64:8> <child Age:4>*Response: <transaction sequence number: 1> <number of children:1> <child EUI64:8> <child Age:4>*

#define
PARENT_ANNOUNCE 0x001Fu
#define
PARENT_ANNOUNCE_RESPONSE 0x801Fu

Find Node Cache Request / Response#

This is broadcast and only discovery servers which have the information for the device of interest, or the device of interest itself, respond. The requesting device can then direct any service discovery requests to the responder.Request: <transaction sequence number: 1> <device of interest ID:2> <d-of-i EUI64:8>Response: <transaction sequence number: 1> <responder ID:2> <device of interest ID:2> <d-of-i EUI64:8>

#define
FIND_NODE_CACHE_REQUEST 0x001Cu
#define
FIND_NODE_CACHE_RESPONSE 0x801Cu

End Device Bind Request / Response#

Request: <transaction sequence number: 1> <node ID:2> <EUI64:8> <endpoint:1> <app profile ID:2> <input cluster count:1> <input cluster:2>* <output cluster count:1> <output cluster:2>*Response: <transaction sequence number: 1> <status:1>

#define
END_DEVICE_BIND_REQUEST 0x0020u
#define
END_DEVICE_BIND_RESPONSE 0x8020u

Clear All Bindings Request / Response#

Request: <transaction sequence number: 1> <clear all bindings request EUI64 TLV:Variable>Clear all bindings request EUI64 TLV: <Count N:1><EUI64 1:8>...<EUI64 N:8>Response: <transaction sequence number: 1> <status:1>

#define
CLEAR_ALL_BINDINGS_REQUEST 0x002Bu
#define
CLEAR_ALL_BINDINGS_RESPONSE 0x802Bu

Binding types and Request / Response#

Bind and unbind have the same formats. There are two possible formats, depending on whether the destination is a group address or a device address. Device addresses include an endpoint, groups don't.Request: <transaction sequence number: 1> <source EUI64:8> <source endpoint:1> <cluster ID:2> <destination address:3 or 10>Destination address: <0x01:1> <destination group:2>Or: <0x03:1> <destination EUI64:8> <destination endpoint:1>Response: <transaction sequence number: 1> <status:1>

#define
UNICAST_BINDING 0x03u
#define
UNICAST_MANY_TO_ONE_BINDING 0x83u
#define
MULTICAST_BINDING 0x01u
#define
BIND_REQUEST 0x0021u
#define
BIND_RESPONSE 0x8021u
#define
UNBIND_REQUEST 0x0022u
#define
UNBIND_RESPONSE 0x8022u

LQI Table Request / Response#

Request: <transaction sequence number: 1> <start index:1>Response: <transaction sequence number: 1> <status:1> <neighbor table entries:1> <start index:1> <entry count:1> <entry:22>* <entry> = <extended PAN ID:8> <EUI64:8> <node ID:2> <device type, RX on when idle, relationship:1> <permit joining:1> <depth:1> <LQI:1>The device-type byte has the following fields: Name Mask Valuesdevice type 0x03 0x00 coordinator 0x01 router 0x02 end device 0x03 unknownrx mode 0x0C 0x00 off when idle 0x04 on when idle 0x08 unknownrelationship 0x70 0x00 parent 0x10 child 0x20 sibling 0x30 other 0x40 previous childreserved 0x10The permit-joining byte has the following fields Name Mask Valuespermit joining 0x03 0x00 not accepting join requests 0x01 accepting join requests 0x02 unknownreserved 0xFC

#define
LQI_TABLE_REQUEST 0x0031u
#define
LQI_TABLE_RESPONSE 0x8031u

Routing Table Request / Response#

Request: <transaction sequence number: 1> <start index:1>Response: <transaction sequence number: 1> <status:1> <routing table entries:1> <start index:1> <entry count:1> <entry:5>* <entry> = <destination address:2> <status:1> <next hop:2>The status byte has the following fields: Name Mask Valuesstatus 0x07 0x00 active 0x01 discovery underway 0x02 discovery failed 0x03 inactive 0x04 validation underwayflags 0x38 0x08 memory constrained 0x10 many-to-one 0x20 route record requiredreserved 0xC0

#define
ROUTING_TABLE_REQUEST 0x0032u
#define
ROUTING_TABLE_RESPONSE 0x8032u

Binding Table Request / Response#

Request: <transaction sequence number: 1> <start index:1>Response: <transaction sequence number: 1> <status:1> <binding table entries:1> <start index:1> <entry count:1> <entry:14/21>* <entry> = <source EUI64:8> <source endpoint:1> <cluster ID:2> <dest addr mode:1> <dest:2/8> <dest endpoint:0/1>If Dest. Address Mode = 0x03, then the Long Dest. Address will be used and Dest. endpoint will be included. If Dest. Address Mode = 0x01, then the Short Dest. Address will be used and there will be no Dest. endpoint.

#define
BINDING_TABLE_REQUEST 0x0033u
#define
BINDING_TABLE_RESPONSE 0x8033u

Leave Request / Response#

Request: <transaction sequence number: 1> <EUI64:8> <flags:1> The flag bits are: 0x40 remove children 0x80 rejoinResponse: <transaction sequence number: 1> <status:1>

#define
LEAVE_REQUEST 0x0034u
#define
LEAVE_RESPONSE 0x8034u
#define
LEAVE_REQUEST_REMOVE_CHILDREN_FLAG 0x40u
#define
LEAVE_REQUEST_REJOIN_FLAG 0x80u

Permit Joining Request / Response#

Request: <transaction sequence number: 1> <duration:1> <permit authentication:1>Response: <transaction sequence number: 1> <status:1>

#define
PERMIT_JOINING_REQUEST 0x0036u
#define
PERMIT_JOINING_RESPONSE 0x8036u

Network Update Request / Response#

Request: <transaction sequence number: 1> <scan channels:4> <duration:1> <count:0/1> <manager:0/2> If the duration is in 0x00 ... 0x05, 'count' is present but not 'manager'. Perform 'count' scans of the given duration on the given channels. If duration is 0xFE, 'channels' should have a single channel and 'count' and 'manager' are not present. Switch to the indicated channel. If duration is 0xFF, 'count' is not present. Set the active channels and the network manager ID to the values given. Unicast requests always get a response, which is INVALID_REQUEST if the duration is not a legal value.Response: <transaction sequence number: 1> <status:1> <scanned channels:4> <transmissions:2> <failures:2> <energy count:1> <energy:1>*

#define
NWK_UPDATE_REQUEST 0x0038u
#define
NWK_UPDATE_RESPONSE 0x8038u
#define
NWK_UPDATE_ENHANCED_REQUEST 0x0039u
#define
NWK_UPDATE_ENHANCED_RESPONSE 0x8039u
#define
NWK_UPDATE_IEEE_JOINING_LIST_REQUEST 0x003Au
#define
NWK_UPDATE_IEEE_JOINING_LIST_REPONSE 0x803Au
#define
NWK_UNSOLICITED_ENHANCED_UPDATE_NOTIFY 0x803Bu

Beacon Survey Request / Response#

This command can be used by a remote device to survey the end devices to determine how many potential parents they have access to.Request: <transaction sequence number: 1> <TLVs: varies>Contains one Beacon Survey Configuration TLV (variable octets),which contain the ScanChannelListStructure (variable length)and the ConfigurationBitmask (1 octet). This information providesthe configuration for the end device's beacon survey.See R23 spec section 2.4.3.3.12 for the request and 3.2.2.2.1for the ChannelListStructure.@codeResponse: <transaction sequence number: 1> <status: 1> <TLVs: varies>Contains one Beacon Survey Results TLV (4 octets), which containthe number of on-network, off-network, potential parent and totalbeacons recorded. If the device that received the request is not arouter, a Potential Parent TLV (variable octects) will be found. Thiswill contain information on the device's current parent, as well asany potential parents found via beacons (up to a maximum of 5). APan ID Conflict TLV can also found in the response.See R23 spec section 2.4.4.3.13 for the response.

#define
BEACON_SURVEY_REQUEST 0x003Cu
#define
BEACON_SURVEY_RESPONSE 0x803Cu

Security Start Key Negotiation Request / Response#

Request: <transaction sequence number: 1> <TLVs: varies>Contains one or more Curve25519 Public Point TLVs (40 octets),which contain an EUI64 and the 32-byte Curve public point.See R23 spec section 2.4.3.4.1@note This command SHALL NOT be APS encrypted regardless ofwhether sent before or after the device joins the network.This command SHALL be network encrypted if the device has anetwork key, i.e. it has joined the network earlier and wantsto negotiate or renegotiate a new link key; otherwise, if itis used prior to joining the network, it SHALL NOT be network encrypted.Response: <transaction sequence number: 1> <status:1> <TLVs: varies>Contains one or more Curve25519 Public Point TLVs (40 octets),which contain an EUI64 and the 32-byte Curve public point, orLocal TLVs.See R23 spec section 2.4.4.4.1@note This command SHALL NOT be APS encrypted. When performingKey Negotiation with an unauthenticated neighbor that is notyet on the network, network layer encryption SHALL NOT be usedon the message. If the message is being sent to unauthenticateddevice that is not on the network and is not a neighbor, itSHALL be relayed as described in section 4.6.3.7.7. Otherwisethe message SHALL have network layer encryption.

#define
KEY_NEGOTIATION_REQUEST 0x0040u
#define
KEY_NEGOTIATION_RESPONSE 0x8040u

Retrieve Authentication Token Request / Response#

Request: <transaction sequence number: 1> <TLVs: varies>Contains one or more Authentication Token ID TLVs (1 octet),which contain the TLV Type Tag ID of the source of theauthentication token. See R23 spec section 2.4.3.4.2Response: <transaction sequence number: 1> <status:1> <TLVs: varies>Contains one or more 128-bit Symmetric Passphrase Global TLVs(16 octets), which contain the symmetric passphrase authenticationtoken. See R23 spec section 2.4.4.4.2

#define
AUTHENTICATION_TOKEN_REQUEST 0x0041u
#define
AUTHENTICATION_TOKEN_RESPONSE 0x8041u

Retrieve Authentication Level Request / Response#

Request: <transaction sequence number: 1> <TLVs: varies>Contains one or more Target IEEE Address TLVs (8 octets),which contain the EUI64 of the device of interest.See R23 spec section 2.4.3.4.3Response: <transaction sequence number: 1> <status:1> <TLVs: varies>Contains one or more Device Authentication Level TLVs(10 octets), which contain the EUI64 of the inquired device,along with the its initial join method and its active linkkey update method.See R23 spec section 2.4.4.4.3

#define
AUTHENTICATION_LEVEL_REQUEST 0x0042u
#define
AUTHENTICATION_LEVEL_RESPONSE 0x8042u

Set Configuration Request / Response#

Request: <transaction sequence number: 1> <TLVs: varies>Contains one or more Global TLVs (1 octet),which contain the TLV Type Tag ID, and theirvalue.Response: <transaction sequence number: 1> <status:1>

#define
SET_CONFIGURATION_REQUEST 0x0043u
#define
SET_CONFIGURATION_RESPONSE 0x8043u

Get Configuration Request / Response#

Request: <transaction sequence number: 1> <TLVs: varies>Contains one or more TLVs (1 octet),which the sender wants to get informationResponse: <transaction sequence number: 1> <status:1> <TLVs: varies>Contains one or more TLV tag Ids and their valuesin response to the request

#define
GET_CONFIGURATION_REQUEST 0x0044u
#define
GET_CONFIGURATION_RESPONSE 0x8044u

Security Start Key Update Request / Response#

Request: <transaction sequence number: 1> <TLVs: varies>Contains one or more TLVs. These TLVs can be Selected KeyNegotiation Method TLVs (10 octets), Fragmentation ParametersGlobal TLVs (5 octets), or other TLVs.See R23 spec section 2.4.3.4.6@note This SHALL NOT be APS encrypted or NWK encrypted if thelink key update mechanism is done as part of the initial joinand before the receiving device has been issued a networkkey. This SHALL be both APS encrypted and NWK encrypted ifthe link key update mechanism is performed to refresh thelink key when the receiving device has the network key andhas previously successfully joined the network.Response: <transaction sequence number: 1> <status:1>See R23 spec section 2.4.4.4.6@note This command SHALL be APS encrypted.

#define
KEY_UPDATE_REQUEST 0x0045u
#define
KEY_UPDATE_RESPONSE 0x8045u

Security Decommission Request / Response#

Request: <transaction sequence number: 1> <security decommission request EUI64 TLV:Variable>Security Decommission request EUI64 TLV: <Count N:1><EUI64 1:8>...<EUI64 N:8>Response: <transaction sequence number: 1> <status:1>

#define
SECURITY_DECOMMISSION_REQUEST 0x0046u
#define
SECURITY_DECOMMISSION_RESPONSE 0x8046u

Challenge for APS frame counter synchronization#

Request: <transaction sequence number: 1> <TLVs: varies>Contains at least the APS Frame Counter Challenge TLV, which holds thesender EUI and the 64 bit challenge value.Response: <transaction sequence number: 1> <TLVs: varies>Contains at least the APS Frame Counter Response TLV, which holds thesender EUI, received challenge value, APS frame counter, challengesecurity frame counter, and 8-byte MIC.

#define
SECURITY_CHALLENGE_REQUEST 0x0047u
#define
SECURITY_CHALLENGE_RESPONSE 0x8047u

Unsupported#

Not mandatory and not supported.

#define
COMPLEX_DESCRIPTOR_REQUEST 0x0010u
#define
COMPLEX_DESCRIPTOR_RESPONSE 0x8010u
#define
USER_DESCRIPTOR_REQUEST 0x0011u
#define
USER_DESCRIPTOR_RESPONSE 0x8011u
#define
DISCOVERY_REGISTER_REQUEST 0x0012u
#define
DISCOVERY_REGISTER_RESPONSE 0x8012u
#define
USER_DESCRIPTOR_SET 0x0014u
#define
USER_DESCRIPTOR_CONFIRM 0x8014u
#define
NETWORK_DISCOVERY_REQUEST 0x0030u
#define
NETWORK_DISCOVERY_RESPONSE 0x8030u
#define
DIRECT_JOIN_REQUEST 0x0035u
#define
DIRECT_JOIN_RESPONSE 0x8035u

Discovery Cache Request / Response#

DEPRECATED Request: <transaction sequence number: 1> <source node ID:2> <source EUI64:8>Response: <transaction sequence number: 1> <status (== EMBER_ZDP_SUCCESS):1>

#define
DISCOVERY_CACHE_REQUEST 0x0012u
#define
DISCOVERY_CACHE_RESPONSE 0x8012u

Macros#

#define
CLUSTER_ID_RESPONSE_MINIMUM 0x8000u

Functions#

emberNetworkAddressRequest(EmberEUI64 target, bool reportKids, uint8_t childStartIndex)

Request the 16 bit network address of a node whose EUI64 is known.

emberIeeeAddressRequest(EmberNodeId target, bool reportKids, uint8_t childStartIndex, EmberApsOption options)

Request the EUI64 of a node whose 16 bit network address is known.

emberIeeeAddressRequestToTarget(EmberNodeId discoveryNodeId, bool reportKids, uint8_t childStartIndex, EmberApsOption options, EmberNodeId targetNodeIdOfRequest)
emberEnergyScanRequest(EmberNodeId target, uint32_t scanChannels, uint8_t scanDuration, uint16_t scanCount)

Request that an energy scan be performed and its results returned. This request may only be sent by the current network manager and must be unicast, not broadcast.

emberSetNetworkManagerRequest(EmberNodeId networkManager, uint32_t activeChannels)

Broadcast a request to set the identity of the network manager and the active channel mask. The mask is used when scanning for the network after missing a channel update.

emberChannelChangeRequest(uint8_t channel)

Broadcast a request to change the channel. This request may only be sent by the current network manager. A several second delay occurs from receipt of the broadcast to changing the channel to allow time for the broadcast to propagate.

Send a broadcast for a ZDO Device announcement. Normally, it is NOT required to call this as the stack automatically sends a device announcement during joining or rejoining, as per the spec.

Send a broadcast for a ZDO Parent Announcement. Normally, it is NOT required to call this as the stack automatically sends a Parent Announce when a Zigbee Router/Coordinator reboots, is in a joined or authenticated state, and has at least one device.

uint8_t

Provide access to the stack ZDO transaction sequence number for the last request.

void

Set the ZDO (WWAH) configuration mode in the stack. ZDO configuration mode is used to enable/disable ZDO command processing and to protect the device from unauthorized configuration changes during normal operation.

void

Set the channel number the device will accept in ZDO Mgmt Network Update command to change channel.

void
sl_set_device_capability_extension_field_for_zigbee_virtual_device(boolean attach_tlv, uint16_t capability_extension_bitmask)

This is an API to set the device capability extension TLV used by Zigbee Direct.

Network and IEEE Address Request/Response Documentation#

Node Descriptor Request/Response Documentation#

Power Descriptor Request / Response Documentation#

Simple Descriptor Request / Response Documentation#

Active Endpoints Request / Response Documentation#

Match Descriptors Request / Response Documentation#

End Device Announce and End Device Announce Response Documentation#

System Server Discovery Request / Response Documentation#

Parent Announce and Parent Announce Response Documentation#

Find Node Cache Request / Response Documentation#

End Device Bind Request / Response Documentation#

Clear All Bindings Request / Response Documentation#

Binding types and Request / Response Documentation#

LQI Table Request / Response Documentation#

Routing Table Request / Response Documentation#

Binding Table Request / Response Documentation#

Leave Request / Response Documentation#

Permit Joining Request / Response Documentation#

Network Update Request / Response Documentation#

Beacon Survey Request / Response Documentation#

Security Start Key Negotiation Request / Response Documentation#

Retrieve Authentication Token Request / Response Documentation#

Retrieve Authentication Level Request / Response Documentation#

Set Configuration Request / Response Documentation#

Get Configuration Request / Response Documentation#

Security Start Key Update Request / Response Documentation#

Security Decommission Request / Response Documentation#

Challenge for APS frame counter synchronization Documentation#

Unsupported Documentation#

Discovery Cache Request / Response Documentation#

Function Documentation#

emberNetworkAddressRequest#

EmberStatus emberNetworkAddressRequest (EmberEUI64 target, bool reportKids, uint8_t childStartIndex)

Request the 16 bit network address of a node whose EUI64 is known.

Parameters
N/Atarget

The EUI64 of the node.

N/AreportKids

True to request that the target list their children in the response.

N/AchildStartIndex

The index of the first child to list in the response. Ignored if reportKids is false.

Returns


Definition at line 45 of file stack/include/zigbee-device-stack.h

emberIeeeAddressRequest#

EmberStatus emberIeeeAddressRequest (EmberNodeId target, bool reportKids, uint8_t childStartIndex, EmberApsOption options)

Request the EUI64 of a node whose 16 bit network address is known.

Parameters
N/Atarget

The network address of the node.

N/AreportKids

True to request that the target list their children in the response.

N/AchildStartIndex

The index of the first child to list in the response. Ignored if reportKids is false.

N/Aoptions

The options to use when sending the request. See emberSendUnicast() for a description.

Returns


Definition at line 65 of file stack/include/zigbee-device-stack.h

emberIeeeAddressRequestToTarget#

EmberStatus emberIeeeAddressRequestToTarget (EmberNodeId discoveryNodeId, bool reportKids, uint8_t childStartIndex, EmberApsOption options, EmberNodeId targetNodeIdOfRequest)
Parameters
N/AdiscoveryNodeId
N/AreportKids
N/AchildStartIndex
N/Aoptions
N/AtargetNodeIdOfRequest

Definition at line 70 of file stack/include/zigbee-device-stack.h

emberEnergyScanRequest#

EmberStatus emberEnergyScanRequest (EmberNodeId target, uint32_t scanChannels, uint8_t scanDuration, uint16_t scanCount)

Request that an energy scan be performed and its results returned. This request may only be sent by the current network manager and must be unicast, not broadcast.

Parameters
N/Atarget

The network address of the node to perform the scan.

N/AscanChannels

A mask of the channels to be scanned.

N/AscanDuration

How long to scan on each channel. Allowed values are 0..5, with the scan times as specified by 802.15.4 (0 = 31 ms, 1 = 46 ms, 2 = 77 ms, 3 = 138 ms, 4 = 261 ms, 5 = 507 ms).

N/AscanCount

The number of scans to be performed on each channel (1 .. 8).

Returns


Definition at line 95 of file stack/include/zigbee-device-stack.h

emberSetNetworkManagerRequest#

EmberStatus emberSetNetworkManagerRequest (EmberNodeId networkManager, uint32_t activeChannels)

Broadcast a request to set the identity of the network manager and the active channel mask. The mask is used when scanning for the network after missing a channel update.

Parameters
N/AnetworkManager

The network address of the network manager.

N/AactiveChannels

The new active channel mask.

Returns


Definition at line 114 of file stack/include/zigbee-device-stack.h

emberChannelChangeRequest#

EmberStatus emberChannelChangeRequest (uint8_t channel)

Broadcast a request to change the channel. This request may only be sent by the current network manager. A several second delay occurs from receipt of the broadcast to changing the channel to allow time for the broadcast to propagate.

Parameters
N/Achannel

The channel to change to.

Returns


Definition at line 138 of file stack/include/zigbee-device-stack.h

emberSendDeviceAnnouncement#

EmberStatus emberSendDeviceAnnouncement (void )

Send a broadcast for a ZDO Device announcement. Normally, it is NOT required to call this as the stack automatically sends a device announcement during joining or rejoining, as per the spec.

Parameters
N/A

May be used to re-send the device announcement.

Returns


Definition at line 157 of file stack/include/zigbee-device-stack.h

emberSendParentAnnouncement#

EmberStatus emberSendParentAnnouncement (void )

Send a broadcast for a ZDO Parent Announcement. Normally, it is NOT required to call this as the stack automatically sends a Parent Announce when a Zigbee Router/Coordinator reboots, is in a joined or authenticated state, and has at least one device.

Parameters
N/A

May be used to re-send the parent announcement.

Returns


Definition at line 170 of file stack/include/zigbee-device-stack.h

emberGetLastStackZigDevRequestSequence#

uint8_t emberGetLastStackZigDevRequestSequence (void )

Provide access to the stack ZDO transaction sequence number for the last request.

Parameters
N/A

Returns

  • The last stack ZDO transaction sequence number used.


Definition at line 178 of file stack/include/zigbee-device-stack.h

emberSetZDOConfigurationMode#

void emberSetZDOConfigurationMode (bool enabled)

Set the ZDO (WWAH) configuration mode in the stack. ZDO configuration mode is used to enable/disable ZDO command processing and to protect the device from unauthorized configuration changes during normal operation.

Parameters
N/Aenabled

Definition at line 190 of file stack/include/zigbee-device-stack.h

emberSetPendingNetworkUpdateChannel#

void emberSetPendingNetworkUpdateChannel (uint8_t channel)

Set the channel number the device will accept in ZDO Mgmt Network Update command to change channel.

Parameters
N/Achannel

A pending network update channel number.

If a ZDO Mgmt Network Update command is received by the device specifying a channel that does not match with the given channel, the ZDO Mgmt Network Update command will be ignored by the device. A value of 0xFF indicates that any channel received in a ZDO Mgmt Network Update command will be accepted which is also the default value set by the stack.


Definition at line 204 of file stack/include/zigbee-device-stack.h

sl_set_device_capability_extension_field_for_zigbee_virtual_device#

void sl_set_device_capability_extension_field_for_zigbee_virtual_device (boolean attach_tlv, uint16_t capability_extension_bitmask)

This is an API to set the device capability extension TLV used by Zigbee Direct.

Parameters
N/Aattach_tlv

boolean value to indicate if the tlv should be attached to the joiner encapsulation tlv , set true to attach

N/Acapability_extension_bitmask

2 bytes value to be set as described in the Zigbee Direct specification.

If the local device is a Zigbee virtual Device it needs to present the capability extension TLV in the network commissioning request within the joiner encapsulation TLV. This is required only for a Zigbee Virtual Device.


Definition at line 216 of file stack/include/zigbee-device-stack.h