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

Coordinator sends "leave" command after the association (TZ-111) #21

Closed
Ravenen opened this issue May 10, 2023 · 8 comments
Closed

Coordinator sends "leave" command after the association (TZ-111) #21

Ravenen opened this issue May 10, 2023 · 8 comments

Comments

@Ravenen
Copy link
Contributor

Ravenen commented May 10, 2023

I am using esp-zigbee-gateway example on the ESP32C6.
I added some communications after the end device association: ask active endpoints list, ask simple descriptor on each endpoint.
After that, the ESP_ZB_ZDO_SIGNAL_LEAVE_INDICATION signal is received, and I see in the WireShark that coordinator sends the leave command to that device.
image
image
image
image

zigbee sdk pairing pcapng.zip

@github-actions github-actions bot changed the title Coordinator sends "leave" command after the association Coordinator sends "leave" command after the association (TZ-111) May 10, 2023
@likunqiao097304
Copy link
Contributor

It seems like coordinator is trying to send the nwk key(No.14) but no further action from end-device to request trust center link key. Is end-device also our Zigbee stack or our board? Also by default we disable using install code policy to do the network commissioning, so please check both size have the same security mechanism.

@Ravenen
Copy link
Contributor Author

Ravenen commented May 11, 2023

Thank you for your response!
End Device is a Sonoff temperature sensor. I didn't change any security configs in the example. So, again, what are the recommendations to fix that? Or should I give some more information?

@likunqiao097304
Copy link
Contributor

Does this Sonoff temperature sensor use Zigbee 3.0 standard way to do the commission? Like it has install code and MAC on the label. I'd like to know how is process from your side to let your sensor join the network. Have you tried to join other Zigbee coordinator successfully?

From the log you provided, our Zigbee coordinator did send the network key successfully (a351a85....). And later encrypted ZDO active endpoint, simple descriptor request, your sensor did decrypte correctly with response. However, end-device(sensor) didn't do response/action with the network key.

Here is a picture that we see as successfully join. Highlight them in blue:
image

@Ravenen
Copy link
Contributor Author

Ravenen commented May 12, 2023

Yes, I have tried to join it to other coordinator with CC ZigBee stick and ZigBee2Mqtt software. I also have the association process captured with the WireShark. There is also no response to the network key, but the coordinator keeps the device in the network.

zigbee switch pairing.zip

image
image
image

@Ravenen
Copy link
Contributor Author

Ravenen commented May 12, 2023

And yes, the manual of the device does say that it supports ZigBee 3.0.
PXL_20230512_135839185~2

@Ravenen
Copy link
Contributor Author

Ravenen commented May 18, 2023

So... Any suggestions here? What can I possibly do to help with my issue?

@xieqinan
Copy link
Contributor

Hi Ravenen,
The problem described above can potentially be resolved by disabling the bdbTrustCenterRequireKeyExchange MACRO in the Zigbee Gateway. This solution is outlined in the Zigbee BDB specification provided below. An API for configuring the MACRO will be made available as soon as possible in ESP-ZigBee-SDK.
MicrosoftTeams-image

The End Device will be allowed to join the Zigbee network without the requirement of exchanging a link key, if the Zigbee Gateway disables bdbTrustCenterRequireKeyExchange option. However, it is important to note that this approach is considered unsafe for the Zigbee network.

@chshu
Copy link
Collaborator

chshu commented May 26, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants