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