Skip to content

Commit

Permalink
samples: nrf_rpc: ps_client: fix BLE snippet after upmerge
Browse files Browse the repository at this point in the history
The upmerge PR enabled BT_HCI for the protocols
serialization client sample, but the point of this sample
is to use BT_RPC_STACK, which enables RPC serialization
of Bluetooth host APIs, instead of the entire HCI-based
stack.

Restore the previous behavior and add necessary workarounds
to enable Bluetooth shell commands despite of not using
the HCI-based host implementation.

Signed-off-by: Damian Krolik <[email protected]>
  • Loading branch information
Damian-Nordic authored and nordicjm committed Feb 18, 2025
1 parent 915921d commit 6c574e3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ CONFIG_BT_DEVICE_NAME="Nordic_UART_Service"
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1
CONFIG_BT_CTLR=n
CONFIG_BT_HCI=y
CONFIG_BT_LL_SOFTDEVICE=n
CONFIG_BT_SHELL=y

# Enable the NUS service
Expand Down
5 changes: 5 additions & 0 deletions subsys/bluetooth/rpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ add_subdirectory(common)
add_subdirectory_ifdef(CONFIG_BT_RPC_CLIENT client)
add_subdirectory_ifdef(CONFIG_BT_RPC_HOST host)
add_subdirectory(soc)

# Host shell commands are only included in Zephyr for BT_HCI, the default stack implementation that
# is mutually exclusive with BT_RPC_STACK, so the commands must be pulled in manually to make them
# work with the RPC-based stack.
add_subdirectory_ifdef(CONFIG_BT_SHELL ${ZEPHYR_BASE}/subsys/bluetooth/host/shell host/shell)
7 changes: 7 additions & 0 deletions subsys/bluetooth/rpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ if BT_RPC_CLIENT
config HEAP_MEM_POOL_SIZE
default 4096

# BT_SHELL config in Zephyr depends on BT_HCI, the default stack implementation that is mutually
# exclusive with BT_RPC_STACK, so this config must be duplicated to make shell commands work with
# the RPC-based stack.
config BT_SHELL
bool "Bluetooth shell"
select SHELL

endif # BT_RPC_CLIENT

if BT_RPC_HOST
Expand Down

0 comments on commit 6c574e3

Please sign in to comment.