<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[BACnet4J 3.2 and BBMD/Foreign Device Support]]></title><description><![CDATA[<p dir="auto">Can this additional functionality be accessed by manually making entries in either the BDT or FDT tables? If so, can this be accomplished via dashboard or scripting Data Source?</p>
<p dir="auto">How could I accomplish registration using this function via the UI?</p>
<pre><code>public void registerAsForeignDevice(final InetSocketAddress addr, final int timeToLive) throws BACnetException {
        if (timeToLive &lt; 1)
            throw new IllegalArgumentException("timeToLive cannot be less than 1");
        if (getTransport() == null || getTransport().getLocalDevice() == null)
            throw new IllegalArgumentException(...........
</code></pre>
<p dir="auto">The BACnet network I am working with requires Foreign Devices to register with the BBMD in order to route broadcasts.</p>
<p dir="auto">Thank you</p>
]]></description><link>https://forum.mango-os.com/topic/3099/bacnet4j-3-2-and-bbmd-foreign-device-support</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 16:27:40 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3099.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Nov 2017 14:15:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to BACnet4J 3.2 and BBMD/Foreign Device Support on Tue, 21 Nov 2017 20:52:14 GMT]]></title><description><![CDATA[<p dir="auto">Great! Hope that does what you need.</p>
<p dir="auto">Pretty much any time the script is going through Java code to do something, it'll happen during validation or actual runtime the same. Things like the RuntimeManager, JsonEmport or calling the set() function will only actually change things if running, since they're going through mechanisms particular to the scripts.</p>
]]></description><link>https://forum.mango-os.com/post/16271</link><guid isPermaLink="true">https://forum.mango-os.com/post/16271</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 21 Nov 2017 20:52:14 GMT</pubDate></item><item><title><![CDATA[Reply to BACnet4J 3.2 and BBMD/Foreign Device Support on Fri, 13 Oct 2023 18:16:07 GMT]]></title><description><![CDATA[<p dir="auto">Phil, thank you very much.<br />
I added your suggested code to a scripting DS, saved, and was successfully registered after only clicking on the script validation icon. No additional interaction required so far.</p>
<p dir="auto">Registration request was sent -</p>
<p dir="auto"><a href="https://i.imgur.com/kOtl6RJ.png" rel="nofollow ugc">0_1511296630199_7e10a1a2-054c-4101-9ca7-241310bff311-image.png</a></p>
<p dir="auto">and success response returned.</p>
<p dir="auto"><a href="https://i.imgur.com/IemqtB5.png" rel="nofollow ugc">0_1511296660583_e418dbda-e2a8-4145-9898-1ed7893298c4-image.png</a></p>
<p dir="auto">I will continue to watch and provide updates if anything changes. Thanks again!!</p>
]]></description><link>https://forum.mango-os.com/post/16270</link><guid isPermaLink="true">https://forum.mango-os.com/post/16270</guid><dc:creator><![CDATA[Wingnut2.0]]></dc:creator><pubDate>Fri, 13 Oct 2023 18:16:07 GMT</pubDate></item><item><title><![CDATA[Reply to BACnet4J 3.2 and BBMD/Foreign Device Support on Tue, 21 Nov 2017 18:07:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi Wingnutz, great question!</p>
<p dir="auto">I wonder if we should be offering this as optional settings on any local device.</p>
<p dir="auto">Yes you can call it, but I'm not sure the timing will be ideal... you may need to send a broadcast manually afterward.</p>
<p dir="auto">I think what you'll want to do is something like....</p>
<pre><code>if(RuntimeManager.isDataSourceEnabled("DS_BAC_xid") &amp;&amp; !this.initialized) { //ensure the data source has started, so that it has created the local device
  var localDeviceConfig = com.serotonin.ma.bacnet.device.LocalDeviceDwr.getLocalDevice( "12345678-abcd-1234-94ba-9301406140aa" ); //get this by exporting your BACnet source or local devices, the local device id
  var localDevice = com.serotonin.ma.bacnet.device.LocalDeviceFactory.getLocalDevice(localDeviceConfig, null);
  var ipNetwork = localDevice.getNetwork();
  try {
    ipNetwork.registerAsForeignDevice( new java.net.InetSocketAddress("192.168.1.123", 0xBAC0), 60 );
    //You may want to do a broadcast? new com.serotonin.ma.bacnet.BACnetDiscovery(com.serotonin.m2m2.Common.getTranslations(), "local_device_id");
    this.initialized = true;
  } catch(e) {
      this.initialized = false;
      //print(e.getMessage());
  } finally {
    com.serotonin.ma.bacnet.device.LocalDeviceFactory.releaseLocalDevice(localDevice, null);
  }
} else {
  this.initialized = false; //should the data source be restarted, this script would have to observe it off for a poll to register again. 
  //If this were a problem, you could use a binary point on the script to reinitialize the bacnet data source, 
  //  RuntimeManager.disableDataSource(xid), sleep at least one poll period of the bacnet DS, 
  //  or wait on com.serotonin.m2m2.Common.runtimeManager.isDataSourceRunning(dsid) but you'll need the data source's ID.
}
</code></pre>
]]></description><link>https://forum.mango-os.com/post/16262</link><guid isPermaLink="true">https://forum.mango-os.com/post/16262</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 21 Nov 2017 18:07:04 GMT</pubDate></item></channel></rss>