Modbus TCP
The Gateway communicates via MQTT and publishes and listens to a number of topics.
However, in firmware 3.7.0 Modbus TCP has been added. Modbus should preferably be used on Gateways that have PSRAM like the E32 V2 and the S3/S3-LR.
See The EMS-ESP Wiki [1] for all the details on the protocol implementation.