Install the gateway
The gateway is the same Protocol Bridge, without a desktop window. It runs as a Windows service, starts with the machine, restarts after failures and serves its user interface in the browser.
Install as a Windows service
Section titled “Install as a Windows service”-
Copy the gateway files to the machine, e.g. to
C:\ProtocolBridge. (From source:dotnet publish apps/ProtocolBridge.Gateway -c Release -r win-x64 -o C:\ProtocolBridge.) -
Open PowerShell as Administrator and run:
Terminal window C:\ProtocolBridge\scripts\install-service.ps1 -Urls "http://localhost:5180" -
Open http://localhost:5180 in a browser on that machine.
The service is called ProtocolBridgeGateway (display name Protocol Bridge Gateway). It starts
automatically, restarts 5 seconds after a crash (60 seconds after the third crash in a day)
and logs to the Windows Event Log.
| Parameter | Default | Meaning |
|---|---|---|
-Name |
ProtocolBridgeGateway |
service name |
-Exe |
..\ProtocolBridge.Gateway.exe next to the script |
the gateway program |
-Urls |
http://localhost:5180 |
where the web UI listens |
To remove the service, run C:\ProtocolBridge\scripts\uninstall-service.ps1 as Administrator.
Open the firewall for server endpoints
Section titled “Open the firewall for server endpoints”Systems that read from the gateway (SCADA, OPC UA clients, Modbus masters) connect to its server endpoints, so their ports must be open:
New-NetFirewallRule -DisplayName 'IEC 104' -Direction Inbound -Protocol TCP -LocalPort 2404 -Action AllowNew-NetFirewallRule -DisplayName 'OPC UA' -Direction Inbound -Protocol TCP -LocalPort 4840 -Action AllowNew-NetFirewallRule -DisplayName 'Modbus' -Direction Inbound -Protocol TCP -LocalPort 502 -Action AllowClient endpoints connect outwards and need no inbound rule.
Application settings
Section titled “Application settings”appsettings.json next to ProtocolBridge.Gateway.exe:
{ "Urls": "http://localhost:5180", "ProtocolBridge": { "AutoStart": true, "Runtime": "Process", "ConfigurationPath": "C:\\ProgramData\\ProtocolBridge\\gateway.json" }}| Setting | Default | Meaning |
|---|---|---|
ProtocolBridge:ConfigurationPath |
%ProgramData%\ProtocolBridge\gateway.json |
the configuration file |
ProtocolBridge:AutoStart |
true |
start enabled endpoints when the service starts |
ProtocolBridge:Runtime |
Process |
Process: the gateway starts the protocol runtime itself. Remote: connect to a runtime that already runs (set RuntimeUrl and RuntimeToken) |
In Process mode the gateway starts protocolbridge-runtime.exe from its folder on 127.0.0.1
with a random port and token, and restarts it if it stops unexpectedly.
Status API
Section titled “Status API”For monitoring, the gateway has a read-only HTTP API next to its UI:
| Request | Returns |
|---|---|
GET /api/endpoints |
every endpoint with its state |
GET /api/endpoints/{id}/points |
the live points of one endpoint |
GET /api/mappings |
every mapping |