This example duplicates the functionalities of the SDK example - soc-btmesh-switch with NCP mode, instead of controlling the light by the push buttons on the WSTK, it implements a lightweight console, so that you can use the CLI to control the lights in the network. For more information about the ncp mode and ncp host and target, please go through KBA_BT_1602: NCP Host Implementation and Example.
The NCP mode requires both the host and target to work.
A simple console is implemented to receive commands from user. Users can add any customized command by adding an new item to CMDs array in app.c.
|l||l [1/0]||Set light on or off|
|ln||ln [0-100]||Set lightness [0% - 100%]|
|ct||ct [0-100]||Set Color Temperature [0% - 100%]|
|fr||fr [1/0]||1 - Factory Reset, 0 - normal reset|
#if defined(_SILICON_LABS_32B_SERIES_1_CONFIG_3) /* xG13 devices have two RTCCs, one for the stack and another for the application. * The clock for RTCC needs to be enabled in application code. In xG12 RTCC init * is handled by the stack */ CMU_ClockEnable(cmuClock_RTCC, true); #endif