Released version 0.5.1 with support for Visual Studio 2010/2012

Since many people have asked how to build libiec61850 with Visual Studio this new release contains a new build system based on cmake that is able to generate solution and project files for Visual Studio, Code Blocks and other tools. With the help of cmake it is now possible to build all examples and the library as a DLL for Windows with Visual Studio 2010 and 2012. To cross-compile for Embedded Linux systems it is recommended to use the old make based build system. The new release also improved server support for the reporting service. Clients can now create new data sets and connect them to existing report control blocks. This enables a more flexible use of reporting (event based message transmission).

23 thoughts on “Released version 0.5.1 with support for Visual Studio 2010/2012

        1. Michael Zillgith Post author

          I have removed some of the problems/standard deviances in version 0.5.2. Other problems IEDScout mentions I cannot really confirm. Either the missing attributes are not defined in the SCL file, or they are defined but in a different way as in the current standard edition. So probably the remainning issues are because IedScout does not test against the current standard edition?

          1. Christian

            Thank you for your modification!
            But with new v0.5.2 version, I can’t run server_sample1 in Ubuntu linux…

            It’s reported “Starting server failed! Exit.”

            I had not modify any source code after download.

          2. Michael Zillgith Post author

            For me this example works on Ubuntu 13.04 (64bit) as well as on Windows 7 (32bit). If the server cannot start this usually means that you are not running as root on a Linux system or another program already uses TCP port 102.

  1. zhangxiao

    struct sockaddr_storage addr;
    int addrLen = sizeof(addr);

    getpeername(self->fd, (sockaddr*) &addr, &addrLen); //this line why not can complie on ver 0.5.1?

    1. Michael Zillgith Post author

      Thanks for the hint! The line has to be changed to:

      getpeername(self->fd, (struct sockaddr*) &addr, &addrLen);

      to compile for both MINGW and VC++. I will include this fix in the next release.

  2. Fernando Covatti

    Great work 🙂
    I’ve been wondering about control support and I am so happy to see that you have implemented it. I’ve been using the MMS code to develop an ICCP client on my work and using the GOOSE publisher to develop a gateway on my masters!

  3. zhangxiao

    https://github.com/stevenblair/discover , have the 9-2 code,this example I tried under QT5.1,works well.
    I tried this.0.5.1 under the visual studio 10,some example can not complied,like this server_example_goose
    1>static_model.c(10): error C2133: “datasets”: unknow size
    1>static_model.c(11): error C2133: “reportControlBlocks”: unknow size

    ……static_model.c(1339): fatal error C1003:error except up 100;stopping complied .

    server_example4
    IsoServer isoServer = IedServer_getIsoServer(iedServer); //not defined..
    but this implend in ied_server.c not in it`s .H .
    In MingW complied good .
    I think compatibleness is the Key.

  4. viking

    Hi,sir
    I am using mingw to compile server _example2 of version 0.5.2.1 and connect server_example2.exe with iedscout1.5. I’ve defined 4 reportcontrolblocks , while the program is running i find the rptid of the 4 reportcontrolblocks are same, they’re the first reportcontrolblock rptid. why? a bug ?

    1. Michael Zillgith Post author

      You are right. There is a bug in MMS access to report control blocks. I will post a fix soon.

      UPDATE: Please have a look at version 0.5.3. It should fix this problem.

  5. Cristian

    I use the client_example1 to comunication with another bussiness IEC61850 server, but it’s error in IsoClientConnection_associate() because no DATA_INDICATION returned;
    The parseIncomingMessage() function had been called for 2 times but returned the same CONNECT_INDICATION (tpduType is the same 0xe0, 0xf0 is right to the second time?) .

    Maybe there are something wrong about Cotp comunication, I’m not sure…

    1. Cristian

      Sorry maybe I used a changed version, please don’t care for it.
      But when I test comunication with 3rd Server by iec61850_client_sample1, it’s hang when recv() func is called.

      I used windows 8 64x version.

      1. Michael Zillgith Post author

        Can you send me a wireshark capture file showing this?

        EDIT: So connection establishment doesn’t work? Can you provide the full packets as a capture file (preferably via email or by a file drop service)? Thanks.

      2. Michael Zillgith Post author

        You can try to decrease the COTP packet size:

        #define CONFIG_COTP_MAX_TPDU_SIZE 8192

        or

        #define CONFIG_COTP_MAX_TPDU_SIZE 1024

        in stack_config.h

        and rebuild all.

  6. tlijun

    Hi Michael Zillgith,
    It’s great work. I have a question that how to make the libiec61850 in a dll format. thanks

    1. Michael Zillgith Post author

      If you use cmake there is a target “iec61850-shared”. You can use this to create Visual Studio project files that are able to build a DLL. There is also the make target “dynlib” that can be used with MinGW.

      1. tlijun

        Hi Michael Zillgith,
        When I use the the command as below,there is a error.Would you please tell me the method to make dll in detail. Thanks very muck.

        >make TARGET=dynlib
        compiling socket_linux.c
        mkdir -p build/src/hal/socket/linux/
        gcc -g -c -Isrc/mms/iso_presentation/asn1c -Isrc/mms/iso_pres
        iso_session -Isrc/mms/iso_cotp -Isrc/mms/iso_acse -Isrc/mms/i
        -Isrc/mms/asn1 -Isrc/mms/iso_client -Isrc/mms/iso_mms/server
        common -Isrc/mms/iso_mms/client -Isrc/mms/iso_mms/asn1c -Isrc
        ocket -Isrc/hal/thread -Isrc/hal/ethernet -Isrc/hal -Isrc/goo
        rver -Isrc/iedclient -Isrc/iedcommon -Isrc/iedserver -Isrc/ie
        /iedserver/mms_mapping -o build/src/hal/socket/linux/socket_l
        et/linux/socket_linux.c
        src/hal/socket/linux/socket_linux.c:25:24: fatal error: sys/s
        le or directory
        #include
        ^
        compilation terminated.
        make: *** [build/src/hal/socket/linux/socket_linux.o] Error 1

        1. Michael Zillgith Post author

          If you want to cross-compile on linux with mingw you have to use

          make TARGET=WIN32 dynlib

Comments are closed.