Skip to content
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

Untimely retry on repeated sending of a command associated with a custom cluster (TZ-1085) #414

Closed
Matthieu-Poulain opened this issue Aug 27, 2024 · 2 comments
Labels

Comments

@Matthieu-Poulain
Copy link

Matthieu-Poulain commented Aug 27, 2024

Question

Hello,

I am trying to build a remote system with a remote and a receiver (both esp32-C6 or H2).
On this system, for safety reasons, the user has to press a button while he wants the receiver to drive a motor (for now it's just a simple LED). When he stops pressing the button, the motor has to stops within 300ms (timeout).

In order to achieve such a behaviour, i implemented a custom cluster (I'm not sure if this is even the best method though) from which i send every 100ms a custom command telling the receiver to keep the motor ON.
When its done i can send a 2nd command or just wait for the timeout to to stop it.

However, at that pace, it seems that sometimes a message may not be received or acknoledged. This ends in the command being sent again while the LED is supposed to be OFF and the LED starts for a short time to turn ON until next timeout.

I searched for a way to fix this behavior, but neither of the ZBOSS defines i could find and changed solved my issue.
What is the reason behind this behavior? Is the timing (100ms) too short to send such short commands? Is this even the right way to build my system or is there any other API i missed while searching?

Thanks a lot for the help you could provide.

Additional context.

No response

@github-actions github-actions bot changed the title Untimely retry on repeated sending of a command associated with a custom cluster Untimely retry on repeated sending of a command associated with a custom cluster (TZ-1085) Aug 27, 2024
@xieqinan
Copy link
Contributor

xieqinan commented Aug 29, 2024

@Matthieu-Poulain,

To reproduce your issue, I created an example based on your description, which is attached. It works as expected on two ESP32H2 chip, their distance is about 50 cm.

We can discuss the issue based on this patch based on esp-zigbee-sdk (537b9aa) .
0001-test-send-frame-in-100ms-interval.zip

@Matthieu-Poulain
Copy link
Author

@Matthieu-Poulain,

To reproduce your issue, I created an example based on your description, which is attached. It works as expected on two ESP32H2 chip, their distance is about 50 cm.

We can discuss the issue based on this patch based on esp-zigbee-sdk (537b9aa) . 0001-test-send-frame-in-100ms-interval.zip

Hello,
I feel like an idiot...
I put a debug output to print the received command counter inside the receive handler function... Removing it seems to allow the proper working of the receiver. I really must be more careful with printf & ESP_LOGx functions...

Thanks a lot for your help

@chshu chshu closed this as completed Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants