Skip to content

Commit

Permalink
nrf_modem: v2.5.0 release
Browse files Browse the repository at this point in the history
See CHANGELOG file for details.

Co-authored-by: Mirko Covizzi <[email protected]>
Co-authored-by: Tommi Kangas <[email protected]>
Co-authored-by: Emanuele Di Santo <[email protected]>
Co-authored-by: divya pillai <[email protected]>
Signed-off-by: Eivind Jølsgard <[email protected]>
  • Loading branch information
5 people committed Oct 4, 2023
1 parent 5d8f0dc commit e3e4951
Show file tree
Hide file tree
Showing 34 changed files with 1,648 additions and 846 deletions.
4 changes: 4 additions & 0 deletions doc/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

.. _`AT Commands Reference Guide`: https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/intro.html

.. _`Selecting UICC slot %CSUS`: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fref_at_commands%2FREF%2Fat_commands%2Faccess_uicc%2Fcsus.html

.. _`Credential storage management %CMNG`: https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/mob_termination_ctrl_status/cmng.html

.. _`Cellular Monitor`: https://infocenter.nordicsemi.com/topic/ug_cellular_monitor/UG/cellular_monitor/cellular_mon_cert_manager.html
Expand Down Expand Up @@ -60,6 +62,8 @@

.. _`IANA`: https://en.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority

.. _`SIM card`: https://en.wikipedia.org/wiki/SIM_card

.. ### Source: other

.. _`Zephyr`: https://www.zephyrproject.org
Expand Down
27 changes: 19 additions & 8 deletions nrf_modem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,30 @@

if(CONFIG_NRF_MODEM_LINK_BINARY)

nrfxlib_calculate_lib_path(NRF_MODEM_LIB_DIR
BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
SOFT_FLOAT_FALLBACK
)
string(REGEX REPLACE "_[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]$" "" arch_soc_dir ${CONFIG_SOC})

if(NOT NRF_MODEM_LIB_DIR)
message(ERROR " This combination of SoC and floating point ABI is not supported by libmodem.")
if(NOT arch_soc_dir MATCHES "nRF9160")
string(REGEX REPLACE "nRF91[0-9]*" "nRF9120" arch_soc_dir ${arch_soc_dir})
endif()

if(CONFIG_FPU)
if(CONFIG_FP_HARDABI)
set(float_dir hard-float)
elseif(CONFIG_FP_SOFTABI)
set(float_dir soft-float)
else()
assert(0 "Unreachable code")
endif()
else()
set(float_dir soft-float)
endif()

set(NRF_MODEM_LIB_DIR "lib/${arch_soc_dir}/${float_dir}")

if(CONFIG_NRF_MODEM_LOG)
zephyr_library_import(modem ${NRF_MODEM_LIB_DIR}/libmodem_log.a)
zephyr_library_import(modem ${CMAKE_CURRENT_SOURCE_DIR}/${NRF_MODEM_LIB_DIR}/libmodem_log.a)
else()
zephyr_library_import(modem ${NRF_MODEM_LIB_DIR}/libmodem.a)
zephyr_library_import(modem ${CMAKE_CURRENT_SOURCE_DIR}/${NRF_MODEM_LIB_DIR}/libmodem.a)
endif()

zephyr_include_directories(include)
Expand Down
1 change: 1 addition & 0 deletions nrf_modem/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ For more information, see :ref:`nrf_modem_ug_porting`.
doc/gnss_interface
doc/bootloader
doc/delta_dfu
doc/softsim_interface
doc/fault_handling
doc/modem_trace
doc/logging
Expand Down
55 changes: 55 additions & 0 deletions nrf_modem/doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,61 @@ Changelog

All notable changes to this project are documented in this file.

nrf_modem 2.5.0
***************

:ref:`Core library <architecture>`
==================================

* Added:

* The :ref:`nrf_modem_softsim` to use a software SIM with the cellular modem.
* Binaries for the nRF9120 SoC (nRF9161 SiP).

* Updated:

* The :c:func:`nrf_modem_init` function is no longer required to be called twice when updating the modem firmware.
* The folder structure for the library binaries.
The binaries are now used by the SoC they support instead of the processor.

:ref:`Sockets <nrf_sockets>`
============================

* Added:

* The :c:macro:`NRF_SO_EXCEPTIONAL_DATA` socket option to enable sending data as part of exceptional events (3GPP).
* The :c:macro:`NRF_MSG_WAITACK` flag to request a blocking send operation until the request is acknowledged by the network.
* Enhanced APN rate control.

* Removed the ``sa_len``, ``sin_len``, and ``sin6_len`` callbacks from the :c:struct:`nrf_sockaddr`, :c:struct:`nrf_sockaddr_in`, and :c:struct:`nrf_sockaddr_in6` structs, respectively.
* Replaced the ``NRF_SO_BINDTODEVICE`` socket option with :c:macro:`NRF_SO_BINDTOPDN`.
The new option takes an integer for the PDN ID.

:ref:`AT interface <nrf_modem_at>`
==================================

* Added the option to set a timeout for the waiting time for the ongoing AT commands to complete by calling the :c:func:`nrf_modem_at_sem_timeout_set` function.
* The :c:func:`nrf_modem_at_cmd_async` function now immediately returns if there is another AT command pending, regardless of whether it was sent with the :c:func:`nrf_modem_at_cmd_async` function or other API calls.

:ref:`GNSS interface <gnss_interface>`
======================================

* Added:

* Support for QZSS assistance.
* Maximum speeds for dynamics modes.

:ref:`Delta DFU <nrf_modem_delta_dfu>`
======================================

* Added the :c:member:`nrf_modem_init_params.dfu_handler` callback that will be called after a DFU, and returns the result of the update.

:ref:`Bootloader <nrf_modem_bootloader>`
========================================

* The :c:func:`nrf_modem_bootloader_digest` function now takes a list of firmware segments as input.
The resulting digest is an array of 32-bit integers.

nrf_modem 2.4.1
***************

Expand Down
9 changes: 9 additions & 0 deletions nrf_modem/doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,15 @@ Dynamics modes
:project: nrfxlib
:members:

.. _nrf_modem_softsim_api:

SoftSIM API
***********

.. doxygengroup:: nrf_modem_softsim
:project: nrfxlib
:members:

OS specific definitions
***********************

Expand Down
37 changes: 12 additions & 25 deletions nrf_modem/doc/delta_dfu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Such updates can save significant amounts of time and bandwidth.

During a firmware delta update, the application transfers the firmware into an area of flash memory in the modem, known as the *scratch area*.
Once the firmware delta update has been transferred completely, the application schedules the update of the modem firmware, which happens the next time the application boots the modem while calling :c:func:`nrf_modem_init`.
Finally, the application reboots the modem once more, by reinitializing the Modem library to run the updated modem firmware.
The same delta update for updating to a new firmware version can be used to perform a rollback to the original firmware version from which the update was done.

The delta update functionality is available through the Modem library :ref:`nrf_modem_delta_dfu_api`, found in :file:`nrfxlib/nrf_modem/include/nrf_modem_delta_dfu.h`.
Expand Down Expand Up @@ -91,9 +90,8 @@ A delta modem firmware upgrade consists of the following steps:
#. Preparing the scratch area
#. Transferring the new firmware
#. Scheduling the firmware update
#. Reinitializing the modem to perform the update
#. Reinitializing the modem to perform the update and run the new firmware
#. Checking the result of the update
#. Reinitializing the modem to run the new firmware

Initializing the Modem library
==============================
Expand Down Expand Up @@ -191,22 +189,16 @@ To let the modem perform the update, the application must reinitialize the modem
Checking the result of the update
=================================

:c:func:`nrf_modem_init` will return one of the following values:
The application is notified of the result of the update through the :c:member:`nrf_modem_init_params.dfu_handler` callback with one of the following values:

* ``NRF_MODEM_DFU_RESULT_OK`` - The update is successful. The modem will run the updated firmware the next time it boots.
* ``NRF_MODEM_DFU_RESULT_AUTH_ERROR`` - The update did not take place. The modem will run the original firmware the next time it boots.
* ``NRF_MODEM_DFU_RESULT_UUID_ERROR`` - The update did not take place. The modem will run the original firmware the next time it boots.
* ``NRF_MODEM_DFU_RESULT_OK`` - The update is successful. The modem is running the new firmware.
* ``NRF_MODEM_DFU_RESULT_AUTH_ERROR`` - The update did not take place. The modem is running the original firmware.
* ``NRF_MODEM_DFU_RESULT_UUID_ERROR`` - The update did not take place. The modem is running the original firmware.
* ``NRF_MODEM_DFU_RESULT_INTERNAL_ERROR`` - The modem encountered an internal error while updating, and it will not boot to prevent executing unintended operations. The next firmware update operation can only be attempted through the :ref:`nrf_modem_bootloader_api`.
* ``NRF_MODEM_DFU_RESULT_HARDWARE_ERROR`` - The modem encountered a hardware error while updating, and it will not boot to prevent executing unintended operations. The next firmware update operation can only be attempted through the :ref:`nrf_modem_bootloader_api`.
* ``NRF_MODEM_DFU_RESULT_VOLTAGE_LOW`` - The modem did not have sufficient voltage to apply the firmware update. The operation will be retried the next time the modem is started.

Reinitializing the modem to run the new firmware
================================================

Regardless of the value returned by :c:func:`nrf_modem_init`, the application must reinitialize the modem by reinitializing the Modem library in order to run the modem firmware.
The application can reinitialize the Modem library by calling :c:func:`nrf_modem_init`.
If the update is successful, the modem runs the new modem firmware.
The application can verify that by reading the modem firmware UUID or reading the ``AT+CGMR`` command response.
The application can verify that the modem runs the new modem firmware by reading the modem firmware UUID or reading the ``AT+CGMR`` command response.

Rolling back to a previous firmware
***********************************
Expand Down Expand Up @@ -238,21 +230,16 @@ To let the modem perform the rollback, the application must reinitialize the mod
Checking the result of the rollback
===================================

:c:func:`nrf_modem_init` will return one of the following values:
The application is notified of the result of the update through the :c:member:`nrf_modem_init_params.dfu_handler` callback with one of the following values:

* ``NRF_MODEM_DFU_RESULT_OK`` - The rollback is successful. The modem will run the previous firmware the next time it boots.
* ``NRF_MODEM_DFU_RESULT_AUTH_ERROR`` - The rollback did not take place. The modem will run the same firmware the next time it boots.
* ``NRF_MODEM_DFU_RESULT_UUID_ERROR`` - The rollback did not take place. The modem will run the same firmware the next time it boots.
* ``NRF_MODEM_DFU_RESULT_OK`` - The rollback is successful. The modem is running the new firmware.
* ``NRF_MODEM_DFU_RESULT_AUTH_ERROR`` - The rollback did not take place. The modem is running the original firmware.
* ``NRF_MODEM_DFU_RESULT_UUID_ERROR`` - The rollback did not take place. The modem is running the original firmware.
* ``NRF_MODEM_DFU_RESULT_INTERNAL_ERROR`` - The modem encountered an internal error while executing the rollback, and it will not boot to prevent executing unintended operations. For subsequent programming, the modem can only be programmed through the :ref:`nrf_modem_bootloader_api`.
* ``NRF_MODEM_DFU_RESULT_HARDWARE_ERROR`` - The modem encountered a hardware error while executing the rollback, and it will not boot to prevent executing unintended operations. For subsequent programming, the modem can only be programmed through the :ref:`nrf_modem_bootloader_api`.
* ``NRF_MODEM_DFU_RESULT_VOLTAGE_LOW`` - The modem did not have sufficient voltage to apply the firmware rollback. The operation will be retried the next time the modem is started.

Reinitializing the modem to run the firmware
============================================

Regardless of the value returned by :c:func:`nrf_modem_init`, the application must reinitialize the modem by reinitializing the :ref:`nrf_modem` to run the modem firmware.
The application can reinitialize the Modem library by calling :c:func:`nrf_modem_init`.
If the rollback is successful, the modem runs the previous modem firmware.
The application can verify that by reading the modem firmware UUID or the ``AT+CGMR`` command response.
The application can verify that the modem runs the previous modem firmware by reading the modem firmware UUID or the ``AT+CGMR`` command response.

Thread safety
*************
Expand Down
Loading

0 comments on commit e3e4951

Please sign in to comment.