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

  • I have been able to see devices on my local network. However when I try and access something outside my local network, nothing is being discovered.

    
            String ip = "173.122.233.51";//obviously changed.
    
            LocalDevice localDevice = new LocalDevice(1234, ip);
            //LocalDevice localDevice = new LocalDevice(1234, "255.255.255.255");
            //localDevice.getEventHandler().addListener(new Listener());
            localDevice.initialize();
    
    
            // Who is
            InetSocketAddress addr = new InetSocketAddress(InetAddress.getByName(ip), 47808);
            localDevice.sendUnconfirmed(addr, null, new WhoIsRequest());
            //localDevice.sendBroadcast(2068, null, new WhoIsRequest());
            // localDevice.sendUnconfirmed(new Address(new UnsignedInteger(47808), new OctetString(new byte[] { (byte) 96,
            // (byte) 51, (byte) 24, (byte) 1 })), null, new WhoIsRequest());
            // RemoteDevice rd = new RemoteDevice(105, new Address(new UnsignedInteger(47808),
            // new OctetString(new byte[] {(byte)206, (byte)210, 100, (byte)134})), null);
            // rd.setSegmentationSupported(Segmentation.segmentedBoth);
            // rd.setMaxAPDULengthAccepted(1476);
            // localDevice.addRemoteDevice(rd);
    
            Thread.sleep(1000);
            
                if(localDevice.getRemoteDevices().size()>0){
                    System.out.println("Found a remote device");
            }
     else{
                    System.out.println("Didn't find a remote device");
    
     }
    
    
    

    I am using DiscoveryTest.java. I think I've uncommented the lines that are useful to this. Any help would be great. I can see the device with other software so I know the device exists, and that there are devices at that ip address.


  • If you are trying to discover devices on remote networks, other subnets, you will need to have BBMDs configured on each network or create some code to register as a foreign device to some existing device on the other subnet, BACnet uses broadcasts for its discovery. There is information on the BACnet.org site about this.


  • Maybe I'm just missing something here. To me the ip address of 192.168.1.100 and 71.75.74.100 are nearly identical. The only difference in getting to them is all the routers in between. I know I can connect remotely to the device I'm trying to connect. It has a internal web browser that I can connect with. I can also see the bacnet devices at that ip address through another demo program I have.

    I just can't believe this is such an uncommon thing. The first thing I thought of when I saw Bacnet/IP was that now I could remotely manage a device exposed to the outside internet from anywhere in the world. All I am trying to do is request devices on a specific ip address. I guess I just assumed bacnet4j doesn't care where the ip address is located, and routers just take care of where the request needs to go.


  • You can likely still set this up in Mango, but you'll have to explicitly provide the address/device information. As pfs109 said, discovery is done with broadcasts, but - maybe surprisingly - broadcasts are used in both directions, i.e. the WhoIs and the IAm. If the proper ports are opened or correctly forwarded, discovery in remote networks may not work, because broadcasts are (usually) not propagated beyond local networks.


  • Well it seems I may have found out my issue, but still not sure on a solution.

    My other program is sending a "BACnet Cirtual Link Control" message(Just the text I'm seeing in wireshark). Once it gets a response from that, it sends a WhoIs and receives an IAm.

    Well at least I have something to look for now though. :)


  • Duplicate post.