Skip to content

Commit 6a991ae

Browse files
ferre111Kucmasz
authored andcommitted
Anjay-zephyr 3.2.1
Bugfixes - Deleted second ANJAY_WITH_MODULE_FACTORY_PROVISIONING definition in anjay_config.h - Added correct usage of the `ZSOCK_MSG_DONTWAIT` flag in network integration Improvements - Added ANJAY_WITH_COMMUNICATION_TIMESTAMP_API, ANJAY_WITH_OBSERVATION_STATUS and ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER to Kconfig - Fixed compatibility with newer versions of Zephyr that require including its headers from the `zephyr/` directory - Added support for private keys stored as DER-encoded PKCS#1 and SECG1 (in addition to previously supported PKCS#8 and PEM encodings) on nRF91 security backend
1 parent 1636096 commit 6a991ae

16 files changed

+293
-40
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 3.2.1 (Dec 13th, 2022)
4+
5+
### Bugfixes
6+
- Deleted second ANJAY_WITH_MODULE_FACTORY_PROVISIONING definition in anjay_config.h
7+
- Added correct usage of the `ZSOCK_MSG_DONTWAIT` flag in network integration
8+
9+
### Improvements
10+
- Added ANJAY_WITH_COMMUNICATION_TIMESTAMP_API, ANJAY_WITH_OBSERVATION_STATUS
11+
and ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER to Kconfig
12+
- Fixed compatibility with newer versions of Zephyr that require including its
13+
headers from the `zephyr/` directory
14+
- Added support for private keys stored as DER-encoded PKCS#1 and SECG1
15+
(in addition to previously supported PKCS#8 and PEM encodings) on nRF91
16+
security backend
17+
318
## 3.1.2 (Aug 31st, 2022)
419

520
### Bugfixes

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,4 @@ if(NOT CONFIG_ASSERT)
5151
target_compile_definitions(${ZEPHYR_CURRENT_LIBRARY} PRIVATE NDEBUG)
5252
endif()
5353

54-
set_source_files_properties(${AVS_COMMONS_SOURCES}
55-
PROPERTIES INCLUDE_DIRECTORIES ${ZEPHYR_BASE}/include/posix)
56-
5754
endif()

Kconfig.anjay

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,25 @@ config ANJAY_WITH_NET_STATS
151151
bool "Enable support for measuring amount of LwM2M traffic."
152152
default y
153153

154+
config ANJAY_WITH_COMMUNICATION_TIMESTAMP_API
155+
bool "Enable support for communication timestamp API."
156+
default n
157+
help
158+
Enable anjay_get_server_last_registration_time(),
159+
anjay_get_server_next_update_time() and
160+
anjay_get_server_last_communication_time() functions.
161+
154162
config ANJAY_WITH_OBSERVATION_STATUS
155163
bool "Enable support for the anjay_resource_observation_status() API."
156-
default y
164+
default n
165+
166+
config ANJAY_MAX_OBSERVATION_SERVERS_REPORTED_NUMBER
167+
int "Maximum number of listed servers that observe a given Resource."
168+
default 0
169+
depends on ANJAY_WITH_OBSERVATION_STATUS
170+
help
171+
Maximum number of servers observing a given Resource listed by
172+
anjay_resource_observation_status() function.
157173

158174
config ANJAY_WITH_THREAD_SAFETY
159175
bool "Enable guarding of all accesses to anjay_t with a mutex."

compat/log_impl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
#include <logging/log.h>
17+
#include <zephyr/logging/log.h>
1818
/* For now, only registering main anjay log module is required */
1919
LOG_MODULE_REGISTER(anjay, CONFIG_ANJAY_LOG_LEVEL);

compat/log_impl.h

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

1717
#pragma once
1818

19-
#include <logging/log.h>
19+
#include <zephyr/logging/log.h>
2020

2121
LOG_MODULE_DECLARE(anjay, CONFIG_ANJAY_LOG_LEVEL);
2222

compat/mbedtls_compat.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include <avsystem/commons/avs_errno.h>
2222
#include <avsystem/commons/avs_time.h>
2323

24-
#include <drivers/entropy.h>
25-
#include <random/rand32.h>
24+
#include <zephyr/drivers/entropy.h>
25+
#include <zephyr/random/rand32.h>
2626

2727
typedef struct anjay_mbedtls_timing_delay_context_struct {
2828
avs_time_monotonic_t timer;
@@ -98,7 +98,7 @@ static int entropy_callback(void *dev,
9898
void anjay_zephyr_mbedtls_entropy_init__(mbedtls_entropy_context *ctx) {
9999
const struct device *entropy_dev = NULL;
100100
#ifdef CONFIG_ENTROPY_HAS_DRIVER
101-
entropy_dev = device_get_binding(DT_CHOSEN_ZEPHYR_ENTROPY_LABEL);
101+
entropy_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_entropy));
102102
AVS_ASSERT(entropy_dev, "Failed to acquire entropy device");
103103
#endif // CONFIG_ENTROPY_HAS_DRIVER
104104
int result =

compat/net_impl.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# error "Custom implementation of the network layer conflicts with AVS_COMMONS_NET_WITH_POSIX_AVS_SOCKET"
2727
#endif // AVS_COMMONS_NET_WITH_POSIX_AVS_SOCKET
2828

29-
#include <net/socket.h>
29+
#include <zephyr/net/socket.h>
3030

3131
#include "net_impl.h"
3232

@@ -219,7 +219,8 @@ static avs_error_t net_receive(avs_net_socket_t *sock_,
219219
if (zsock_poll(&pfd, 1, (int) timeout_ms) == 0) {
220220
return avs_errno(AVS_ETIMEDOUT);
221221
}
222-
ssize_t bytes_received = zsock_recv(sock->fd, buffer, buffer_length, 0);
222+
ssize_t bytes_received =
223+
zsock_recv(sock->fd, buffer, buffer_length, ZSOCK_MSG_DONTWAIT);
223224
if (bytes_received < 0) {
224225
#ifdef CONFIG_WIFI_ESWIFI
225226
// Although poll succeeded, recv may fail with errno set to EAGAIN when

compat/net_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef NET_IMPL_H
1818
#define NET_IMPL_H
1919

20-
#include <net/socket.h>
20+
#include <zephyr/net/socket.h>
2121

2222
#include <avsystem/commons/avs_socket_v_table.h>
2323

compat/threading_compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <avsystem/commons/avs_memory.h>
2020
#include <avsystem/commons/avs_mutex.h>
2121

22-
#include <kernel.h>
22+
#include <zephyr/kernel.h>
2323

2424
struct avs_condvar {
2525
struct k_condvar zephyr_condvar;

compat/time_compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
#include <avsystem/commons/avs_time.h>
18-
#include <kernel.h>
18+
#include <zephyr/kernel.h>
1919

2020
#ifdef CONFIG_DATE_TIME
2121
# include <date_time.h>

0 commit comments

Comments
 (0)