• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. carnecro

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    • Profile
    • Following 0
    • Followers 0
    • Topics 9
    • Posts 24
    • Best 1
    • Controversial 0
    • Groups 0

    carnecro

    @carnecro

    1
    Reputation
    881
    Profile views
    24
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website www.neopsis.com Location Emmen, Switzerland

    carnecro Unfollow Follow

    Best posts made by carnecro

    • No Datagram receive on Unix based systems

      I started to play a bit with the Bacnet4J code and I have an issue that I cannot resolve. The simple DiscoveryTest from src_test works for me only on Windows OS. Running the same code on MacOSX, Linux (Debian) and even Embedded ARM Linux blocks on UDP receive(). In the wiresharrk I see the WhoIs messages are sent and my Bacnet remote devices are responding the IAm. First I thought I have a local firewall active on the hosts, however, running UdpDump test works fine and brings me the responses on all systems.

      Any idea from community before I start to dive into the code? BTW is the community active? I did not see any answer since last 6 months in this forum?

      posted in BACnet4J general discussion
      carnecroC
      carnecro

    Latest posts made by carnecro

    • RE: Timeouts when discovering BACnet device

      @CraigWeb I apologize for the false alarm. I analyzed everything again with Wireshark and found out that the problem was a misconfigured firewall.

      If the data are transported in multiple segments, the server obviously opens a new socket for each Complex-ACK. For us, the direction from device to Mango was blocked for BACnet. After modifying the rules on the firewall everything works fine. Sorry again.

      posted in Mango General
      carnecroC
      carnecro
    • RE: Timeouts when discovering BACnet device

      I opened a ticket on GitHub Bacnet4J, but honestly, I don't believe anyone will bother with it. There are quite a lot of bugs described there, and I've documented and described some, but no one is responding. For me it is annoying because I bought a license to use Bacnet4J commercially (it was not cheap), but as it turns out, the library is not of good quality and especially there is no support. I do not recommend using it for professional implementations.

      posted in Mango General
      carnecroC
      carnecro
    • RE: Timeouts when discovering BACnet device

      @CraigWeb The problem is clearly a bug in the Bacnet4J library during the segmented response to ReadProperty. From a certain number of objects the server returns a segmented response. Bacnet4J for some reason misses the first segment of the response and therefore repeats the request. This leads to an error. Here are screnshots of the communication in the case of Bacnet4J and Yabe.

      Yabe
      Yabe.png

      Bacnet4J
      Bacnet4J.png

      I think that nobody has ever tested segmented responses, otherwise they would have found this problem.

      posted in Mango General
      carnecroC
      carnecro
    • RE: Timeouts when discovering BACnet device

      @CraigWeb Mango doesn't give me much information where to look for the problem. That's why I wrote a BACnet client using BACnet4J. I have found that problems with BACnet4J occur when the discovery process tries to read information about a larger number of points. I can't say where the limit is. I've experimented with segmentation, ReadPropertyMultiple, APDU timeouts, all with no reasonable results.

      What do you mean by API timeout? Personally, I don't think anyone has tested BACnet4J in this configuration.

      posted in Mango General
      carnecroC
      carnecro
    • RE: Timeouts when discovering BACnet device

      @CraigWeb FYI I checked the device with 750 data points in BacEye (BacEye can communicate with this device without any issues):

      Pic20230310011051.png

      posted in Mango General
      carnecroC
      carnecro
    • RE: Timeouts when discovering BACnet device

      @CraigWeb IMO it's an issue with Bacnet4J library. I can discover all these devices and objects with many Bacnet clients (Yabe, BacEye, Tridium Niagara, etc). So I have written a small application using Bacnet4J and when I am reading object list from a device with 750 data points, I get an error

      error reading object list: ErrorAPDU(errorClass=services, errorCode=operational-problem,errorClass=services, errorCode=operational-problem)
      

      There is no problem to read points from a device with approx 250 data points. Because I can read all objects with all other clients I have I assume it's Bacnet4J issue related to MaxAPDU setting.

      posted in Mango General
      carnecroC
      carnecro
    • Timeouts when discovering BACnet device

      I have BACnet devices with 1500+ data points. I am unable to discover data points. Although I set the timeout to 600000 ms (600 secons/5 minutes) I still get timeout errors. I can discover smaller devices with approx 300 data points, although even this operation takes an unusually long time.

      posted in Mango General bacnet
      carnecroC
      carnecro
    • Error when writing MultistateObject property stateText

      When I try to write property stateText on MultistateValue object (assuming same for MultistateInput and Output), I get the following error:

      java.lang.ClassCastException: com.serotonin.bacnet4j.type.constructed.SequenceOf cannot be cast to com.serotonin.bacnet4j.type.constructed.BACnetArray
              at com.serotonin.bacnet4j.obj.mixin.MultistateMixin.validateProperty(MultistateMixin.java:63)
              at com.serotonin.bacnet4j.obj.BACnetObject.writeProperty(BACnetObject.java:481)
              at com.serotonin.bacnet4j.service.confirmed.WritePropertyRequest.handle(WritePropertyRequest.java:102)
              at com.serotonin.bacnet4j.transport.DefaultTransport.handleConfirmedRequest(DefaultTransport.java:870)
              at com.serotonin.bacnet4j.transport.DefaultTransport.incomingConfirmedRequest(DefaultTransport.java:827)
              at com.serotonin.bacnet4j.transport.DefaultTransport.receiveAPDU(DefaultTransport.java:640)
              at com.serotonin.bacnet4j.transport.DefaultTransport.receiveImpl(DefaultTransport.java:578)
              at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:498)
              at java.lang.Thread.run(Thread.java:748)
      

      IMO there is inconsistency. Multistate object constructor uses BacnetArray<CharacterString>, write property handler uses SequenceOf<CharacterString>, however, both objects are passed to the same mixin validation procedure.

      posted in BACnet4J general discussion
      carnecroC
      carnecro
    • localDate, localTime and utcOffset

      It looks like the properties localDate, localTime and utcOffset are modified in the device beforeReadProperty method. These properties are obviously derived from thy system clock and operating system setting.

      In our case, the device OS (Linux) is always running the clock in the UTC timezone even when the device is installed in another timezone. We would like to return the properties localDate, localTime and UTC offset to clients converted to the real device timezone.

      Is there any way how to do it except to subclass the DeviceObject and override beforeReadProperty?

      posted in BACnet4J general discussion
      carnecroC
      carnecro
    • Proper response for ReadPropertyMultiple, PID=all

      I defined some proprietary properties on the analog-value object and when I disable the ReadPropertyMultiple requests the Bacnet4J server returns all properties to the client (for testing I am using MBS BACeye). Obviously, the client reads the properties one by one based on the property-list.

      With ReadPropertyMultiple enabled the proprietary properties must be queried manually. I noticed, that the client sends the request with PropertyIdentifier.all (#8).

      ReadPropertyMultipleRequest [listOfReadAccessSpecs=[ReadAccessSpecification [objectIdentifier=analog-value 45, listOfPropertyReferences=[PropertyReference [propertyIdentifier=all, propertyArrayIndex=null]]]]]
      

      Should I as application developer create the response with the List of Read Access Results (Bacnet 15.7.1.2.1) od does it Bacnet4J automaticaly for me? I checked the answer using this code snippet and it looks like the Bacnet4J response does not contain the proprietary properties,

      public void requestReceived(Address from, Service service) {
               super.requestReceived(from, service);
      
               if (service.getChoiceId() == 14) {
      
                   ReadPropertyMultipleRequest req = (ReadPropertyMultipleRequest) service;
                   CommLogger.info("REQ: " + req.toString());
      
                   SequenceOf<ReadAccessSpecification> ras = req.getListOfReadAccessSpecs();
                   try {
                       final ReadPropertyMultipleAck ack = (ReadPropertyMultipleAck) new ReadPropertyMultipleRequest(
                               ras).handle(executor.getLocalDevice(), from);
                       CommLogger.info("RSP: " + ack.toString());
                   } catch (BACnetException e) {
                       e.printStackTrace();
                   }
               }
           }
      

      Robert

      posted in BACnet4J general discussion
      carnecroC
      carnecro