Bluetooth: Host for nRF RPC Bluetooth Low Energy¶
The nRF RPC Host sample demonstrates the Bluetooth Low Energy (LE) stack with the Remote procedure call library (nRF RPC) library, which exposes the stack’s interface to another device or CPU using Remote Procedure Calls (RPC). On an nRF53 device, this sample is supposed to run on the network core and it provides the Bluetooth LE functionality for the application core.
Overview¶
Note
Currently, serialization of the Generic Access Profile (GAP) and Connection Management is supported.
The host (network core) is running the full Bluetooth LE stack. It receives serialized function calls that it decodes and executes, then sends response data to the client (application core).
When the sample starts, it displays the welcome prompt “Starting nRF RPC bluetooth host”.
Requirements¶
The sample supports the following development kits:
Hardware platforms |
PCA |
Board name |
Build target |
---|---|---|---|
PCA10095 |
|
Building and running¶
This sample can be found under samples/bluetooth/rpc_host
in the nRF Connect SDK folder structure.
See Building and programming a sample application for information about how to build and program the application.
Debug build¶
To build the sample with a debugging configuration, use the following command:
west build samples/bluetooth/rpc_host -- -DCONFIG_OVERLAY=overlay-debugging.conf
Testing¶
Build the sample with the same Bluetooth configuration as the application core sample. For more details, see: Bluetooth Low Energy Remote Procedure Call. Build the Bluetooth: Beacon on the application core. This sample works out of the box and does not require configuration changes. In the Beacon sample directory, invoke:
west build -b nrf5340dk_nrf5340_cpuapp -- -DCONFIG_BT_RPC=y
After programming the sample for your development kit, test it by performing the following steps:
Connect the dual core development kit to the computer using a USB cable. The development kit is assigned a COM port (Windows) or ttyACM device (Linux), which is visible in the Device Manager.
Connect to the kit with a terminal emulator (for example, PuTTY). See How to connect with PuTTY for the required settings.
Reset the development kit.
Observe that the terminal connected to the network core displays “Starting nRF RPC Bluetooth host”.
On the terminal connected to the application core, you can observe your Bluetooth application is running.