nRF RPC: Protocols serialization client
The Protocols serialization client sample demonstrates how to send remote procedure calls (RPC) to a protocols serialization server device, such as one running the Protocols serialization server sample. The RPCs are used to control Bluetooth® LE, NFC and OpenThread stacks running on the server device. The client and server devices use the Remote procedure call library (nRF RPC) and the nRF RPC UART transport to communicate with each other.
Requirements
The sample supports the following development kit:
Hardware platforms |
PCA |
Board name |
Board target |
---|---|---|---|
PCA10156 |
|
||
nRF54L15 DK |
PCA10156 |
|
|
PCA10056 |
|
To test the sample, you also need another device running the Protocols serialization server sample.
For testing the Bluetooth LE API serialization, you need to have the nRF Connect for Mobile app installed on your smartphone or tablet.
For testing the NFC API serialization, you also need a smartphone or tablet that can read NFC tags.
Overview
The Protocols serialization client sample is a thin client that does not include OpenThread, Bluetooth LE or NFC stacks. Instead, it provides implementations of selected OpenThread, Bluetooth LE and NFC functions that forward the function calls over UART to the Protocols serialization server. The client also includes a shell for testing the serialization.
Configuration
See Configuring and building for information about how to permanently or temporarily change the configuration.
Snippets
The following snippets are available:
ble
- Enables the client part of the Bluetooth LE RPC and shell interface to serialized API. Also enables the Bluetooth LE Nordic UART Service.coex
- Enables shell commands for the MPSL software coexistence implementation on the server device.debug
- Enables debugging the sample by enabling__ASSERT()
statements globally and verbose logging.log_rpc
- Enables logging over RPC.openthread
- Enables the client part of the OpenThread RPC.nfc
- Enables the client part of the NFC RPC.
Building and running
This sample can be found under samples/nrf_rpc/protocols_serialization/client
in the nRF Connect SDK folder structure.
To build the sample, follow the instructions in Building an application for your preferred building environment. See also Programming an application for programming steps and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.
Note
When building repository applications in the SDK repositories, building with sysbuild is enabled by default.
If you work with out-of-tree freestanding applications, you need to manually pass the --sysbuild
parameter to every build command or configure west to always use it.
You can modify the list of enabled features, which by default includes Bluetooth LE support and debug logs.
Testing
To test the client sample, follow the instructions in the Testing section of the protocol serialization server sample test procedure.
Dependencies
This sample uses the following nRF Connect SDK libraries:
This sample uses the following sdk-nrfxlib library: