[ 
https://issues.apache.org/jira/browse/PLC4X-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17304779#comment-17304779
 ] 

Adrian Lazar commented on PLC4X-286:
------------------------------------

Hey [~ldywicki],
I am struggling for far too long with setting up a project to use the plc4x-api 
and the profinet-driver, so I decided to ask for help:

The project I created that uses plc4j-api and test-java-profinet-driver (both 
self install 0.9.0-SNAPSHOT) is a Java module project (contains 
module-info.java) and fails to connect: 

{{10:42:24 [oioEventLoopGroup-2-1] INFO org.pcap4j.core.NativeMappings - Pcap4J 
successfully loaded a native pcap library: WinPcap version 4.1.3 (packet.dll 
version 4.1.0.2980), based on libpcap version 1.0 branch 1_0_rel0b (20091008)
10:42:25 [oioEventLoopGroup-2-1] INFO org.pcap4j.util.PropertiesLoader - 
[org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.inet, use 
default value: 2
10:42:25 [oioEventLoopGroup-2-1] INFO org.pcap4j.util.PropertiesLoader - 
[org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.inet6, use 
default value: 23
10:42:25 [oioEventLoopGroup-2-1] INFO org.pcap4j.util.PropertiesLoader - 
[org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.packet, use 
default value: 17
10:42:25 [oioEventLoopGroup-2-1] INFO org.pcap4j.util.PropertiesLoader - 
[org/pcap4j/pcap4j.properties] Could not get value by org.pcap4j.af.link, use 
default value: 18
10:42:25 [oioEventLoopGroup-2-1] INFO org.pcap4j.core.Pcaps - 9 NIF(s) found.
10:42:25 [oioEventLoopGroup-2-1] INFO 
org.apache.plc4x.java.spi.connection.NettyChannelFactory - Unable to connect, 
shutting down worker thread.
10:42:25 [oioEventLoopGroup-2-1] WARN 
io.netty.channel.AbstractChannelHandlerContext - Failed to mark a promise as 
failure because it has succeeded already: 
DefaultChannelPromise@590f6a3e(success)
java.lang.IllegalStateException: close() must be invoked after the channel is 
closed.}}


In my main I am running this:

String connectionString = 
"profinet-dcp://192.168.0.101?sender=50:65:f3:b8:cd:a3";
try (PlcConnection plcConnection = new 
PlcDriverManager().getConnection(connectionString)) {
//... do something with the connection here ..

Is the driver not ready yet to return a valid PlcConnection instance?

> Add profinet-DCP
> ----------------
>
>                 Key: PLC4X-286
>                 URL: https://issues.apache.org/jira/browse/PLC4X-286
>             Project: Apache PLC4X
>          Issue Type: Improvement
>          Components: Driver-Ethernet/IP, Driver-Profinet, Driver-S7
>    Affects Versions: 0.9.0
>            Reporter: Adrian Lazar
>            Priority: Major
>              Labels: beginner, feature, question
>
> I found some work done towards implementing the 
> [profinet-DCP|https://profinetuniversity.com/naming-addressing/profinet-dcp/] 
> protocol on the  [feature/profinet 
> branch|[https://github.com/apache/plc4x/tree/feature/profinet]].
> I see that the profinet protocol is not on the develop branch anymore, was it 
> replaced with the s7 protocol?
> If someone would have the time to guide me, I could work on it to update, 
> test, and bring this discovery feature to PLC4X.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to