-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need help in figuring out why sometimes on/off command is not sent to all bind devices (TZ-1431) #517
Comments
an update |
I don’t think the low-level busy state will be triggered in your application since there are only three devices in your network. I suggest we debug this issue by analyzing the sniffer data first. However, I’m unable to parse the
You can try testing it using the
I believe the SDK can fulfill your application requirements. However, let’s identify the root cause of the failure first. By the way, is the light device a sleep device? |
@xieqinan , thanks for the reply
is there an official way to know about it? is there a way to be notified when the low-level is 'ready' again? just to re-iterate a bit: |
@xieqinan , so here's a complete pcap starting with commisioning to the first timed out command. However this time I can see from the log that the command is actually sent but not responded by the light. (There's also 2nd shorter attachment at the end that illustrates an original problem) Presence sensor: Attached sniff includes the following potential points of interest:
I'm attaching also another shorter one where presence sensor manages to send |
@xieqinan , wanted to ask if you had a chance to look into this and if maybe you have some advice regarding a better command sending routine? |
Can I simplify your problem as follows? In a large network containing 74 devices, a unicast frame is not acknowledged by the destination device initially. However, after approximately 3 seconds, the same frame is retransmitted and acknowledged. If so, I believe this is normal behavior. Due to the limited bandwidth of IEEE802.15.4, frames can occasionally be missed by devices in traffic network. Zigbee incorporates MAC and APS retransmission mechanisms to mitigate the likelihood of missed frames. For RxWhenIdle devices, APS retransmits frames that do not receive an APS ACK after 3 seconds. |
@xieqinan , not in this case but anecdotally it sometimes doesn't send the command. But that doesn't matter all that much. As I understand this may be normal and my current approach with an explicit timeout actually works the way I'm ok with. |
The timeout duration is a constant value defined within the stack, so no application-level option is provided to modify it. |
@xieqinan , then I think it concludes this topic. |
Question
If it's possible I'd like to get help on the issue I'm having.
router
device.on/off
client cluster (and to a coordinator as well)on
command from a coordinator that in turn triggers the sensor to issueon
command to ownbinds
(aforementioned light and a coordinator itself)The problem
most of the time it works and 2 commands are issued: to the light and to the coordinator.
However sometimes I can see that only 1
on
command to a coordinator is issued, sometimes no commands at all.Additional info:
on
command is generated upon internal conditions (one of the own sensors are active)address_mode
set toESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT
withesp_zb_zcl_on_off_cmd_req
API callesp_zb_zcl_command_send_status_handler_register
and that one gets called without errors.ESP_ZB_CORE_CMD_DEFAULT_RESP_CB_ID
. This one doesn't receive the response from the lights (naturally)I suspect it has something to do with how "busy" the lower level zigbee machinery is.
How could I troubleshoot it? Why mostly command is sent to all bound devices with no problems and sometimes it doesn't get sent at all or just partially?
Apparently lower level code is not able to send the command. Is there some dedicated callback to know when that happens? At the moment I'm catching this situation with a dedicated internal timer that times out.
Does it make sense to manually send dedicated commands to all relevant bound devices? (in other words not with
ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT
but with e.g.ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT
)?I'm attaching also a wireshark capture of the described situation.
The presence sensor has a short address of
0xce27
The target light in question has a short address of
0xe979
I was applying the filter
_ws.col.def_src == "0xce27" || _ws.col.def_dst == "0xce27"
Packet
50
denotes a command from a coordinator to0xce27
that is supposed to triggeron
command from a presence sensor0xce27
to the light0xe979
.In this case the command is sent to the coordinator in a packet
87
with a sequence number191
. This sequence number I also see via other means (I report back such cases to zigbee2mqtt via separate attributes) and I can see that I get the send status and waiting for the response.At packets
199
,200
,201
one can see a repeated attempt after a timeout which this time succeeds.timeout_tsn191_ce27_to_e979.pcapng.zip
Thanks in advance!
Additional context.
No response
The text was updated successfully, but these errors were encountered: