This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Zigbee CLI example and light_bulb example

Hi, all! 

I'm using Nordic's sample program.

"Zigbee Light Control example"
https://infocenter.nordicsemi.com/topic/sdk_tz_v4.0.0/zigbee_example_light_control.html


has worked well.

"Testing" - "Zigbee CLI Agent example"
infocenter.nordicsemi.com/.../zigbee_example_cli_agent.html

It also worked well.

Next.
"Using CLI to control lighting devices"
infocenter.nordicsemi.com/.../zigbee_example_cli_agent.html

want to do.

I started nRF52840 where I wrote this. -> examples\zigbee\light_control\light_bulb

Next I wrote this in nF52840. -> examples\zigbee\experimental\cli\cli_agent_router

and typed the following


> bdb role zc
Coordinator set
Done.
> bdb start
Started coordinator
Done.
> bdb legacy enable
Done.
> zdo match_desc 0xfffd 0xfffd 0xxc05e 1 0 0
Sending broadcast request.
Done.


The nRF52840 for which light_bulb was written cannot be detected.

Any help?

Parents
  • Hello,

    The zdo match_desc is specified for IKEA and HUE light bulbs, which use a difference cluster than the light bulb example in the SDK.

    The description of zdo match_desc, which you can find here is:

    zdo match_desc <h:16-bit destination address>
                   <h:requested address/type> <h:profile ID>
                   <d:number of input clusters> [<h:input cluster IDs> ...]
                   <d:number of output clusters> [<h:output cluster IDs> ...]

    The first two parameters are the addresses that should respond to the message. If you insert 0xfffd, that means all non-sleepy devices. 0xffff means all devices. I usually use 0xffff.

    The next parameter is the profile ID. The IKEA and HUE bulbs use something called Light Link, which has ID 0xc05e, while the light bulb example in the SDK use the zigbee Home Automation (HA) ID, which is 0x0104.

    The rest of the parameters, let's call them a, b, c, and d.

    a is the number of input clusters, b is the list of these input clusters,

    c is the number of output clusters, and d is the list of these clusters.

    The light bulb example from the SDK has 6 input clusters, and no output clusters. The input clusters is listed in the light bulb example:

    ZB_HA_DECLARE_DIMMABLE_LIGHT_CLUSTER_LIST(dimmable_light_clusters,
                                              basic_attr_list,
                                              identify_attr_list,
                                              groups_attr_list,
                                              scenes_attr_list,
                                              on_off_attr_list,
                                              level_control_attr_list);

    (the last 6 lines).

    Let us use e.g. the attributes on_off and level_control. These have the ID 0x0006 and 0x0008, respectively.

    So if you use the command:

    zcl match_desc 0xffff 0xffff 0x0104 2 0x0006 0x0008 0

    You will ask all nodes: "What nodes use the HA profile and contain at least these two attributes: on_off and level_control?"

    Then you should see the short address of the light bulb.

    Best regards,

    Edvin

Reply
  • Hello,

    The zdo match_desc is specified for IKEA and HUE light bulbs, which use a difference cluster than the light bulb example in the SDK.

    The description of zdo match_desc, which you can find here is:

    zdo match_desc <h:16-bit destination address>
                   <h:requested address/type> <h:profile ID>
                   <d:number of input clusters> [<h:input cluster IDs> ...]
                   <d:number of output clusters> [<h:output cluster IDs> ...]

    The first two parameters are the addresses that should respond to the message. If you insert 0xfffd, that means all non-sleepy devices. 0xffff means all devices. I usually use 0xffff.

    The next parameter is the profile ID. The IKEA and HUE bulbs use something called Light Link, which has ID 0xc05e, while the light bulb example in the SDK use the zigbee Home Automation (HA) ID, which is 0x0104.

    The rest of the parameters, let's call them a, b, c, and d.

    a is the number of input clusters, b is the list of these input clusters,

    c is the number of output clusters, and d is the list of these clusters.

    The light bulb example from the SDK has 6 input clusters, and no output clusters. The input clusters is listed in the light bulb example:

    ZB_HA_DECLARE_DIMMABLE_LIGHT_CLUSTER_LIST(dimmable_light_clusters,
                                              basic_attr_list,
                                              identify_attr_list,
                                              groups_attr_list,
                                              scenes_attr_list,
                                              on_off_attr_list,
                                              level_control_attr_list);

    (the last 6 lines).

    Let us use e.g. the attributes on_off and level_control. These have the ID 0x0006 and 0x0008, respectively.

    So if you use the command:

    zcl match_desc 0xffff 0xffff 0x0104 2 0x0006 0x0008 0

    You will ask all nodes: "What nodes use the HA profile and contain at least these two attributes: on_off and level_control?"

    Then you should see the short address of the light bulb.

    Best regards,

    Edvin

Children
Related