Skip to content

MODBUS/TCP Security Support #352

Description

@TimT1919

It would be very nice if this Modbus TCP over TLS would be supported.
It seams to be specified by Modbus, see .
I tried to replace the net server with a tls server, but i have issues.
So i debugged the issues and found that only one line needs to be changed for TLS support.
The issue is that the initial socket is use and that node-modbus is not waiting for the tlsSocket.

I changed the following in node-modbus file modbus-tcp-server.js

constructor(server, options) {
        super(options);
        this._server = server;
        server.on('secureConnection', this._onConnection.bind(this));
        //server.on('connection', this._onConnection.bind(this));
}

Maybe it would be fixed with an boolean option that can be used to decide which event is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions