I had to change parity to PARITY_NONE.
I also get extra bytes from the bms which caused a error in unpack.
my raw data for basic info dd03002614de000071487148000e309200000000000125640210030b820b910b6b000000714871480000f8f677
I fixed the error by truncating the data.
expected_len = struct.calcsize( self.__basic_info_struct_format );
data = response[4:-3];#rcs remove header, chksum, stop token
data = data[:expected_len] #rcs wonder what extra ~9bytes is
print( "unpacking to " + self.__basic_info_struct_format + "data len is=" + str( len(data) ) );
unpacked = struct.unpack(self.__basic_info_struct_format, data )
I had to change parity to PARITY_NONE.
I also get extra bytes from the bms which caused a error in unpack.
my raw data for basic info dd03002614de000071487148000e309200000000000125640210030b820b910b6b000000714871480000f8f677
I fixed the error by truncating the data.
expected_len = struct.calcsize( self.__basic_info_struct_format );
data = response[4:-3];#rcs remove header, chksum, stop token
data = data[:expected_len] #rcs wonder what extra ~9bytes is
print( "unpacking to " + self.__basic_info_struct_format + "data len is=" + str( len(data) ) );
unpacked = struct.unpack(self.__basic_info_struct_format, data )