The invention discloses a method for transmitting data among different
system devices, which comprises the following steps that: a TLV frame consists of a frame header, a tag, length data length, value data and CRC (
Cyclic Redundancy Check) check and is represented by hexadecimal, a frame header 0xFD is added in front of each frame of data, a
machine B judges whether the first
byte of the received data is the frame header or not,
data analysis is carried out, and the data is transmitted to the
machine B; according to the method, the
processing of the next normal message cannot be influenced by the previous
error message, the problem that all the messages are wrong due to the error of one frame can be solved through a mechanism of adding the frame header, a CRC check value is added to the last of each frame of data, once the error of one frame of data occurs, the CRC check of a receiving party must be wrong, and the
processing efficiency of the receiving party is improved. In this way, the next frame of data can be analyzed, the
processing of frame header and
tail CRC
verification is added, the data length is accommodated and expanded to two bytes, the longest 65000 +
byte data can be represented, and most of
Internet of Things data interaction scenes can be covered.