BHH", 6, 8202, 4).hex() Out[2]: '06200a0004' It should output:'0620100004'. It should be a modbus instruction, which will cause " /> BHH", 6, 8202, 4).hex() Out[2]: '06200a0004' It should output:'0620100004'. It should be a modbus instruction, which will cause " /> BHH", 6, 8202, 4).hex() Out[2]: '06200a0004' It should output:'0620100004'. It should be a modbus instruction, which will cause "/>

I'm having trouble with the python struct.pack() function for packing data into a byte sequence

60 Views Asked by At
In [2]: struct.pack(">BHH", 6, 8202, 4).hex()
Out[2]: '06200a0004'

It should output:'0620100004'. It should be a modbus instruction, which will cause the crc validation to fail, how can I fix it

0

There are 0 best solutions below