convertersystems / opc-ua-client

Visualize and control your enterprise using OPC Unified Architecture (OPC UA) and Visual Studio.
MIT License
397 stars 115 forks source link

Cannot connect to S7-1212C with Firmware >=v4.5.0 #201

Closed djonasdev closed 3 years ago

djonasdev commented 3 years ago

The connection establishment fails after a short time with a channel faulted event:

grafik

A connection is still possible with the previous firmware version v4.4.1.

Can someone reproduce this phenomenon? I tested it with two different 1212C.


With the dataFEED OPC UA Demo Client I'm able to connect and browse the CPU (https://industrial.softing.com/de/produkte/opc-ua-und-opc-classic-sdks/opc-ua-demo-client.html).

awcullen commented 3 years ago

I found the same issue when connecting to a S7-1215C with latest firmware 4.5.0.

I was able to fix it by specifying a much longer TimeoutHint.

                var channel = new UaTcpSessionChannel(
                    appDescription,
                    certificateStore,
                    new AnonymousIdentity(),
                    discoveryUrl,
                    options: new UaTcpSessionChannelOptions { TimeoutHint = 30000 });

The time to connect with secure channel is longer in this firmware.

Another way to go is to turn off encryption.

                var channel = new UaTcpSessionChannel(
                    appDescription,
                    certificateStore,
                    new AnonymousIdentity(),
                    discoveryUrl,
                    securityPolicyUri: SecurityPolicyUris.None);

Then the connection time is immediate.