forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple dect sample. Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
- Loading branch information
1 parent
3190fa5
commit e74e569
Showing
8 changed files
with
585 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(hello_dect) | ||
|
||
# NORDIC SDK APP START | ||
target_sources(app PRIVATE src/main.c) | ||
# NORDIC SDK APP END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
config CARRIER | ||
int "Carrier to use" | ||
default 1677 #during development, remove default from sample so cutomer must address it?- | ||
help | ||
The availability of the channels and the exact regulation to use them varies in different countries. | ||
See ETSI TS 103 636-2 5.4.2 for the calculation. | ||
|
||
config NETWORK_ID | ||
int "Network ID" | ||
range 1 4294967295 | ||
default 91 | ||
|
||
config MCS | ||
int "MCS" | ||
default 1 | ||
help | ||
The MCS impacts how much data can be fit into subslots/slots. | ||
|
||
config TX_POWER | ||
int "Transmission power" | ||
range 0 11 | ||
default 11 | ||
help | ||
TX power, 11 == 19 dBm, maximum of the HW(!) | ||
|
||
config TX_TRANSMISSIONS | ||
int "TX transmissions" | ||
range 0 4294967295 | ||
default 30 | ||
help | ||
Transmissions before sample exits, use 0 to transmit forever. | ||
|
||
config RX_PERIOD_S | ||
int "RX period" | ||
default 5 | ||
help | ||
Receive window period. | ||
Time is given in seconds. | ||
|
||
module = DECT_PHY_HELLO_TX | ||
module-str = DECT NR+ PHY hello DECT | ||
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" | ||
|
||
menu "Zephyr Kernel" | ||
source "Kconfig.zephyr" | ||
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
.. _nrf_modem_dect_phy_hello: | ||
|
||
nRF91x1: DECT NR+ PHY hello sample | ||
################################## | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 2 | ||
|
||
This sample demonstrates how to set up a simple DECT NR+ application with the DECT PHY modem firmware. | ||
|
||
.. important:: | ||
|
||
DECT NR+ operates on free but regulated radio channels. The regulation and availability of the channels varies in different countries. | ||
It is the responsibility of the developer to operate the devices according to the local regulation, both at the development site and the device operation regions. | ||
|
||
Requirements | ||
************ | ||
|
||
The sample needs at least two nRF91x1 Development Kits. | ||
|
||
See :ref:`nrf91x1_ug_intro` for more details. | ||
|
||
.. note:: | ||
|
||
The :ref:`nrf_modem_dect_phy_simple` require a special modem firmware to run on the nRF91x1 modem core. Please contact our sales department to know more. | ||
|
||
|
||
.. include:: /includes/tfm.txt | ||
|
||
Overview | ||
******** | ||
|
||
The sample shows a simple broadcast and reception of DECT NR+ messages between devices on a hard-coded channel. | ||
|
||
After initialization the devices will run a loop, transmitting a counter value before listening for incomming receptions for :kconfig:option:`CONFIG_RX_PERIOD_S`. | ||
The loop is exited after a number of transmissions given by the :kconfig:option:`CONFIG_TX_TRANSMISSIONS` Kconfig option, or continue forever if the :kconfig:option:`CONFIG_TX_TRANSMISSIONS` Kconfig option is ``0``. | ||
|
||
Each device can be reset to run the sample again. | ||
|
||
Building and running | ||
******************** | ||
|
||
.. |sample path| replace:: :file:`samples/modem_trace_flash` | ||
|
||
.. include:: /includes/build_and_run_ns.txt | ||
|
||
Testing | ||
======= | ||
|
||
|test_sample| | ||
|
||
After programming the sample to your development kits, test it by performing the following steps: | ||
|
||
#. |connect_kit| | ||
#. |connect_terminal| | ||
#. Observe that the devices will transmit a counter value that is received by the other devices. | ||
#. After a given number of transmissions, observe that the devices shut down and exit the sample. | ||
|
||
Sample output | ||
============= | ||
|
||
The sample shows an output similar to the following: | ||
|
||
Device 1: | ||
|
||
.. code-block:: console | ||
*** Booting nRF Connect SDK v3.5.99-ncs1 *** | ||
[00:00:00.378,784] <inf> app: Dect NR+ PHY sample started | ||
[00:00:00.691,375] <inf> app: Dect NR+ PHY initialized, device ID: 12345 | ||
[00:00:00.691,406] <inf> app: Transmitting 0 | ||
[00:00:05.697,784] <inf> app: Transmitting 1 | ||
[00:00:10.704,193] <inf> app: Transmitting 2 | ||
[00:00:14.186,553] <inf> app: Received header from device ID 67890 | ||
[00:00:14.186,889] <inf> app: Received data (RSSI: -54.5): Hello DECT! 0 | ||
[00:00:15.710,571] <inf> app: Transmitting 3 | ||
[00:00:19.192,932] <inf> app: Received header from device ID 67890 | ||
[00:00:19.193,267] <inf> app: Received data (RSSI: -54.5): Hello DECT! 1 | ||
[00:00:20.716,949] <inf> app: Transmitting 4 | ||
... | ||
[00:02:24.352,661] <inf> app: Received header from device ID 67890 | ||
[00:02:24.352,996] <inf> app: Received data (RSSI: -54.5): Hello DECT! 26 | ||
[00:02:25.876,739] <inf> app: Transmitting 29 | ||
[00:02:25.876,831] <inf> app: Reached maximum number of transmissions (30) | ||
[00:02:25.876,831] <inf> app: Shutting down | ||
[00:02:25.893,554] <inf> app: Bye! | ||
Device 2: | ||
|
||
.. code-block:: console | ||
*** Booting nRF Connect SDK v3.5.99-ncs1 *** | ||
[00:00:00.407,287] <inf> app: Dect NR+ PHY sample started | ||
[00:00:00.719,238] <inf> app: Dect NR+ PHY initialized, device ID: 67890 | ||
[00:00:00.719,268] <inf> app: Transmitting 0 | ||
[00:00:02.254,211] <inf> app: Received header from device ID 12345 | ||
[00:00:02.254,547] <inf> app: Received data (RSSI: -54.5): Hello DECT! 3 | ||
[00:00:05.725,646] <inf> app: Transmitting 1 | ||
[00:00:07.260,620] <inf> app: Received header from device ID 12345 | ||
[00:00:07.260,955] <inf> app: Received data (RSSI: -54.5): Hello DECT! 4 | ||
... | ||
[00:02:10.885,284] <inf> app: Transmitting 26 | ||
[00:02:12.420,318] <inf> app: Received header from device ID 12345 | ||
[00:02:12.420,654] <inf> app: Received data (RSSI: -54.5): Hello DECT! 29 | ||
[00:02:15.891,693] <inf> app: Transmitting 27 | ||
[00:02:20.898,071] <inf> app: Transmitting 28 | ||
[00:02:25.904,449] <inf> app: Transmitting 29 | ||
[00:02:25.904,541] <inf> app: Reached maximum number of transmissions (30) | ||
[00:02:25.904,571] <inf> app: Shutting down | ||
[00:02:25.921,325] <inf> app: Bye! | ||
Dependencies | ||
************ | ||
|
||
It uses the following `sdk-nrfxlib`_ libraries: | ||
|
||
* :ref:`nrfxlib:nrf_modem` | ||
|
||
It uses the following Zephyr libraries: | ||
|
||
* :ref:`zephyr:uart_api` | ||
|
||
|
||
In addition, it uses the following secure firmware components: | ||
|
||
* :ref:`Trusted Firmware-M <ug_tfm>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CONFIG_DK_LIBRARY=y | ||
CONFIG_LOG=y | ||
|
||
CONFIG_MODEM_ANTENNA_AT_MAGPIO="" | ||
CONFIG_MODEM_ANTENNA_AT_COEX0="" | ||
|
||
CONFIG_NRF_MODEM_LIB=y | ||
|
||
CONFIG_NRF_MODEM_LINK_BINARY_DECT_PHY=y | ||
CONFIG_HWINFO=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
sample: | ||
name: Modem trace flash | ||
tests: | ||
sample.nrf9160.modem_trace_flash: | ||
build_only: true | ||
integration_platforms: | ||
- nrf9160dk_nrf9160_ns | ||
platform_allow: nrf9160dk_nrf9160_ns | ||
tags: ci_build |
Oops, something went wrong.