From 7e2f703e094b4fbca713c7d7e45ddac74a605c3a Mon Sep 17 00:00:00 2001 From: Luiz Santana Date: Tue, 21 Apr 2026 17:50:41 -0300 Subject: [PATCH 1/6] add bzll files to build --- zephyr/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 3520772..5152019 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -451,11 +451,13 @@ set(BACNETSTACK_BASIC_SRCS $<$:${BACNETSTACK_SRC}/bacnet/basic/bbmd6/h_bbmd6.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/bbmd6/vmac.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/bzll/bzllvmac.c> + $<$:${BACNETSTACK_SRC}/bacnet/basic/bzll/h_bzll.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/server/bacnet_basic.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/server/bacnet_device.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/server/bacnet_port.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/server/bacnet_port_ipv4.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/server/bacnet_port_ipv4.c> + $<$:${BACNETSTACK_SRC}/bacnet/basic/server/bacnet_port_bzll.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/object/access_credential.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/object/access_door.c> $<$:${BACNETSTACK_SRC}/bacnet/basic/object/access_point.c> From 80752861b3e83bc27e5812f2dcc414abb6e2472d Mon Sep 17 00:00:00 2001 From: Luiz Santana Date: Mon, 4 May 2026 16:05:41 -0300 Subject: [PATCH 2/6] Fix warnings that appeared when integrated with a zigbee stack and some implicitly declared types changed --- zephyr/include/bacnet_settings/bacnet_storage.h | 1 + zephyr/subsys/bacnet_settings/bacnet_settings.c | 2 +- zephyr/subsys/bacnet_shell/bacnet_shell_property.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zephyr/include/bacnet_settings/bacnet_storage.h b/zephyr/include/bacnet_settings/bacnet_storage.h index 3a85c43..14ef425 100644 --- a/zephyr/include/bacnet_settings/bacnet_storage.h +++ b/zephyr/include/bacnet_settings/bacnet_storage.h @@ -10,6 +10,7 @@ #define BACNET_STORAGE_H #include +#include #include #include #include diff --git a/zephyr/subsys/bacnet_settings/bacnet_settings.c b/zephyr/subsys/bacnet_settings/bacnet_settings.c index b1cea31..82dfa6a 100644 --- a/zephyr/subsys/bacnet_settings/bacnet_settings.c +++ b/zephyr/subsys/bacnet_settings/bacnet_settings.c @@ -323,7 +323,7 @@ bool bacnet_settings_value_parse( return false; } /* convert the string value into a tagged union value */ - if (isalpha(value_string[0])) { + if (isalpha((unsigned char)value_string[0])) { if (property_list_commandable_member(object_type, property_id) && (bacnet_strnicmp(value_string, "NULL", 4) == 0)) { /* check for case insensitive NULL string */ diff --git a/zephyr/subsys/bacnet_shell/bacnet_shell_property.c b/zephyr/subsys/bacnet_shell/bacnet_shell_property.c index 3a568bc..52847e5 100644 --- a/zephyr/subsys/bacnet_shell/bacnet_shell_property.c +++ b/zephyr/subsys/bacnet_shell/bacnet_shell_property.c @@ -117,7 +117,7 @@ int bacnet_shell_property_parse( } err = bacnet_shell_object_type_instance_parse( sh, argc, argv, object_type, object_instance); - if (isalpha(argv[3][0])) { + if (isalpha((unsigned char)argv[3][0])) { /* choose a property by name with optional [] to denote array */ scan_count = sscanf(argv[3], "%79[^[][%u]", name, &array_value); if (scan_count < 1) { From 44d56d7b57e3bb1cfecab018df6e91f297830c16 Mon Sep 17 00:00:00 2001 From: Luiz Santana Date: Fri, 8 May 2026 11:27:56 -0300 Subject: [PATCH 3/6] Add Bzll timing parameters --- zephyr/CMakeLists.txt | 2 ++ zephyr/subsys/Kconfig | 1 + zephyr/subsys/bacnet_datalink/Kconfig | 26 ++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 zephyr/subsys/bacnet_datalink/Kconfig diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 5152019..20840d2 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -589,6 +589,8 @@ zephyr_compile_definitions( BACNET_VENDOR_NAME="${CONFIG_BACNET_VENDOR_NAME}" BACNET_PROTOCOL_REVISION=${CONFIG_BACNET_PROTOCOL_REVISION} BACNET_STACK_DEPRECATED_DISABLE=1 + BZLL_NODE_TIME_TO_LIVE_S=${CONFIG_BZLL_NODE_TIME_TO_LIVE_S} + BZLL_SCAN_NODES_INTERVAL_S=${CONFIG_BZLL_SCAN_NODES_INTERVAL_S} # datalink API $<$:BACDL_NONE> $<$:BACAPP_ALL> diff --git a/zephyr/subsys/Kconfig b/zephyr/subsys/Kconfig index 81841de..09a82ad 100644 --- a/zephyr/subsys/Kconfig +++ b/zephyr/subsys/Kconfig @@ -4,6 +4,7 @@ comment "BACnet Subsystems" +rsource "bacnet_datalink/Kconfig" rsource "bacnet_settings/Kconfig" rsource "bacnet_shell/Kconfig" rsource "object/Kconfig" diff --git a/zephyr/subsys/bacnet_datalink/Kconfig b/zephyr/subsys/bacnet_datalink/Kconfig new file mode 100644 index 0000000..10ea7b5 --- /dev/null +++ b/zephyr/subsys/bacnet_datalink/Kconfig @@ -0,0 +1,26 @@ +# Kconfig - Subsystem configuration options +# +# @author Luiz Santana +# @date May 2026 +# @copyright SPDX-License-Identifier: Apache-2.0 +menuconfig BACNET_DATALINK_SETTINGS + bool "BACNET_DATALINK_SETTINGS" + default y if BACNETSTACK + help + This option enable BACnet Datalink Settings + +if BACNET_DATALINK_SETTINGS + + config BZLL_NODE_TIME_TO_LIVE_S + int "BZLL time to live node in the VMAC table" + default 600 + help + BZLL interval to keep a node in the VMAC table before an update + + config BZLL_SCAN_NODES_INTERVAL_S + int "BZLL interval to scan the zigbee network for BACnet nodes to update the VMAC table" + default 3600 + help + BZLL interval to scan the zigbee network for BACnet nodes to update the VMAC table + +endif # BACNET_DATALINK_SETTINGS \ No newline at end of file From 995911928fc4d9f8041b04adecffe015bc3015e4 Mon Sep 17 00:00:00 2001 From: Luiz Santana Date: Tue, 12 May 2026 15:44:44 -0300 Subject: [PATCH 4/6] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- zephyr/CMakeLists.txt | 4 ++-- zephyr/subsys/bacnet_datalink/Kconfig | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 20840d2..984c4e0 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -589,8 +589,8 @@ zephyr_compile_definitions( BACNET_VENDOR_NAME="${CONFIG_BACNET_VENDOR_NAME}" BACNET_PROTOCOL_REVISION=${CONFIG_BACNET_PROTOCOL_REVISION} BACNET_STACK_DEPRECATED_DISABLE=1 - BZLL_NODE_TIME_TO_LIVE_S=${CONFIG_BZLL_NODE_TIME_TO_LIVE_S} - BZLL_SCAN_NODES_INTERVAL_S=${CONFIG_BZLL_SCAN_NODES_INTERVAL_S} + $<$:BZLL_NODE_TIME_TO_LIVE_S=${CONFIG_BZLL_NODE_TIME_TO_LIVE_S}> + $<$:BZLL_SCAN_NODES_INTERVAL_S=${CONFIG_BZLL_SCAN_NODES_INTERVAL_S}> # datalink API $<$:BACDL_NONE> $<$:BACAPP_ALL> diff --git a/zephyr/subsys/bacnet_datalink/Kconfig b/zephyr/subsys/bacnet_datalink/Kconfig index 10ea7b5..67a723b 100644 --- a/zephyr/subsys/bacnet_datalink/Kconfig +++ b/zephyr/subsys/bacnet_datalink/Kconfig @@ -7,20 +7,20 @@ menuconfig BACNET_DATALINK_SETTINGS bool "BACNET_DATALINK_SETTINGS" default y if BACNETSTACK help - This option enable BACnet Datalink Settings + This option enables BACnet datalink settings. if BACNET_DATALINK_SETTINGS config BZLL_NODE_TIME_TO_LIVE_S - int "BZLL time to live node in the VMAC table" + int "BZLL node time-to-live in the VMAC table" default 600 help - BZLL interval to keep a node in the VMAC table before an update + Time in seconds to keep a node in the VMAC table before it must be updated. config BZLL_SCAN_NODES_INTERVAL_S - int "BZLL interval to scan the zigbee network for BACnet nodes to update the VMAC table" + int "BZLL interval for scanning the Zigbee network for BACnet nodes and updating the VMAC table" default 3600 help - BZLL interval to scan the zigbee network for BACnet nodes to update the VMAC table + Time interval in seconds between scans of the Zigbee network for BACnet nodes to update the VMAC table. endif # BACNET_DATALINK_SETTINGS \ No newline at end of file From 0c756db6359b6ddece2a1b009c7ecac65c930b55 Mon Sep 17 00:00:00 2001 From: Luiz Santana Date: Tue, 12 May 2026 15:45:23 -0300 Subject: [PATCH 5/6] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- zephyr/include/bacnet_settings/bacnet_storage.h | 1 - 1 file changed, 1 deletion(-) diff --git a/zephyr/include/bacnet_settings/bacnet_storage.h b/zephyr/include/bacnet_settings/bacnet_storage.h index 14ef425..3a85c43 100644 --- a/zephyr/include/bacnet_settings/bacnet_storage.h +++ b/zephyr/include/bacnet_settings/bacnet_storage.h @@ -10,7 +10,6 @@ #define BACNET_STORAGE_H #include -#include #include #include #include From e5924cf2a0d424876730d52dfd81edb7baa90349 Mon Sep 17 00:00:00 2001 From: Luiz Santana Date: Tue, 12 May 2026 16:43:34 -0300 Subject: [PATCH 6/6] Fix stdio inclusion --- zephyr/subsys/bacnet_settings/bacnet_storage_shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/zephyr/subsys/bacnet_settings/bacnet_storage_shell.c b/zephyr/subsys/bacnet_settings/bacnet_storage_shell.c index fbdda2b..4b8c593 100644 --- a/zephyr/subsys/bacnet_settings/bacnet_storage_shell.c +++ b/zephyr/subsys/bacnet_settings/bacnet_storage_shell.c @@ -10,6 +10,7 @@ #include #include #include +#include static const char Storage_Base_Name[] = CONFIG_BACNET_STORAGE_BASE_NAME;