Брутфорс - наше всё! :-) Я поковырялся в дебрях исходников, походу
да, у них там бага: https://github.com/DreamSourceLab/DSView/blob/master/libsigrokdecode4DSL/decoders/modbus/pd.py
def parse_write_multiple(self):
'''Function 15 and 16 are almost the same, so we can parse them both
using one function.'''
self.mimumum_length = 8
function = self.data[1].data
if function == 15:
data_unit = 'Coils'
max_outputs = 0x07B0
long_address_offset = 10001
elif function == 16:
data_unit = 'Registers'
max_outputs = 0x007B
long_address_offset = 30001
self.puti(1, 'function',
'Function {}: Write Multiple {}'.format(function, data_unit))
starting_address = self.half_word(2)
# Some instruction manuals use a long form name for addresses, this is
# listed here for convienience.
address_name = long_address_offset + starting_address
self.puti(3, 'address',
'Start at address 0x{:X} / {:d}'.format(starting_address,
address_name))
quantity_of_outputs = self.half_word(4)
if quantity_of_outputs <= max_outputs:
self.puti(5, 'data',
'Write {} {}'.format(quantity_of_outputs, data_unit))
else:
self.puti(5, 'error',
'Bad value: {} {}. Max is {}'.format(quantity_of_outputs,
data_unit, max_outputs))
self.check_crc(7)
CRC для этой команды они считают не глядя на размеры пакета. В других местах логика бывает погибче " self.check_crc(bytecount + 4)"