Menu

Config Files

Matt Adams
2011-09-28
2013-01-08
  • Matt Adams

    Matt Adams - 2011-09-28

    I am attempting to use BFR, and I'm having some trouble understanding the config file that BFR requires. Specifically whether or not the client/server tags are supposed to be IP address, name or what. I was able to locate some documentation, but it is still unclear.

     
  • Joel Bender

    Joel Bender - 2011-09-28

    The 'client' and 'server' XML element attributes are identifiers internal to the XML configuration file that describe how components are connected together.  XML can only easily describe "tree" structures (each child element represents a new branch) or a list structure (each child element represents the next item in a list) and doesn't do both at the same time.  Because the software components are built in a "stack", where a lower layer provides a service to the next layer up, I decided that each XML element would correspond to a software component, and the connections between them would use the value of the XML attributes 'client' and 'server'.

    So if some element has server="snork" as an attribute, as some point in the XML file will be another element with client="snork" and the two will be bound together.  If they don't all match up, there is a configuration error in the file.  The two elements do not have to be defined in any particular order with each other.

    Does that help?

     
  • Matt Adams

    Matt Adams - 2011-09-29

    Joel,
    That helps some. I'm trying to understand how the software does the physical networking via the XML document. It's just not that clear to me what I need to specify in the configuration file.  For example, the basic configuration file makes sense to me where the physical adapter name is specified and then given a server name.

    I think I got confused by the different configuration files in the HTML help. If I have a computer with two physical network cards acting as a bacnet router, would the configuration below be correct?

    <BFR>
       Define the physical network card eth0 as the LAN
       <Ethernet device="eth0" server="lan"/>

       Define the physical network card eth1 as the WAN
       <Ethernet device="eth1" server="wan"/>

       Use the simple router to route LAN data to the WAN
       <Router client="lan" server="wan"/>
    </BFR>

    I wasn't sure about the Router element and whether or not I needed to define an adapter. If I need to define an adapter, is the client a device? And is the net the BACnet network number?

     
  • Matt Adams

    Matt Adams - 2011-09-30

    Well my configuration above it clearly wrong. I have tried several different configurations and I still end up with nothing that does what I want. I want to send a packet from the router's LAN to a device on the router's WAN and then receive the response back.

    My setup is PC1 running VTS connected to the LAN port of PC2. PC2 is running Coyote and BFR, and is connected to the network (via a switch) with the device.

    Without BFR running, I am able to send a request to the device and see the device respond back to PC2. This sounds like what I would expect with a normal IT router. When I run BFR with the Basic.txt configuration file, the same thing happens. This leads me to believe I am doing something wrong with the configuration file. I tried to get the <Debug working but never seemed to be able to.

    I'm struggling to understand how the client/server relationship works. I was expecting to define two server (eth0 and eth1) and have multiple clients using the data they provide, but that doesn't seem to be the case. Can you provide some examples or suggestions so that I can better understand this relationship and hopefully create a working config file?

     
  • Matt Adams

    Matt Adams - 2011-10-10

    If anyone is interested, here's the config file that I was able to get working:

    <BFR>
            WAN connection data (IP / subnetmask) ignored the port option so it defaults to 47808
            The subnetmask needs to be called out so that broadcasts work.
            <UDP address="10.130.1.253/24" server="wan" />
    
            LAN connection data (IP /subnetmask) ignored the port option so it defaults to 47808
            <UDP address="192.168.0.1/24" server="lan" />
    
            Use the WAN connection as a BBMD allowing foreign device registration
            This completes the pair for "wan"
            <BBMD client="wan" server="bbmd1" foreign="y" />
    
            Use a router to connect the two subnets (10.130.1.0/24 and 192.168.0.0/24)
            <Router>
                    This completes the pair for "bbmd1"
                    BFR announces it is a router to the network on the LAN side
                    <Adapter client="bbmd1" net="253" />
    
                    This completes the pair for "lan"
                    BFR announces it is a router to the network on the WAN side
                    <Adapter client="lan" net="1" />
            </Router>
    </BFR>
    
     
  • Joel Bender

    Joel Bender - 2011-10-12

    … LAN connection data (IP /subnetmask) ignored the port option

    Somehow the

    BACnetAddress::StringToHostPort
    

    function isn't return the port part correctly.  Please check to see if you are using a syntax like

    192.168.0.1/24:47809
    

    , the port comes after the mask.

    Joel

     
  • Matt Adams

    Matt Adams - 2011-10-12

    Joel,
    Are you saying I need to specify the port even if I'm using the default port of 47808?

    Currently I'm using the syntax of

     192.168.0.1/24
    

    since the documentation says if not included it defaults to 47808.

     
  • Joel Bender

    Joel Bender - 2011-10-12

    When you stated that "LAN connection data ignored the port option" I though you ere referring to the fact that you had tried it and it failed, that that you didn't intent to provide it, yet it was working.  You are correct, if you don't provide it, it will default to the standard BACnet port.  Am I over thinking this?

    Joel
    p.s.- note that I turned on the mailing list, but I'm still keeping the forums for a while.

     
  • Matt Adams

    Matt Adams - 2011-10-12

    You're over thinking it. I was just trying to explain why I didn't have a port specified in my config file.

     

Log in to post a comment.