NCP, CPCd, and Host Applications#
In the NCP approach, a typical Connect-based application is divided into three separate applications: NCP, Host, and the Co-processor Communication daemon (CPCd). The NCP runs on the EFR32, while the Host application and CPCd runs on the Host device.
CPC Daemon#
The CPC daemon provides a unified interface for various projects requiring co-processor communication. CPC calls the host device primary, and the NCP (EFR32) device secondary.
CPCd can be downloaded from github: https://github.com/SiliconLabs/cpc-daemon.
In the most common use case, CPCd is running as a daemon on Linux, connecting to the primary’s application via the CPC library (libcpc.so) and connecting to the secondary’s application on UART (other communication channels are supported as well).
CPC supports multiple endpoints, so it can be used to implement dynamic multiprotocol applications, or another endpoint can be created on the same device to implement something on the secondary that is not connected to the radio stack.
Modifying the CPCd is not recommended and should not be needed.
NCP Application (SoC)#
The NCP application runs on the EFR32 and supports communication with CPCd over a CPC endpoint. The NCP application can be built with the default configuration, or optionally can be augmented with customizations for target hardware. The application provided is called Connect – NCP.
The NCP application can be used out-of-the-box without any modification. However, the radio configuration must be set in the NCP Application.
We do not recommend implementing new commands on the same endpoint, if you need further, not Connect related control of the NCP device, we recommend creating a separate CPC endpoint for the new commands.
Host Application#
The Host application can be compiled to almost any device where libcpc is available. Currently, the Host application examples are implemented for the Linux operating system only. These applications are not available in Simplicity Studio, but available on github: https://github.com/SiliconLabs/Connect-NCP-Host.
Physical layer (PHY) parameters can be set only at compile time and only in the NCP application. Radio parameters are not configurable on the Host side.