ZigBee Groups Handler Bug

Hello,

I am using nRF Connect SDK 1.7.0 and wrote a light-bulb-device. It has two identical dimmer-endpoints and I reconized there is a bug with the ZCL Groups cluster.

For example:

Adding a group to endpoint number 1 (ZB_ZCL_CMD_GROUPS_ADD_GROUP).

Now asking endpoint number 2 (the other one) for its list of groups

It should return an empty list as the group was added to the first one. (ZB_ZCL_CMD_GROUPS_GET_GROUP_MEMBERSHIP)

-> It actually returns the group of the other endpoint

From what I checked in the library it looks like internal there is only one list of groups for all endpoints together.

The GET_GROUP_MEMBERSHIP command will always return the complete list, without checking the group membership of each endpoint before returning the items.

The Cluster Library says:

4422 If the group count field of the command frame has a value of 0 indicating that the group list field is empty,
4423 the entity SHALL respond with all group identifiers of which the entity is a member.

The "get group membership " command is unicasted to the endpoint. So I would expect the endpoint to be "the entity". And when the endpoint answers its group list it should only list those who the endpoint is part of.

The Library actually sends all groups known to the device - which looks wrong to me (as if the device would be seen as "the entity").

Is there a workaround for this problem?

I know how to override the command handler to implement an own handler for the ZB_ZCL_CMD_GROUPS_GET_GROUP_MEMBERSHIP command, but how to access the list of groups from application-level? Commands like zb_apsme_get_group_membership_request don't seem to be accessible from application? I only find zb_aps_is_endpoint_in_group but checking for 0-0xFFFF is not really an option...

Thanks & best regards,

Alex

Parents
  • Hi Alex,

    Can you share how you are implementing this, especially how you add the endpoint to a group and how you send the get group membership command? Can you also get a sniffer log of when you send the get group membership command and upload it here as a pcap file?

    When I tested this myself, only the endpoint with a group membership sent a Get Group Membership Response command.

    Best regards,

    Marte

  • Hi Marte,

    I have modified a devboard as send-tool for sending packets to my DUT-device.

    Please find Sniffer logs of what I am doing attached. Key for wireshark ist "7a2cc0bb6504e93b7a55ff79d45569f0".

    recommended filter in wireshark: ((!(wpan.frame_type == 0x2)) && !(zbee_aps.type == 0x2)) && !(zbee_nwk.cmd.id == 0x08)

    I think the sniffer log is explaining my problem best:

    Starting with two identical dimmer endpoints (ep10 and ep11):

    - First I verify both are in no group.

    - add group id 1 to ep10

    - add group id 2 to ep10

    - add group id 2 to ep11

    - get group membership of ep10 (sending with group count 0 - means return all groups of the entity)

    -> ep10 has both groups as expected

    - get group membership of ep11 (sending with group count 0 - means return all groups of the entity)

    -> ep11 also has both groups!?? -> BUG!

    - remove the additinal shown group 1 from ep11

    -> ep11 says error that group 1 is not found (on this endpoint)

    - verify group membership with get group membership of ep11 (sending with group count 0 - means return all groups of the entity)

    -> still says both groups are present on this endpoint

    Best regards,

    Alex

    Groups_7a2cc0bb6504e93b7a55ff79d45569f0.pcapng

  • Hi Marte,

    I just went back to nRF Connect 1.5.1 (which is the certified zigbee platform).

    Unfortunately that version has the same issue. Would be great to get a workaround soon.

    Best regards,

    Alex

  • Hi Alex,

    Thank you for the information. I have forwarded it to the developers.

    They have not gotten back to me regarding a workaround yet.

    Best regards,

    Marte

  • Hi Alex,

    Sorry for the delay. I have an update from the developers.

    They have been able to reproduce the issue and gather some more information regarding it. It seems the issue is with the Get Group Membership Response command, which always returns all groups the device is added to, ignoring the endpoint. By looking at internal logs in the stack they found that adding an endpoint to a group works fine, and sending the Remove Group command from a particular group to and endpoint that is not a member of the group returned that the group was not found. So it seems like group membership is handled correctly otherwise. However, they are still working on this and will keep on testing to make sure that is correct, and to figure out how to solve the issue.

    Regarding your question about getting group membership on the device, the developers confirmed that zb_aps_is_endpoint_in_group() is the only option at the moment. 

    Best regards,

    Marte

  • Hi Alex,

    Another update from the developers. They confirmed what I said in my previous reply, that group memberships is handled correctly, and that the only issue is the Get Group Membership Response command. View Group command works, so it is possible to use this to check group membership, but this will of course have the same issue as when using zb_aps_is_endpoint_in_group, where you have to check for a specific group ID.

    The Get Group Membership bug has been reported to DSR, who are responsible for the ZBOSS stack. The fix should show up in the release notes as ZBS-676.

    Best regards,

    Marte

Reply Children
No Data
Related