Migration guide for nRF Connect SDK v2.8.0 (Working draft)
This document describes the changes required or recommended when migrating your application from nRF Connect SDK v2.7.0 to nRF Connect SDK v2.8.0.
Required changes
The following changes are mandatory to make your application work in the same way as in previous releases.
Samples and applications
This section describes the changes related to samples and applications.
Serial LTE Modem (SLM)
The handling of Release Assistance Indication (RAI) socket options has been updated in the
#XSOCKETOPT
command. The individual RAI-related socket options have been consolidated into a singleSO_RAI
option. You must modify your application to use the newSO_RAI
option with the corresponding value to specify the RAI behavior. The changes are as follows:The
SO_RAI_NO_DATA
,SO_RAI_LAST
,SO_RAI_ONE_RESP
,SO_RAI_ONGOING
, andSO_RAI_WAIT_MORE
options have been replaced by theSO_RAI
option with values from1
to5
.Replace the following commands in your application code if they were used previously:
AT#XSOCKETOPT=1,50,
withAT#XSOCKETOPT=1,61,1
to indicateRAI_NO_DATA
.AT#XSOCKETOPT=1,51,
withAT#XSOCKETOPT=1,61,2
to indicateRAI_LAST
.AT#XSOCKETOPT=1,52,
withAT#XSOCKETOPT=1,61,3
to indicateRAI_ONE_RESP
.AT#XSOCKETOPT=1,53,
withAT#XSOCKETOPT=1,61,4
to indicateRAI_ONGOING
.AT#XSOCKETOPT=1,54,
withAT#XSOCKETOPT=1,61,5
to indicateRAI_WAIT_MORE
.
SUIT DFU for nRF54H20
The manifest sequence number is no longer configured through a sysbuild Kconfig option. The values are now read from the
VERSION
file, used for Application version management in Zephyr and the nRF Connect SDK. This change to the sysbuild Kconfig option requires the following updates in the SUIT templates for your project:Remove from all templates:
suit-manifest-sequence-number: {{ sysbuild['config']['SB_CONFIG_SUIT_ENVELOPE_SEQUENCE_NUM'] }}
Add the line that corresponds to the manifest name, that is
APP_ROOT_SEQ_NUM
for the application root manifest:suit-manifest-sequence-number: {{ APP_ROOT_SEQ_NUM }}
If the value of the sequence number was changed in your application, append the following line to the
VERSION
file:APP_ROOT_SEQ_NUM = <N>
For the list of all variables, set through the
VERSION
, refer to the How to customize the SUIT DFU process.
Nordic Secure Immutable Bootloader (NSIB, B0, or B0n)
Custom printing has been dropped in favor of using the logging subsystem, with output printed out to the default logging device.
The CONFIG_SECURE_BOOT_DEBUG
Kconfig option has been removed.
To disable logging in B0 or B0n, set the CONFIG_LOG
option to n
.
To send logs over RTT instead of UART, apply the following settings:
Enable the
CONFIG_USE_SEGGER_RTT
andCONFIG_RTT_CONSOLE
Kconfig options.Disable the
CONFIG_UART_CONSOLE
andCONFIG_SERIAL
Kconfig options.
Libraries
This section describes the changes related to libraries.
LTE link control library
For applications using LTE link control:
Remove all instances of the
lte_lc_init()
function.Replace the use of the
lte_lc_deinit()
function with thelte_lc_power_off()
function.Replace the use of the
lte_lc_init_and_connect()
function with thelte_lc_connect()
function.Replace the use of the
lte_lc_init_and_connect_async()
function with thelte_lc_connect_async()
function.Remove the use of the
CONFIG_LTE_NETWORK_USE_FALLBACK
Kconfig option. Use theCONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT
orCONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT_GPS
Kconfig option instead. In addition, you can control the priority between LTE-M and NB-IoT using theCONFIG_LTE_MODE_PREFERENCE
Kconfig option.
AT command parser
The
at_parser_cmd_type_get()
has been renamed toat_parser_at_cmd_type_get()
.
Recommended changes
The following changes are recommended for your application to work optimally after the migration.
Samples and applications
This section describes the changes related to samples and applications.
Serial LTE Modem (SLM)
The overlay-native_tls.conf
overlay file is no longer supported with the thingy91/nrf9160/ns
board target due to flash memory constraints.
If you need to use native TLS with Thingy:91, you must disable features from the prj.conf
and overlay-native_tls.conf
configuration files to free up flash memory.
Libraries
This section describes the changes related to libraries.
AT command parser
The AT command parser library has been deprecated in favor of the AT parser library and will be removed in a future version.
You can follow this guide to migrate your application to use the AT parser library. This will reduce the footprint of the application and will decrease memory requirements on the heap.
To replace AT command parser with the AT parser, complete the following steps:
Replace the
CONFIG_AT_CMD_PARSER
Kconfig option with theCONFIG_AT_PARSER
Kconfig option.Replace header files:
Remove:
#include <modem/at_cmd_parser.h> #include <modem/at_params.h>
Add:
#include <modem/at_parser.h>
Replace AT parameter list:
Remove:
struct at_param_list param_list;
Add:
struct at_parser parser;
Replace AT parameter list initialization:
Remove:
/* `param_list` is a pointer to the AT parameter list. * `AT_PARAMS_COUNT` is the maximum number of parameters of the list. */ at_params_list_init(¶m_list, AT_PARAMS_COUNT); /* Other code. */ /* `at_string` is the AT command string to be parsed. * `&remainder` is a pointer to the returned remainder after parsing. * `¶m_list` is a pointer to the AT parameter list. */ at_parser_params_from_str(at_string, &remainder, ¶m_list);
Add:
/* `&at_parser` is a pointer to the AT parser. * `at_string` is the AT command string to be parsed. */ at_parser_init(&at_parser, at_string);
Replace integer parameter retrieval:
Remove:
int value; /* `¶m_list` is a pointer to the AT parameter list. * `index` is the index of the parameter to retrieve. * `&value` is a pointer to the output integer variable. */ at_params_int_get(¶m_list, index, &value); uint16_t value; at_params_unsigned_short_get(¶m_list, index, &value); /* Other variants: */ at_params_short_get(¶m_list, index, &value); at_params_unsigned_int_get(¶m_list, index, &value); at_params_int64_get(¶m_list, index, &value);
Add:
int value; /* `&at_parser` is a pointer to the AT parser. * `index` is the index of the parameter to retrieve. * `&value` is a pointer to the output integer variable. * * Note: this function is type-generic on the type of the output integer variable. */ err = at_parser_num_get(&at_parser, index, &value); uint16_t value; /* Note: this function is type-generic on the type of the output integer variable. */ err = at_parser_num_get(&at_parser, index, &value);
Replace string parameter retrieval:
Remove:
/* `¶m_list` is a pointer to the AT parameter list. * `index` is the index of the parameter to retrieve. * `value` is the output buffer where the string is copied into. * `&len` is a pointer to the length of the copied string. * * Note: the copied string is not null-terminated. */ at_params_string_get(¶m_list, index, value, &len); /* Null-terminate the string. */ value[len] = '\0';
Add:
/* `&at_parser` is a pointer to the AT parser. * `index` is the index of the parameter to retrieve. * `value` is the output buffer where the string is copied into. * `&len` is a pointer to the length of the copied string. * * Note: the copied string is null-terminated. */ at_parser_string_get(&at_parser, index, value, &len);
Replace parameter count retrieval:
Remove:
/* `¶m_list` is a pointer to the AT parameter list. * `count` is the returned parameter count. */ uint32_t count = at_params_valid_count_get(¶m_list);
Add:
size_t count; /* `&at_parser` is a pointer to the AT parser. * `&count` is a pointer to the returned parameter count. */ at_parser_cmd_count_get(&at_parser, &count);
Replace command type retrieval:
Remove:
/* `at_string` is the AT string that we want to retrieve the command type of. */ enum at_cmd_type type = at_parser_at_cmd_type_get(at_string);
Add:
enum at_parser_cmd_type type; /* `&at_parser` is a pointer to the AT parser. * `&type` pointer to the returned command type. */ at_parser_cmd_type_get(&at_parser, &type);
Snippets
This section describes the changes related to snippets.
The existing snippet nrf70-debug
has been removed and divided into three sub-snippets as below:
nrf70-driver-debug
- To enable the nRF70 driver debug logs.nrf70-driver-verbose-logs
- To enable the nRF70 driver, firmware interface, and BUS interface debug logs.wpa-supplicant-debug
- To enable supplicant logs.
Protocols
This section provides detailed lists of changes by protocol.
Bluetooth® LE
To use the Zephyr Bluetooth LE Controller, use the bt-ll-sw-split snippet (see Snippets).