Error while building Matter Light bulb sample with MoveToClosestFrequency command.

Hello,

I'm getting the below mentioned error when I try to build Light Bulb sample with MoveToClosestFrequency in LevelControlCluster.

/home/dotdll/ncs/toolchains/7cbc0036f4/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: app/libapp.a(IMClusterCommandHandler.cpp.obj): in function `chip::app::Clusters::LevelControl::DispatchServerCommand(chip::app::CommandHandler*, chip::app::ConcreteCommandPath const&, chip::TLV::TLVReader&)':
/home/dotdll/ncs/v3.0.0/nrf/samples/matter/light_bulb/src/default_zap/zap-generated/IMClusterCommandHandler.cpp:557: undefined reference to `emberAfLevelControlClusterMoveToClosestFrequencyCallback(chip::app::CommandHandler*, chip::app::ConcreteCommandPath const&, chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::DecodableType const&)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Please let me know how do I implement the command.

Thanks,
Suhas

Parents Reply
  • Hi Andreas,

    Thank you for sharing the documentation links—they're quite helpful.

    Just to clarify, I'm not creating a new cluster. I simply enabled the MoveToClosestFrequency command in the LevelControl cluster via the ZAP GUI, as it aligns with the requirements of my application.

    The build error I mentioned occurs only after enabling this command. I looked into the Matter source under ncs/v3.0.0/modules/lib/matter/src/app/clusters/level-control/level-control.cpp and found that implementations for other LevelControl commands (like MoveToLevel, Step, etc.) are already defined there. However, there doesn't seem to be a corresponding emberAfLevelControlClusterMoveToClosestFrequencyCallback function defined for the command I enabled.

    Could you please confirm whether this is expected, and if the callback for MoveToClosestFrequency needs to be implemented manually? If so, is there any guidance or reference on how to correctly implement and register such a handler?

    Best regards,
    Suhas

Children
No Data
Related