Giter Site home page Giter Site logo

beanit / iec61850bean Goto Github PK

View Code? Open in Web Editor NEW
136.0 17.0 79.0 1.49 MB

A Java IEC 61850 MMS stack for clients and servers.

Home Page: https://www.beanit.com/iec-61850/

License: Apache License 2.0

Shell 0.26% Batchfile 0.04% Java 99.01% Kotlin 0.69%

iec61850bean's Introduction

IEC61850bean

IEC61850bean (previously known as OpenIEC61850) is a library implementing the IEC 61850 standard based on the MMS mapping for client and server communication.

For detailed information on IEC61850bean visit https://www.beanit.com/iec-61850/.

iec61850bean's People

Contributors

moheyel-dinbadr avatar mzillgith avatar pavel-ch avatar sfeuerhahn avatar stefanfeuerhahn avatar steffenbrauns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iec61850bean's Issues

EOFException in TConnection.startConnection() due to missing (?) maxTPDUSizeParam handling

I use a version of the TConnection which is similar to the one you can find here

https://www.javatips.net/api/openiec61850-master/src/mms/jositransport/src/main/java/org/openmuc/jositransport/TConnection.java

In startConnection() this version does something different when it comes to the maxTPDUSizeParam handling.

int variableLength = 0; if (maxTPDUSizeParam < 16 && maxTPDUSizeParam >= 7) { variableLength += 3; }

The version in your repository simply is doing:

int variableLength = 3;

Now I wanted to switch to your version, but this difference seems to not make our S7 controller happy and I get an EOFException later on when reading the first byte in startConnection().
Seems the remote S7 simply drops the connection.

Is there something we can change in the config of our S7 or is this just missing from the version in your repository? If so, I can prepare a patch then.

Help how to send command MMS ?

Hello.
I need your help. How send the command MMS from this library to device. On this a dataset dev0E0DLDCTRL/MMSRECGGIO1$CF$SPCS01$ctlVal

SclParser does not close FileInputStream

Hello,

I've found that the parse method on the SclParser class does not close the FileInputStream it creates before throwing a SclParseException.

As a result, the file is locked for delete, rename etc. operations.

InitiateResponsePDU: "identify" support mismatch

iec61850bean server wrongly announces support for "identify" request/response in servicesSupportedCalled, if the support was requested from client. But in fact, this service is not implemented by the iec61850bean and should announce "False" for identify, see Wireshark printscreen.
image

Cannot active RCB when reconnect.

I hava a server implimented with iec61850bean, and OMICRON IEDScout as client.

The first time client connect sever with no problems, then I closed IEDScout and reconnect server, the problem is client cannot active RCB.

After restart server, all fine again.

It seemed the server didnot release rcb when disconnect.

Would you please check this?

Release to Maven central

Hi,

It would be useful to release the openiec61850 as a maven dependency, so it could be easily imported into the project.

Client cannot retrieve data model

Hi,
When I try to connect to a server with the console client (or GUI client) the association works but the retrieval of the data model doesn't work. Client stops with

Service error: Error code=22

Having a look with wireshark the client seems to send the exact GetNameList MMS PDU twice in the same message. I have seen that the server responds with a correct GetNameList response anyway.

openiec61850-getmodel-problem

ST value not update on client side.

run ConsoleServer, when change a st value on serverside, client side doesn't update with new value.
MX is ok.

for example:
"QQ1101MONT/GGIO1.Ind1.stVal" not working
"QQ1101MONT/MMXN1.AnIn1.mag.f" working

61850.zip

[Help] Example with SSLSocketFactory

An example for creating a connection using TLS would be great. If I pass the SSLSocketFactory

ClientSap clientSap = new ClientSap(SSLSocketFactory.getDefault());

it works, but the server, which does an TPDU Header version check rejects the connection saying that he expects TPDU Header version 3 but got 16.

Cannot compile ITU provided ASN.1 files

I'm trying to compile ITU provided ASN.1 files and the compiler is generating errors.

The line in question is:

Association-information ::= SEQUENCE SIZE (1, ..., 0 | 2..MAX) OF EXTERNAL

The error is:

Parsing "itu_acse-1.asn"
line 212:45: expecting R_PAREN, found ','
line 212:50: expecting "OF", found ','
Exception in thread "main" java.lang.NullPointerException
at com.beanit.asn1bean.compiler.parser.ASNParser.assignment(ASNParser.java:765)
at com.beanit.asn1bean.compiler.parser.ASNParser.module_body(ASNParser.java:302)
at com.beanit.asn1bean.compiler.parser.ASNParser.module_definition(ASNParser.java:182)
at com.beanit.asn1bean.compiler.parser.ASNParser.module_definitions(ASNParser.java:58)
at com.beanit.asn1bean.compiler.Compiler.getJavaModelFromAsn1File(Compiler.java:129)
at com.beanit.asn1bean.compiler.Compiler.main(Compiler.java:106)

:

Problem setting "Oper" structure (FC=CO)

I'm trying to write a "Oper" structure with functional constraint "CO" using the client GUI, but without success. The problem seems to be related to this instruction:

https://github.com/openmuc/openiec61850/blob/0fb4083d38752d4b9f6d95748d41aa6a01795d6b/src/main/java/org/openmuc/openiec61850/ServerAssociation.java#L1128

In fact, if I comment out this line the write operation seems to work. However, probably that instruction is there for a reason, so just commenting it out is not a very good solution.

[Help] Tag does not match mandatory sequence component.

Hi,

Could someone help me with the exception below? I followed the examples and tested using IED Explorer.

Using com.beanit.iec61850bean.clientgui.ClientGui everything works.

`16:55:53.204 [iec61850bean-server-thread-1] DEBUG com.beanit.iec61850bean.ServerAssociation - Connection was closed by client.

16:56:03.533 [iec61850bean-server-thread-1] WARN com.beanit.iec61850bean.ServerAssociation - IOException decoding received MMS request PDU.
java.io.IOException: Tag does not match mandatory sequence component.
at com.beanit.iec61850bean.internal.mms.asn1.ConfirmedRequestPDU.decode(ConfirmedRequestPDU.java:112)
at com.beanit.iec61850bean.internal.mms.asn1.MMSpdu.decode(MMSpdu.java:209)
at com.beanit.iec61850bean.ServerAssociation.listenForMmsRequest(ServerAssociation.java:450)
at com.beanit.iec61850bean.ServerAssociation.handleConnection(ServerAssociation.java:248)
at com.beanit.iec61850bean.ServerAssociation.handleNewAssociation(ServerAssociation.java:155)
at com.beanit.iec61850bean.ServerSap.connectionIndication(ServerSap.java:307)
at com.beanit.iec61850bean.AcseListener.connectionIndication(AcseListener.java:31)
at com.beanit.josistack.ServerAcseSap.connectionIndication(ServerAcseSap.java:119)
at com.beanit.jositransport.ServerThread$ConnectionHandler.run(ServerThread.java:144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)`

Please look at this picture:
https://github.com/danilocgraciano/iec-server/blob/master/ied_explorer.png

And this is the repo: https://github.com/danilocgraciano/iec-server

Thanks.

ClientAssociation: get a bit in servicesSupported from InitiateResponsePDU

In a client, I want to check the server's ability to define a NamedVariableList prior to any tries to do it. With other client libraries this works well.
There is a bit flag defineNamedVariableList inside sevicesSupported bitstring returned by initiateResponsePdu.getInitResponseDetail().getServicesSupportedCalled(), but the holding variable (byte[] servicesSupported) is local in the ClientAssociation.handleInitiateResponse() method.
Can I make the variable byte[] servicesSupported a private field in ClientAssociation, make a public getter to it and create a PR?

Server dont update changes from Client

I am using the current git repo.
When I am setting for example "ied1lDevice1/DSCH1.NamPlt.vendor[DC]" to "TestClient" via ClientGUI or ConsoleClient, changes are available on each connected Client when sending a "GetDataValue request" for the same node.
So setting data was successful, but when I print the server model in ConsoleServer the changes are not visible.

But when I set the same attribute via "w- write value to model node" from ConsoleServer, changes are visible when printing the server model.

Is this behavior on purpose? Did I miss something?

i got error IED Connection Lost . when i used 3rd party IED Scout .

photo_2023-10-10_17-37-31

when i enable reports then i got error which is mention in image .

exception is : java.io.EOFException
at java.base/java.io.DataInputStream.readByte(DataInputStream.java:272)
at com.beanit.jositransport.TConnection.receive(TConnection.java:501)
at com.beanit.josistack.AcseAssociation.receive(AcseAssociation.java:838)
at com.seiritech.alectra.beanit.iec61850bean.ServerAssociation.listenForMmsRequest(ServerAssociation.java:428)
at com.seiritech.alectra.beanit.iec61850bean.ServerAssociation.handleConnection(ServerAssociation.java:248)
at com.seiritech.alectra.beanit.iec61850bean.ServerAssociation.handleNewAssociation(ServerAssociation.java:155)
at com.seiritech.alectra.beanit.iec61850bean.ServerSap.connectionIndication(ServerSap.java:307)
at com.seiritech.alectra.beanit.iec61850bean.AcseListener.connectionIndication(AcseListener.java:31)
at com.beanit.josistack.ServerAcseSap.connectionIndication(ServerAcseSap.java:119)
at com.beanit.jositransport.ServerThread$ConnectionHandler.run(ServerThread.java:144)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
13:01:49.360 [iec61850bean-server-thread-1] DEBUG c.s.a.b.i.ServerAssociation - Connection was closed by client.

Feature Request: Additional Getters/Setters

Additional set and get methods for the following hard-coded parameters would allow for more flexibility:

In ClientSap.java:
Line 37: private final int proposedMaxServOutstandingCalling = 5;
Line 38: private final int proposedMaxServOutstandingCalled = 5;
Line 39: private final int proposedDataStructureNestingLevel = 10;

In ClientAssociation.java:
Line 101: private static final ParameterSupportOptions proposedParameterCbbBitString =
Line 102: new ParameterSupportOptions(new byte[] {0x03, 0x05, (byte) 0xf1, 0x00});

Thanks!

Problem contacting a new plant

we have build a program for receiving the values from Senvion wind plants. For a new plant, we receive the following exception:
org.openmuc.openiec61850.ServiceError: MMS confirmed error.
at org.openmuc.openiec61850.ClientAssociation.testForErrorResponse(ClientAssociation.java:435) ~[jar:rsrc:openiec61850-1.7.0.jar!/:?]
at org.openmuc.openiec61850.ClientAssociation.encodeWriteReadDecode(ClientAssociation.java:575) ~[jar:rsrc:openiec61850-1.7.0.jar!/:?]
at org.openmuc.openiec61850.ClientAssociation.retrieveDataDefinitions(ClientAssociation.java:867) ~[jar:rsrc:openiec61850-1.7.0.jar!/:?]
at org.openmuc.openiec61850.ClientAssociation.retrieveModel(ClientAssociation.java:728) ~[jar:rsrc:openiec61850-1.7.0.jar!/:?]

We had the same exception with previous versions of the library. With commercial IEC-browsers, everything is fine.

Any idea what's wrong?

What is mean the feture of "Buffered reporting (client only)" ?

Hi! First of all, thank you very much for this open source project, it really helped me a lot, but I have some questions and puzzles about the Buffered Report. According to the help document, I saw Client Only. I want to know that this means that the buffering work is done by the client or does the client control the server to complete the buffering function configuration?

IEC61850bean supports the following IEC 61850 services:

All GetDirectory and GetDataDefinition services
GetDataValues and SetDataValues
Data set services
Unbuffered reporting
Buffered reporting (client only)
Control services

SetFile Service

Are there plans to implement ACSI SetFile / MMS ObtainFile request?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.