The current Java bacnet driver is mainly based on some work I did some years 
ago. This only allows passive (listening). Sebastian is writing on a brand new 
driver, but I think that's generally done in go currently. But perhaps he can 
tell us more about it.

Chris

Holen Sie sich Outlook für Android<https://aka.ms/AAb9ysg>
________________________________
From: Łukasz Dywicki <[email protected]>
Sent: Thursday, October 6, 2022 6:02:45 AM
To: [email protected] <[email protected]>
Subject: Re: BACnet tests and doubts

I do not plan work in this area since I am still stuck with
bacnet4j-wrapper I made few years ago.
First I need to catch up with 0.10 release and changes in plc4x browse
api in order to see if and how we could migrate functionality.

There are some complex parts in bacnet which will impact driver logic
ie. recognition of supported services, segmentation of requests,
optional nature of change of value (COV) on the device end not to
mention defined semantics of certain objects.
As an example - PLC4X API currently expects that driver itself is able
to tell developer if subscription is supported, but in case of bacnet
it is determined per device basis. One controller can support that,
other might not, hence usefulness of
plcConnection.getMetadata().canSubscribe() might be questioned.

Best,
Łukasz

czw., 6 paź 2022 o 11:54 Iñigo Angulo <[email protected]> napisał(a):
>
> ok, thank you Lukasz for the guide.
> if I can help here in the future, at least for doing tests or something, let 
> me know.
>
> best,
> iñigo
>
>
> ----- Mensaje original -----
> De: "Łukasz Dywicki" <[email protected]>
> Para: "dev" <[email protected]>
> Enviados: Jueves, 6 de Octubre 2022 11:34:00
> Asunto: Re: BACnet tests and doubts
>
> BACnet handshake was not implemented and it worked only on PCAP transport.
> I was trying to do it a while ago (~2 years)
> https://github.com/apache/plc4x/tree/feature/bacnet-active, but back
> then it was not possible due to optional fields which were not handled
> properly. Now they are supported, but my changes are not compatible any
> more and have to be done from scratch.
>
> Long story short - currently bacnet driver is not an "online" driver.
>
> Best,
> Łukasz
>
>
> On 6.10.2022 11:26, Iñigo Angulo wrote:
> > Hi all,
> >
> > I started doing some tests with BACnet, and wanted to ask a question about 
> > using the driver. I am pretty newbie to this protocol, so hope this will 
> > make sense... :)
> >
> > I am using this project (https://github.com/bacnet-stack/bacnet-stack) to 
> > simulate a BACnet device on Linux. Using the server script, it creates a 
> > device with a UDP endpoint (port 47808) on my local network IP. I can see 
> > this endpoint using nmap or nc commands, so I would assume it is available 
> > and ready to receive requests.
> >
> > Then using PLC4X, I created a java main method to try to establish the 
> > connection to the device. The connection string looks as follows:
> >
> > String connectionString = "bacnet-ip:udp://192.168.0.93:47808";
> >
> > try (PlcConnection plcConnection = new 
> > PlcDriverManager().getConnection(connectionString)) {
> > if (!plcConnection.getMetadata().canRead()) {
> > System.out.println("This connection doesn't support reading.");
> > return;
> > }
> > ...
> >
> >
> > However, when running the code, I get the following exception "Active 
> > connections not yet supported":
> >
> > WARNING: An exceptionCaught() event was fired, and it reached at the tail 
> > of the pipeline. It usually means the last handler in the pipeline did not 
> > handle the exception.
> > org.apache.plc4x.java.api.exceptions.PlcRuntimeException: Active 
> > connections not yet supported
> > at 
> > org.apache.plc4x.java.bacnetip.protocol.BacNetIpProtocolLogic.onConnect(BacNetIpProtocolLogic.java:92)
> > at 
> > org.apache.plc4x.java.spi.Plc4xNettyWrapper.userEventTriggered(Plc4xNettyWrapper.java:203)
> > ...
> >
> > So, I saw there is this 'passive' booelan attribute that gets initiated as 
> > false, and have to admit Im pretty lost about where it is set... maybe the 
> > problem is related to the actual device? or is it something I am missing on 
> > the configuration of the connection?
> >
> > By the way, I am using the code from 'origin/rel/0.10' branch, getting the 
> > build as 0.10.1-SNAPSHOT
> >
> > Thank you in advance! (and sorry if is a misconception about using the 
> > protocol itself...)
> >
> > regards,
> > iñigo
> >
> >
> >

Reply via email to