Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions nrf_modem/doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ Core library

* Added the :ref:`nrf_modem_rs_capture_api` to receive reference signal samples.

DECT NR+
========

* Added:

* The :c:func:`nrf_modem_dect_phy_test_rf_tx_cw_control` function to control continuous wave transmission for device certification purposes.
* The :c:enumerator:`NRF_MODEM_DECT_PHY_ERR_HANDLE_IN_USE` enumeration value.

Sockets
=======

* Added the :c:macro:`NRF_SO_SENDCB` socket option to set a send callback.
The callback is called when a send request is acknowledged by the network and the data has been acknowledged by the peer, if required by the network protocol.
This socket option is supported by the nRF9151 NTN modem firmware.

nrf_modem 3.1.0
***************

Expand Down
71 changes: 71 additions & 0 deletions nrf_modem/include/nrf_modem_dect_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ enum nrf_modem_dect_phy_err {
* @brief Operation is not allowed in the current radio mode.
*/
NRF_MODEM_DECT_PHY_ERR_RADIO_MODE_CONFLICT = 0x100B,
/**
* @brief Handle is already in use.
*
* Each operation given to the modem must have a unique handle among all uncompleted
* operations. Handles may be reused after an operation completes.
*/
NRF_MODEM_DECT_PHY_ERR_HANDLE_IN_USE = 0x100C,
/**
* @brief Unsupported carrier.
*/
Expand Down Expand Up @@ -1437,6 +1444,36 @@ struct nrf_modem_dect_phy_band_get_event {
struct nrf_modem_dect_phy_band *band;
};

/**
* @brief Test RF TX CW operation codes.
*/
enum nrf_modem_dect_phy_test_rf_tx_cw_oper {
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_OPER_ON,
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_OPER_OFF,
};

/**
* @brief Test RF TX CW operation status codes.
*/
enum nrf_modem_dect_phy_test_rf_tx_cw_err {
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_NO_ERROR = 0,
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_ERROR = -1,
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_TX_ALREADY_ON = -100,
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_TX_ALREADY_OFF = -101,
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_BUFFER_RESERVE_FAILED = -102,
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_INVALID_OPERATION = -103,
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_DSP_CONFIG_FAILURE = -104,
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_MSG_SEND_FAILED = -105,
};

/**
* @brief Test RF TX CW control event.
*/
struct nrf_modem_dect_phy_test_rf_tx_cw_control_event {
/** @brief Operation result. */
enum nrf_modem_dect_phy_test_rf_tx_cw_err err;
};

/**
* @brief STF cover sequence control event.
*/
Expand Down Expand Up @@ -1601,6 +1638,10 @@ enum nrf_modem_dect_phy_event_id {
* @brief Event to indicate the completion of STF configuration.
*/
NRF_MODEM_DECT_PHY_EVT_STF_CONFIG,
/**
* @brief Event to indicate the completion of the test RF TX CW configuration.
*/
NRF_MODEM_DECT_PHY_EVT_TEST_RF_TX_CW_CONTROL_CONFIG,
};

/**
Expand Down Expand Up @@ -1636,6 +1677,7 @@ struct nrf_modem_dect_phy_event {
struct nrf_modem_dect_phy_capability_get_event capability_get;
struct nrf_modem_dect_phy_band_get_event band_get;
struct nrf_modem_dect_phy_latency_info_event latency_get;
struct nrf_modem_dect_phy_test_rf_tx_cw_control_event test_rf_tx_cw_control;
struct nrf_modem_dect_phy_stf_control_event stf_cover_seq_control;
struct nrf_modem_dect_phy_link_config_event link_config;
};
Expand Down Expand Up @@ -1989,6 +2031,35 @@ int nrf_modem_dect_phy_latency_get(void);
*/
int nrf_modem_dect_phy_time_get(void);

/**
* @brief Control continuous wave transmission.
*
* The default, applied at each initialization, is OFF.
*
* Continuous wave transmission can only be turned on when the DECT PHY interface is not
* initialized. DECT PHY interface initialization is not allowed when continuous wave transmission
* is on.
*
* @note
* This API is intended for certification purposes only.
* It should not be used for normal operation.
*
* This operation is performed asynchronously.
* Completion of this operation is indicated by the
* @ref NRF_MODEM_DECT_PHY_EVT_TEST_RF_TX_CW_CONTROL_CONFIG event.
*
* @param operation Control operation code.
* @param carrier Carrier on which the wave is transmitted.
* @param power Power of the transmission in dBm.
*
* @retval 0 Request was sent to modem.
* @retval -NRF_EPERM The Modem library is not initialized.
* @retval -NRF_EFAULT No event handler is set.
* @retval -NRF_ENOMEM Not enough shared memory for this request.
*/
int nrf_modem_dect_phy_test_rf_tx_cw_control(enum nrf_modem_dect_phy_test_rf_tx_cw_oper operation,
uint16_t carrier, int8_t power);

/**
* @brief STF cover sequence control.
*
Expand Down
57 changes: 55 additions & 2 deletions nrf_modem/include/nrf_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ extern "C" {
#define NRF_SO_TCP_SRV_SESSTIMEO 55
/** Set a callback for poll events (write-only).
* See @ref nrf_modem_pollcb_t for the callback function type.
*
* @note The callback is executed in an interrupt context.
* Take care to offload any processing as appropriate.
*/
#define NRF_SO_POLLCB 60
/** Release Assistance Indication (RAI) (write-only).
Expand All @@ -323,6 +326,49 @@ extern "C" {
* modem firmware version 2.0.2 and newer.
*/
#define NRF_SO_IPV6_DELAYED_ADDR_REFRESH 62
/**
* Set a callback to be called when a send request is acknowledged by the network and
* the data has been acknowledged by the peer, if required by the network protocol, or until the
* timeout, given by the @ref NRF_SO_SNDTIMEO socket option, is reached. Valid timeout values are
* 1 to 600 seconds.
* See @ref nrf_modem_sendcb_t for the callback function type.
*
* @note The callback is executed in an interrupt context.
* Take care to offload any processing as appropriate.
*
* @note This is only supported by the following modem firmware:
* - mfw_nrf9151-ntn
*
* This socket option cannot be used along with the @ref NRF_MSG_WAITACK send flag.
*/
#define NRF_SO_SENDCB 63
/** @} */

/**
* @defgroup nrf_socket_options_sendcb_params Socket send callback option parameters.
* @ingroup nrf_socket
* @{
*/
/**
* @brief This structure is used to describe the parameters to a send callback function.
*/
struct nrf_modem_sendcb_params {
/** Socket handle */
int fd;
/** Status. Can be 0 on successful send or NRF_EAGAIN on timeout. */
int status;
/** Number of bytes that was sent. */
size_t bytes_sent;
};

/** Callback for send events */
typedef void (*nrf_modem_sendcb_t)(const struct nrf_modem_sendcb_params *params);

/** @c nrf_send() and @c nrf_sendto() callback */
struct nrf_modem_sendcb {
/** Callback function */
nrf_modem_sendcb_t callback;
};
/** @} */

/**
Expand All @@ -346,8 +392,11 @@ extern "C" {
/** Request a blocking read operation until the request is satisfied. */
#define NRF_MSG_WAITALL 0x100
/** Request a blocking send operation until the request is acknowledged.
* When used in @c nrf_send() or @c nrf_sendto(), the operation will block until the data has been
* sent on-air and acknowledged by the peer, if required by the network protocol.
* When used in @c nrf_send() or @c nrf_sendto(), the operation is blocked until the data has been
* sent on-air and acknowledged by the peer, if required by the network protocol, or until the
* timeout, given by the @ref NRF_SO_SNDTIMEO socket option, is reached. Valid timeout values are
* 1 to 600 seconds.
* This send flag cannot be used along with the @ref NRF_SO_SENDCB socket option.
*/
#define NRF_MSG_WAITACK 0x200
/** @} */
Expand Down Expand Up @@ -866,6 +915,8 @@ int nrf_connect(int socket, const struct nrf_sockaddr *address, nrf_socklen_t ad
* - [NRF_ECANCELED] Operation canceled because of APN rate control.
* - [NRF_ENOMEM] TCP stream interrupted because of no heap memory.
* - [NRF_EPROTO] Request failed because DTLS context was serialized.
* - [NRF_EBUSY] Earlier send request with the @ref NRF_SO_SENDCB socket option set is still
* ongoing.
*/
ssize_t nrf_send(int socket, const void *buffer, size_t length, int flags);

Expand All @@ -881,6 +932,8 @@ ssize_t nrf_send(int socket, const void *buffer, size_t length, int flags);
* - [NRF_ECANCELED] Operation canceled because of APN rate control.
* - [NRF_ENOMEM] TCP stream interrupted because of no heap memory.
* - [NRF_EPROTO] Request failed because DTLS context was serialized.
* - [NRF_EBUSY] Earlier send request with the @ref NRF_SO_SENDCB socket option set is still
* ongoing.
*/
ssize_t nrf_sendto(int socket, const void *message, size_t length, int flags,
const struct nrf_sockaddr *dest_addr, nrf_socklen_t dest_len);
Expand Down
Binary file modified nrf_modem/lib/cellular/nrf9120/hard-float/libmodem.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9120/hard-float/libmodem_log.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9120/soft-float/libmodem.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9120/soft-float/libmodem_log.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9160/hard-float/libmodem.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9160/hard-float/libmodem_log.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9160/soft-float/libmodem.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9160/soft-float/libmodem_log.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9230/hard-float/libmodem.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9230/hard-float/libmodem_log.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9230/soft-float/libmodem.a
Binary file not shown.
Binary file modified nrf_modem/lib/cellular/nrf9230/soft-float/libmodem_log.a
Binary file not shown.
Binary file modified nrf_modem/lib/dect_phy/nrf9120/hard-float/libmodem.a
Binary file not shown.
Binary file modified nrf_modem/lib/dect_phy/nrf9120/hard-float/libmodem_log.a
Binary file not shown.
Binary file modified nrf_modem/lib/dect_phy/nrf9120/soft-float/libmodem.a
Binary file not shown.
Binary file modified nrf_modem/lib/dect_phy/nrf9120/soft-float/libmodem_log.a
Binary file not shown.