diff --git a/applications/protocols_serialization/client/src/main.c b/applications/protocols_serialization/client/src/main.c index fe9e170c9136..2d676a28b569 100644 --- a/applications/protocols_serialization/client/src/main.c +++ b/applications/protocols_serialization/client/src/main.c @@ -61,7 +61,7 @@ int main(void) } #endif - printk("Welcome to RPC host\r\n"); + printk("Welcome to RPC client\r\n"); return 0; } diff --git a/applications/protocols_serialization/resources/nrf_scan.jpg b/applications/protocols_serialization/resources/nrf_scan.jpg new file mode 100644 index 000000000000..2de51122138b Binary files /dev/null and b/applications/protocols_serialization/resources/nrf_scan.jpg differ diff --git a/applications/protocols_serialization/resources/nrf_send.jpg b/applications/protocols_serialization/resources/nrf_send.jpg new file mode 100644 index 000000000000..ea447d6bf176 Binary files /dev/null and b/applications/protocols_serialization/resources/nrf_send.jpg differ diff --git a/applications/protocols_serialization/server/CMakeLists.txt b/applications/protocols_serialization/server/CMakeLists.txt index 9e87a08f0254..4607e8abef72 100644 --- a/applications/protocols_serialization/server/CMakeLists.txt +++ b/applications/protocols_serialization/server/CMakeLists.txt @@ -14,4 +14,6 @@ target_sources(app PRIVATE src/main.c) # NORDIC SDK APP END # Link OpenThread CLI even though OPENTHREAD_SHELL is not selected -#zephyr_link_libraries(openthread-cli-ftd) +if(CONFIG_OPENTHREAD_RPC) +zephyr_link_libraries(openthread-cli-ftd) +endif() diff --git a/applications/protocols_serialization/server/snippets/openthread/openthread.conf b/applications/protocols_serialization/server/snippets/openthread/openthread.conf index d5e001d91577..0552026915dd 100644 --- a/applications/protocols_serialization/server/snippets/openthread/openthread.conf +++ b/applications/protocols_serialization/server/snippets/openthread/openthread.conf @@ -4,7 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_SHELL=y CONFIG_OPENTHREAD_SHELL=y CONFIG_SHELL_ARGC_MAX=26 @@ -15,17 +14,9 @@ CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y CONFIG_NETWORKING=y CONFIG_NET_L2_OPENTHREAD=y -CONFIG_OPENTHREAD_RPC=y -CONFIG_OPENTHREAD_RPC_SERVER=y - -CONFIG_NETWORKING=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_PACKET=y -CONFIG_NET_L2_OPENTHREAD=y -CONFIG_IEEE802154_NET_IF_NO_AUTO_START=y # Let RPC client start the interface on demand -CONFIG_OPENTHREAD_MANUAL_START=y CONFIG_OPENTHREAD_RPC=y CONFIG_OPENTHREAD_RPC_SERVER=y - -CONFIG_MBEDTLS_SHA1_C=n -CONFIG_FPU=y +CONFIG_IEEE802154_NET_IF_NO_AUTO_START=y # Let RPC client start the interface on demand +CONFIG_OPENTHREAD_MANUAL_START=y diff --git a/applications/protocols_serialization/server/src/main.c b/applications/protocols_serialization/server/src/main.c index f75ac06155c2..e38ed20746d1 100644 --- a/applications/protocols_serialization/server/src/main.c +++ b/applications/protocols_serialization/server/src/main.c @@ -57,7 +57,7 @@ int main(void) LOG_ERR("Init RPC Failed."); } - printk("Welcome to RPC remote\r\n"); + printk("Welcome to RPC server\r\n"); return 0; } diff --git a/applications/protocols_serialization/user_guide.md b/applications/protocols_serialization/user_guide.md index e8640964f66d..bf5b6cc4ddbe 100644 --- a/applications/protocols_serialization/user_guide.md +++ b/applications/protocols_serialization/user_guide.md @@ -1,25 +1,67 @@ # Protocols serialization applications testing +- [Protocols serialization applications testing](#protocols-serialization-applications-testing) + - [Overview](#overview) + - [Setting up nRF Connect SDK](#setting-up-nrf-connect-sdk) + - [Install NCS](#install-ncs) + - [Building application](#building-application) + - [Flashing and connecting](#flashing-and-connecting) + - [Testing](#testing) + - [Testing BLE](#testing-ble) + - [Testing OpenThread](#testing-openthread) ## Overview +## Setting up nRF Connect SDK +## Install NCS +Please see: +https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/installation/install_ncs.html -## Setting up nRF Connect SDK +To initialize nrf belov command instead the one mentioned in instruction: -Install NCS +`west init -m https://github.com/nrfconnect/sdk-nrf --mr collab-serial-ble-ot` ## Building application - ## Flashing and connecting ## Testing +### Testing BLE + +In order to test BLE You will need to install `nRF Connect for Mobile` + + - IOS: https://apps.apple.com/pl/app/nrf-connect-for-mobile/id1054362403 + + - Android: https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&pcampaignid=web_share + +On client site please invoke in zephyr shell: +```console + > bt init + > bt advertise on +``` + +On mobile Phone open `nRF Connect` app and scan for: `Nordic_UART_Service` as in image below. + +image + +Tap connect. + +This will connect to nRF52 and You should be able to see in zephyr Shell similar message: + +``` +LE conn param updated: int 0x0027 lat 0 to 42 +``` + +To Send Data from your phone tap arrow next to Rx characteristic. + +image -### +On `nRF52` you should see: -Testing BLE +``` +bt_nus: on_receive: Received data, handle 0, conn 0x200023c4 +``` -### -Testing OpenThread +### Testing OpenThread