Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Zigbee coordinator with Xiaomi devices

Hi all!

I found solution for Xiaomi zigbee smart home sensors (gerkon, water sensor, pir motion, and other...) based on CC2530 zigbee shepherd and Trust Center Link Key from lthis ink.

Heve anybody an idea how to implement nrf52840 zigbee light coordinator code to cominicate with Xiaomi devices?

I tried to use it, but i dont inderstand where i have to paste key in source code, when i try to join to network code return  info with unknown signal parameter....

Parents
  • Hi Amigo!
    I think it is worth to start again from a small analysis to get into the right direction.

    Generally, if you want to create a solution based on Zigbee network you have to answer three basic questions:

    1. Which commissioning method are you going to use?

    2. How a device will discover other nodes?

    3. How data will be collected or commands sent?


    The article that you have linked answers the first question – Xiaomi devices will join a coordinated network, with the default, well-known Trust Center link key.

    Although I am not familiar with French language, it seems that the article does not describe a way to discover nodes or collect measurements, but that part may be deciphered from attached traffic dumps. If you look closely, all values are sent using “Report Attributes” command, addressed to the node “0x0000”, which is always the coordinator. That should answer the second question – there is no need to discover nodes, because they seem to report data to the coordinator without additional configuration (unless something was removed from traffic dumps).

    This quick analysis also answers partially the third question: value changes are reported by nodes, so there is no need to explicitly read them from every device. In order to parse those messages you probably should register a ZCL Report Attribute callback. Unfortunately currently there is no example that facilitates Attribute Reporting inside the Zigbee SDK, apart from the code snippet inside infocenter.

    I hope this analysis will speed up your development Slight smile

    Kind regards,

    Tomchy

Reply
  • Hi Amigo!
    I think it is worth to start again from a small analysis to get into the right direction.

    Generally, if you want to create a solution based on Zigbee network you have to answer three basic questions:

    1. Which commissioning method are you going to use?

    2. How a device will discover other nodes?

    3. How data will be collected or commands sent?


    The article that you have linked answers the first question – Xiaomi devices will join a coordinated network, with the default, well-known Trust Center link key.

    Although I am not familiar with French language, it seems that the article does not describe a way to discover nodes or collect measurements, but that part may be deciphered from attached traffic dumps. If you look closely, all values are sent using “Report Attributes” command, addressed to the node “0x0000”, which is always the coordinator. That should answer the second question – there is no need to discover nodes, because they seem to report data to the coordinator without additional configuration (unless something was removed from traffic dumps).

    This quick analysis also answers partially the third question: value changes are reported by nodes, so there is no need to explicitly read them from every device. In order to parse those messages you probably should register a ZCL Report Attribute callback. Unfortunately currently there is no example that facilitates Attribute Reporting inside the Zigbee SDK, apart from the code snippet inside infocenter.

    I hope this analysis will speed up your development Slight smile

    Kind regards,

    Tomchy

Children
Related