Skip to content

Commit

Permalink
Anjay 3.4.0
Browse files Browse the repository at this point in the history
Features

- New APIs for server connection lifecycle management:
anjay_server_schedule_reconnect() and anjay_schedule_register()
- New options in anjay_configuration_t that allow for optional more strict
LwM2M TS compliance: update_immediately_on_dm_change and
enable_self_notify
- Added option to disable auto-closing of the socket when in queue mode.
- avs_coap_observe_cancel() is now public API (for direct users of avs_coap)
- Added Advanced Firmware Update as an Anjay module
- Added simplified demo of Advanced Firmware Update with two firmware images
- Added tutorial for Advanced Firmware Update

Improvements

- Observations are now automatically cancelled if the client needs to send a new
Register messsage
- Added explicit casts in macros that involve negating an unsigned value, to
silence warnings generated by some compilers
- Various improvements and refactors of integration tests, to make them run
faster and more stable
- (commercial feature only) Disabled servers are saved now in Core Persistence,
which prevents them from registering until the timeout passes with respect to
the real clock.

Bugfixes

- Fixed handling of SenML payload that could cause erroneous behavior and memory
leaks when parsing payloads only containing the Base Name field, without Name
- Fixed error handling in bootstrapper (commercial only) and factory
provisioning modules so that the changes are properly rolled back in case of
error
- Fixed assertion error (or 4.05 Method Not Allowed when compiled without
assertions) when attempting to set the Disable Timeout resource in the Server
object when the ANJAY_WITHOUT_DEREGISTER configuration option is set
- Fixed inequality comparisons on some time values that could cause erroneous
behavior on platforms with low-resolution system clocks, and updated unit
tests to not assume a high-resolution clock
- Fixed a problem where anjay_ongoing_registration_exists() inconditionally
returned true if any server connection in a "disabled" state existed
- Timeout when sending a Confirmable Notification now cancels the observation,
as required by RFC 7641
- Removed sending of Release messages when using CoAP+TCP, which fixes the issue
of erroneously sending them at the beginning after reconnecting a LwM2M
connection socket
- Fixed the serial port handling code in the sample NIDD driver, to properly
handle cases where more than one line is received in a single read() call
- Fixed compatibility of integration tests with the current versions of the
Python cryptography module
- Fixed problems with compiling the library without WITH_AVS_COAP_BLOCK
enabled (contributed by Flonidan A/S)
- Fixed a bug in the pymbedtls library used by tests, that prevented it from
working in DTLS client mode
- Fixed bug in the "Custom (D)TLS layers" code examples
  • Loading branch information
PiotrRoszkowski committed Jun 14, 2023
1 parent 75d8b88 commit a8a14fd
Show file tree
Hide file tree
Showing 180 changed files with 16,207 additions and 1,157 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/anjay-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on: [push]
jobs:
ubuntu1804-compilers-test:
runs-on: ubuntu-latest
container: avsystemembedded/anjay-travis:ubuntu-18.04-1.0
container: avsystemembedded/anjay-travis:ubuntu-18.04-1.1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
Expand All @@ -37,7 +37,7 @@ jobs:

ubuntu2004-compilers-test:
runs-on: ubuntu-latest
container: avsystemembedded/anjay-travis:ubuntu-20.04-1.0
container: avsystemembedded/anjay-travis:ubuntu-20.04-1.1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:

ubuntu2204-compilers-test:
runs-on: ubuntu-latest
container: avsystemembedded/anjay-travis:ubuntu-22.04-1.0
container: avsystemembedded/anjay-travis:ubuntu-22.04-1.1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:

rockylinux9-compilers-test:
runs-on: ubuntu-latest
container: avsystemembedded/anjay-travis:rockylinux-9-1.0
container: avsystemembedded/anjay-travis:rockylinux-9-1.1
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
Expand All @@ -123,6 +123,8 @@ jobs:
submodules: recursive
- run: dnf update -y
- run: dnf install -y $CC
# Solve issues with EPERM when running dumpcap
- run: setcap '' $(which dumpcap)
- run: ./devconfig --with-valgrind --without-analysis -DWITH_VALGRIND_TRACK_ORIGINS=OFF -DWITH_URL_CHECK=OFF -DWITH_IPV6=OFF
- run: env CC=gcc LC_ALL=C.UTF-8 make -j
- run: env CC=gcc LC_ALL=C.UTF-8 make check
Expand Down
59 changes: 58 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,68 @@
# Changelog

## 3.4.0 (June 14th, 2023)

### Features

- New APIs for server connection lifecycle management:
``anjay_server_schedule_reconnect()`` and ``anjay_schedule_register()``
- New options in ``anjay_configuration_t`` that allow for optional more strict
LwM2M TS compliance: ``update_immediately_on_dm_change`` and
``enable_self_notify``
- Added option to disable auto-closing of the socket when in queue mode.
- `avs_coap_observe_cancel()` is now public API (for direct users of avs_coap)
- Added Advanced Firmware Update as an Anjay module
- Added simplified demo of Advanced Firmware Update with two firmware images
- Added tutorial for Advanced Firmware Update

### Improvements

- Observations are now automatically cancelled if the client needs to send a new
Register messsage
- Added explicit casts in macros that involve negating an unsigned value, to
silence warnings generated by some compilers
- Various improvements and refactors of integration tests, to make them run
faster and more stable
- (commercial feature only) Disabled servers are saved now in Core Persistence,
which prevents them from registering until the timeout passes with respect to
the real clock.

### Bugfixes

- Fixed handling of SenML payload that could cause erroneous behavior and memory
leaks when parsing payloads only containing the Base Name field, without Name
- Fixed error handling in bootstrapper (commercial only) and factory
provisioning modules so that the changes are properly rolled back in case of
error
- Fixed assertion error (or 4.05 Method Not Allowed when compiled without
assertions) when attempting to set the Disable Timeout resource in the Server
object when the `ANJAY_WITHOUT_DEREGISTER` configuration option is set
- Fixed inequality comparisons on some time values that could cause erroneous
behavior on platforms with low-resolution system clocks, and updated unit
tests to not assume a high-resolution clock
- Fixed a problem where `anjay_ongoing_registration_exists()` inconditionally
returned `true` if any server connection in a "disabled" state existed
- Timeout when sending a Confirmable Notification now cancels the observation,
as required by RFC 7641
- Removed sending of Release messages when using CoAP+TCP, which fixes the issue
of erroneously sending them at the beginning after reconnecting a LwM2M
connection socket
- Fixed the serial port handling code in the sample NIDD driver, to properly
handle cases where more than one line is received in a single read() call
- Fixed compatibility of integration tests with the current versions of the
Python cryptography module
- Fixed problems with compiling the library without `WITH_AVS_COAP_BLOCK`
enabled (contributed by Flonidan A/S)
- Fixed a bug in the pymbedtls library used by tests, that prevented it from
working in DTLS client mode
- Fixed bug in the "Custom (D)TLS layers" code examples

## 3.3.1 (March 10th, 2023)

### Improvements

- `anjay_disable_server()` and `anjay_disable_server_with_timeout()` can now be
be called on servers that are not enabled as well
called on servers that are not enabled as well

### Bugfixes

Expand Down
20 changes: 17 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
cmake_minimum_required(VERSION 3.6.0)

project(anjay C)
set(ANJAY_VERSION "3.3.1" CACHE STRING "Anjay library version")
set(ANJAY_VERSION "3.4.0" CACHE STRING "Anjay library version")
set(ANJAY_BINARY_VERSION 1.0.0)

set(ANJAY_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down Expand Up @@ -271,6 +271,7 @@ option(WITHOUT_IP_STICKINESS "Disable support for IP stickiness" OFF)
cmake_dependent_option(WITH_SENML_JSON "Enable support for SenML JSON content format" ON WITH_LWM2M11 OFF)
cmake_dependent_option(WITH_CBOR "Enable support for CBOR and SenML CBOR content formats" ON WITH_LWM2M11 OFF)
cmake_dependent_option(WITH_SEND "Enable support for LwM2M 1.1 Send operation" ON "WITH_CBOR OR WITH_SENML_JSON" OFF)
option(WITHOUT_QUEUE_MODE_AUTOCLOSE "Disable automatic closing of server connection sockets after MAX_TRANSMIT_WAIT of inactivity" OFF)

cmake_dependent_option(WITH_OBSERVATION_STATUS "Enable support for anjay_resource_observation_status() API" ON "WITH_OBSERVE" OFF)
cmake_dependent_option(WITH_COAP_DOWNLOAD "Enable support for CoAP(S) downloads" ON WITH_DOWNLOADER OFF)
Expand Down Expand Up @@ -330,11 +331,13 @@ cmake_dependent_option(WITHOUT_MODULE_fw_update_PUSH_MODE
"Disable support for PUSH mode Firmware Update"
OFF "WITH_MODULE_fw_update;WITH_DOWNLOADER" OFF)
cmake_dependent_option(WITH_MODULE_factory_provisioning "Factory provisioning module" ON "WITH_BOOTSTRAP;WITH_CBOR" OFF)
option(WITH_MODULE_advanced_fw_update "Advanced Firmware Update object module" OFF)

################# CODE #########################################################

add_library(anjay
include_public/anjay/access_control.h
include_public/anjay/advanced_fw_update.h
include_public/anjay/anjay.h
include_public/anjay/attr_storage.h
include_public/anjay/core.h
Expand Down Expand Up @@ -473,6 +476,7 @@ add_library(anjay
src/modules/access_control/anjay_access_control_persistence.c
src/modules/access_control/anjay_mod_access_control.c
src/modules/access_control/anjay_mod_access_control.h
src/modules/advanced_fw_update/anjay_advanced_fw_update.c
src/modules/factory_provisioning/anjay_provisioning.c
src/modules/fw_update/anjay_fw_update.c
src/modules/ipso/anjay_ipso_3d_sensor.c
Expand Down Expand Up @@ -522,6 +526,7 @@ set(ANJAY_WITHOUT_IP_STICKINESS "${WITHOUT_IP_STICKINESS}")
set(ANJAY_WITH_MODULE_ACCESS_CONTROL "${WITH_MODULE_access_control}")
set(ANJAY_WITH_MODULE_IPSO_OBJECTS "${WITH_MODULE_ipso_objects}")
set(ANJAY_WITH_MODULE_FW_UPDATE "${WITH_MODULE_fw_update}")
set(ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE "${WITH_MODULE_advanced_fw_update}")
set(ANJAY_WITHOUT_MODULE_FW_UPDATE_PUSH_MODE "${WITHOUT_MODULE_fw_update_PUSH_MODE}")
set(ANJAY_WITH_MODULE_SECURITY "${WITH_MODULE_security}")
set(ANJAY_WITH_MODULE_SERVER "${WITH_MODULE_server}")
Expand All @@ -539,6 +544,7 @@ set(ANJAY_WITH_LWM2M11 "${WITH_LWM2M11}")
set(ANJAY_WITH_SECURITY_STRUCTURED "${WITH_SECURITY_STRUCTURED}")
set(ANJAY_WITH_SEND "${WITH_SEND}")
set(ANJAY_WITH_SENML_JSON "${WITH_SENML_JSON}")
set(ANJAY_WITHOUT_QUEUE_MODE_AUTOCLOSE "${WITHOUT_QUEUE_MODE_AUTOCLOSE}")

configure_file(include_public/anjay/anjay_config.h.in
include_public/anjay/anjay_config.h)
Expand Down Expand Up @@ -603,10 +609,11 @@ if(WITH_TEST)
$<TARGET_PROPERTY:anjay,SOURCES>
tests/core/coap/utils.c
tests/core/coap/utils.h
tests/core/downloader/downloader_mock.h
tests/core/bootstrap_mock.h
tests/core/io/bigdata.h
tests/core/observe/observe_mock.h
tests/core/socket_mock.c
tests/core/socket_mock.h
tests/utils/dm.c
tests/utils/dm.h
tests/utils/mock_clock.c
Expand All @@ -625,6 +632,9 @@ if(WITH_TEST)
if(WITH_SEND)
target_sources(anjay_test PRIVATE tests/core/lwm2m_send.c)
endif()
if(WITH_MODULE_factory_provisioning)
target_sources(anjay_test PRIVATE tests/modules/factory_provisioning/provisioning.c)
endif()
target_include_directories(anjay_test PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}"
$<TARGET_PROPERTY:anjay,INCLUDE_DIRECTORIES>)
Expand Down Expand Up @@ -758,7 +768,7 @@ if(WITH_TEST)

if(WITH_INTEGRATION_TESTS)
set(TEST_RERUNS 3 CACHE STRING "Maximal number of times we try to rerun each testsuite")
set(TEST_SENSITIVE_RERUNS 3 CACHE STRING "Maximal number of times we try to rerun each sensitive testsuite")
option(TEST_KEEP_SUCCESS_LOGS "Store all logs from test cases, even if no error happened" ON)
add_subdirectory(tests/integration)
endif()
else(WITH_TEST)
Expand Down Expand Up @@ -856,6 +866,10 @@ if(WITH_MODULE_fw_update)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/fw_update.h"
DESTINATION include/anjay)
endif()
if(WITH_MODULE_advanced_fw_update)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/advanced_fw_update.h"
DESTINATION include/anjay)
endif()
if(WITH_MODULE_security)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/security.h"
DESTINATION include/anjay)
Expand Down
12 changes: 12 additions & 0 deletions demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ if (${ANJAY_WITH_MODULE_FW_UPDATE})
set(SOURCES ${SOURCES} firmware_update.c)
endif()

if (${ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE})
set(SOURCES ${SOURCES}
advanced_firmware_update.c
advanced_firmware_update_app.c
advanced_firmware_update_addimg.c)

endif()

if(NOT WIN32)
set(SOURCES ${SOURCES} objects/ip_ping.c)
endif()
Expand All @@ -48,6 +56,10 @@ if (${ANJAY_WITH_MODULE_FW_UPDATE})
set(HEADERS ${HEADERS} firmware_update.h)
endif()

if (${ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE})
set(HEADERS ${HEADERS} advanced_firmware_update.h)
endif()

set(ALL_SOURCES ${SOURCES} ${HEADERS})

if(NOT TARGET anjay)
Expand Down
Loading

0 comments on commit a8a14fd

Please sign in to comment.