Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing building of openthread and BLE together. #7

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion applications/protocols_serialization/client/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int main(void)
}
#endif

printk("Welcome to RPC host\r\n");
printk("Welcome to RPC client\r\n");

return 0;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion applications/protocols_serialization/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_SHELL=y
CONFIG_OPENTHREAD_SHELL=y

CONFIG_SHELL_ARGC_MAX=26
Expand All @@ -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
2 changes: 1 addition & 1 deletion applications/protocols_serialization/server/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
56 changes: 49 additions & 7 deletions applications/protocols_serialization/user_guide.md
Original file line number Diff line number Diff line change
@@ -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.

<img src="resources/nrf_scan.jpg" alt="image" width="300" height="auto">

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.

<img src="resources/nrf_send.jpg" alt="image" width="300" height="auto">

###
On `nRF52` you should see:

Testing BLE
```
bt_nus: on_receive: Received data, handle 0, conn 0x200023c4
```

###

Testing OpenThread
### Testing OpenThread
Loading