The first device-instance in the command line is used with Who-Is and I-Am discovery services to bind the device-instance to a MAC, DNET, and DADR in an address table module used to lookup the address from a given device instance. If you pass the --mac on the command line then the Who-Is and I-Am is skipped. The device-instance passed on the command line is added to the address table module along with the MAC, DNET, and DADR values for the application to use when looking up the address from the instance...
Hi Steve, thank you for your help! I think the main point is that using --dnet 0 for local network was necessary, to make it work. The hint with the wildcard 4194303 is very useful as well. I was able to get responses with these calls: $ ./bacrp --mac <controller-ip>:47808 --dnet 0 1 8 4194303 75 $ ./bacrp --mac <controller-ip>:47808 --dnet 0 1 8 4194303 77 $ ./bacrp --mac <controller-ip>:47808 --dnet 0 1 8 <device-id> 75 $ ./bacrp --mac <controller-ip>:47808 --dnet 0 1 8 <device-id> 77 $ ./bacrp...
All the BACnet services use a MAC address to send messages to each other, whether the MAC address is an IP address (which uses the Ethernet MAC address via ARP to find the IP address) or an Ethernet MAC address or an MS/TP address, depending on the hardware connection of the local device. On IP, an IP router or gateway is needed to send the packet from one IP subnet to another (ping should be working if the end device support it). On the example apps, the --mac can therefore be used to send via the...
Hi, I want to use the BACnet Protocol Stack on Linux to check connectivity for BACnet/IP to devices on a different subnet. As far as I understood I can use Who-is only on the local subnet or using BBMD routing. Can I instead do a read property call to the BACnet device on the remote subnet if I only know the IP, Port and potentially the Device ID? (Linux routing seems fine since pinging the device works. And issuing nc -u CONTROLLER-IP 47808 does at least not fail with an ICMP message from a firewall)...
Hi, I want to use the BACnet Protocol Stack on Linux to check connectivity for BACnet/IP to devices on a different subnet. As far as I understood I can use Who-is only on the local subnet or using BBMD routing. Can I instead do a read property call to the BACnet device on the remote subnet if I only know the IP, Port and potentially the Device ID? (Linux routing seems fine since pinging the device works. And issuing nc -u <controller-ip> 47808 does at least not fail with an ICMP message from a firewall)</controller-ip>...
Hi, I want to use the BACnet Protocol Stack on Linux to check connectivity for BACnet/IP to devices on a different subnet. As far as I understood I can use Who-is only on the local subnet or using BBMD routing. Can I instead do a read property call to the BACnet device on the remote subnet if I only know the IP, Port and potentially the Device ID? (Routing seems fine since pinging the device works. And issuing nc -u <controller-ip> 47808 does at least not fail with an ICMP message from a firewall)</controller-ip>...
Secured event decoding by refactoring deprecated functions. (#1126)
Added basic timer object, internal state machine, and unit tests (#1123)
Created a storybook for kids with BACnet Stack nonsense.
[WIP] Secured event decoding by removing deprecated functions.
Secured event decoding by removing deprecated functions.
Cleanup of compile after merge
Merge remote-tracking branch 'origin/master' into feature/bacnet-ipv6-bbmd-enabled-handler
Fixing Makefile build for bip6 with win32 MinGW and in github workflows. (#1125)
Clause 21, enumerations for BACnetNetworkPortCommand conflict with final assigned values in multiple addenda. (#1124)
Updated the bvlc6.sh to enable registration with foreign device
Added object list init into create function in cases where create is called before init. (#1122)
Updated CHANGELOG with this change.
Added object list init into create function in cases where create is called before init.
Fixed octetstring_copy_value() and added unit tests. (#1121)
Added abstract-syntax constructed value for timer object to use. Removed color tags that were not part of the standard.
Added constructed value encoded and decoder.
[WIP] adding more funcitonality to Timer object and its unit test
[WIP] adding more funcitonality to Timer object and its unit test
[WIP] adding more funcitonality to Timer object and its unit test
[WIP] adding more funcitonality to Timer object and its unit test
[WIP] adding more funcitonality to Timer object and its unit test
[WIP] adding more funcitonality to Timer object and its unit test
[WIP] adding more funcitonality to Timer object and its unit test
Added more debug to property unit test
Handle list of property references as BACnetLIST by default
[WIP] adding Timer object and API for Read/Write property with unit tests
[WIP] basic timer object functionality
[WIP] adding BACnetTimerStateChangeValue encode, decode, parse, print, and diff with unit tests
[WIP] adding BACnetTimerStateChangeValue encode, decode, parse, print, and diff with unit tests
[WIP] adding basic timer object and unit tests
[WIP] Fixing Makefile build for bip6 with win32 MinGW and in github workflows.
Fixed apps that failed with missing functions during linking.
Fixed unit tests that failed with missing functions during linking.
Added unit testing for npdu_is_expecting_reply functions.
Refactored the data-expecting-reply compare function into the NDPU module.
Added NDPU helper to detect segmented complex ack reply in a PDU
Reverted segment-ack changes to ports
Merge remote-tracking branch 'origin/master' into bugfix/force-reply-postponed-segmented-complex-ack
The NDPU priority is now passed through the stack via apdu.c or h_apdu.c module so the MS/TP compare DER function can include the value in the comparison. (#1119)
Added more unit testing for ReadProperty to increase code coverage. (#1118)
Bump github/codeql-action from 3 to 4 (#1117)
Added postpone reply because transmission of the segmented ComplexACK cannot begin until the node holds the token.
Feature/add-device-object-functions-find-api (#1115)
Reverted changes to ports devices that use alternate device function table structure.
Updated CHANGELOG with pull-request info.
Expose Device_Object_Functions() API to return basic object API table of functions for all objects.
Expose Device_Object_Functions_Find() API to enable override of basic object API function.
In general, if a BACnet device supports receiving a TimeSync, it will update its Local_Date and Local_Time properties in the Device object. Most of the demo apps in the BACnet Stack library include an example TimeSync handler, but the actual setting of the OS clock may or may not be functional - see ports/xx/datetime-init.c module for the OS you are using. There is also a simulated time clock in src/bacnet/basic/sys/datetime_mstimer.c that could be used instead as shown in the ports/stm32f4xx example....
there are several implementations of 'basic' example objects. Feel free to copy and modify any of those to support the object numbering of your choice. If you want to add an API (function/method) in the basic header file, feel free to post a patch and following the naming conventions of the existing example header files. Many times I simply create a copy of the basic example objects and add all the API and features that I need in order to support specific features that the basic example objects don't...
I think the fix you need is this one: https://github.com/bacnet-stack/bacnet-stack/pull/803/files Note that v1.3.8 and v1.4.x are pretty similar for the ports/stm32f10x, so you could use the v1.4.x src/bacnet/datalink/mstp.c and dlmstp.c modules to see if that fixes the problem. If that does fix it, I can update 1.3.x branch with the fixes.
This seems to get me what I want. Any downsides to this? Thanks! pdu_len = datalink_receive(&src, &PDUBuffer[0], MAX_MPDU, 0); if (pdu_len) { if (MSTP_Port->DestinationAddress == MSTP_Port->This_Station || MSTP_Port->DestinationAddress == MSTP_BROADCAST_ADDRESS) { npdu_handler(&src, &PDUBuffer[0], pdu_len); } else { MSTP_Port->master_state = MSTP_MASTER_STATE_IDLE; MSTP_Port->ReceivedValidFrame = false; } }
Hello to Steve and the community! I am working on a simple MS/TP master device implementation based off of the STM32F10x port on version 1.3.8. I have noticed dlmstp_receive() operates agnostic to the value of This_Station. This appears also true for npdu_handler(). This results in handler_read_property_multiple() for example, being entered regardless if the received request matches This_Station. I suspect this behavior is required in case the device wants to perform routing, but where is rejection...
Hi Steve, 1. I want users to set the instance numbers of the objects of their choice through a UI. There is a method to set the instance number of the device, but to how to set the Object Instance of first AI[0] be 50 and so on. The code takes index number as instance number. 2. If I use the library in the app folder for my project, how can I accomplish the above task and how can I modify the functions pertaining to specific object. 3. If I want to create my library, should I need to include all...
Merge remote-tracking branch 'origin/master' into bacnet-stack-1.4
Updated CHANGELOG after latest commits.
Merge remote-tracking branch 'origin/master' into bacnet-stack-1.4
Only print the property-list if supported.
Fixed the EPICS tool to read all the required and optional properties that could be in a device when property-list property is not supported.
Fixed property-list array size checking. Fixed APDU timeout.
Revert changes to date decode and basic CSV object.
Clean up merge on .gitignore
FIxed warnings in EPICS main module.
Merge remote-tracking branch 'origin/master' into bugfix/add-more-bibbs-to-bacepics
Fixes based on SK's feedback
Updated EPICS to reflect the latest PR and work better with BTF
Fixed bug where a pointer to memory was read after free.
Merge remote-tracking branch 'origin/master' into bugfix/ai.c_used_uint8_t_for_units_and_not_uint16_t
Added new enumerations, text, BACnetARRAY and BACnetList from protocol-revision 30 (#1114)
Refactored CharacterString_Value_Out_Of_Service_Set() function to remove confusion about an assignment inside an if-statement. (#1113)
Added a context variable in basic object data structure and API to get or set the context pointer. (#1111)
Fixed basic program object internal datatype for reason-for-fault and change properties. (#1110)
Merge remote-tracking branch 'origin/master' into bugfix/ai.c_used_uint8_t_for_units_and_not_uint16_t
Fixed compile errors in basic/server/device when BACAPP_TIMESTAMP or Channel object are not enabled. (#1109)
I've used the library with ESP32, but not with Platform IO. I also use vscode with the BACnet Stack library on a daily basis for maintaining the library. When I integrated BACnet into an EPS32 product, I needed to create a CMakeLists.txt that worked with the IDF that ESP32 was using as that was what the team was using to build their product. I can try to make something similar in the ports eventually, but have not had the free time to do it. You could also use the BACnet Stack Zephyr OS repo to build...
Using VS Code, PlatformIO, generic ESP32 dev module. I really appreciate the fact that this BACnet stack is free and open-source. There’s clearly a huge amount of work behind it. That said, I cannot figure this out for the life of me. Almost certainly part of the challenge is 1) I’m targeting an ESP32, and 2) my background is more industrial/PLC-focused, so I’m not usually deep in the weeds of low-level C libraries like this. I’ve spent about two weeks of nights and weekends tinkering, and I’m still...
Using VS Code, PlatformIO, generic ESP32 dev module. I really appreciate the fact that this BACnet stack is free and open-source. There’s clearly a huge amount of work behind it. That said, I cannot figure this out for the life of me. Almost certainly part of the challenge is 1) I’m targeting an ESP32, and 2) my background is more industrial/PLC-focused, so I’m not usually deep in the weeds of low-level C libraries like this. I’ve spent about two weeks of nights and weekends tinkering, and I’m still...
Using VS Code, PlatformIO, generic ESP32 dev module. I really appreciate the fact that this BACnet stack is free and open-source. There’s clearly a huge amount of work behind it. That said, I cannot figure this out for the life of me. Almost certainly part of the challenge is 1) I’m targeting an ESP32, and 2) my background is more industrial/PLC-focused, so I’m not usually deep in the weeds of low-level C libraries like this. I’ve spent about two weeks of nights and weekends tinkering, and I’m still...
Merge remote-tracking branch 'origin/master' into bacnet-stack-1.4
Updated CHANGELOG after latest commits.
Added uBASIC+BACnet README document to describe the programming language, porting, and integration. (#1108)
Bugfix/using-uint16-for-units-property-storage (#1107)
Converted device object test to use common read-write property test. Extended the basic BACnet device object example API. (#1106)
Merge remote-tracking branch 'origin/master' into bacnet-stack-1.4
Manually restoring diffs to Steve's format
Added clang-format-win.bat to do a global scrub
More clang format fixups
Brought in Steves latest changes and applied clang-format
Merge remote-tracking branch 'originKarg/master' into bugfix/ai.c_used_uint8_t_for_units_and_not_uint16_t
Fixed MS/TP state WAIT_FOR_REPLY to allow reception of any frames that are not known to be not reply frames. (#1103)
ai.c used a uint8_t for units (needs to be 16 bits)
Test/expanded-object-property-write-coverage (#1102)
Fixed Lighting Output object STOP lighting command so that it sets the present-value. (#1101)
Fixed the lighting command RAMP TO ramp rate to always clamp within 0.1 and 100.0 to avoid endless rate of 0.0. (#1100)
Fixed Lighting Output Step Up/On and Down/Off mixup. (#1099)