<?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[Basic Bacnet4j Question]]></title><description><![CDATA[<p dir="auto">I have a basic question about bacnet4j I hope someone can answer...</p>
<p dir="auto">I posted this same question last year, never got an answer and never figured it out.  I am back at it again attempting to read data from bacnet devices using Java.  I looked around on this forum and this same sort of question has come up many times without an answer.  If someone with bacnet4j knowledge can answer this question I believe you will be helping a lot of folk now and in the future.</p>
<p dir="auto">What I am trying to do:</p>
<p dir="auto">I have a computer on a IP network running an application that will need to read temperature data from a bacnet devices that is behind a BAS router (BACnet Multi-Network Router by Contemporary Controls) which is on the same IP subnet.  The computer's IP is 10.0.0.111.  The BAS router's IP is 10.0.051.  Netmask 255.255.255.0.  The bacnet device ID I want to talk to is 5.</p>
<p dir="auto">I have no idea where to start?  I come from the IP world where things have IP addresses and ports.  I can't seem to figure out what IP addresses and ports mean as it relates to local and remote bacnet devices.  If someone could describe what a remote device and a local device is in the world of bacnet4j that would help greatly!   In my scenero above the computer running the java application the local device? Is the bacnet device ID #5 the remote devices.   I have looked through all of the test classes and I am still lost.</p>
<p dir="auto">LocalDevice localDevice = new localDevice(1234, "10.0.0.255")</p>
<p dir="auto">What is 1234?  I know it is a port, but a port on where, the local computer?  If so then I assume 10.0.0.255 an interface on the local computer. If so why don't the examples just bind to the localhost?</p>
<p dir="auto">localDevice.sendBroadcast(2068,null, new WhoIsRequest());</p>
<p dir="auto">What is 2068?  How does this relate to the port 1234 above?</p>
<p dir="auto">Help!</p>
<p dir="auto">Thanks (with fingers crossed) Dan</p>
]]></description><link>https://forum.mango-os.com/topic/1009/basic-bacnet4j-question</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 11:17:24 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1009.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 May 2012 23:15:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Basic Bacnet4j Question on Thu, 24 May 2012 18:37:33 GMT]]></title><description><![CDATA[<p dir="auto">I finally got it to work...</p>
<p dir="auto">LocalDevice localDevice = new LocalDevice(1234, "10.0.0.255", "10.0.0.111");<br />
localDevice.initialize();<br />
localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));<br />
localDevice.getEventHandler().addListener((DeviceEventListener) new Listener());</p>
<p dir="auto">I now successfully receive an "i am" from all the bacnet devices expected.</p>
<p dir="auto">In the many of the test examples the LocalDevice constructor used was:</p>
<p dir="auto">LocalDevice localDevice = new LocalDevice(1234, "10.0.0.255");</p>
<p dir="auto">I was never able to get any of those examples to work using this form of the constructor.  The javadoc offers no help so I have no idea what address it is trying to bind to when you don't specify an address.  I would suggest the test examples use the other constructor.  Will save newbies a lot of frustration.</p>
<p dir="auto">Dan</p>
]]></description><link>https://forum.mango-os.com/post/6385</link><guid isPermaLink="true">https://forum.mango-os.com/post/6385</guid><dc:creator><![CDATA[djrosu]]></dc:creator><pubDate>Thu, 24 May 2012 18:37:33 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Bacnet4j Question on Tue, 22 May 2012 21:12:39 GMT]]></title><description><![CDATA[<p dir="auto">That should work. If not, try 255.255.255.255 and get more specific from there.</p>
]]></description><link>https://forum.mango-os.com/post/6384</link><guid isPermaLink="true">https://forum.mango-os.com/post/6384</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Tue, 22 May 2012 21:12:39 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Bacnet4j Question on Tue, 22 May 2012 19:22:04 GMT]]></title><description><![CDATA[<p dir="auto">If if the PC running bacnet4j has an IP address of 10.0.0.8 and netmask 255.255.255.0 should the IP address specified in the localDevice method then be 10.0.0.255?</p>
]]></description><link>https://forum.mango-os.com/post/6382</link><guid isPermaLink="true">https://forum.mango-os.com/post/6382</guid><dc:creator><![CDATA[djrosu]]></dc:creator><pubDate>Tue, 22 May 2012 19:22:04 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Bacnet4j Question on Tue, 22 May 2012 18:52:00 GMT]]></title><description><![CDATA[<p dir="auto">It is a UDP broadcast address.</p>
]]></description><link>https://forum.mango-os.com/post/6380</link><guid isPermaLink="true">https://forum.mango-os.com/post/6380</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Tue, 22 May 2012 18:52:00 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Bacnet4j Question on Tue, 22 May 2012 18:22:28 GMT]]></title><description><![CDATA[<p dir="auto">Thank you so much for the info.</p>
<p dir="auto">The other confusion I am having is with the IP addresses. Is the IP address specified in the localDevice() call the IP address of the machine running bacnet4j?  If so couldn't you just use localhost? I also noticed in some examples they use a broadcast IP address (such as the example above)...</p>
]]></description><link>https://forum.mango-os.com/post/6379</link><guid isPermaLink="true">https://forum.mango-os.com/post/6379</guid><dc:creator><![CDATA[djrosu]]></dc:creator><pubDate>Tue, 22 May 2012 18:22:28 GMT</pubDate></item><item><title><![CDATA[Reply to Basic Bacnet4j Question on Thu, 17 May 2012 23:32:31 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">If someone could describe what a remote device and a local device is in the world of bacnet4j that would help greatly!</p>
</blockquote>
<p dir="auto">BACnet devices are all peers of one another. To exist in a BACnet network, you (figuratively) must be a BACnet device. The "local" device is the BACnet device that the instance of BACnet4J represents. Everything else - including other instances of BACnet4J running on the same box - is a "remote" device.</p>
<blockquote>
<p dir="auto">What is 1234? I know it is a port...</p>
</blockquote>
<p dir="auto">It is not a port. That is the device id of the local device. All devices in the network are supposed to have a unique id, although in practice this is not strictly enforced. Your CC box has a device id of 5.</p>
<blockquote>
<p dir="auto">What is 2068? How does this relate to the port 1234 above?</p>
</blockquote>
<p dir="auto">That is the port to which you want to send the broadcast. Typically devices listen at port 0xBAC0 (47808), but BACnet4J is capable of working with alternate ports.</p>
]]></description><link>https://forum.mango-os.com/post/6376</link><guid isPermaLink="true">https://forum.mango-os.com/post/6376</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Thu, 17 May 2012 23:32:31 GMT</pubDate></item></channel></rss>