Bear in mind that host application requires a UNIX-like operating system (tested with Debian Linux) to compile and run the executable.
NCP stands for ‘Network Co-processor’. By this method the customers can use a common firmware on the EFR32 SoC and control the NCP through UART interface from their application running on a different host equipment.
The setup has two separate and mostly independent part:
The EFR32 firmware is a ready-to-use example, fully pre-configured, it is only necessary to configure the radio parameters if the default settings are not suitable and compile / load the code to the EFR32 device if there is no any special requirement. There are two example projects regarding UART based NCP, the software and the hardware flow control versions – although these examples are almost the same except the definition which controls SW / HW handshaking method for the selected UART. If the communication hangs see Connect: Avoid NCP device to hang.
Open one of the NCP UART projects (SW or HW flow control) which suits the needs and go through the configuration / generation / compilation process. After the compiled firmware downloaded to the SoC and started, the device immediately available to receive NCP commands from the host.
Although, it is possible to use any Connect project with NCP, in most of the cases customers uses the host as a coordinator, thus the Host Sink example project selected since this is a perfect boiler-plate code to develop / implement own application.
Although, a host application can run on almost any architecture, the application examples in the SDK are provided only for UNIX-like operating systems.
This example assumes that the customer has a UNIX-like environment set up with Simplicity Studio and GCC for the host (target) available. It is also possible to cross-compile the application to different target than the host but setting up that kind of environment is out of the scope of this document.
Open the Connect (Host): Sink example project. Since this project is not part specific, delete the selected part if any:
Click on generate, which will create the necessary files as in case of any other projects. Since the host GCC is usually not configured, executing the compilation process will print an info message and will no compile the code:
The current IDE does not support host target compilation, however, at that point it is possible to compile the application from a terminal console. Open a terminal and navigate to the project’s root directory and issue the
make -f sink-host.mak command. The project should be compiled cleanly and an executable named
sink-host-unix-host app should be created in the directory
build-sink-host-unix-host. By starting the application, a text console should appear on which it is possible to type the application commands and they should work as if it was the serial console of a Sink / SoC configuration:
./sink-host-unix-host-app --uart /dev/ttyACM0 Reset info: 0x0B (SOFTWARE) ASHv3 is up INIT: sink-host sink-host>
By default, the Host Sink application works the same as the SoC version of Sink example, the user can issue the commands to form a network or enable joining (See: ‘How to setup and use a Connect Sink / Sensor example project’).
Since the ASHv3 protocol is fully documented, customers can implement a host code on their own hardware – not necessarily need to use the structure of the provided examples.
For more details on NCP protocol see UG235.09: Developing NCP Applications with Silicon Labs Connect.