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
  • Hello,

    Have you tried to sniff the Zigbee traffic using this key? I have not looked into the Ziaomi solution, but I guess that if the TC Link Key is available, you should be able to swap the key from one of the examples to connect to them.

     

    I do not have the sensors to test on, but you can try the example located in nRF5_SDK_for_Thread_and_Zigbee_v1.0.0examples\zigbee\experimental\light_control\light_coordinator

     

    You can see in the file located in:

    nRF5_SDK_for_Thread_and_Zigbee_v1.0.0\external\zboss\include\zb_config.h

    On line 174, the key is decleared. Try changing it to the key that you found.

     

    Best regards,

    Edvin

  • Yes, i found key, it's the same as in link above!

    I watch console log when gerkon  try to join the network 

    There were two statuses 

    2 - ZB_ZDO_SIGNAL_DEVICE_ANNCE

    15 - ZB_NWK_SIGNAL_DEVICE_ASSOCIATED

    My Xiaomi device is join the network and i see sniffer data from gerkon to coordinator

    But in console log i dont see any message about data was recieved by coordinator. 

    What a handler or function i have to use to watch recieved data from xiaomi device to coordinator?

  • I do not quite understand what you are trying to do. 

    You have some products from Xiaomi that uses Zigbee? And they work on their own, is that correct?

     

    Then you want to use an nRF as a light coordinator in this Zigbee network, is that right? Because then I think you are on the wrong track.

    In a Zigbee network, there is only one coordinator, and only one. If the network already exists, you can not join a network as a coordinator, unless you are the first node/device in the network. I suggest you rather try to join the network as a ligth_switch or light_bulb. I do not know if Xiaomi's solution supports light switches/bulbs, but you can try.

     

    Best regards,

    Edvin

  • no i want to made custom  zigbee gateway for Xiaomi sensors.  I thouth i can do it using coordinator example. My Xiaomi sensor can join the coordinator network. I need to get data from Xiaomi device.

Reply Children
  • Ok, I understand. Are you sure that the Xiaomi devices are not already configured for the Xiamoi coordinator, and hence that they are only looking for that network? They might store network information in an NVMC memory. Or are you sure that there are no other "secret"s that are needed by the devices? Any out of band information that is transferred on commissioning/joining of the network?

     

    Best regards,

    Edvin

  • Yes, Xiaomi devices are has the same link key "ZigBeeAlliance09". They are connect ing to coordinator (nrf52840 example) well (logging signal 2 - ZB_ZDO_SIGNAL_DEVICE_ANNCE and 15 - ZB_NWK_SIGNAL_DEVICE_ASSOCIATED) and i can watch packets between coord and Xiaomi with sniffer (my message above).

  • Ok. I can see that the first message:

    ZB_ZDO_SIGNAL_DEVICE_ANNCE (description from infocenter here) means that the device has joined the network. 
    The other:

    ZB_NWK_SIGNAL_DEVICE_ASSOCIATED (description here) As it it says on infocenter, this is here for historical reasons. You should use the ANNCE message instead.

     

    So could you describe in detail your exact issue? Are you not able to communicate with the devices after they have joined the network? Or is it the info with unknown signal parameters? What parameters and signal do you refer to?

     

    Do you have a light_switch in addition to your light_coordinator in your setup as well?

     

    Best regards,

    Edvin

Related