No sequence definition found for vendorId=8
-
Hi! I'm working on an acquisition application and I am getting some exceptions when running my application.
My code is:
localDevice = new LocalDevice(1234,serverAddress);
localDevice.initialize();
localDevice.sendBroadcast(47808, new WhoIsRequest());
Thread.sleep(5000);
remoteDevices = localDevice.getRemoteDevices();I'm finding 30 devices but I'm getting multiple BacnetException and IpMessageControl$MessageValidationAssertionException coming from the library. Any Idea about what's causing this?
com.serotonin.bacnet4j.exception.BACnetException: Error while creating APDU:
at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.runImpl(IpMessageControl.java:502)
at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.run(IpMessageControl.java:456)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.serotonin.bacnet4j.exception.BACnetErrorException: No sequence definition found for vendorId=8, serviceNumber1
at com.serotonin.bacnet4j.type.Encodable.readVendorSpecific(Encodable.java:338)
at com.serotonin.bacnet4j.service.unconfirmed.UnconfirmedPrivateTransferRequest.<init>(UnconfirmedPrivateTransferRequest.java:75)
at com.serotonin.bacnet4j.service.unconfirmed.UnconfirmedRequestService.createUnconfirmedRequestService(UnconfirmedRequestService.java:44)
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:499)
... 4 moreAND
com.serotonin.bacnet4j.npdu.ip.IpMessageControl$MessageValidationAssertionException: Network messages are not supported
at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.runImpl(IpMessageControl.java:491)
at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.run(IpMessageControl.java:456)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)Thank you very much!
Eric
-
Hi Eric,
The first one, "No sequence definition found for vendorId", means that your Delta equipment (i.e. vendor #8) is sending a vendor specific message that your BACnet4J instance has not been configured to interpret.
The second one means that the message has NPCI settings that BACnet4J does not know how to handle.
For both cases, please post a wire dump and i'll see what can be done.
-
Is there a way to configure Wireshark for getting
only information going to/coming from my Java app?Thanks for the fast reply!
Eric
-
The only simple thing i know of is "non-promiscuous" mode, which restricts traffic to only that coming or going from your host. I believe you can also create specific filters too.
-
Hi Eric,
Ok, i got the captures. Regarding "Network messages are not supported", i believe this to be a valid exception. A "network message", i.e. a message that is being routed between BACnet networks is being received by BACnet4J. Since BACnet4J is only for application layer use, it should not be receiving these messages. I can provide a means to ignore such messages and silence the exceptions.
For the proprietary message, i'll need you to look up the their sequence definition for their proprietary service with id "1". Given this, i can create a class to parse the data.
-
I don't know how and where to look to get the informations for the proprietary message. Do I ask
Delta Controls directly?Eric
-
Yes, they will certainly know.
-
Has this been resolved? I have the latest bacnet4j distribution (1.1) and a Delta board and get the same error.
-
You need to get the vendor-specific message format from the vendor. Once you have it you can write the code to handle it in your impl. You might also post it here to be added to the distro.
-
I don't need these messages for anything, and I don't really have a Delta rep I can ask for the encodings (I'm doing some contract work for another company that uses Delta boards).
Is there any way to configure the library to simply ignore these messages rather than erroring and filling up my log files?
Regards,
-
Just to clarify... I'm not soliciting these messages. They are some sort of broadcast that I'm getting once I create a LocalDevice on the same network as the Delta board.
-
Understood. Eric had the same problem. I've uploaded a new version of the product to SF, version 1.2. It has some enhancements regarding vendor-specific services. In particular, you will no longer see a stack trace when you receive these messages, but rather just a one liner that provides the vendor id, service number, and the byte queue of the remaining message (with context ids).
If you want to suppress the message (i.e. you have no intention of implementing the sequence definition for the service), the simplest way is to just override the DefaultExceptionListener class and provide a new implementation of the unimplementedVendorService method.
class MyExceptionListener extends DefaultExceptionListener { @Override public void unimplementedVendorService(UnsignedInteger vendorId, UnsignedInteger serviceNumber, ByteQueue queue) { // do nothing. } }
This allows you to be picky if you want to be, and still log messages that you don't expect. In your case of the Delta message you might do this:
class MyExceptionListener extends DefaultExceptionListener { @Override public void unimplementedVendorService(UnsignedInteger vendorId, UnsignedInteger serviceNumber, ByteQueue queue) { if (vendorId.intValue() == 8 && serviceNumber.intValue() == 1) { // do nothing } else super.unimplementedVendorService(vendorId, serviceNumber, queue); } }
And finally, you need to register your listener with LocalDevice to get it to work:
LocalDevice.setExceptionListener(new MyExceptionListener());
NOTE: the 1.2 version is now licensed under GPL (replacing LGPL). If you want to use this product commercially, you should contact Serotonin to obtain an alternative license that permits commercial use.
-
Works like a charm. Thanks!