Xinyuan-LilyGO / T-ZigBee

Zigbee Ultra Low Power IOT Development Board
GNU Affero General Public License v3.0
72 stars 18 forks source link

Add ability to register clusters via zbhci #23

Closed bvkNL closed 1 year ago

bvkNL commented 1 year ago

As I understand it, the firmware for the TLSR8258 chip that flashed first (for instance as part of the sensor_demo), includes the zcl_register command that sets the ZCL in and out clusters for the zigbee chip. Registering the clusters can be found in the sampleGateway.c in the telink-zigbee-sdk. This sets which server/client clusters are made available to use and are also auto-discovered by for example Home Assistant.

However setting/registering the clusters does not seem to be possible via the zhbci commands that are used by the platformio sample projects included in this Github repo. Hence, it does not seem to be possible to adjust which clusters can be used via these sample projects. Is this correct or am I missing something?

Are there plans to add this possibility to zbhci in the future? Or is the only solution to create custom firmware using Telink's SDK?

Thanks a lot for all the hard work!

lbuque commented 1 year ago

@bvkNL It is currently not possible to set/register the clusters through the zbhci command.

The coupling between setting/registering the clusters and the tlsr8258 zcl is so deep that it is difficult to extract it as part of the zbhci command.

It is better to use Telink's SDK to create custom firmware.

bvkNL commented 1 year ago

Ok, that makes sense. Thanks for the swift answer! I’ll dive into the telink SDK.

One thing that might be a nice addition to the GitHub documentation, is some more explanation of what the Telink firmware does and why it needs to be flashed, eg for some of the examples to work. It took me quite some time to piece it all together. If I have time, I’ll make a pull request with some suggestions.

In any case, I’ll close this issue.