What is the Wildcard Profile ID?
As of rev 20 of the ZigBee Specification, a wildcard profile ID was introduced. Our implementation of this concept can be found in ember-types.h, EMBER_WILDCARD_PROFILE_ID.
The purpose as described by the Zigbee documentation is used as a way to allow messages sent with any profile ID to be accepted. Usually, if a device sends a message that has a profile ID that does not match the device it is sending it to, then the message would be ignored. The wildcard profile ID can be used so that a message can be sent to any profile ID and not be rejected purely based on the profile ID. For example, if you send a message to a SE device or HA device with EMBER_WILDCARD_PROFILE_ID the message will not be denied based on the profile ID. However, if you sent a SE device a message with a HA profile ID it would get rejected based on the profile ID.
For more details on the wildcard profile ID please read ZigBee Specification - 05-3474 rev 20.
How to set up reporting functionality in EmberZNet stack, and how to use it?
Reports are asynchronous messages sent out when a ZCL attribute has changed. The Reporting plugin supports both requesting reports from another device and sending out attribute reports when the device has been configured to do so. The receiving node receives incoming Report Attribute Response frames (via emberAfReportAttributesCallback). If the application receives reports from multiple sources, Silicon Labs recommends configuring it as a concentrator. The Reporting table size can be set in AppBuilder under the Plugins tab or change the define value of EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE in your project's header file.
This plugin implements the ZigBee Cluster Library's standard binding-based approach of reporting in which reports are sent to corresponding entries in the binding table. Either the node sending the reports, the node receiving the reports, or another third-party configuration device, may create the binding table entry(s) on the reporting node. (Note: The binding table needs to be large enough to accommodate all report targets.) Reports are sent to destinations of all bindings with matching clusterID and source endpoint for the attribute being reported. In order to pair devices, the nodes need to be entered into a provisioning mode. More information on the binding process can be found in our Fundamentals: Design Choices (UG103.3) guide under Chapter 5: "Device Discovery and Provisioning".
To create an entry into the reporting table, check out section 7.67 EmberAfPluginReportingEntry Struct Reference in our Application Framework API and section 2.4.7 in ZCL specification found at ZigBee.org. A good example is in our HA Sample Light callbacks file located at app/framework/scenarios/zha/HaSampleLight/HaSampleLight_callbacks.c:
reportingEntry.direction = EMBER_ZCL_REPORTING_DIRECTION_REPORTED;
reportingEntry.endpoint = emberAfPrimaryEndpoint();
reportingEntry.clusterId = ZCL_ON_OFF_CLUSTER_ID;
reportingEntry.attributeId = ZCL_ON_OFF_ATTRIBUTE_ID;
reportingEntry.mask = CLUSTER_MASK_SERVER;
reportingEntry.manufacturerCode = EMBER_AF_NULL_MANUFACTURER_CODE;
reportingEntry.data.reported.minInterval = MIN_INTERVAL_S;
reportingEntry.data.reported.maxInterval = MAX_INTERVAL_S;
reportingEntry.data.reported.reportableChange = 0;
A few notes on reportingEntry:
direction - Specifies whether values of the attribute are reported or received.
attributeId - Contains the identifier of the attribute to be reported.
data.reported.minInterval - The minimum interval in seconds between issuing reports.
data.reported.maxInterval - The maximum interval in seconds between issuing reports.
data.reported.reportableChange - The minimum change to the attribute that will result in a report being issued. This value is ignored for discrete (Boolean) attributes as those will generate reports on any change.
The plugin will only send a report for active reported attributes and only if a reportable change has occurred and the minimum interval has elapsed or if the maximum interval is set and has elapsed. For more details on the plugin, please refer to the Ember Application Framework Developer Guide section 15.4 Reporting Plugin.