• S
    soulhunt79

    I am using the following service to sync the time

    DateTime tmptime = new DateTime();
    LD.sendBroadcast(RemotePort,network,new TimeSynchronizationRequest(tmptime));

    The problem I'm having is that I can't actually verify it happened. Is there a way of actually getting the current time from a device?

    posted in BACnet4J general discussion read more
  • S
    soulhunt79

    I have BBMD enabled on my device. Is there anyway to create a client using bacnet4j to talk to this? As I understand it, I need BBMD on both sides.

    I have looked through the test files and nothing to me looks like this, but maybe I'm just expecting something different.

    I can talk locally with a device, but not outside my network.

    posted in BACnet4J general discussion read more
  • S
    soulhunt79

    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.

    posted in BACnet4J general discussion read more
  • S
    soulhunt79

    Hopefully this is a quick fix and I'm just missing something really obvious. I'm using some of the sample code in the test files and getting time outs while trying to get data. Code is below.

    I have tried different values for the OID. When I try "0" it comes back immediately as null which is accurate. The spec sheet is saying AV1-AV145 and BV1-BV36 is valid.

    
    ObjectIdentifier oidtest = new ObjectIdentifier(ObjectType.analogValue, 3);
    PropertyReferences refstest = new PropertyReferences();
    refstest.add(oidtest, PropertyIdentifier.all);
    PropertyValues pvstest = localDevice.readProperties(d, refstest);
    for (ObjectPropertyReference opr : pvstest)
         System.out.println(pvstest.getNoErrorCheck(opr));
    
    

    Second issue is on the object list.

    I have tried the code below. It doesn't work on my device because it doens't support segmentation. Are there some other functions that I could replace here?

    
    
    
    List<ObjectIdentifier> oids = ((SequenceOf<ObjectIdentifier>) localDevice.sendReadPropertyAllowNull(d, d.getObjectIdentifier(), PropertyIdentifier.objectList)).getValues();
    
    
    

    Thanks

    posted in BACnet4J general discussion read more
  • S
    soulhunt79

    I am using the following service to sync the time

    DateTime tmptime = new DateTime();
    LD.sendBroadcast(RemotePort,network,new TimeSynchronizationRequest(tmptime));

    The problem I'm having is that I can't actually verify it happened. Is there a way of actually getting the current time from a device?

    posted in BACnet4J general discussion read more
  • S
    soulhunt79

    I have BBMD enabled on my device. Is there anyway to create a client using bacnet4j to talk to this? As I understand it, I need BBMD on both sides.

    I have looked through the test files and nothing to me looks like this, but maybe I'm just expecting something different.

    I can talk locally with a device, but not outside my network.

    posted in BACnet4J general discussion read more
  • S
    soulhunt79

    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. :)

    posted in BACnet4J general discussion read more
  • S
    soulhunt79

    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.

    posted in BACnet4J general discussion read more
  • S
    soulhunt79

    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.

    posted in BACnet4J general discussion read more