Skip to content

Commit 436fd2f

Browse files
NordicBuilderrlubos
authored andcommitted
manifest: Update sdk-nrfxlib revision (auto-manifest PR)
Automatically created by Github Action samples: dect_phy: dect_shell: modem 1.1 support * Major modem/libmodem api update. Also did related changes: - new commands: activate/deactivate, radio_mode - new setting: startup radio mode for activation - pcc/pdc rx includes handle but not carrier/channel, thus keeping up to date information for that. - ping/perf/rf_tool: still own callbacks but no reinit of phy api, doing cancel(all) instead. - rf_tool: decreased --frame_repeat_count default to 15. - rf_tool: "rf_tool command done" print at the end. - radio mode query is used. - latency info usage is added. Jira: MOSH-621 samples: dect_phy: hello_dect: modem 1.1 support * Updates for libmodem 3.0.0 API changes. Adds support for configuring the band group index for using band 4 with the sample. Signed-off-by: Nordic Builder <[email protected]> Signed-off-by: Jani Hirsimäki <[email protected]> Signed-off-by: Eivind Jølsgard <[email protected]>
1 parent ab1330a commit 436fd2f

31 files changed

+1794
-1097
lines changed

samples/dect/dect_phy/dect_shell/README.rst

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ Main command structure:
3838
.. code-block:: console
3939
4040
dect
41+
activate
42+
deactivate
4143
sett
44+
radio_mode
4245
rssi_scan
4346
ping
4447
perf
@@ -286,15 +289,6 @@ Example 2: HARQ
286289
287290
dect perf -c --c_gap_subslots 4 --c_tx_mcs 4 --c_slots 4 --s_tx_id 39 -t 12 --c_harq_feedback_rx_delay_subslots 2 --c_harq_feedback_rx_subslots 3 --c_harq_process_nbr_max 7 -a --channel 1671
288291
289-
* Client side: Decrease default scheduler delay and rerun the previous step:
290-
291-
.. code-block:: console
292-
293-
dect sett -d 5000
294-
295-
.. note::
296-
Set the delay back to default to avoid scheduler problems on other use cases.
297-
298292
RX/TX testing with RF tool
299293
==========================
300294

@@ -329,13 +323,13 @@ Example 1: bi-directional testing
329323
.. code-block:: console
330324
331325
dect sett -t 39
332-
dect rf_tool -m rx_tx --rx_find_sync --frame_repeat_count 50 --frame_repeat_count_intervals 10 -c 1677
326+
dect rf_tool -m rx_tx --rx_find_sync --frame_repeat_count 15 --frame_repeat_count_intervals 10 -c 1677
333327
334328
* Client side: Trigger to start operation:
335329

336330
.. code-block:: console
337331
338-
dect rf_tool -m rx_tx --frame_repeat_count 50 --frame_repeat_count_intervals 10 -t 39 -c 1677
332+
dect rf_tool -m rx_tx --frame_repeat_count 15 --frame_repeat_count_intervals 10 -t 39 -c 1677
339333
340334
Example 2: unidirectional testing
341335
---------------------------------
@@ -346,7 +340,7 @@ Example 2: unidirectional testing
346340
.. code-block:: console
347341
348342
dect sett -t 39
349-
dect rf_tool -m rx --rx_find_sync --frame_repeat_count 50 -c 1677
343+
dect rf_tool -m rx --rx_find_sync --frame_repeat_count 15 -c 1677
350344
351345
* RX device option 2: RX device on ``rx_cont`` mode:
352346

@@ -360,13 +354,13 @@ Example 2: unidirectional testing
360354
.. code-block:: console
361355
362356
dect sett -t 39
363-
dect rf_tool -m rx_cont --rf_mode_peer tx --frame_repeat_count 50 --rx_find_sync -c 1677
357+
dect rf_tool -m rx_cont --rf_mode_peer tx --frame_repeat_count 15 --rx_find_sync -c 1677
364358
365359
* TX device: Trigger to start operation:
366360

367361
.. code-block:: console
368362
369-
dect rf_tool -m tx --frame_repeat_count 50 -c 1677 -t 39
363+
dect rf_tool -m tx --frame_repeat_count 15 -c 1677 -t 39
370364
371365
* RX device with option 2: Stop continuous RX to give a report:
372366

@@ -388,20 +382,20 @@ Example 3: duty cycle (RX+TX) testing
388382
.. code-block:: console
389383
390384
server:
391-
dect rf_tool -m rx_tx --rx_find_sync --rx_subslot_count 9 --rx_idle_subslot_count 3 --tx_subslot_count 8 --tx_idle_subslot_count 3 --frame_repeat_count 50 -c 1677
385+
dect rf_tool -m rx_tx --rx_find_sync --rx_subslot_count 9 --rx_idle_subslot_count 3 --tx_subslot_count 8 --tx_idle_subslot_count 3 --frame_repeat_count 15 -c 1677
392386
393387
client:
394-
dect rf_tool -m rx_tx --rx_subslot_count 9 --rx_idle_subslot_count 3 --tx_subslot_count 8 --tx_idle_subslot_count 3 --frame_repeat_count 50 -c 1677 -t 39
388+
dect rf_tool -m rx_tx --rx_subslot_count 9 --rx_idle_subslot_count 3 --tx_subslot_count 8 --tx_idle_subslot_count 3 --frame_repeat_count 15 -c 1677 -t 39
395389
396390
RX/TX duty cycle percentage 82.50%:
397391

398392
.. code-block:: console
399393
400394
server:
401-
dect rf_tool -m rx_tx --rx_find_sync --rx_subslot_count 17 --rx_idle_subslot_count 3 --tx_subslot_count 16 --tx_idle_subslot_count 4 --frame_repeat_count 50 -c 1677
395+
dect rf_tool -m rx_tx --rx_find_sync --rx_subslot_count 17 --rx_idle_subslot_count 3 --tx_subslot_count 16 --tx_idle_subslot_count 4 --frame_repeat_count 15 -c 1677
402396
403397
client:
404-
dect rf_tool -m rx_tx --rx_subslot_count 17 --rx_idle_subslot_count 3 --tx_subslot_count 16 --tx_idle_subslot_count 4 --frame_repeat_count 50 -c 1677 -t 39
398+
dect rf_tool -m rx_tx --rx_subslot_count 17 --rx_idle_subslot_count 3 --tx_subslot_count 16 --tx_idle_subslot_count 4 --frame_repeat_count 15 -c 1677 -t 39
405399
406400
* TX/RX testing on separate devices:
407401

@@ -433,10 +427,10 @@ Example 4: Bi-directional testing with more data
433427
.. code-block:: console
434428
435429
server:
436-
dect rf_tool -m rx_tx --rx_find_sync --rx_subslot_count 9 --rx_idle_subslot_count 4 --tx_subslot_count 8 --tx_idle_subslot_count 4 --tx_mcs 4 --frame_repeat_count 50 -c 1677
430+
dect rf_tool -m rx_tx --rx_find_sync --rx_subslot_count 9 --rx_idle_subslot_count 4 --tx_subslot_count 8 --tx_idle_subslot_count 4 --tx_mcs 4 --frame_repeat_count 15 -c 1677
437431
438432
client:
439-
dect rf_tool -m rx_tx --rx_subslot_count 9 --rx_idle_subslot_count 4 --tx_subslot_count 8 --tx_idle_subslot_count 4 --tx_mcs 4 --frame_repeat_count 50 -c 1677 --tx_pwr 15 -t 39
433+
dect rf_tool -m rx_tx --rx_subslot_count 9 --rx_idle_subslot_count 4 --tx_subslot_count 8 --tx_idle_subslot_count 4 --tx_mcs 4 --frame_repeat_count 15 -c 1677 --tx_pwr 15 -t 39
440434
441435
Dect NR+ PHY MAC
442436
================

samples/dect/dect_phy/dect_shell/src/dect/common/dect_common.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,15 @@ typedef struct {
213213
#define DECT_PHY_SUPPORTED_CHANNEL_BAND22_MIN 1691
214214
#define DECT_PHY_SUPPORTED_CHANNEL_BAND22_MAX 1711
215215

216+
#define DESH_DECT_PHY_SUPPORTED_BAND_COUNT 5
217+
218+
/************************************************************************************************/
219+
220+
#define DECT_PHY_CLASS_1_MAX_TX_POWER_DBM 23
221+
#define DECT_PHY_CLASS_2_MAX_TX_POWER_DBM 21
222+
#define DECT_PHY_CLASS_3_MAX_TX_POWER_DBM 19
223+
#define DECT_PHY_CLASS_4_MAX_TX_POWER_DBM 10
224+
216225
/************************************************************************************************/
217226

218227
#define US_TO_MODEM_TICKS(x) ((uint64_t)(((x) * NRF_MODEM_DECT_MODEM_TIME_TICK_RATE_KHZ) / 1000))

samples/dect/dect_phy/dect_shell/src/dect/common/dect_common_settings.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ static const struct dect_phy_settings_common phy_common_settings_data = {
5353
.network_id = DECT_PHY_DEFAULT_NETWORK_ID,
5454
.transmitter_id = DECT_PHY_DEFAULT_TRANSMITTER_LONG_RD_ID,
5555
.band_nbr = 1,
56+
.activate_at_startup = true,
57+
.startup_radio_mode = NRF_MODEM_DECT_PHY_RADIO_MODE_LOW_LATENCY,
5658
};
5759

5860
static const struct dect_phy_settings phy_settings_data_defaults = {

samples/dect/dect_phy/dect_shell/src/dect/common/dect_common_settings.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#define DECT_PHY_DEFAULT_NETWORK_ID 0x12345678
1818
#define DECT_PHY_DEFAULT_TRANSMITTER_LONG_RD_ID 38
19-
#define DECT_PHY_API_SCHEDULER_OFFSET_US (10000)
19+
#define DECT_PHY_API_SCHEDULER_OFFSET_US (5000)
2020

2121
#define DECT_PHY_SETT_DEFAULT_BEACON_TX_INTERVAL_SECS 2
2222

@@ -109,6 +109,8 @@ struct dect_phy_settings_common {
109109
uint32_t network_id;
110110
uint32_t transmitter_id;
111111
uint16_t band_nbr;
112+
bool activate_at_startup;
113+
enum nrf_modem_dect_phy_radio_mode startup_radio_mode;
112114
uint16_t short_rd_id; /* Generated random value, cannot be set */
113115
};
114116

samples/dect/dect_phy/dect_shell/src/dect/common/dect_common_utils.c

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ const char *dect_common_utils_modem_phy_err_to_string(enum nrf_modem_dect_phy_er
229229
{NRF_MODEM_DECT_PHY_SUCCESS, "NRF_MODEM_DECT_PHY_SUCCESS"},
230230
{NRF_MODEM_DECT_PHY_ERR_LBT_CHANNEL_BUSY, "ERR_LBT_CHANNEL_BUSY"},
231231
{NRF_MODEM_DECT_PHY_ERR_UNSUPPORTED_OP, "ERR_UNSUPPORTED_OP"},
232-
{NRF_MODEM_DECT_PHY_ERR_NO_ONGOING_OP, "ERR_NO_ONGOING_OP"},
232+
{NRF_MODEM_DECT_PHY_ERR_NOT_FOUND, "ERR_NOT_FOUND"},
233233
{NRF_MODEM_DECT_PHY_ERR_NO_MEMORY, "ERR_NO_MEMORY"},
234234
{NRF_MODEM_DECT_PHY_ERR_NOT_ALLOWED, "ERR_NOT_ALLOWED"},
235235
{NRF_MODEM_DECT_PHY_OK_WITH_HARQ_RESET, "PHY_OK_WITH_HARQ_RESET"},
@@ -244,15 +244,18 @@ const char *dect_common_utils_modem_phy_err_to_string(enum nrf_modem_dect_phy_er
244244
{NRF_MODEM_DECT_PHY_ERR_PAYLOAD_UNAVAILABLE, "ERR_PAYLOAD_UNAVAILABLE"},
245245
{NRF_MODEM_DECT_PHY_ERR_OP_CANCELED, "PHY_ERR_OP_CANCELED"},
246246
{NRF_MODEM_DECT_PHY_ERR_COMBINED_OP_FAILED, "ERR_COMBINED_OP_FAILED"},
247+
{NRF_MODEM_DECT_PHY_ERR_RADIO_MODE_CONFLICT, "ERR_RADIO_MODE_CONFLICT"},
247248
{NRF_MODEM_DECT_PHY_ERR_UNSUPPORTED_CARRIER, "ERR_UNSUPPORTED_CARRIER"},
248249
{NRF_MODEM_DECT_PHY_ERR_UNSUPPORTED_DATA_SIZE, "ERR_UNSUPPORTED_DATA_SIZE"},
249250
{NRF_MODEM_DECT_PHY_ERR_INVALID_NETWORK_ID, "ERR_INVALID_NETWORK_ID"},
250251
{NRF_MODEM_DECT_PHY_ERR_INVALID_PHY_HEADER, "ERR_INVALID_PHY_HEADER"},
251252
{NRF_MODEM_DECT_PHY_ERR_INVALID_DURATION, "ERR_INVALID_DURATION"},
252253
{NRF_MODEM_DECT_PHY_ERR_INVALID_PARAMETER, "ERR_INVALID_PARAMETER"},
254+
{NRF_MODEM_DECT_PHY_ERR_TX_POWER_OVER_MAX_LIMIT, "ERR_TX_POWER_OVER_MAX_LIMIT"},
253255
{NRF_MODEM_DECT_PHY_ERR_MODEM_ERROR, "ERR_MODEM_ERROR"},
254256
{NRF_MODEM_DECT_PHY_ERR_MODEM_ERROR_RF_STATE, "ERR_MODEM_ERROR_RF_STATE"},
255257
{NRF_MODEM_DECT_PHY_ERR_TEMP_HIGH, "ERR_TEMP_HIGH"},
258+
{NRF_MODEM_DECT_PHY_ERR_PROD_LOCK, "ERR_PROD_LOCK"},
256259
/* Specific internal errors: */
257260
{DECT_SCHEDULER_DELAYED_ERROR, "DECT_SCHEDULER_DELAYED_ERROR"},
258261
{DECT_SCHEDULER_SCHEDULER_FATAL_MEM_ALLOC_ERROR,
@@ -489,3 +492,33 @@ bool dect_common_utils_mdm_ticks_is_in_range(uint64_t time, uint64_t start, uint
489492
{
490493
return (time >= start && time <= end);
491494
}
495+
496+
/**************************************************************************************************/
497+
498+
const char *dect_common_utils_radio_mode_to_string(int mode, char *out_str_buff)
499+
{
500+
struct mapping_tbl_item const mapping_table[] = {
501+
{NRF_MODEM_DECT_PHY_RADIO_MODE_LOW_LATENCY, "Low latency"},
502+
{NRF_MODEM_DECT_PHY_RADIO_MODE_LOW_LATENCY_WITH_STANDBY,
503+
"Low latency with standby"},
504+
{NRF_MODEM_DECT_PHY_RADIO_MODE_NON_LBT_WITH_STANDBY, "LBT disabled, with standby"},
505+
{-1, NULL}};
506+
507+
return dect_common_utils_map_to_string(mapping_table, mode, out_str_buff);
508+
}
509+
510+
/**************************************************************************************************/
511+
512+
int8_t dect_common_utils_max_tx_pwr_dbm_by_pwr_class(uint8_t power_class)
513+
{
514+
switch (power_class) {
515+
case 1:
516+
return DECT_PHY_CLASS_1_MAX_TX_POWER_DBM;
517+
case 2:
518+
return DECT_PHY_CLASS_2_MAX_TX_POWER_DBM;
519+
case 3:
520+
return DECT_PHY_CLASS_3_MAX_TX_POWER_DBM;
521+
default:
522+
return DECT_PHY_CLASS_4_MAX_TX_POWER_DBM;
523+
}
524+
}

samples/dect/dect_phy/dect_shell/src/dect/common/dect_common_utils.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,12 @@ bool dect_common_utils_32bit_network_id_validate(uint32_t network_id);
9494

9595
bool dect_common_utils_mdm_ticks_is_in_range(uint64_t time, uint64_t start, uint64_t end);
9696

97+
/******************************************************************************/
98+
99+
const char *dect_common_utils_radio_mode_to_string(int mode, char *out_str_buff);
100+
101+
/******************************************************************************/
102+
103+
int8_t dect_common_utils_max_tx_pwr_dbm_by_pwr_class(uint8_t power_class);
104+
97105
#endif /* DECT_COMMON_UTILS_H */

samples/dect/dect_phy/dect_shell/src/dect/common/dect_phy_api_scheduler.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include "dect_common_settings.h"
1515
#include "dect_phy_common_rx.h"
1616

17+
#include "dect_phy_ctrl.h"
18+
1719
#include "dect_phy_api_scheduler_integration.h"
1820
#include "dect_phy_api_scheduler.h"
1921

@@ -64,7 +66,6 @@ static void dect_phy_api_scheduler_led_off_timer_handler(struct k_timer *timer_i
6466

6567
static bool dect_phy_api_scheduler_list_remove_from_tail(void);
6668
static void dect_phy_api_scheduler_list_purge(void);
67-
static bool dect_phy_api_scheduler_list_is_empty(void);
6869

6970
static struct dect_phy_api_scheduler_list_item *
7071
dect_phy_api_scheduler_done_list_item_add(struct dect_phy_api_scheduler_list_item *new_list_item);
@@ -212,7 +213,7 @@ static bool dect_phy_api_scheduler_list_remove_from_tail(void)
212213
return return_value;
213214
}
214215

215-
static bool dect_phy_api_scheduler_list_is_empty(void)
216+
bool dect_phy_api_scheduler_list_is_empty(void)
216217
{
217218
return sys_dlist_is_empty(&to_be_sheduled_list);
218219
}
@@ -476,7 +477,7 @@ struct dect_phy_api_scheduler_list_item *
476477
dect_phy_api_scheduler_list_item_add(struct dect_phy_api_scheduler_list_item *new_list_item)
477478
{
478479
struct dect_phy_api_scheduler_list_item *iterator = NULL;
479-
const uint32_t scheduler_offset = DECT_PHY_TX_RX_SCHEDULING_OFFSET_MDM_TICKS;
480+
uint32_t scheduler_offset = dect_phy_ctrl_modem_latency_min_margin_between_ops_get();
480481

481482
if (new_list_item == NULL) {
482483
return NULL;
@@ -888,18 +889,6 @@ dect_phy_api_scheduler_done_list_item_find_by_phy_handle(uint32_t handle)
888889
return iterator;
889890
}
890891

891-
static void dect_phy_api_scheduler_done_list_items_stop_in_modem(void)
892-
{
893-
struct dect_phy_api_scheduler_list_item *iterator = NULL;
894-
895-
SYS_DLIST_FOR_EACH_CONTAINER(&done_sheduled_list, iterator, dnode) {
896-
if (!iterator->stop_requested) {
897-
(void)nrf_modem_dect_phy_rx_stop(iterator->phy_op_handle);
898-
iterator->stop_requested = true;
899-
}
900-
}
901-
}
902-
903892
static void dect_phy_api_scheduler_done_list_mdm_op_complete(
904893
struct dect_phy_common_op_completed_params *params,
905894
struct dect_phy_api_scheduler_list_item *list_item)
@@ -1499,7 +1488,6 @@ static void dect_phy_api_scheduler_th_handler(void)
14991488
}
15001489
case DECT_PHY_API_EVENT_SCHEDULER_OP_SUSPEND: {
15011490
scheduler_data.state = SCHEDULER_STATE_SUSPENDED;
1502-
dect_phy_api_scheduler_done_list_items_stop_in_modem();
15031491
dect_phy_api_scheduler_suspended_evt_send();
15041492
break;
15051493
}

samples/dect/dect_phy/dect_shell/src/dect/common/dect_phy_api_scheduler.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
/* Following defines the time how much in advance is scheduled to modem */
1515
#define DECT_PHY_API_SCHEDULER_OP_TIME_WINDOW_MS 500
16-
#define DECT_PHY_API_SCHEDULER_OP_MAX_COUNT 20
16+
#define DECT_PHY_API_SCHEDULER_OP_MAX_COUNT 30
1717

1818
#define DECT_SCHEDULER_DELAYED_ERROR 6666
1919
#define DECT_SCHEDULER_SCHEDULER_FATAL_MEM_ALLOC_ERROR 6667
@@ -217,6 +217,8 @@ void dect_phy_api_scheduler_list_delete_all_items(void); /* purge */
217217

218218
uint64_t dect_phy_api_scheduler_list_item_last_scheduled_modem_frame_time_get(void);
219219

220+
bool dect_phy_api_scheduler_list_is_empty(void);
221+
220222
/**************************************************************************************************/
221223

222224
/* Scheduler done list API */

samples/dect/dect_phy/dect_shell/src/dect/common/dect_phy_common.h

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
/******************************************************************************/
1717

18-
#define DECT_PHY_MAX_TX_PWR_DBM 23
19-
2018
#define DECT_PHY_LBT_PERIOD_MAX_SYM (NRF_MODEM_DECT_LBT_PERIOD_MAX / NRF_MODEM_DECT_SYMBOL_DURATION)
2119
#define DECT_PHY_LBT_PERIOD_MIN_SYM (NRF_MODEM_DECT_LBT_PERIOD_MIN / NRF_MODEM_DECT_SYMBOL_DURATION)
2220

@@ -35,17 +33,10 @@ struct dect_phy_common_harq_feedback_data {
3533
uint8_t encoded_data_to_send[DECT_DATA_MAX_LEN]; /* DECT_MAC_MESSAGE_TYPE_HARQ_FEEDBACK */
3634
};
3735

38-
struct dect_phy_common_op_initialized_params {
39-
uint64_t time;
40-
int16_t temperature;
41-
struct nrf_modem_dect_phy_modem_cfg modem_configuration;
42-
enum nrf_modem_dect_phy_err status;
43-
};
44-
4536
struct dect_phy_common_op_pcc_rcv_params {
4637
uint64_t time;
4738
uint64_t stf_start_time;
48-
struct nrf_modem_dect_phy_rx_pcc_status pcc_status;
39+
struct nrf_modem_dect_phy_pcc_event pcc_status;
4940

5041
uint8_t phy_len;
5142
enum dect_phy_packet_length_type phy_len_type;
@@ -60,17 +51,17 @@ struct dect_phy_common_op_pcc_rcv_params {
6051

6152
struct dect_phy_common_op_pcc_crc_fail_params {
6253
uint64_t time;
63-
struct nrf_modem_dect_phy_rx_pcc_crc_failure crc_failure;
54+
struct nrf_modem_dect_phy_pcc_crc_failure_event crc_failure;
6455
};
6556
struct dect_phy_common_op_pdc_crc_fail_params {
6657
uint64_t time;
67-
struct nrf_modem_dect_phy_rx_pdc_crc_failure crc_failure;
58+
struct nrf_modem_dect_phy_pdc_crc_failure_event crc_failure;
6859
};
6960

7061
struct dect_phy_commmon_op_pdc_rcv_params {
71-
struct nrf_modem_dect_phy_rx_pdc_status rx_status;
62+
struct nrf_modem_dect_phy_pdc_event rx_status;
7263

73-
uint16_t last_rx_op_channel;
64+
uint16_t rx_channel;
7465

7566
uint8_t last_received_pcc_short_nw_id;
7667
uint16_t last_received_pcc_transmitter_short_rd_id;

0 commit comments

Comments
 (0)