Communicate with inverter via RS-232 to Ethernet gateway MOXA NPort 5110A

After some more fiddling around, I can answer the question myself: The checksum calculation above works just fine.

It was just pure stupidity: I accidentally included the first start_byte (0xAA) in the buffer I passed to the function which is actually not involved in the header_checksum (my red box in the picture above is wrong and should start at the frame_flags byte) according to the specification:

image

(see chapter 3.3 on page 7)

Without that byte, the result is correct - so sorry for wasting your time...

1 Like