This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to configure reporting for metering attribute 0x400

Other Parts Discussed in Thread: CC2531

Hi There,
I am currently developing a zigbee system using the zigbee HA gateway.
The problem I have is this:
I would like to setup a SmartPlug to send Reports for various attributes including
Simple Metering (cluster 702) Instantaneous readings Attr (0x400).
When I send the Configure Reporting Message with an Attribute Id of 0x400 (instantaneous value) the gateway

triggers signal 11
Fault address: 0xbf000
Fault Reason address not mapped to object
Stack Space unavailable
Executing original handler...

At this point the servers restart.

The Configure Reporting message is correctly sent and the SmartPlug starts sending reports.

Configure Reporting works with low attribute ID's.

I tried configuring a Combined Interface endpoint with 0x400 attribute but this made no difference.

Is there a problem in the servers or I am going about this the wrong way.

Regards

Norman.

  • Hi Norman,

    Can you check if my understanding is correct? You have a smart plug device and there is InstantaneousDemand attribute. The GW wants to get attribute report from the smart plug device and configure the interval using the API GW_SET_ATTRIBUTE_REPORTING_REQ. Is that correct?

    Can you please share here the code snippet where the use of GW_SET_ATTRIBUTE_REPORTING_REQ is presented?

    - Cetri
  • Hi Cetri,

    In the demo app user_interface.c there is an undocument case which sets up reporting.

    To demonstrate the problem I simply replace the case 'y' with the following code snippet.

    The configure reporting message is transmitted ( I monitor using UBIQUA) and as soon as the

    positive response is received the servers crash. as described in my initial post.

    case 'y':

    {
            selected_device_index = ui_get_selected_device_index();
             if (selected_device_index != MAX_DEVICE_LIST)
             {
                    destination_addr.ieee_addr = ds_device_table[selected_device_index].ieee_addr;
                    destination_addr.endpoint = ds_device_table[selected_device_index].ep_list[ds_device_table[selected_device_index].selected_endpoint_index].endpoint_id;
                     attr_configure_reporting(destination_addr, gateway_self_addr, 5, 0x702, 0x400, GW_ZCL_ATTRIBUTE_DATA_TYPES_T__ZCL_DATATYPE_INT24);
             }
     }
     break;

    Thank you for your assistance.

    Kind Regards


    Norman.

  • Hi Cetri,

    Have you managed to reproduce this problem.

    In the mean time I'm periodically polling the attribute, but this is obviously not ideal.

    Regards

    Norman.

  • Hi Norman,

    Will get back to you after checking with a GW expert.

    - Cetri
  • Hi Norman,

    I tried your code changes, and it works just fine on my setup. I used a new BBB rev C, with a newly programmed CC2531 USB dongle.

    I connected only a single device to the gateway's ZigBee network: Smartenit – ZBMPlug15 – Model #5010Q. I selected endpoint #2 on this device and pressed 'y'. This resulted in power measurements being reported and processed successfully by the gateway and its sample application.

    I may be able to asist you further if you can attached a sniffer log (in PSD format. You may use the free SmartRF Packet Sniffer from TI to save a capture to file using this format).

    Best regards,

    OD

  • Hi OD,
    Thanks for your assistance.
    I am using a DEVELCO Smartplug. The Simple Metering Cluster is on EP 21.
    I am trying to configure reporting as follows:
    EP: 0x21 Cluster:0x702 Attribute:0x400
    Please note that if I configure the same ep and cluster to report attr: 0x0000, it works just fine.
    Can you confirm that you are configuring reporting for 0x400.

    I have air logs in both PSD and PCAP formats. Unfortunately I cannot make sense of the PSD format because I don't have a tool to decode the packets. The PCAP was captured using UBIQUA.
  • I'm new to this forum so trying to attach the air logs.

    logs.zip

  • Hi Norman,

    Thanks for sending the log.

    From the log, I can tell that the Smart Plug device you are using is not compliant with the ZigBee spec in the way it formats the Configure Reporting Response:

    Please have a look at packet #70. The ZCL Payload is 4 bytes, which are probably representing the Status, the Direction, and the Attribute ID. This is not the right format though: This structure is only applicable when there is an error with an attribute configuration, i.e. when the status is not "success". Since the status IS success, the ZCL Pauload in the response should have been a single byte (0x00), meaning all attributes successfully configured. For reference, please see the ZCL specification (075123r04ZB) p.30 lines 25-30:

    "When all attribute reporting configuration records have been processed, the
    device shall generate the constructed configure reporting response command. If
    there are no attribute status records in the constructed command, indicating that
    all attributes were configured successfully, a single attribute status record shall be
    included in the command, with the status field set to SUCCESS and the direction
    and attribute identifier fields omitted."

    I suggest that you check with the Smart Plug manufacturer if there is a new firmware for this device that fixes this issue.

    Best regards,

    OD.

  • Hi OD,

    Thanks for the feedback.

    Yes, I had noticed some time back that the device was unnecessarily sending the direction and attribute id fields but untill now this has not been an issue.

    If you configure reporting for say attribute 0x0000 the device also sends the additional fields but this works just fine and the servers appear to be quite happy.

    Then recently I tried to configure attribute 0x400 and thats when I discovered this problem. Why should the servers crash for attr 0x400 and not for 0x0000.

    I agree that the transmission of the additional fields is not as per spec but I am concerned, as I hope you are, that an incorrect response causes the servers to crash.


    Kind Regards

    Norman.

  • Hi Norman,

    We appreciate any feedback, and obviously bug reporting is necessary for us to constantly improve our products. I agree that crashes should be avoided/fixed, no matter the reason that cause them. The issue you reported is now on record, and will most likely be addressed in the next release.

    Thanks!
    OD.
  • Hi OD,

    I am trying to enable reporting for Byun switch with the demo app. I have added following changes in user_interface.c file for switch case 'y':

    attr_configure_reporting(destination_addr, gateway_self_addr, 0, CLUSTER_ID_ONOFF, ATTRID_ON_OFF, GW_ZCL_ATTRIBUTE_DATA_TYPES_T__ZCL_DATATYPE_BOOLEAN);

    I commented the attribute reporting for Temperature measurement and Humdiity which is the sample code in user_interface.c

    Steps to run:

    1. Run HA gateway with command: "hagateway x86"

    2. Run sample application with command: "./start_application

    3. Press "P" to permit join requests.

    4. My Zigbee switch then connects to gateway and joins the network. It has 3 ON/OFF buttons shown as 3 endpoints on the console:

    IEEE_ADDR               ADDR EP DETAILS | EP DETAILS | ...                                                                                    
     00:12:4B:00:08:B8:3F:1E 0000 02 0007(HA) | 03 0100(HA) | 04 0101(HA) | 05 0102(HA) | 06 0102(HA)                                              
    >00:12:4B:00:08:93:F7:F4 6DBE 03 ON/OFF SWITCH | 02 ON/OFF SWITCH | 01 ON/OFF SWITCH

    5. Then I select one of the endpoints for the switch and press "D"

    6. I select the endpoint 03 for HA gateway and again press "D".

    This completes the bind process

    7. Now I select the endpoint on switch and press "y" to enable reporting.

    But I am getting following error:

    received from GATEWAY: len=6, cmd_id=0, subsystem=115
     Raw=06:00:73:00:08:00:10:00:18:00
    Calling confirmation callback
    attr_read_confirm_handler: Received ZIGBEE_GENERIC_CNF
    attr_read_confirm_handler: Status SUCCESS.
    Reporting Register state 4
    received from NWK_MGR: len=21, cmd_id=27, subsystem=82
     Raw=15:00:52:1B:08:1B:10:01:18:00:22:0D:08:00:11:F4:F7:93:08:00:4B:12:00:28:03
    comm_device_binding_entry_request_rsp_ind Received NWK_MGR_CMD_ID_T__NWK_SET_BINDING_ENTRY_RSP_IND
    Bind/Unbind successful
    sourceaddress 0x124b000893f7f4 endpoint 0x3
    Reporting Register state 5
    Unregistering state machine (00422e4a)
    received from GATEWAY: len=12, cmd_id=21, subsystem=83
     Raw=0C:00:53:15:08:15:10:00:18:04:22:02:08:00:28:00
    attr_process_set_attribute_reporting_rsp_ind: WARNING: Status FAILURE msg->status = 4

    I want the demo app to show the status of switch ON/OFF on the console, when I manually press the switch. The reverse is working fine, i.e. if I select the respective endpoint and press N/F then the switch is turned ON/OFF.

    Please guide me. What steps have I missed? Where can I get more information on the status and error codes?

    Thanks,

    Sonal