Skip to main content
Huawei SUN2000 inverters support several physical and logical paths to Modbus. Choosing the right one depends on your inverter generation, whether an SDongle is fitted, and how many simultaneous clients you need. The table below summarizes every supported method, then the sections that follow give you step-by-step connection instructions and the full FC 0x41 file-transfer protocol.

Connection method comparison

V3 inverters with updated SDongle firmware changed the default Modbus TCP port from 502 to 6607. If your connection attempt to port 502 fails, enable third-party Modbus access in the FusionSolar App under the SDongle settings, then connect on port 6607.

SDongle TCP connection (Python)

Use this method when your inverter has an SDongle connected to your local network (Ethernet or Wi-Fi) and you have activated third-party Modbus access in the FusionSolar App.
1

Find the SDongle's IP address

Open the FusionSolar App, navigate to your plant, and locate the SDongle device details. Alternatively, check your router’s DHCP client list for a device whose MAC prefix matches Huawei.
2

Activate Modbus TCP in the FusionSolar App

In the App, go to Settings → SDongle → Advanced and enable Modbus TCP access. This step is required for new-firmware SDongles.
3

Install pymodbus

4

Connect and read registers

RS-485 RTU connection (Python)

Use this method on V2 inverters or any installation without an SDongle. Connect an RS-485 USB adapter to the inverter’s COM port.
1

Wire the RS-485 adapter

Connect the adapter’s A(+) and B(−) terminals to the corresponding RS-485 terminals on the inverter. Use shielded twisted-pair cable and keep the run under 1200 m.
2

Install pymodbus and pyserial

3

Connect and read registers

When reading large log files over RS-485 using FC 0x41, set your response timeout to 5–10 seconds. The ARM processor needs time to retrieve data from the inverter’s internal Flash storage before it can fill the transmit buffer.

FC 0x41: proprietary log file transfer

Standard Modbus function codes (FC 03 and FC 04) are limited to 252 bytes per packet, which is not practical for multi-megabyte EMAP log files. Huawei introduced FC 0x41 (User Defined Function) to turn the inverter into a file server.

Catalog files

Before requesting a log, you retrieve a catalog that lists available files and their sizes:

Sub-function protocol

FC 0x41 uses three sub-functions to transfer a file:
1

Sub-function 0x05 — Start Upload

The master sends a Start Upload request specifying the file type (for example, 0x04 for logs). The inverter responds with the total file size and confirms it will deliver data in 240-byte chunks. The 240-byte chunk size fits neatly inside a 256-byte Modbus frame including headers, ensuring stability even on older V2 RS-485 links.
2

Sub-function 0x06 — Upload Data

The master iterates through the file by requesting chunks sequentially by Frame SN (sequence number). Each packet carries a CRC checksum. If a packet fails its CRC check, the master re-requests the same Frame SN — no need to restart the transfer.
3

Sub-function 0x07 — End Upload

After receiving the final chunk, the master sends an End Upload request to close the session. This releases resources on the inverter side.

Integrity and timing

  • CRC per packet — every 240-byte chunk is individually checksummed. A corrupt packet is re-requested by its Frame SN rather than restarting the full transfer.
  • Frame SN — monotonically increasing sequence numbers let the master detect and recover from dropped packets.
  • Timeouts — on V2 over RS-485 the first response can take 5–10 seconds while the ARM processor loads data from Flash into the send buffer. Always configure a generous response timeout; subsequent chunks typically arrive faster once the buffer is primed.
Do not attempt FC 0x41 file transfers while another Modbus client is actively polling registers. The inverter’s ARM processor handles both tasks on a single communication stack, and concurrent access can cause timeouts or corrupt chunk sequences.