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

  • Hi to all,

    well i am trying to speak with an alerton eth controller that has 8 vlx controllers .
    With a bacnet browser Itimeconnector) i see everything ok.
    When i am using mango bacnet datasource i have the following problem:

    At first mango is 10.18.241.254
    alerton eth is 10.18.241.250

    in the bacnet datasource i am using as local bind address the 10.18.241.254 (mango ip)
    broadcast 10.18.241.255. Then save start and then press whois in the bacnet discovery and the message that i am receiving is "Address already in use: Cannot bind"

    In netstat is mango binds 0.0.0.0 for the 47808 and also the 10.18.241.254 udp both at the same time

    In contrast timeconnect binds correctly the address to the port , and the netstat provides that 10.18.241.254:47808.

    Well in wireshark mango sends correctly the i am and whois but in the datasource nothing happens. if you press whois you always have the "Address already in use: Cannot bind"

    Could someone provide some help.

    Attachment: download link


  • Well you have to disable the datasource in order to see the devices now, but when you press the arrow in the right to begin details for a specific device it says error for 1(20) (the device MAC)
    and in the mango console we have the following:

    ERROR 2014-01-22 14:47:49,892 (com.serotonin.m2m2.web.dwr.util.ExceptionDetectio
    nFilter.doFilter:38) - DWR invocation exception
    java.lang.NumberFormatException: For input string: "1(20)"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.
    java:65)
    at java.lang.Integer.parseInt(Integer.java:492)
    at java.lang.Integer.parseInt(Integer.java:527)
    at com.serotonin.bacnet4j.base.BACnetUtils.dottedStringToBytes(BACnetUti
    ls.java:95)
    at com.serotonin.bacnet4j.type.primitive.OctetString.<init>(OctetString.
    java:59)
    at com.serotonin.bacnet4j.type.primitive.OctetString.<init>(OctetString.
    java:52)
    at com.serotonin.bacnet4j.type.constructed.Address.<init>(Address.java:5
    0)
    at com.serotonin.ma.bacnet.BACnetEditDwr.startObjectListRequest(BACnetEd
    itDwr.java:133)
    at com.serotonin.ma.bacnet.BACnetEditDwr.sendDeviceObjectListRequest(BAC
    netEditDwr.java:88)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilt
    er.java:34)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.j
    ava:428)
    at com.serotonin.m2m2.web.dwr.util.TranslationsFilter.doFilter(Translati
    onsFilter.java:37)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.j
    ava:428)
    at com.serotonin.m2m2.web.dwr.util.ExceptionDetectionFilter.doFilter(Exc
    eptionDetectionFilter.java:26)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.j
    ava:428)
    at com.serotonin.m2m2.web.dwr.util.DwrPermissionFilter.doFilter(DwrPermi
    ssionFilter.java:38)
    at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.j
    ava:428)
    at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java
    :431)
    at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java
    :283)
    at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandle
    r.java:52)
    at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:1
    01)
    at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538
    )
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
    Handler.java:1352)
    at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.j
    ava:77)
    at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:141)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
    Handler.java:1323)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java
    :476)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
    ava:119)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.jav
    a:517)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandl
    er.java:225)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl
    er.java:937)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
    406)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle
    r.java:183)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle
    r.java:871)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
    ava:117)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
    .java:110)
    at org.eclipse.jetty.server.Server.handle(Server.java:346)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.
    java:589)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpCo
    nnection.java:1065)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)

        at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:41
    
    1.  at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn
      

    dPoint.java:535)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEnd
    Point.java:40)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
    .java:529)
    at java.lang.Thread.run(Thread.java:744)


  • I believe this is the same problem I reported here: http://forum.infiniteautomation.com/forum/posts/list/1633.page

    with no response.


  • I'm going to get this looked into, part of the problem is that we don't have a similar set up to test this with. In all our BACnet tests things work fine and most people report no problems so it must be something with this specific set up and I'll try to get to the bottom of it as soon as possible.

    Thanks,

    Joel.


  • hornetgr,

    I've been looking into this bug and have coded up a simulator to help me with it. When you see the error: "1(20) (the device MAC)", what is your network number? I'm guessing its 20? Also does the end of your MAC address have a (20) on it?

    I think I can see the bug in the code but before I go any further it would be good to know I'm on the right track.

    Thanks,
    Terry


  • I believe the network is the first number, and the MAC (MSTP MAC addresses are a single byte integer, 1-255) is in parentheses (20).


  • Thanks for the reply, I can see what you are saying from the link to the other post above. I believe the issue is that the module isn't able to handle anything besides a properly formed IP address : port combo. I'll see what I can do to change that in the code.


  • Okay, so I'm at work now, so I checked this out some more. I was wrong before. The network number is what is in the parentheses, and the MAC is before it. The points DO work if entered manually with JUST the MAC integer in the MAC field, network number in Network number field, and the gateway's IP:port in the Link service IP field. But there are at least two actual problems.

    1. Transferring information from the Device Scan results to the Object scan settings brings over the entire string "MAC(NETWORK)" and puts that in the MAC field - needs to JUST be the MAC address.
    2. The object scan throws a socket exception even when the information is entered properly manually.

  • Really, to be proper, there should be no REQUIREMENT to tell the module the MAC address or Link Service ID. Bacnet should be able to properly find any device with nothing more than the Device Instance number. If the other information is NOT fed to the module, it should use WhoIs messages to find that information (and it can then cache it for further requests). Any point should be able to be set up using nothing but the Device Instance, Object Type, and Object Instance. Ex: Dev 240110, AV-101


  • I have changed some of the module code but I don't have a way to test the gateway side of things. Would either of you mind helping me out by testing it for me? I am attaching the updated jar file.

    To test:

    1. stop Mango
    2. make a backup of the file: $MA_HOME/web/modules/BACnet/lib/m2m2-BACnet-x.x.x.jar
    3. delete the original file so it is no longer in the $MA_HOME/web/modules/BACnet/lib/ folder
    4. place the attached m2m2-BACnet-2.0.4-beta.jar into the $MA_HOME/web/modules/BACnet/lib/ folder
    5. start mango and check discovery

    When done if this doesn't fix the problem replace the beta jar with the original to revert back.

    This fix is only for #1 of CraziFuzzy's noted issues.

    Issue #2 about the Socket being closed is going to take some further digging. The error is being propagated from within the BacNet4j library and isn't directly part of the mango code.

    Attachment: download link


  • That does appear to have fixed the MAC address issue, and I am also not getting the socket error now either (it may have been a result of the BacNet4J calls being made incorrectly due to the MAC problem). So this seems to have sorted it. Now, on to slightly other issues since you are looking in that code, is there a way to pull the 'Description' property instead of Object Name? in most bacnet devices I've dealt with, Object Name is a hard-coded string tied to the actual hardware input, and not necessarily what the point represents. Description is usually much more meaningful, and would be the best candidate for populating the Point Name field.


  • Here is a beta version for a new module that will use the Description from an Object for the point name if it exists. If there is no description it will fallback to using the Object Name. Please give this a test and let me know if it performs as expected. Thanks for your assistance.

    Attachment: download link


  • Excellent, i'll give it a whirl tonight. Though my testing will be limited, as only 4 of my 1200 devices show up on a device scan due to linux's improper handling of broadcasts when bound to an IP. I'm sure that is on the BacNet4J side, so I'm not sure if you work with that, but it seems the only fix is to bind twice, once to the interface address, and once to the broadcast address - or switch to windows, which just doesn't sound fun.


  • So, some issues. The results table is not generated properly. The heading reflects the new Description column added, but the results do not. (see attached image) The description is getting fetched properly, as it shows up in the Point Details if you click 'Add Point', but the table is not being populated. Also, fetching the descriptions is pretty slow, as it is fetching them one at a time, instead of using RequestPropertyMultiple as all the other requests. It might be a lot quicker if the description fetch was done in the same loop as the one issuing the RPM's for object-name, units, and present-value.

    I've got some devices (CRC-RPM1) that return screwed up object types for 2 of the AV's in the object list. For these, instead of ignoring the object, it looks like mango is going forward and requesting info about it. When the description request is sent for those bad objects, the unknown-object error response seems to halt the scan - I guess this needs some error handling.

    I've got other devices (sadly enough, the major bulk of my device count - our vav controllers - Alerton VAVi-SD), which are returning the descriptions properly, then when the first RPM request is sent to get object-name, units, and value for the first 6 objects, no response is received at all from the device. It retries 2 more times, and after no response, the scan just stops.

    Other than the display issue, and the poor handling of even poorer devices, this seems to be working. Our Alerton VLX controllers (very large point density) work great, other than being pretty slow to get through all those points individually.

    Attachment: download link


  • Thanks for taking the time to test that you for me. I will make some changes this week that should fix those issues. I’ll post back when I’m done.


    1. Table should be fixed, I must have forgotten that code change in the posted module. Perhaps you need to clear your browser cache to pickup the new javascript? Either way I'm sure that code is in this version of the module

    2. I've added some error handling and cleaned up the way the description is requested. Please let me know if that works now. I am not sure what object types will allow a request for the description so I hope what I did works.

    3. The unknown-object errors you are receiving can probably be fixed but I'm not sure of what constitutes a 'screwed up' object type? It appears as though the code is able to handle object types 0-30 and then anything else is labeled 'Vendor Specific'. Should we not request anything else for the types > 30?

    Attachment: download link


  • Any object type CAN have a Description property, but it is optional. Similarly, there is nothing wrong with the fact that your code asks info on vendor object types, what was wrong was that when it got the unknown object response, it stopped any further requests. It should, if anything, report that error in the results, and carry on. If you are only asking for objects returned by an object_list request, you SHOULDN'T ever see that error, but BACNet manufacturers are notorious for not checking everything out, and bugs like this exist everywhere. The error just needs to be handled gracefully.

    In the case of those bugged devices, those points are AV's, but are not being reported as such properly in the object_list. I'm in communication with the manufacturer about getting the firmware fixed.