Skip to content

Commit

Permalink
nrf_modem: release v2.6.0
Browse files Browse the repository at this point in the history
For a detailed list of changes, see the CHANGELOG file.

Signed-off-by: Emanuele Di Santo <[email protected]>
  • Loading branch information
lemrey authored and eivindj-nordic committed Feb 26, 2024
1 parent 3bf59c9 commit 4e5a43d
Show file tree
Hide file tree
Showing 27 changed files with 1,204 additions and 556 deletions.
6 changes: 6 additions & 0 deletions doc/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@

.. _`coex interface of nRF9160`: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf9160%2Fip%2Fradio_lte%2Fdoc%2Fmagpio_if.html

.. _`Revision Identification +CGMR`: https://infocenter.nordicsemi.com/topic/ref_at_commands_nrf91x1/REF/at_commands/general/cgmr.html

.. ### Source: www.nordicsemi.com

.. _`nRF9160 modem firmware zip file`: https://www.nordicsemi.com/Products/Low-power-cellular-IoT/nRF9160/Download#0B34B59935AF4AFCB7AB93E9646C1F53
Expand Down Expand Up @@ -106,3 +108,7 @@
.. _`nRF Connect for Desktop`: https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-Desktop

.. _`nPM1300 Evaluation Kit`: https://infocenter.nordicsemi.com/

.. _`Wireshark`: https://www.wireshark.org/

.. _`3GPP TS 24.301 Technical Specification`: https://www.3gpp.org/DynaReport/24301.htm
62 changes: 62 additions & 0 deletions nrf_modem/doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,68 @@ Changelog

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

nrf_modem 2.6.0
***************

Core library
============

* Added:

* The :c:func:`nrf_modem_os_mutex_init`, :c:func:`nrf_modem_os_mutex_lock` and :c:func:`nrf_modem_os_mutex_unlock` functions to the OS requirements.

* Updated:

* Fixed a bug where some modem faults during initialization were not sent to the modem fault handler function as intended.

Sockets
=======

* Added:

* The new :c:macro:`NRF_SO_KEEPOPEN` socket option to allow sockets to remain open when their PDN connection is lost, or the device is set to flight mode.
* The RAI socket option :c:macro:`NRF_SO_RAI` and the values :c:macro:`NRF_RAI_NO_DATA`, :c:macro:`NRF_RAI_LAST`, :c:macro:`NRF_RAI_ONE_RESP`, :c:macro:`NRF_RAI_ONGOING`, and :c:macro:`NRF_RAI_WAIT_MORE`.
* A set of security tags that can be used for test and debugging purposes, to allow to the `Cellular Monitor`_ application to decrypt TLS traffic.

* Updated:

* Fixed rare multi-threading bugs in the :c:func:`nrf_socket`, :c:func:`nrf_recv` and :c:func:`nrf_connect` functions.
* Fixed a bug in the :c:func:`nrf_accept` function that caused it to not wait for a connection as intended.
* The :c:macro:`NRF_SO_RCVTIMEO` socket option can now be used to set a timeout for the :c:func:`nrf_accept` operation.
* Fixed a bug where the :c:macro:`NRF_POLLNVAL` event would not be reported when using poll callbacks set with the :c:macro:`NRF_SO_POLLCB` socket option.
* Fixed a bug where retrieving the value of :c:macro:`NRF_SO_SEC_HOSTNAME` caused a bad memory access, if the option had not been set.
* The :c:macro:`nrf_sa_family_t` type definition to ``unsigned short`` (from ``unsigned int``), to reduce the size of the socket address types.
* The type of the field :c:member:`nrf_sockaddr.sa_family` to :c:macro:`nrf_sa_family_t` (from ``int``).
* The type of the field :c:member:`nrf_sockaddr_in6.sin6_scope_id` to ``uint8_t`` (from ``uint32_t``).

* Deprecated:

* The ``nrf_sec_cipher_t``, ``nrf_sec_peer_verify_t``, ``nrf_sec_role_t``, and ``nrf_sec_session_cache_t`` types. Use ``int`` instead.
* The RAI socket options :c:macro:`NRF_SO_RAI_NO_DATA`, :c:macro:`NRF_SO_RAI_LAST`, :c:macro:`NRF_SO_RAI_ONE_RESP`, :c:macro:`NRF_SO_RAI_ONGOING`, and :c:macro:`NRF_SO_RAI_WAIT_MORE`.

* Removed:

* The field :c:member:`nrf_sockaddr_in6.sin6_flowinfo`, to reduce the size of the :c:struct:`nrf_sockaddr_in6` structure. The field was unsupported.

AT interface
============

* Added:

* The :c:func:`nrf_modem_at_cfun_handler_set` function to set a callback for functional mode changes.

* Updated:

* The custom AT commands are now case-insensitive.

GNSS interface
==============

* Added:

* The :c:macro:`NRF_MODEM_GNSS_DELETE_EKF` flag for the :c:func:`nrf_modem_gnss_nv_data_delete` function to delete Extended Kalman Filter (EKF) state data.
* The :c:macro:`NRF_MODEM_GNSS_PVT_FLAG_SCHED_DOWNLOAD` flag to indicate that the GNSS is running because of a scheduled download.

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

Expand Down
29 changes: 29 additions & 0 deletions nrf_modem/doc/at_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,35 @@ In this case, the application need not provide any intermediate buffers and can
Conversely, :c:func:`nrf_modem_at_cmd` is the only function in the AT interface that copies the whole response of the modem from the shared memory into the provided input buffer, which is owned by the application.
Therefore, this function can be used when the application needs the whole AT command response, as received from the modem, or in those cases when the stack requirements of :c:func:`nrf_modem_at_scanf` are too high for the calling thread, or when parsing the response using a :c:func:`scanf` format is hard.

CFUN handler
************

The Modem library allows the application to be notified on functional mode changes in the modem by adding a CFUN handler through the :c:func:`nrf_modem_at_cfun_handler_set` function.
The handler is called after an CFUN AT command is successfully processed by the modem.

.. note::
The CFUN handler is not supported with :c:func:`nrf_modem_at_cmd_async`.

The following code snippet shows how to define and set a CFUN handler:

.. code-block:: c
static void cfun_callback(int mode)
{
printk("CFUN changed to %d\n", mode);
if (mode == 0) {
/* Resubscribe to network registration status notifications. */
nrf_modem_at_printf("AT+CEREG=1");
}
}
nrf_modem_at_cfun_handler_set(cfun_callback);
.. important::
If you are building an |NCS| application, do not use the :c:func:`nrf_modem_at_cfun_handler_set` function to register your callback.
Instead, use the :c:macro:`NRF_MODEM_LIB_ON_CFUN` macro to register to functional mode changes where you need them in your application, to ensure compatibility with other |NCS| libraries.

Custom AT commands
******************

Expand Down
10 changes: 5 additions & 5 deletions nrf_modem/doc/fault_handling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ The application can reinitialize the modem by reinitializing the Modem library t
.. important::
If modem traces are enabled, the modem continues to output trace data (a coredump) in the event of a fault, even after signaling the fault to the application.
To make sure the application is able to retrieve the coredump correctly, the application must not re-initialize the modem until all the outstanding trace data has been processed.
The :c:func:`nrf_modem_trace_get()` function will return ``-ENODATA`` when all outstanding trace data has been processed by the application.
The :c:func:`nrf_modem_trace_get()` function will return negative :c:macro:`NRF_ENODATA` when all outstanding trace data has been processed by the application.

When the Modem library is used in |NCS|, the :ref:`nrf_modem_lib_readme` handles synchronizing modem re-initialization with tracing operations.

Networking sockets
******************

Socket APIs that require communication with the modem, return ``-1`` and set ``errno`` to ``NRF_ESHUTDOWN`` if the modem has crashed or if it is uninitialized.
Socket APIs that require communication with the modem, return ``-1`` and set ``errno`` to :c:macro:`NRF_ESHUTDOWN` if the modem has crashed or if it is uninitialized.

Although the modem has crashed, any data which was stored by the Modem library, including data that was delivered to the Modem library by the modem, remains available until the Modem library is shut down.
This includes incoming network data, which was received before the crash but has not been read by the application.
The application can read that data as normal, using the :c:func:`recv` function.
When no more data is available, the :c:func:`recv` function returns ``-1`` and sets ``errno`` to ``NRF_ESHUTDOWN``.
When no more data is available, the :c:func:`recv` function returns ``-1`` and sets ``errno`` to :c:macro:`NRF_ESHUTDOWN`.

Ongoing API calls
*****************
Expand All @@ -57,5 +57,5 @@ When the Modem library detects that a fault has occurred in the modem, it immedi

Following are the two categories of APIs in the Modem library and their behavior after a modem fault:

* Socket APIs - Exit immediately returning ``-1`` and sets errno to ``NRF_ESHUTDOWN``
* Non-Socket APIs - Exit immediately returning ``-NRF_ESHUTDOWN``
* Socket APIs - Exit immediately returning ``-1`` and sets errno to :c:macro:`NRF_ESHUTDOWN`.
* Non-Socket APIs - Exit immediately returning negative :c:macro:`NRF_ESHUTDOWN`.
2 changes: 1 addition & 1 deletion nrf_modem/doc/modem_trace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Tracing and modem faults

When a fault occurs in the modem and traces are enabled, the modem will send a coredump using the trace interface.
The :c:func:`nrf_modem_trace_get` function returns trace fragments until there are no more fragments to process.
In the case where there are no more trace fragments after a modem coredump is complete, the :c:func:`nrf_modem_trace_get` function returns ``-NRF_ENODATA`` as shown in the following figure:
In the case where there are no more trace fragments after a modem coredump is complete, the :c:func:`nrf_modem_trace_get` function returns negative :c:macro:`NRF_ENODATA` as shown in the following figure:

.. figure:: images/nrf_modem_trace_sequence_coredump.svg
:alt: Modem library coredump trace sequence
Expand Down
Loading

0 comments on commit 4e5a43d

Please sign in to comment.