Giter VIP home page Giter VIP logo

device-bacnet-c's Introduction

device-bacnet-c

Build Status GitHub Latest Dev Tag) GitHub Latest Stable Tag) GitHub License GitHub Pull Requests GitHub Contributors GitHub Committers GitHub Commit Activity

Warning
The main branch of this repository contains work-in-progress development code for the upcoming release, and is not guaranteed to be stable or working. It is only compatible with the main branch of edgex-compose which uses the Docker images built from the main branch of this repo and other repos.

The source for the latest release can be found at Releases.

Device service for BACnet protocol written in C. This service may be built to support BACnet devices connected via ethernet (/IP) or serial (/MSTP).

Build Instructions

Requirements

This device service requires the EdgeX Device SDK for C (device-sdk-c), version 3.0

BACnet stack

The device service is built using Steve Karg's BACnet stack version 0.8.6. Some patches have been applied to enable the stack to be built using the musl C standard library, to allow for building the device service in Alpine Linux. The patched version of the stack is retrieved during the build process.

Building the BACnet Device Service

Before building the BACnet device service, please ensure that you have the EdgeX C-SDK installed and make sure that the current directory is the BACnet device service directory (device-bacnet-c). To build the BACnet device service, enter the command below into the command line to run the build script.

./scripts/build.sh

This will build two device services: device-bacnet-ip and device-bacnet-mstp. To only build one of them, run the build script with the parameter "ip" or "mstp" depending on which device service you want to build. The command below shows an example of this.

./script/build.sh mstp

In the event that your C-SDK is not installed in the system default paths, you may specify its location using the environment variable CSDK_DIR

After having built the device service, the executable can be found in ./build/release/device-bacnet-{ip, mstp}/device-bacnet-c

Running the Service

With no options specified the service runs with a name of "device-bacnet", the default configuration profile, no registry and a configuration directory of res/ip (for Ethernet) or res/mstp (for Serial). These settings may be changed on the command line as follows:

   -i,  --instance <name>      : Append the given instance to the service name
   -r,  --registry             : Use the registry service
   -p,  --profile <name>       : Set the profile name
   -cd, --configDir <dir>      : Set the configuration directory

BBMD Setup

To run the BACnet/IP device service using a BBMD device, set BBMD_ADDRESS and BBMD_PORT to the values corresponding to the BBMD device under the [Driver] section of the TOML configuration.

Supported BACnet Services

The device service uses the Who-Is BACnet service when doing a discovery call, the Read-Property service when doing a GET request, and the Write-Property service when doing a PUT request.

Limitations

The service can access Boolean, String, Int (Signed and Unsigned) and Float (Real and Double) types. Other BACnet types such as Enum, OctetString, Date and Time are not supported.

Example Device Profiles

Example profiles for BACnet devices are included in the sample-profiles directory. The profiles included are for the KMC BAC-4021C, KMC BAC-5051E, KMC BAC-5901CE, KMC BAC-9001 and for the Simple Server Application from the BACnet stack.

Example Configurations

An example TOML configuration for the device service is present in the res/ drectory. The configuration contains a commented out section with an example on how to set up the device service to point to a BBMD device.

The default port for the service is 59980. The alternative port 59981 has been reserved, for deployments where it is required to run instances of both ip and mstp services.

Documentation

Further documentation can be found in the docs/ directory. This describes device addressing, deviceResource specification, operation with the simulator, device service configuration, and containerisation of the device service.

device-bacnet-c's People

Contributors

cloudxxx8 avatar edward-scott avatar ernestojeda avatar felixting avatar gofling avatar iain-anderson avatar jamesrgregg avatar jpwhitemn avatar lenny-goodell avatar soda480 avatar steveoss avatar tomflem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

device-bacnet-c's Issues

Compilation error, compilation is not reproducible.

🐞 Bug Report

Unable to compile the corresponding executable file. Compilation error.

[root@singlexxx device-bacnet-c-3.1.0]# ./scripts/build.sh 
++++ readlink -f ./scripts/build.sh
+++ dirname /device-bacnet-c-3.1.0/scripts/build.sh
++ dirname /device-bacnet-c-3.1.0/scripts
+ ROOT=/device-bacnet-c-3.1.0
+ echo /device-bacnet-c-3.1.0
/device-bacnet-c-3.1.0
+ cd /device-bacnet-c-3.1.0
+ '[' '!' -f /device-bacnet-c-3.1.0/lib/ip/libbacnet.a ']'
+ '[' '!' -f /device-bacnet-c-3.1.0/lib/mstp/libbacnet.a ']'
+ mkdir -p /device-bacnet-c-3.1.0/build/release/device-bacnet-ip
+ cd /device-bacnet-c-3.1.0/build/release/device-bacnet-ip
+ cmake -DDATALINK:STRING=BACDL_BIP=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release /device-bacnet-c-3.1.0/src/c
-- Found IOT: /opt/iotech/iot/1.5/lib/libiot.so  
-- /opt/iotech/iot/1.5/include
-- Configuring done
-- Generating done
-- Build files have been written to: /device-bacnet-c-3.1.0/build/release/device-bacnet-ip
+ make
+ tee release.log
[ 11%] Building C object CMakeFiles/bacnet_objects.dir/device-bacnet-c-3.1.0/bacnet-stack/demo/object/device-client.c.o
[ 22%] Linking C static library libbacnet_objects.a
[ 22%] Built target bacnet_objects
[ 33%] Building C object CMakeFiles/device-bacnet-c.dir/main.c.o
/device-bacnet-c-3.1.0/src/c/main.c: In function ‘bacnet_discover’:
/device-bacnet-c-3.1.0/src/c/main.c:392:59: warning: passing argument 4 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                           ^~~~~~
      |                                                           |
      |                                                           devsdk_strings *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:43:15: note: expected ‘const char *’ but argument is of type ‘devsdk_strings *’
   43 |   const char *description,
      |   ~~~~~~~~~~~~^~~~~~~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:67: warning: passing argument 5 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                   ^~~~~~~
      |                                                                   |
      |                                                                   char *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:44:25: note: expected ‘const devsdk_strings *’ but argument is of type ‘char *’
   44 |   const devsdk_strings *labels,
      |   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:76: warning: passing argument 6 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                            ^~~~~~~~~
      |                                                                            |
      |                                                                            devsdk_protocols *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:45:15: note: expected ‘const char *’ but argument is of type ‘devsdk_protocols *’
   45 |   const char *profile_name,
      |   ~~~~~~~~~~~~^~~~~~~~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:100: warning: passing argument 9 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                                                    ^~~~~~
      |                                                                                                    |
      |                                                                                                    devsdk_error *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:48:28: note: expected ‘edgex_device_autoevents *’ but argument is of type ‘devsdk_error *’
   48 |   edgex_device_autoevents *autos,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:5: error: too few arguments to function ‘edgex_add_device’
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |     ^~~~~~~~~~~~~~~~
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:38:6: note: declared here
   38 | void edgex_add_device
      |      ^~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/device-bacnet-c.dir/build.make:76: CMakeFiles/device-bacnet-c.dir/main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/device-bacnet-c.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
+ mkdir -p /device-bacnet-c-3.1.0/build/release/device-bacnet-mstp
+ cd /device-bacnet-c-3.1.0/build/release/device-bacnet-mstp
+ cmake -DDATALINK:STRING=BACDL_MSTP=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release /device-bacnet-c-3.1.0/src/c
-- The C compiler identification is GNU 11.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found IOT: /opt/iotech/iot/1.5/lib/libiot.so  
-- /opt/iotech/iot/1.5/include
-- Configuring done
-- Generating done
-- Build files have been written to: /device-bacnet-c-3.1.0/build/release/device-bacnet-mstp
+ make
+ tee release.log
[ 11%] Building C object CMakeFiles/bacnet_objects.dir/device-bacnet-c-3.1.0/bacnet-stack/demo/object/device-client.c.o
[ 22%] Linking C static library libbacnet_objects.a
[ 22%] Built target bacnet_objects
[ 33%] Building C object CMakeFiles/device-bacnet-c.dir/main.c.o
/device-bacnet-c-3.1.0/src/c/main.c: In function ‘bacnet_discover’:
/device-bacnet-c-3.1.0/src/c/main.c:392:59: warning: passing argument 4 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                           ^~~~~~
      |                                                           |
      |                                                           devsdk_strings *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:43:15: note: expected ‘const char *’ but argument is of type ‘devsdk_strings *’
   43 |   const char *description,
      |   ~~~~~~~~~~~~^~~~~~~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:67: warning: passing argument 5 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                   ^~~~~~~
      |                                                                   |
      |                                                                   char *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:44:25: note: expected ‘const devsdk_strings *’ but argument is of type ‘char *’
   44 |   const devsdk_strings *labels,
      |   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:76: warning: passing argument 6 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                            ^~~~~~~~~
      |                                                                            |
      |                                                                            devsdk_protocols *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:45:15: note: expected ‘const char *’ but argument is of type ‘devsdk_protocols *’
   45 |   const char *profile_name,
      |   ~~~~~~~~~~~~^~~~~~~~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:100: warning: passing argument 9 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                                                    ^~~~~~
      |                                                                                                    |
      |                                                                                                    devsdk_error *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:48:28: note: expected ‘edgex_device_autoevents *’ but argument is of type ‘devsdk_error *’
   48 |   edgex_device_autoevents *autos,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:5: error: too few arguments to function ‘edgex_add_device’
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |     ^~~~~~~~~~~~~~~~
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:38:6: note: declared here
   38 | void edgex_add_device
      |      ^~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/device-bacnet-c.dir/build.make:76: CMakeFiles/device-bacnet-c.dir/main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/device-bacnet-c.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
[root@singlexxx device-bacnet-c-3.1.0]# pwd
/device-bacnet-c-3.1.0
[root@singlexxx device-bacnet-c-3.1.0]# ls
Attribution.txt  GOVERNANCE.md  LICENSE   OWNERS.md  VERSION       build  lib  sample-profiles  src
CHANGELOG.md     Jenkinsfile    Makefile  README.md  bacnet-stack  docs   res  scripts
[root@singlexxx device-bacnet-c-3.1.0]# make
scripts/build.sh
++++ readlink -f scripts/build.sh
+++ dirname /device-bacnet-c-3.1.0/scripts/build.sh
++ dirname /device-bacnet-c-3.1.0/scripts
+ ROOT=/device-bacnet-c-3.1.0
+ echo /device-bacnet-c-3.1.0
/device-bacnet-c-3.1.0
+ cd /device-bacnet-c-3.1.0
+ '[' '!' -f /device-bacnet-c-3.1.0/lib/ip/libbacnet.a ']'
+ '[' '!' -f /device-bacnet-c-3.1.0/lib/mstp/libbacnet.a ']'
+ mkdir -p /device-bacnet-c-3.1.0/build/release/device-bacnet-ip
+ cd /device-bacnet-c-3.1.0/build/release/device-bacnet-ip
+ cmake -DDATALINK:STRING=BACDL_BIP=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release /device-bacnet-c-3.1.0/src/c
-- /opt/iotech/iot/1.5/include
-- Configuring done
-- Generating done
-- Build files have been written to: /device-bacnet-c-3.1.0/build/release/device-bacnet-ip
+ make
+ tee release.log
make[1]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
make[2]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
make[3]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
Consolidate compiler generated dependencies of target bacnet_objects
make[3]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
[ 22%] Built target bacnet_objects
make[3]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
Consolidate compiler generated dependencies of target device-bacnet-c
make[3]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
make[3]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
[ 33%] Building C object CMakeFiles/device-bacnet-c.dir/main.c.o
/device-bacnet-c-3.1.0/src/c/main.c: In function ‘bacnet_discover’:
/device-bacnet-c-3.1.0/src/c/main.c:392:59: warning: passing argument 4 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                           ^~~~~~
      |                                                           |
      |                                                           devsdk_strings *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:43:15: note: expected ‘const char *’ but argument is of type ‘devsdk_strings *’
   43 |   const char *description,
      |   ~~~~~~~~~~~~^~~~~~~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:67: warning: passing argument 5 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                   ^~~~~~~
      |                                                                   |
      |                                                                   char *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:44:25: note: expected ‘const devsdk_strings *’ but argument is of type ‘char *’
   44 |   const devsdk_strings *labels,
      |   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:76: warning: passing argument 6 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                            ^~~~~~~~~
      |                                                                            |
      |                                                                            devsdk_protocols *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:45:15: note: expected ‘const char *’ but argument is of type ‘devsdk_protocols *’
   45 |   const char *profile_name,
      |   ~~~~~~~~~~~~^~~~~~~~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:100: warning: passing argument 9 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                                                    ^~~~~~
      |                                                                                                    |
      |                                                                                                    devsdk_error *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:48:28: note: expected ‘edgex_device_autoevents *’ but argument is of type ‘devsdk_error *’
   48 |   edgex_device_autoevents *autos,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:5: error: too few arguments to function ‘edgex_add_device’
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |     ^~~~~~~~~~~~~~~~
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:38:6: note: declared here
   38 | void edgex_add_device
      |      ^~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/device-bacnet-c.dir/build.make:76: CMakeFiles/device-bacnet-c.dir/main.c.o] Error 1
make[3]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
make[2]: *** [CMakeFiles/Makefile2:85: CMakeFiles/device-bacnet-c.dir/all] Error 2
make[2]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
make[1]: *** [Makefile:91: all] Error 2
make[1]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-ip'
+ mkdir -p /device-bacnet-c-3.1.0/build/release/device-bacnet-mstp
+ cd /device-bacnet-c-3.1.0/build/release/device-bacnet-mstp
+ cmake -DDATALINK:STRING=BACDL_MSTP=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release /device-bacnet-c-3.1.0/src/c
-- /opt/iotech/iot/1.5/include
-- Configuring done
-- Generating done
-- Build files have been written to: /device-bacnet-c-3.1.0/build/release/device-bacnet-mstp
+ make
+ tee release.log
make[1]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
make[2]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
make[3]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
Consolidate compiler generated dependencies of target bacnet_objects
make[3]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
[ 22%] Built target bacnet_objects
make[3]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
Consolidate compiler generated dependencies of target device-bacnet-c
make[3]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
make[3]: Entering directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
[ 33%] Building C object CMakeFiles/device-bacnet-c.dir/main.c.o
/device-bacnet-c-3.1.0/src/c/main.c: In function ‘bacnet_discover’:
/device-bacnet-c-3.1.0/src/c/main.c:392:59: warning: passing argument 4 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                           ^~~~~~
      |                                                           |
      |                                                           devsdk_strings *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:43:15: note: expected ‘const char *’ but argument is of type ‘devsdk_strings *’
   43 |   const char *description,
      |   ~~~~~~~~~~~~^~~~~~~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:67: warning: passing argument 5 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                   ^~~~~~~
      |                                                                   |
      |                                                                   char *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:44:25: note: expected ‘const devsdk_strings *’ but argument is of type ‘char *’
   44 |   const devsdk_strings *labels,
      |   ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:76: warning: passing argument 6 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                            ^~~~~~~~~
      |                                                                            |
      |                                                                            devsdk_protocols *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:45:15: note: expected ‘const char *’ but argument is of type ‘devsdk_protocols *’
   45 |   const char *profile_name,
      |   ~~~~~~~~~~~~^~~~~~~~~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:100: warning: passing argument 9 of ‘edgex_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |                                                                                                    ^~~~~~
      |                                                                                                    |
      |                                                                                                    devsdk_error *
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:48:28: note: expected ‘edgex_device_autoevents *’ but argument is of type ‘devsdk_error *’
   48 |   edgex_device_autoevents *autos,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/device-bacnet-c-3.1.0/src/c/main.c:392:5: error: too few arguments to function ‘edgex_add_device’
  392 |     edgex_add_device (driver->service, name, description, labels, profile, protocols, false, NULL, &error);
      |     ^~~~~~~~~~~~~~~~
In file included from /device-bacnet-c-3.1.0/src/c/main.c:12:
/usr/include/edgex/devices.h:38:6: note: declared here
   38 | void edgex_add_device
      |      ^~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/device-bacnet-c.dir/build.make:76: CMakeFiles/device-bacnet-c.dir/main.c.o] Error 1
make[3]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
make[2]: *** [CMakeFiles/Makefile2:85: CMakeFiles/device-bacnet-c.dir/all] Error 2
make[2]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'
make[1]: *** [Makefile:91: all] Error 2
make[1]: Leaving directory '/device-bacnet-c-3.1.0/build/release/device-bacnet-mstp'

Affected Services [REQUIRED]

The issue is located in:

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

Description and Minimal Reproduction [REQUIRED]

🔥 Exception or Error





🌍 Your Environment

Deployment Environment:
ubuntu or centos meet the same error:
ubuntu:

root@singlexxx:/home/syx/go/src/device-bacnet-c-3.0.0# uname -a
Linux singlexxx 5.4.0-177-generic #197-Ubuntu SMP Thu Mar 28 22:45:47 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@singlexxx:/home/syx/go/src/device-bacnet-c-3.0.0# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

centos:

[root@localhost ~]# cat /etc/os-release 
NAME="CentOS Stream"
VERSION="9"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="9"
PLATFORM_ID="platform:el9"
PRETTY_NAME="CentOS Stream 9"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:centos:centos:9"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
[root@localhost ~]# uname -a
Linux localhost.localdomain 5.14.0-171.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Oct 1 12:56:27 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

EdgeX Version [REQUIRED]:

Anything else relevant?

Required documentation

Add a docs directory and add documentation covering:

  • Device addressing (Protocol Properties)
  • DeviceResource specifications (Attributes)
  • Service Configuration ([Driver] options)
  • Operation with simulator (bacserv executable)

Move build ARG to runtime

Re: device-bacnet-c build automation
The current way this build works doesn’t fit well with the standard build process we’re establishing with Jenkins Pipelines. As it stands the current build process would create separate images for the two different datalink types. We then would seemingly need both architecture types. This equates to 4 Docker images vs the standard 2 images.

Can the build argument be a runtime argument instead?

device-bacnet-c does not build when setting CSDK_VER=2.3.1-dev.8

🐞 Bug Report

Affected Services [REQUIRED]

device-bacnet-c

Is this a regression?

Unknown

Description and Minimal Reproduction [REQUIRED]

When changing CSDK_VER to 2.3.1-dev.8, "make docker" no longer works

🔥 Exception or Error


$ git diff
diff --git a/scripts/build_deps.sh b/scripts/build_deps.sh
index b57a4d2..6d0cbeb 100755
--- a/scripts/build_deps.sh
+++ b/scripts/build_deps.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e -x
 
-CSDK_VER=2.3.0
+CSDK_VER=2.3.1-dev.8
 
 # Dependencies
 if [ ! -d deps ]



$ make docker
docker build \
        -f scripts/Dockerfile.alpine \
        --label "git_sha=3ba4b59b159319c1ab93ebe76d9d54adfa72a26f" \
        -t edgexfoundry/device-bacnet:3ba4b59b159319c1ab93ebe76d9d54adfa72a26f \
        -t edgexfoundry/device-bacnet:2.3.1-dev \
            .
[+] Building 1.7s (13/22)                                                                                                                                                                                                
 => [internal] load .dockerignore                                                                                                                                                                                   0.0s
 => => transferring context: 2B                                                                                                                                                                                     0.0s
 => [internal] load build definition from Dockerfile.alpine                                                                                                                                                         0.0s
 => => transferring dockerfile: 2.23kB                                                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/alpine:3.16                                                                                                                                                      0.0s
 => [internal] load build context                                                                                                                                                                                   0.0s
 => => transferring context: 1.37kB                                                                                                                                                                                 0.0s
 => [stage-1  1/11] FROM docker.io/library/alpine:3.16                                                                                                                                                              0.0s
 => CACHED [stage-1  2/11] RUN wget https://iotech.jfrog.io/artifactory/api/security/keypair/public/repositories/alpine-release -O /etc/apk/keys/alpine.dev.rsa.pub                                                 0.0s
 => CACHED [stage-1  3/11] RUN echo 'https://iotech.jfrog.io/artifactory/alpine-release/v3.16/main' >> /etc/apk/repositories                                                                                        0.0s
 => CACHED [builder  4/10] RUN apk add --update --no-cache build-base git gcc cmake make linux-headers yaml-dev libmicrohttpd-dev curl-dev util-linux-dev ncurses-dev paho-mqtt-c-dev-1.3 hiredis-dev libcbor-dev   0.0s
 => CACHED [builder  5/10] COPY scripts /device-bacnet-c/scripts                                                                                                                                                    0.0s
 => CACHED [builder  6/10] COPY src /device-bacnet-c/src/                                                                                                                                                           0.0s
 => CACHED [builder  7/10] COPY VERSION /device-bacnet-c/                                                                                                                                                           0.0s
 => CACHED [builder  8/10] WORKDIR /device-bacnet-c                                                                                                                                                                 0.0s
 => ERROR [builder  9/10] RUN /device-bacnet-c/scripts/build_deps.sh                                                                                                                                                1.6s
------                                                                                                                                                                                                                   
 > [builder  9/10] RUN /device-bacnet-c/scripts/build_deps.sh:                                                                                                                                                           
#0 0.299 + CSDK_VER=2.3.1-dev.8                                                                                                                                                                                          
#0 0.299 + '[' '!' -d deps ]                                                                                                                                                                                             
#0 0.299 + mkdir deps                                                                                                                                                                                                    
#0 0.300 + cd /device-bacnet-c/deps                                                                                                                                                                                      
#0 0.300 + wget https://github.com/edgexfoundry/device-sdk-c/archive/v2.3.1-dev.8.zip
#0 0.315 Connecting to github.com (192.30.255.112:443)
#0 0.584 Connecting to codeload.github.com (192.30.255.121:443)
#0 0.820 saving to 'v2.3.1-dev.8.zip'
#0 0.907 v2.3.1-dev.8.zip     100% |********************************|  242k  0:00:00 ETA
#0 0.907 'v2.3.1-dev.8.zip' saved
#0 0.907 + unzip v2.3.1-dev.8.zip
#0 0.908 Archive:  v2.3.1-dev.8.zip
#0 0.911    creating: device-sdk-c-2.3.1-dev.8/
#0 0.911    creating: device-sdk-c-2.3.1-dev.8/.github/
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/.github/Contributing.md
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/.github/PULL_REQUEST_TEMPLATE.md
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/.github/semantic.yml
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/.gitignore
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/Attribution.txt
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/CHANGES
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/Doxyfile
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/GOVERNANCE.md
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/Jenkinsfile
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/LICENSE
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/Makefile
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/OWNERS.md
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/README.IOT.md
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/README.md
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/README.v3.md
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/VERSION
#0 0.911    creating: device-sdk-c-2.3.1-dev.8/docs/
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/docs/configuration.md
#0 0.911   inflating: device-sdk-c-2.3.1-dev.8/docs/deviceprofiles.md
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/docs/metrics.md
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/docs/servicewritersguide.md
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/docs/startup.md
#0 0.913    creating: device-sdk-c-2.3.1-dev.8/include/
#0 0.913    creating: device-sdk-c-2.3.1-dev.8/include/devsdk/
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/include/devsdk/devsdk-base.h
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/include/devsdk/devsdk.h
#0 0.913    creating: device-sdk-c-2.3.1-dev.8/include/edgex/
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/include/edgex/devices.h
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/include/edgex/edgex-base.h
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/include/edgex/edgex.h
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/include/edgex/profiles.h
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/include/edgex/rest-server.h
#0 0.913    creating: device-sdk-c-2.3.1-dev.8/scripts/
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/scripts/Dockerfile.alpine
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/scripts/Dockerfile.alpine-base
#0 0.913   inflating: device-sdk-c-2.3.1-dev.8/scripts/build.sh
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/scripts/entrypoint.sh
#0 0.916    creating: device-sdk-c-2.3.1-dev.8/src/
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/CMakeLists.txt
#0 0.916    creating: device-sdk-c-2.3.1-dev.8/src/c/
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/CMakeLists.txt
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/api.h
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/autoevent.c
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/autoevent.h
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/bus-impl.h
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/bus-mqtt.c
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/bus-redstr.c
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/bus.c
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/bus.h
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/callback2.c
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/callback2.h
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/cmdinfo.h
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/config.c
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/config.h
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/consul.c
#0 0.916   inflating: device-sdk-c-2.3.1-dev.8/src/c/consul.h
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/correlation.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/correlation.h
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/data.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/data.h
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/defs.h.in
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/device.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/device.h
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/devman.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/devmap.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/devmap.h
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/devsdk-base.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/devutil.h
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/discovery.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/discovery.h
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/edgex-logging.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/edgex-logging.h
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/edgex-rest.c
#0 0.918   inflating: device-sdk-c-2.3.1-dev.8/src/c/edgex-rest.h
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/edgex2.h
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/errorlist.h
#0 0.920    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/CMakeLists.txt
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/README.md
#0 0.920    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/CMakeLists.txt
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/README.md
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/device-bitfields.c
#0 0.920    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/res/
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/res/configuration.toml
#0 0.920    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/res/devices/
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/res/devices/Bitfields.json
#0 0.920    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/res/profiles/
#0 0.920   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/bitfields/res/profiles/Example-Bitfields.json
#0 0.921    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/
#0 0.921   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/CMakeLists.txt
#0 0.921   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/README.md
#0 0.921   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/device-counter.c
#0 0.921    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/res/
#0 0.921   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/res/configuration.toml
#0 0.921    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/res/devices/
#0 0.921   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/res/devices/Counters.json
#0 0.921    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/res/profiles/
#0 0.921   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/counters/res/profiles/Counter.json
#0 0.921    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/
#0 0.921   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/CMakeLists.txt
#0 0.921   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/README.md
#0 0.921    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/res/
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/res/configuration.toml
#0 0.923    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/res/devices/
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/res/devices/readme.txt
#0 0.923    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/res/profiles/
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/res/profiles/TemplateProfile.json
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/template.c
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/watcher1.json
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/discovery/watcher2.json
#0 0.923    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/CMakeLists.txt
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/README.md
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/device-file.c
#0 0.923    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/res/
#0 0.923   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/res/configuration.toml
#0 0.924    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/res/devices/
#0 0.924   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/res/devices/file1.json
#0 0.924   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/res/lorem.txt
#0 0.924    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/res/profiles/
#0 0.924   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/file/res/profiles/FileExampleProfile.json
#0 0.924    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/
#0 0.924   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/CMakeLists.txt
#0 0.924   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/README.md
#0 0.924   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/device-gyro.c
#0 0.924    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/res/
#0 0.924   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/res/configuration.toml
#0 0.924    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/res/devices/
#0 0.924   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/res/devices/gyro.json
#0 0.924    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/res/profiles/
#0 0.925   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/gyro/res/profiles/Gyro.json
#0 0.925    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/
#0 0.925   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/CMakeLists.txt
#0 0.925   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/README.md
#0 0.925   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/device-random.c
#0 0.925    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/res/
#0 0.925   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/res/configuration.toml
#0 0.925    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/res/devices/
#0 0.925   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/res/devices/randomdevice1.json
#0 0.925    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/res/profiles/
#0 0.925   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/random/res/profiles/RandomExampleProfile.json
#0 0.925    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/res/
#0 0.925   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/res/configuration.toml
#0 0.925    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/res/devices/
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/res/devices/device1.json
#0 0.927    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/res/profiles/
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/res/profiles/TemplateProfile.json
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/template.c
#0 0.927    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/CMakeLists.txt
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/README.md
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/device-terminal.c
#0 0.927    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/res/
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/res/configuration.toml
#0 0.927    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/res/devices/
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/res/devices/terminal.json
#0 0.927    creating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/res/profiles/
#0 0.927   inflating: device-sdk-c-2.3.1-dev.8/src/c/examples/terminal/res/profiles/Terminal.json
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/filesys.c
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/filesys.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/map.c
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/map.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/metadata.c
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/metadata.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/metrics.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/parson.c
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/parson.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/profiles.c
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/profiles.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/registry-impl.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/registry.c
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/registry.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/reqdata.c
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/reqdata.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/request_auth.c
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/request_auth.h
#0 0.930   inflating: device-sdk-c-2.3.1-dev.8/src/c/rest-server.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/rest-server.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/rest.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/rest.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/secrets-impl.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/secrets-insecure.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/secrets-insecure.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/secrets-vault.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/secrets-vault.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/secrets.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/secrets.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/service.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/service.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/transform.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/transform.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/validate.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/validate.h
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/watchers.c
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/c/watchers.h
#0 0.933    creating: device-sdk-c-2.3.1-dev.8/src/cmake/
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/cmake/FindIOT.cmake
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/cmake/FindLIBCBOR.cmake
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/cmake/FindLIBHIREDIS.cmake
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/cmake/FindLIBMICROHTTP.cmake
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/cmake/FindLIBPAHO.cmake
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/cmake/FindLIBUUID.cmake
#0 0.933   inflating: device-sdk-c-2.3.1-dev.8/src/cmake/FindLIBYAML.cmake
#0 0.933 + cd device-sdk-c-2.3.1-dev.8
#0 0.933 + ./scripts/build.sh
#0 0.934 + CPPCHECK=false
#0 0.934 + DOCGEN=false
#0 0.934 + CMAKEOPTS='-DCMAKE_EXPORT_COMPILE_COMMANDS=ON'
#0 0.934 + TOMLVER=SDK-0.2
#0 0.934 + CUTILVER=1.4
#0 0.934 + '[' 0 -gt 0 ]
#0 0.934 + readlink -f ./scripts/build.sh
#0 0.935 + dirname /device-bacnet-c/deps/device-sdk-c-2.3.1-dev.8/scripts/build.sh
#0 0.935 + dirname /device-bacnet-c/deps/device-sdk-c-2.3.1-dev.8/scripts
#0 0.935 + ROOT=/device-bacnet-c/deps/device-sdk-c-2.3.1-dev.8
#0 0.935 + cd /device-bacnet-c/deps/device-sdk-c-2.3.1-dev.8
#0 0.935 + '[' '!' -d deps ]
#0 0.935 + mkdir deps
#0 0.936 + wget -O - https://github.com/IOTechSystems/tomlc99/archive/SDK-0.2.tar.gz
#0 0.936 + tar -C deps -z -x -f -
#0 0.937 Connecting to github.com (192.30.255.112:443)
#0 1.151 Connecting to codeload.github.com (192.30.255.121:443)
#0 1.356 writing to stdout
#0 1.373 -                    100% |********************************| 16451  0:00:00 ETA
#0 1.373 written to stdout
#0 1.376 + cp deps/tomlc99-SDK-0.2/toml.c deps/tomlc99-SDK-0.2/toml.h src/c
#0 1.377 + mkdir -p /device-bacnet-c/deps/device-sdk-c-2.3.1-dev.8/build/release
#0 1.377 + cd /device-bacnet-c/deps/device-sdk-c-2.3.1-dev.8/build/release
#0 1.377 + cmake '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON' '-DCMAKE_BUILD_TYPE=Release' /device-bacnet-c/deps/device-sdk-c-2.3.1-dev.8/src
#0 1.442 -- The C compiler identification is GNU 11.2.1
#0 1.452 -- Detecting C compiler ABI info
#0 1.498 -- Detecting C compiler ABI info - done
#0 1.513 -- Check for working C compiler: /usr/bin/cc - skipped
#0 1.513 -- Detecting C compile features
#0 1.514 -- Detecting C compile features - done
#0 1.519 -- Found LIBMICROHTTP: /usr/lib/libmicrohttpd.so  
#0 1.554 -- Found CURL: /usr/lib/libcurl.so (found version "8.0.1")  
#0 1.566 -- Found LIBYAML: /usr/lib/libyaml.so  
#0 1.566 -- Found LIBUUID: /usr/lib/libuuid.so  
#0 1.566 -- Found LIBCBOR: /usr/lib/libcbor.so  
#0 1.566 -- Found LIBPAHO: /usr/lib/libpaho-mqtt3as.so  
#0 1.569 -- Found LIBHIREDIS: /usr/lib/libhiredis.so  
#0 1.572 CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
#0 1.572   Could NOT find IOT (missing: IOT_LIBRARY IOT_INCLUDE_DIR)
#0 1.572 Call Stack (most recent call first):
#0 1.572   /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
#0 1.572   cmake/FindIOT.cmake:4 (find_package_handle_standard_args)
#0 1.572   CMakeLists.txt:50 (find_package)
#0 1.572 
#0 1.572 
#0 1.573 -- Configuring incomplete, errors occurred!
#0 1.573 See also "/device-bacnet-c/deps/device-sdk-c-2.3.1-dev.8/build/release/CMakeFiles/CMakeOutput.log".
------
Dockerfile.alpine:29
--------------------
  27 |     WORKDIR /device-bacnet-c
  28 |     
  29 | >>> RUN /device-bacnet-c/scripts/build_deps.sh
  30 |     
  31 |     RUN /device-bacnet-c/scripts/build.sh 
--------------------
ERROR: failed to solve: process "/bin/sh -c /device-bacnet-c/scripts/build_deps.sh" did not complete successfully: exit code: 1
make: *** [Makefile:34: docker_device_bacnet_c] Error 1
```

🌍 Your Environment

Deployment Environment:

EdgeX Version [REQUIRED]:

Anything else relevant?

Documentation clarifications

The toplevel README.md should refer the reader to the additional information available:

  • The provided device profiles
  • The example configurations
  • The further documentation files in the docs directory

It should also note the use of Steve Karg's BACnet stack, the base version (0.8.6) and any patches that have been applied to it (I think none?).

A new section on containers should be added, consisting of

  • How to build in a container
  • How to map the serial device through when running mstp in docker
  • Implications for ip when running in docker (use of BBMD)

Write/read one or more properties to one or more objects in a process in a BACnet device

🚀 Feature Request

Relevant Package [REQUIRED]

Bacnet-stack which is the base of device-bacnet-c has supported write/read one or more properties to one or more objects in a process in a BACnet device, which is invoked by writepropm/readpropm.

Description [REQUIRED]

But device-bacnet-c doesn't support that, the multiple write/read request is realized by a loop, in which single write/read is realized, which leads to a slower process.

Describe the solution you'd like

n/a

Describe alternatives you've considered

n/a

BBMD usage

Consider using [Driver] configuration entries for BBMD_ADDRESS and BBMD_PORT

How to use BACnet device service under 2.1 EdgeX version?

Hi,
I am using 2.1 Jakarta version of EdgeX core services in my project, while i found the BACnet device service is based on relative old verison of C SDK, when i add device profile as provided in this repository , i got error messages like "can not parse yaml file...".

So my question is how to use BACnet device service under 2.1 EdgeX version? some workable simple demos are highly appreciated!

Many thanks!

security vulnerability - need to upgrade gnutls and musl libs

Snyk reported new security vulnerability on our BACnet C device service. Contents below. Link to the report for those with access: https://app.snyk.io/org/edgex-jenkins/project/9abc9edc-057a-4d18-8a3b-c10f0d21abeb?utm_source=slack&fromGitHubAuth=true

===
Use of a Broken or Risky Cryptographic Algorithm

Vulnerable module: gnutls
Introduced through: [email protected] and [email protected]
Exploit maturity: No known exploit
**Fixed in: 3.6.7-r1**
Dockerfile instruction: RUN apk add --update --no-cache linux-headers yaml libmicrohttpd curl libuuid

Detailed paths

Introduced through: edgexfoundry/docker-device-bacnet-c:[email protected][email protected]
Introduced through: edgexfoundry/docker-device-bacnet-c:[email protected][email protected][email protected]

Overview

Affected versions of this package are vulnerable to Use of a Broken or Risky Cryptographic Algorithm. GnuTLS 3.6.x before 3.6.13 uses incorrect cryptography for DTLS. The earliest affected version is 3.6.3 (2018-07-16) because of an error in a 2017-10-06 commit. The DTLS client always uses 32 '\0' bytes instead of a random value, and thus contributes no randomness to a DTLS negotiation. This breaks the security guarantees of the DTLS protocol.

===
Use of a Broken or Risky Cryptographic Algorithm

Vulnerable module: gnutls
Introduced through: [email protected] and [email protected]
Exploit maturity: No known exploit
**Fixed in: 3.6.14-r0**
Dockerfile instruction: RUN apk add --update --no-cache linux-headers yaml libmicrohttpd curl libuuid

Detailed paths

Introduced through: edgexfoundry/docker-device-bacnet-c:[email protected][email protected]
Introduced through: edgexfoundry/docker-device-bacnet-c:[email protected][email protected][email protected]

Overview

Affected versions of this package are vulnerable to Use of a Broken or Risky Cryptographic Algorithm. GnuTLS 3.6.x before 3.6.14 uses incorrect cryptography for encrypting a session ticket (a loss of confidentiality in TLS 1.2, and an authentication bypass in TLS 1.3). The earliest affected version is 3.6.4 (2018-09-24) because of an error in a 2018-09-18 commit. Until the first key rotation, the TLS server always uses wrong data in place of an encryption key derived from an application.

===

Out-of-bounds Write

Vulnerable module: musl
Introduced through: [email protected], [email protected] and others
Exploit maturity: No known exploit
**Fixed in: 1.1.20-r5**
Dockerfile instruction: RUN apk add --update --no-cache linux-headers yaml libmicrohttpd curl libuuid

Detailed paths

Introduced through: edgexfoundry/docker-device-bacnet-c:[email protected][email protected]
Introduced through: edgexfoundry/docker-device-bacnet-c:[email protected][email protected][email protected]
Introduced through: edgexfoundry/docker-device-bacnet-c:[email protected][email protected][email protected]

…and 23 more
Overview

musl libc through 1.1.23 has an x87 floating-point stack adjustment imbalance, related to the math/i386/ directory. In some cases, use of this library could introduce out-of-bounds writes that are not present in an application's source code.

Upgrade to alpine 3.18

🚀 Feature Request

Relevant Package [REQUIRED]

Description [REQUIRED]

Upgrade to alpine 3.18

Allow use of local C SDK build

As it stands the cmake setup requres the C SDK to be installed on the system's default paths. It would be better to be able to point an environment variable at an instance of the SDK anywhere on the filesystem. Eg, CSDK_DIR

Add .md pages describing how to test (with real hardware)

Per Kamakura planning meeting (Nov 21), each device service should provide a HOWTOTEST.md page that describe how to check the base functionality of the device service with real hardware. These tests should be run manually before each release.

Each device service should also provide a WORKSWITH.md page that lists the actual hardware (make, model, web site link, etc.) that the device service has been tested with and known to work with. Provide enough details on the device/sensor so that an adopter would know where to go to get the same device.

Simplify sample device profiles

  • properties/value/size : Deprecated. Remove.
  • properties/value/[defaultValue/minimum/maximum] : These only apply to writable properties. They are also NYI but if there are sensible values they can take, it's ok to have them.
  • attributes : Consider making property=presentValue and index=none defaults.
  • deviceCommands : Are redundant if they only contain a single resource operation. Remove those ones.

Sample config file changes

"BACnet test" isn't a great label. Just "BACnet" would be preferable.
I'm assigning ports 49980 and 49981 to the ip and mstp versions respectively. Please update.

undefined reference to `edgex_device_add_device'

Hello,
Installed geneva csdk on Ubuntu 20.04 and I just have tested device-bacnet-c.
But when I use ./src/build.sh, I can't complete.

  • readlink -f ./scripts/build.sh
  • dirname /home/ubuntu/work/edgeXsrc/device-bacnet-c/scripts/build.sh
  • dirname /home/ubuntu/work/edgeXsrc/device-bacnet-c/scripts
  • ROOT=/home/ubuntu/work/edgeXsrc/device-bacnet-c
  • echo /home/ubuntu/work/edgeXsrc/device-bacnet-c
    /home/ubuntu/work/edgeXsrc/device-bacnet-c
  • cd /home/ubuntu/work/edgeXsrc/device-bacnet-c
  • [ ! -f /home/ubuntu/work/edgeXsrc/device-bacnet-c/lib/ip/libbacnet.a ]
  • [ ! -f /home/ubuntu/work/edgeXsrc/device-bacnet-c/lib/mstp/libbacnet.a ]
  • mkdir -p /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-ip
  • cd /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-ip
  • cmake -DDATALINK:STRING=BACDL_BIP=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release /home/ubuntu/work/edgeXsrc/device-bacnet-c/src/c
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-ip
  • make
  • tee release.log
    [ 22%] Built target bacnet_objects
    [ 33%] Linking C executable device-bacnet-c
    /usr/bin/ld: CMakeFiles/device-bacnet-c.dir/main.c.o: in function bacnet_discover': main.c:(.text+0x59c): undefined reference to edgex_device_add_device'
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/device-bacnet-c.dir/build.make:162: device-bacnet-c] Error 1
    make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/device-bacnet-c.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2
  • mkdir -p /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-mstp
  • cd /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-mstp
  • cmake -DDATALINK:STRING=BACDL_MSTP=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release /home/ubuntu/work/edgeXsrc/device-bacnet-c/src/c
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-mstp
    • teemake release.log

[ 22%] Built target bacnet_objects
[ 33%] Linking C executable device-bacnet-c
/usr/bin/ld: CMakeFiles/device-bacnet-c.dir/main.c.o: in function bacnet_discover': main.c:(.text+0x58c): undefined reference to edgex_device_add_device'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/device-bacnet-c.dir/build.make:162: device-bacnet-c] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/device-bacnet-c.dir/all] Error 2
make: *** [Makefile:84: all] Error 2


Installed csdk-1.3.0, I can't also find on CSDK library.

$ readelf -s libcsdk.so | grep edgex_device_add
538: 0000000000034cc8 8 FUNC GLOBAL DEFAULT 11 edgex_device_add_profile
1014: 0000000000034cc8 8 FUNC GLOBAL DEFAULT 11 edgex_device_add_profile

Where is edgex_device_add_device ?

All the best,
Ryan

Reading Binary values (binary-input) crashes the service and restarts

🐞 Bug Report

Affected Services [REQUIRED]

Reading certain BACnet points (binary-input, binary-value)

Is this a regression?

n/a

Description and Minimal Reproduction [REQUIRED]

I am able to read float values and enumerated values, but binary values does not seem to work as expected.

🔥 Exception or Error



The error is 5.3 and the service crashes. No other errors thrown

🌍 Your Environment

Deployment Environment:

EdgeX Version [REQUIRED]:
latest version of all containers

Anything else relevant?
I have tried using Bool and all Uint types as the type and it still does not read and the service crashes

Migrate to Fuji version of SDK

  • when building the SDK as a dependency, check out the fuji branch rather than v1.0.x
  • bump version to 1.1 (VERSION and Jenkinsfile)
  • use new field name in profiles ("object" -> "deviceResource")
  • use edgex_device_service_processparams to do argument processing

NB the Fuji branch for the SDK is currently (18th Oct) "master". "fuji" will be created next week.

SIGSEGV when run cross compiling device-bacnet-c of bacnet-ip

Cross compiling device-bacnet-c of I.mx6ul that ARM platform.when run device-bacnet-c on board of I.mx6ul ,I got SIGSEGV, detail :

_dl_relocate_object
Program received signal SIGSEGV, Segmentation fault.
_dl_relocate_object (scope=0x76ff61b8, reloc_mode=, consider_profiling=consider_profiling@entry=0)
at /usr/src/debug/glibc/2.23-r0/git/elf/dl-reloc.c:232
232 /usr/src/debug/glibc/2.23-r0/git/elf/dl-reloc.c: No such file or directory.

I search maybe cause by dynamic library load .

EdgeX DevOps: General Dockerfile Standardization

During Ireland planning DevOps wanted to align some aspects of the Dockerfiles across all repositories to have more uniformity between Dockerfiles. It was agreed upon that the following changes would take place in the Dockerfiles.

  1. For build stage, we will use Go 1.15 with 3.12 (golang:1.15-alpine3.12) Alpine where applicable (for Go services)
  2. Move to alpine 3.12 (in second stage FROM in Dockerfile)
  3. Align to similar apk add commands. i.e. apk add --update --no-cache ... vs. apk update && apk add ... && rm -rf /var/cache/apk/*

device-bacnet failing with HTTP 409 Conflict message

🐞 Bug Report

Affected Services [REQUIRED]

device-bacnet

Is this a regression?

Unknown

Description and Minimal Reproduction [REQUIRED]

device-bacnet container fails when started under Kubernetes.
See edgexfoundry/edgex-examples#187 for testing instructions.

This also fails under docker

make ds-bacnet

(requires edgexfoundry/edgex-compose#374) merged to test

🔥 Exception or Error


Script for waiting on security bootstrapping ready-to-run
Tue Apr 18 17:27:01 UTC 2023 Executing waitFor with /device-bacnet-ip/device-bacnet-c -cp=consul://edgex-core-consul:8500 --registry --confdir=/res waiting on tcp://edgex-security-bootstrapper:54329
level=INFO ts=2023-04-18T17:27:01.141639488Z app=security-bootstrapper source=config.go:611 msg="Loading configuration file from /edgex-init/res/configuration.yaml"
level=INFO ts=2023-04-18T17:27:01.14252964Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/WaitFor/Timeout' by environment variable: STAGEGATE_WAITFOR_TIMEOUT=60s"
level=INFO ts=2023-04-18T17:27:01.142562653Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/Registry/ReadyPort' by environment variable: STAGEGATE_REGISTRY_READYPORT=54324"
level=INFO ts=2023-04-18T17:27:01.142572317Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/Registry/Host' by environment variable: STAGEGATE_REGISTRY_HOST=edgex-core-consul"
level=INFO ts=2023-04-18T17:27:01.142579478Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/Ready/ToRunPort' by environment variable: STAGEGATE_READY_TORUNPORT=54329"
level=INFO ts=2023-04-18T17:27:01.142584234Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/Database/Port' by environment variable: STAGEGATE_DATABASE_PORT=6379"
level=INFO ts=2023-04-18T17:27:01.142590169Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/BootStrapper/StartPort' by environment variable: STAGEGATE_BOOTSTRAPPER_STARTPORT=54321"
level=INFO ts=2023-04-18T17:27:01.142594197Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/Database/Host' by environment variable: STAGEGATE_DATABASE_HOST=edgex-redis"
level=INFO ts=2023-04-18T17:27:01.142598817Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/SecretStoreSetup/Host' by environment variable: STAGEGATE_SECRETSTORESETUP_HOST=edgex-security-secretstore-setup"
level=INFO ts=2023-04-18T17:27:01.142605613Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/Database/ReadyPort' by environment variable: STAGEGATE_DATABASE_READYPORT=6379"
level=INFO ts=2023-04-18T17:27:01.142609664Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/BootStrapper/Host' by environment variable: STAGEGATE_BOOTSTRAPPER_HOST=edgex-security-bootstrapper"
level=INFO ts=2023-04-18T17:27:01.142614138Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'SecretStore/Host' by environment variable: SECRETSTORE_HOST=edgex-vault"
level=INFO ts=2023-04-18T17:27:01.142619463Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/SecretStoreSetup/Tokens/ReadyPort' by environment variable: STAGEGATE_SECRETSTORESETUP_TOKENS_READYPORT=54322"
level=INFO ts=2023-04-18T17:27:01.142624915Z app=security-bootstrapper source=variables.go:457 msg="Variables override of 'StageGate/Registry/Port' by environment variable: STAGEGATE_REGISTRY_PORT=8500"
level=INFO ts=2023-04-18T17:27:01.142632472Z app=security-bootstrapper source=config.go:222 msg="Private configuration loaded from file with 13 overrides applied"
level=INFO ts=2023-04-18T17:27:01.142911993Z app=security-bootstrapper source=command.go:119 msg="Security bootstrapper running waitFor"
level=INFO ts=2023-04-18T17:27:01.142969236Z app=security-bootstrapper source=command.go:144 msg="Waiting for: [tcp://edgex-security-bootstrapper:54329] with timeout: [1m0s]"
level=INFO ts=2023-04-18T17:27:01.145564832Z app=security-bootstrapper source=command.go:214 msg="Connected to tcp://edgex-security-bootstrapper:54329"
Tue Apr 18 17:27:01 UTC 2023 Starting /device-bacnet-ip/device-bacnet-c -cp=consul://edgex-core-consul:8500 --registry --confdir=/res ...
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="iot_threadpool_alloc (threads: 8 max_jobs: 0 default_priority: -1 affinity: -1)"
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="iot_scheduler_alloc (priority: -1 affinity: -1)"
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="Override config SecretStore/Host = edgex-vault"
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="Override config Service/Host = edgex-device-bacnet"
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: scheduled token refresh in 1360 seconds"
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: GET http://edgex-vault:8200/v1/consul/creds/device-bacnet-ip failed"
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: no consul token found"
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="Found registry service at consul://edgex-core-consul:8500"
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: GET http://edgex-vault:8200/v1/consul/creds/device-bacnet-ip failed"
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: no consul token found"
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="Unable to get configuration from registry."
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="Will load from file."
level=INFO ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="Uploading configuration to registry."
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: GET http://edgex-vault:8200/v1/consul/creds/device-bacnet-ip failed"
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: no consul token found"
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: GET http://edgex-vault:8200/v1/consul/creds/device-bacnet-ip failed"
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="vault: no consul token found"
level=ERROR ts=2023-04-18T17:27:01Z app=device-bacnet-ip msg="Unable to upload config: HTTP 409 Conflict"
Error: 17: HTTP 409 Conflict

🌍 Your Environment

Deployment Environment: kubernetes or docker

EdgeX Version [REQUIRED]: minnesota dev

Anything else relevant?

Build Error Unknown type name ‘iot_typecode_t’ error on Raspberry pi

Hello,

I am trying to build this but got an error. I appreciate your help int this regard. Thank you

/root/device-sdk-c/include/devsdk/devsdk-base.h:48:3: error: unknown type name ‘iot_typecode_t’
48 | iot_typecode_t type;
| ^~~~~~~~~~~~~~
/root/device-sdk-c/include/devsdk/devsdk-base.h:94:3: error: unknown type name ‘iot_typecode_t’
94 | iot_typecode_t type;
| ^~~~~~~~~~~~~~
In file included from /root/device-sdk-c/include/edgex/devices.h:18,
from /root/device-bacnet-c/src/c/main.c:12:
/root/device-sdk-c/include/edgex/edgex.h:47:3: error: unknown type name ‘iot_typecode_t’
47 | iot_typecode_t type;
| ^~~~~~~~~~~~~~
/root/device-bacnet-c/src/c/main.c: In function ‘bacnet_alloc_exception’:
/root/device-bacnet-c/src/c/main.c:109:38: error: ‘IOT_DATA_TAKE’ undeclared (first use in this function); did you mean ‘IOT_DATA_MAP’?
109 | return iot_data_alloc_string (str, IOT_DATA_TAKE);
| ^~~~~~~~~~~~~
| IOT_DATA_MAP
/root/device-bacnet-c/src/c/main.c:109:38: note: each undeclared identifier is reported only once for each function it appears in
/root/device-bacnet-c/src/c/main.c: In function ‘parseProperty’:
/root/device-bacnet-c/src/c/main.c:162:69: error: ‘IOT_DATA_REF’ undeclared (first use in this function); did you mean ‘IOT_DATA_MAP’?
162 | *exc = iot_data_alloc_string ("Unknown BACnet property name", IOT_DATA_REF);
| ^~~~~~~~~~~~
| IOT_DATA_MAP
/root/device-bacnet-c/src/c/main.c: In function ‘parseType’:
/root/device-bacnet-c/src/c/main.c:189:69: error: ‘IOT_DATA_REF’ undeclared (first use in this function); did you mean ‘IOT_DATA_MAP’?
189 | *exc = iot_data_alloc_string ("Attribute 'type' is required", IOT_DATA_REF);
| ^~~~~~~~~~~~
| IOT_DATA_MAP
/root/device-bacnet-c/src/c/main.c: In function ‘get_supported_services’:
/root/device-bacnet-c/src/c/main.c:313:85: error: ‘IOT_DATA_REF’ undeclared (first use in this function); did you mean ‘IOT_DATA_MAP’?
313 | iot_data_string_map_add (properties, "DS-RPM-B", iot_data_alloc_string ("true", IOT_DATA_REF));
| ^~~~~~~~~~~~
| IOT_DATA_MAP
/root/device-bacnet-c/src/c/main.c: In function ‘bacnet_get_handler’:
/root/device-bacnet-c/src/c/main.c:443:71: error: ‘IOT_DATA_REF’ undeclared (first use in this function); did you mean ‘IOT_DATA_MAP’?
443 | *exception = iot_data_alloc_string ("Error populating read_data", IOT_DATA_REF);
| ^~~~~~~~~~~~
| IOT_DATA_MAP
/root/device-bacnet-c/src/c/main.c: In function ‘bacnet_put_handler’:
/root/device-bacnet-c/src/c/main.c:513:72: error: ‘IOT_DATA_REF’ undeclared (first use in this function); did you mean ‘IOT_DATA_MAP’?
513 | *exception = iot_data_alloc_string ("Error populating write_data", IOT_DATA_REF);
| ^~~~~~~~~~~~
| IOT_DATA_MAP
/root/device-bacnet-c/src/c/main.c: In function ‘main’:
/root/device-bacnet-c/src/c/main.c:668:101: error: ‘IOT_DATA_REF’ undeclared (first use in this function); did you mean ‘IOT_DATA_MAP’?
668 | iot_data_string_map_add (defaults, "DefaultDevicePath", iot_data_alloc_string (DEFAULT_MSTP_PATH, IOT_DATA_REF));
| ^~~~~~~~~~~~
| IOT_DATA_MAP
/root/device-bacnet-c/src/c/main.c: In function ‘bacnet_alloc_exception’:
/root/device-bacnet-c/src/c/main.c:110:1: warning: control reaches end of non-void function [-Wreturn-type]
110 | }
| ^
make[2]: *** [CMakeFiles/device-bacnet-c.dir/build.make:76: CMakeFiles/device-bacnet-c.dir/main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/device-bacnet-c.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Use new Port assignments (Device Bacnet)

Per TSC 5/19/2021 decision the new ports assignments for Ireland will be:

North side services (app, rules, analytics, etc.): 597xx
Core and supporting services: 598xx (59880 for core data and 59881 for metadata for example)
South side services (device services): 599xx

Update service to use new port assignment in above assigned range
Update any configs (clients) that uses the old ports of any of the services (core, etc) that have changed.

Docker image fails to start.

🐞 Bug Report

Affected Services [REQUIRED]

The issue is located in: edgex-device-bacnet

Is this a regression?

Unsure... This is my first use of the service.

Description and Minimal Reproduction [REQUIRED]

Using the latest version of the container image, the edgex-device-bacnet service does not start.

Building a compose file from edgex-compose compose builder, then start the cluster using docker-compose-up.

🔥 Exception or Error




edgex-device-bacnet          | level=INFO ts=2022-11-18T22:53:24Z app=device-bacnet-ip msg="iot_threadpool_alloc (threads: 8 max_jobs: 0 default_priority: -1 affinity: -1)"
edgex-device-bacnet          | level=INFO ts=2022-11-18T22:53:24Z app=device-bacnet-mstp msg="iot_threadpool_alloc (threads: 8 max_jobs: 0 default_priority: -1 affinity: -1)"
edgex-device-bacnet          | level=INFO ts=2022-11-18T22:53:24Z app=device-bacnet-mstp msg="iot_scheduler_alloc (priority: -1 affinity: -1)"
edgex-device-bacnet          | level=INFO ts=2022-11-18T22:53:24Z app=device-bacnet-ip msg="iot_scheduler_alloc (priority: -1 affinity: -1)"
edgex-device-bacnet          | /device-bacnet-mstp/device-bacnet-c: Unrecognized option consul://edgex-core-consul:8500
edgex-device-bacnet          | /device-bacnet-ip/device-bacnet-c: Unrecognized option consul://edgex-core-consul:8500
edgex-device-bacnet exited with code 0

🌍 Your Environment

Deployment Environment:
On macOS, using the container images.

EdgeX Version [REQUIRED]:

{"apiVersion":"v2","version":"2.3.1-dev.4","serviceName":"core-command"}%                                                                                       

Anything else relevant?
It looks like the only option for the service is --help, but the startup.sh script adds the --registry option.

Update Docker description for 3.0.1 patch release

Docker image still using old --confdir

🐞 Bug Report

Affected Services [REQUIRED]

The issue is located in: Docker file

Is this a regression? Yes

Yes, the previous version in which this bug was not present was: ....

Description and Minimal Reproduction [REQUIRED]

Docker file has old name
https://github.com/edgexfoundry/device-bacnet-c/blob/main/scripts/Dockerfile.alpine#L53

All Go service have removed this since the default value of ./res works fine.

🔥 Exception or Error

Unrecognized option --confdir=/res

🌍 Your Environment

Deployment Environment:

EdgeX Version [REQUIRED]:

Anything else relevant?

CMake Error at CMakeLists.txt:58

🐞 Bug Report

Affected Services [REQUIRED]

Not a service bug, just a CMake statement complaining about the VERSION file missing at the root directory.

The issue is located in:

After building the BACnet driver, scripts/build.sh fails because it's looking for this path:
/home/home-name/edgex/device-bacnet-c/src/c/../../VERSION
But VERSION was removed after migration to v2.0

Is this a regression?

Yes, the previous version in which this bug was not present was:

CSDK v1.3.1 and BACnet driver v1.x

Description and Minimal Reproduction [REQUIRED]

🔥 Exception or Error



CMake Error at CMakeLists.txt:58 (FILE):
FILE STRINGS file
"home/home-name/edgex/device-bacnet-c/src/c/../../VERSION" cannot be read.

🌍 Your Environment

Deployment Environment:
Ubuntu 22.04
EdgeX Version [REQUIRED]:
CSDK v2.3.0
BACnet v? (no VERSION file)
Anything else relevant?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.