goprotos7 is a standalone server that implements a protocol compatible with S7 communication, commonly used by industrial automation systems and PLCs. It is intended for testing, education, and development of SCADA/HMI tools and industrial simulators.
β οΈ This software is not affiliated with Siemens AG or any proprietary implementation.
It is an independent, reverse-engineered protocol implementation for compatibility and research purposes only.
- Implements ISO-on-TCP (RFC 1006) with COTP session negotiation
- Supports request connection
- Supports response request connection
- Supports PDU (Protocol Data Unit) request
- Implements S7 communication protocol
- readvar request and response
- writevar request and response
- user-data SZL request for CPU info (
GetCPUInfo)
- Simulates access to Data Blocks (DB)
- Goals:
- ReadVar
- WriteVar
- Goals:
- Simulate wrong request package response error
Install latest binaries with Go:
# Server go install github.com/brunolkatz/goprotos7/cmd/goprotos7@latest # s7db CLI go install github.com/brunolkatz/goprotos7/s7db/cmd/s7db@latest
Build locally:
go build -o goprotos7 ./cmd/goprotos7 go build -o s7db ./s7db/cmd/s7db
Run:
| Env | Default Value | Description |
|---|---|---|
--bin-folder or -b |
Target BINs files folder. | |
--port or -p |
102 |
The port to listen on. If empty, the default port 102 will be used. |
goprotos7 --bin-folder ./db
The service will start listening on port 102 by default, which is the standard port for S7 communication.
s7db is the current CLI for managing S7 DB schemas, packing/unpacking DB binaries, watching PLC values, heartbeat handling, and running s7sim scripts.
For more information, see: ./s7db/README.md