• I
    ilyass

    Hi,

    I am new in Bacnet and Bacnet4J. I am developping an slave bacnet application. this application has to discover a list of bacnet objects/devices and after to manage its. I am using VTS (Virtual Tset Shell) to test my application.
    I have some questions, so :

    1- i create a localDevice

    LocalDevice localDevice = new LocalDevice(1, "10.193.224.255", "10.193.224.239");
    

    10.193.224.255 : address broadcast
    and after i initialise it

    try {
             	localDevice.initialize();
             }catch(IOException e) {
             	System.out.println("IO Error!");
             	e.printStackTrace();
             	return;
             }
    

    finally i send a broadcast request

    localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));
    

    but the list of object is empty and VTS doesn't receive any thing, i don't know why because with VTS i create devices and objects that have "10.193.224.177" address IP. So i don't know how i can do this

    2- what is the different between remoteDevice and localDevice ?

    3- second test : with VTS i send WhoIsRequest

    after i create a bacnet object in my application

    LocalDevice localDevice = new LocalDevice(1, "10.193.224.255", "10.193.224.239");         
             BACnetObject bacnetObj = new BACnetObject(localDevice, new ObjectIdentifier(ObjectType.analogInput, 10));
             bacnetObj.setProperty(PropertyIdentifier.objectName, new CharacterString("TemperatureSensorOneRF"));
             bacnetObj.setProperty(PropertyIdentifier.description, new CharacterString("Controller of TemperatureSensor"));
    

    after i send :

     localDevice.sendBroadcast(0xBAC0, new IAmRequest(new ObjectIdentifier(ObjectType.analogInput, 10), new UnsignedInteger(1024), Segmentation.noSegmentation, new UnsignedInteger(236)));
    

    But VTS doesn't receive any thing

    thanks for help

    posted in BACnet4J general discussion read more
  • I
    ilyass

    I am new in bacnet devloppment, i develop a bacnet driver Bacnet/IP.
    and i search for an example of creation connection Bacnet/IP and test creation BacnetObject
    I use the VTS stack to test
    thanks

    posted in BACnet4J general discussion read more
  • I
    ilyass

    I mean that the notification doesn't work, but no exception is made.

    when i send this subscription, i received just one time the notification.

    posted in BACnet4J general discussion read more
  • I
    ilyass

    Hi,

    I have always the same problem with the subscriptionCOV service. I want to make it without cancellation. So from the spec we have :

    13.14.1.5 Lifetime

    This parameter, of type Unsigned, shall convey the desired lifetime of the subscription in seconds. A value of zero shall
    indicate an indefinite lifetime, without automatic cancellation. A non-zero value shall indicate the number of seconds that
    may elapse before the subscription shall be automatically cancelled. If both the 'Issue Confirmed Notifications' and 'Lifetime'
    parameters are absent, then this shall indicate a cancellation request. If the 'Lifetime' parameter is present then the 'Issue
    Confirmed Notifications' parameter shall be present.
    So i put this

    
    SubscribeCOVRequest service = new SubscribeCOVRequest(
    					new UnsignedInteger(1), objectIdentifier,
    					new Boolean(true), new UnsignedInteger(0));
    try {
            localDevice.send(remoteDevice, service);
    	log.info("subsciption of " + objectIdentifier.getObjectType()
    						+ "-" + objectIdentifier.getInstanceNumber() + " done");
    } catch (BACnetException e) {
    	log.error("unable to send <SubscribeCOVRequest> for the Object "
    		+ objectIdentifier.getObjectType()+  "-"+objectIdentifier.getInstanceNumber()+ "\t"+ e.getMessage());
    }
    
    

    I tested lifetime = null, but it doesn't work

    thanks for help

    posted in BACnet4J general discussion read more
  • I
    ilyass

    Hi,

    Thanks for your help, i didn't do that

    It works know

    posted in BACnet4J general discussion read more
  • I
    ilyass

    Hi,

    I have a problem with a new ObjectType that i added, it's CREDENTIAL_INPUT

    when i execute
    for each propertyReference i do

    Encodable encodable = props.getNoErrorCheck(oid, pr);
    

    pr is **PropertyReference **and props is PropertyValues and oid is my ObjectIdentifier

    the result is

    type.toString()=Credential Input
    +pr.toString()=Object name--AmbiguousValue
    +encodable.toString()=Ambiguous([75,e,0,4f,54,45,53,20,52,45,41,44,45,52,20,31])
    +pr.toString()=Object identifier--AmbiguousValue
    +objectIdentifier=Ambiguous([c4,9,40,40,0])
    +pr.toString()=Object type--AmbiguousValue
    +pr.toString()=Description--AmbiguousValue
    +pr.toString()=Present value--AmbiguousValue
    +pr.toString()=Status flags--AmbiguousValue
    +pr.toString()=Reliability--AmbiguousValue
    +pr.toString()=Out of service--AmbiguousValue
    +pr.toString()=Update time--AmbiguousValue
    updateTime=Ambiguous([])
    +pr.toString()=Profile name--AmbiguousValue
    instanceNumber=16384
    

    Do you have an Idea ?

    thanks for help

    posted in BACnet4J general discussion read more
  • I
    ilyass

    Hi,

    I have a question about SubscribeCOVRequest; it is possible to make the subscription COV for all time and not for a specific lifetime ?

    thanks for help

    posted in BACnet4J general discussion read more
  • I
    ilyass

    With VTS, when i sent UnconfirmedTextMessage, i specified a numeric class witch doesn't exists, so my application throws exception

    thank you for your help

    Attachment: download link

    posted in BACnet4J general discussion read more
  • I
    ilyass

    Hi,

    I found the solution of my problem. On VTS I configured the network as remote network but i test in local network. So i changed it and now i receive informations from my application

    Thank you for your help.

    Just an other question, i have this exception when i send UnconfirmedTextMessage via VTS :

    
    
    com.serotonin.bacnet4j.exception.BACnetException: Error while creating APDU: 
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.runImpl(IpMessageControl.java:501)
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.run(IpMessageControl.java:455)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: com.serotonin.bacnet4j.exception.BACnetException: java.lang.reflect.InvocationTargetException
    	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:174)
    	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:186)
    	at com.serotonin.bacnet4j.type.constructed.Choice.read(Choice.java:65)
    	at com.serotonin.bacnet4j.type.constructed.Choice.<init>(Choice.java:54)
    	at com.serotonin.bacnet4j.service.unconfirmed.UnconfirmedTextMessageRequest.<init>(UnconfirmedTextMessageRequest.java:100)
    	at com.serotonin.bacnet4j.service.unconfirmed.UnconfirmedRequestService.createUnconfirmedRequestService(UnconfirmedRequestService.java:46)
    	at com.serotonin.bacnet4j.apdu.UnconfirmedRequest.<init>(UnconfirmedRequest.java:62)
    	at com.serotonin.bacnet4j.apdu.APDU.createAPDU(APDU.java:38)
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.runImpl(IpMessageControl.java:498)
    	... 4 more
    Caused by: java.lang.reflect.InvocationTargetException
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    	at com.serotonin.bacnet4j.type.Encodable.read(Encodable.java:171)
    	... 12 more
    Caused by: com.serotonin.bacnet4j.exception.BACnetErrorException: 29
    	at com.serotonin.bacnet4j.type.primitive.CharacterString.validateEncoding(CharacterString.java:138)
    	at com.serotonin.bacnet4j.type.primitive.CharacterString.<init>(CharacterString.java:80)
    	... 17 more
    
    

    do you know why ?

    thanks

    posted in BACnet4J general discussion read more
  • I
    ilyass

    Hi,

    I am new in Bacnet and Bacnet4J. I am developping an slave bacnet application. this application has to discover a list of bacnet objects/devices and after to manage its. I am using VTS (Virtual Tset Shell) to test my application.
    I have some questions, so :

    1- i create a localDevice

    LocalDevice localDevice = new LocalDevice(1, "10.193.224.255", "10.193.224.239");
    

    10.193.224.255 : address broadcast
    and after i initialise it

    try {
             	localDevice.initialize();
             }catch(IOException e) {
             	System.out.println("IO Error!");
             	e.printStackTrace();
             	return;
             }
    

    finally i send a broadcast request

    localDevice.sendBroadcast(0xBAC0, new WhoIsRequest(null, null));
    

    but the list of object is empty and VTS doesn't receive any thing, i don't know why because with VTS i create devices and objects that have "10.193.224.177" address IP. So i don't know how i can do this

    2- what is the different between remoteDevice and localDevice ?

    3- second test : with VTS i send WhoIsRequest

    after i create a bacnet object in my application

    LocalDevice localDevice = new LocalDevice(1, "10.193.224.255", "10.193.224.239");         
             BACnetObject bacnetObj = new BACnetObject(localDevice, new ObjectIdentifier(ObjectType.analogInput, 10));
             bacnetObj.setProperty(PropertyIdentifier.objectName, new CharacterString("TemperatureSensorOneRF"));
             bacnetObj.setProperty(PropertyIdentifier.description, new CharacterString("Controller of TemperatureSensor"));
    

    after i send :

     localDevice.sendBroadcast(0xBAC0, new IAmRequest(new ObjectIdentifier(ObjectType.analogInput, 10), new UnsignedInteger(1024), Segmentation.noSegmentation, new UnsignedInteger(236)));
    

    But VTS doesn't receive any thing

    thanks for help

    posted in BACnet4J general discussion read more