CN107294976A - Communication means and system, receiving terminal based on serial ports - Google Patents
Communication means and system, receiving terminal based on serial ports Download PDFInfo
- Publication number
- CN107294976A CN107294976A CN201710506016.3A CN201710506016A CN107294976A CN 107294976 A CN107294976 A CN 107294976A CN 201710506016 A CN201710506016 A CN 201710506016A CN 107294976 A CN107294976 A CN 107294976A
- Authority
- CN
- China
- Prior art keywords
- state
- byte
- field
- determining
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004891 communication Methods 0.000 title claims abstract description 34
- 238000000034 method Methods 0.000 claims abstract description 55
- 238000012545 processing Methods 0.000 claims abstract description 29
- 230000008569 process Effects 0.000 claims description 17
- 230000007704 transition Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/329—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Communication Control (AREA)
Abstract
The invention provides the communication means based on serial ports and system, receiving terminal, this method, using with receiving terminal, including:Pre-set the state machine of the receiving terminal, and the state machine at least one state, and the corresponding processing procedure of every kind of state is set;A1:The original state at least one state is determined, the original state is regard as current state;A2:Using the state machine, according to the corresponding processing procedure of the current state, the corresponding byte of the current state in the protocol frame that transmitting terminal is sent is determined, byte corresponding to the current state is handled, and determines next state;A3:Next state is transferred to, using next state as current state, A2 is returned to.The invention provides the communication means based on serial ports and system, receiving terminal, the communication in application layer can be realized by serial ports.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a serial port-based communication method and system and a receiving end.
Background
The serial port is a common low-speed communication interface and is widely applied to various embedded systems.
The existing serial port standard only defines the protocols of a physical layer and a link layer, does not have an application layer protocol based on a serial port, and cannot realize communication at the application layer through the serial port.
Disclosure of Invention
The embodiment of the invention provides a serial port-based communication method, a serial port-based communication system and a receiving end, which can realize communication at an application layer through a serial port.
In a first aspect, an embodiment of the present invention provides a serial port-based communication method, where an application and a receiving end include:
presetting a state machine of the receiving end and at least one state of the state machine, and setting a processing process corresponding to each state;
a1: determining an initial state in the at least one state, and taking the initial state as a current state;
a2: determining the byte corresponding to the current state in a protocol frame sent by a sending end according to the processing process corresponding to the current state by using the state machine, processing the byte corresponding to the current state and determining the next state;
a3: transition to the next state, return the next state as the current state to a 2.
Further, the air conditioner is provided with a fan,
the protocol frame includes:
a start flag field, a data byte number field, a command field, a data field, an end flag field, and a check field;
wherein,
the starting mark field is used for storing a starting mark;
the data field is used for storing data to be transmitted;
the data byte number field is used for storing the byte number of the data to be transmitted;
the command field is used for storing a command code number;
the end mark field is used for storing an end mark;
the check field is used for storing check data.
Further, the air conditioner is provided with a fan,
the at least one state comprises: a start state, a data length high byte state, a data length low byte state, a command byte state, a receive data state, an end flag state, a check high byte state, and a check low byte state;
the determining an initial state of the at least one state comprises:
determining the starting state as the initial state;
when the current state is the start state,
the A2, comprising:
determining the starting mark field in the protocol frame, receiving the starting mark of the starting mark field of the protocol frame, judging whether the starting mark is the same as a preset standard starting mark, if so, determining that the next state is the data length high byte state, otherwise, determining that the next state is the starting state;
when the current state is the data length high byte state,
the A2, comprising:
determining the high byte of the data byte number field in the protocol frame, receiving the high byte of the data byte number field, calculating the first byte number corresponding to the high byte of the data byte number field, and determining the next state as the data length low byte state;
when the current state is the data length low byte state,
the A2, comprising:
determining the low byte of the data byte digital field in the protocol frame, receiving the low byte of the data byte digital field, calculating a second byte number corresponding to the low byte of the data byte digital field, determining a first total byte number according to the first byte number and the second byte number, and determining that the next state is the command byte state;
when the current state is the command byte state,
the A2, comprising:
determining the command code number in the command field in the protocol frame, receiving the command code number in the command field, judging whether the command code number is any one of at least one preset standard command code number, if so, determining a command corresponding to the command code number, and determining that the next state is the data receiving state, otherwise, determining that the next state is the starting state; wherein each standard command code number corresponds to at least one command;
when the current state is the received data state,
the A2, comprising:
taking the bytes to be received of the first total byte after the command code number as bytes corresponding to the state of the received data, receiving the bytes to be received of the first total byte after the command code number, and determining that the next state is the state of the end mark;
when the current state is the end flag state,
the A2, comprising:
taking a plurality of bytes of a preset byte after the byte to be received as a byte corresponding to the state of the end mark, receiving the plurality of bytes of the preset byte after the byte to be received, judging whether the plurality of bytes of the preset byte is the same as a preset standard end mark, if so, determining that the next state is the high byte checking state, otherwise, determining that the next state is the starting state;
when the current state is the check high byte state,
the A2, comprising:
determining the high byte of the check field in the protocol frame, receiving the high byte of the check field, calculating a first numerical value corresponding to the high byte of the check field, and determining that the next state is the check low byte state;
when the current state is the check low byte state,
the A2, comprising:
determining the low byte of the check field in the protocol frame, receiving the low byte of the check field, calculating a second numerical value corresponding to the low byte of the check field, determining a total numerical value according to the first numerical value and the second numerical value, checking the protocol frame according to the total numerical value, outputting the analysis content of the protocol frame when the check is passed, determining that the next state is the starting state, and determining that the next state is the starting state when the check is not passed.
Further, the air conditioner is provided with a fan,
the outputting the parsed content of the protocol frame includes:
outputting a command corresponding to the command code number in the protocol frame;
after the outputting the parsed content of the protocol frame, further comprising:
and executing the command corresponding to the command code, and responding to the sending end according to the command corresponding to the command code.
Further, the air conditioner is provided with a fan,
the outputting the parsed content of the protocol frame includes:
outputting the first total number of bytes to be received after the command code number in the protocol frame.
In a second aspect, an embodiment of the present invention provides a receiving end, including:
a state machine and a determination unit;
the state machine is provided with at least one state, and each state is provided with a corresponding processing process;
the determining unit is configured to determine an initial state of the at least one state, and use the initial state as a current state;
the state machine is configured to perform:
a2: determining the byte corresponding to the current state in a protocol frame sent by a sending end according to the processing process corresponding to the current state, processing the byte corresponding to the current state, and determining the next state;
a3: transition to the next state, return to a2 with the next state as the current state.
Further, the air conditioner is provided with a fan,
the protocol frame includes:
a start flag field, a data byte number field, a command field, a data field, an end flag field, and a check field;
wherein,
the starting mark field is used for storing a starting mark;
the data field is used for storing data to be transmitted;
the data byte number field is used for storing the byte number of the data to be transmitted;
the command field is used for storing a command code number;
the end mark field is used for storing an end mark;
the check field is used for storing check data.
Further, the air conditioner is provided with a fan,
the at least one state comprises: a start state, a data length high byte state, a data length low byte state, a command byte state, a receive data state, an end flag state, a check high byte state, and a check low byte state;
the determination unit is configured to determine the start state as the initial state;
the state machine is configured to perform:
when the current state is the start state,
the A2, comprising:
determining the starting mark field in the protocol frame, receiving the starting mark of the starting mark field of the protocol frame, judging whether the starting mark is the same as a preset standard starting mark, if so, determining that the next state is the data length high byte state, otherwise, determining that the next state is the starting state;
when the current state is the data length high byte state,
the A2, comprising:
determining the high byte of the data byte number field in the protocol frame, receiving the high byte of the data byte number field, calculating the first byte number corresponding to the high byte of the data byte number field, and determining the next state as the data length low byte state;
when the current state is the data length low byte state,
the A2, comprising:
determining the low byte of the data byte digital field in the protocol frame, receiving the low byte of the data byte digital field, calculating a second byte number corresponding to the low byte of the data byte digital field, determining a first total byte number according to the first byte number and the second byte number, and determining that the next state is the command byte state;
when the current state is the command byte state,
the A2, comprising:
determining the command code number in the command field in the protocol frame, receiving the command code number in the command field, judging whether the command code number is any one of at least one preset standard command code number, if so, determining a command corresponding to the command code number, and determining that the next state is the data receiving state, otherwise, determining that the next state is the starting state; wherein each standard command code number corresponds to at least one command;
when the current state is the received data state,
the A2, comprising:
taking the bytes to be received of the first total byte after the command code number as bytes corresponding to the state of the received data, receiving the bytes to be received of the first total byte after the command code number, and determining that the next state is the state of the end mark;
when the current state is the end flag state,
the A2, comprising:
taking a plurality of bytes of a preset byte after the byte to be received as a byte corresponding to the state of the end mark, receiving the plurality of bytes of the preset byte after the byte to be received, judging whether the plurality of bytes of the preset byte is the same as a preset standard end mark, if so, determining that the next state is the high byte checking state, otherwise, determining that the next state is the starting state;
when the current state is the check high byte state,
the A2, comprising:
determining the high byte of the check field in the protocol frame, receiving the high byte of the check field, calculating a first numerical value corresponding to the high byte of the check field, and determining that the next state is the check low byte state;
when the current state is the check low byte state,
the A2, comprising:
determining the low byte of the check field in the protocol frame, receiving the low byte of the check field, calculating a second numerical value corresponding to the low byte of the check field, determining a total numerical value according to the first numerical value and the second numerical value, checking the protocol frame according to the total numerical value, outputting the analysis content of the protocol frame when the check is passed, determining that the next state is the starting state, and determining that the next state is the starting state when the check is not passed.
Further, the air conditioner is provided with a fan,
the state machine, when executing the analysis content of the output protocol frame, is specifically configured to:
outputting a command corresponding to the command code number in the protocol frame;
the state machine is further configured to execute the command corresponding to the command code number after the parsing content of the protocol frame is output, and respond to the sending end according to the command corresponding to the command code number.
Further, the air conditioner is provided with a fan,
the state machine, when executing the analysis content of the output protocol frame, is specifically configured to:
outputting the first total number of bytes to be received after the command code number in the protocol frame.
In a third aspect, an embodiment of the present invention provides a serial port-based communication system, including:
a transmitting end and the receiving end of any one of the second aspect;
the sending end is used for sending a protocol frame to the receiving end.
In the embodiment of the invention, the state machine is arranged at the receiving end, the protocol frame is arranged aiming at the serial port, the receiving end and the sending end which are connected through the serial port can communicate at the application layer through the protocol frame, the protocol frame can be analyzed through the state machine at the receiving end to obtain the information which needs to be transmitted by the sending end, and the communication at the application layer can be realized through the serial port.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a serial port-based communication method according to an embodiment of the present invention;
fig. 2 is a flowchart of another serial-based communication method according to an embodiment of the present invention;
FIG. 3 is a state transition diagram of a state machine according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a receiving end according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a serial-based communication system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a serial port-based communication method, where a receiving end is applied, the method may include the following steps:
a0: presetting a state machine of the receiving end and at least one state of the state machine, and setting a processing process corresponding to each state;
a1: determining an initial state in the at least one state, and taking the initial state as a current state;
a2: determining the byte corresponding to the current state in a protocol frame sent by a sending end according to the processing process corresponding to the current state by using the state machine, processing the byte corresponding to the current state and determining the next state;
a3: transition to the next state, return to a2 with the next state as the current state.
In the embodiment of the invention, the state machine is arranged at the receiving end, the protocol frame is arranged aiming at the serial port, the receiving end and the sending end which are connected through the serial port can communicate at the application layer through the protocol frame, the protocol frame can be analyzed through the state machine at the receiving end to obtain the information which needs to be transmitted by the sending end, and the communication at the application layer can be realized through the serial port.
In an embodiment of the present invention, the protocol frame includes:
a start flag field, a data byte number field, a command field, a data field, an end flag field, and a check field;
wherein,
the starting mark field is used for storing a starting mark;
the data field is used for storing data to be transmitted;
the data byte number field is used for storing the byte number of the data to be transmitted;
the command field is used for storing a command code number;
the end mark field is used for storing an end mark;
the check field is used for storing check data.
In the embodiment of the invention, the sending end and the receiving end communicate through the protocol frame. In the protocol frame, the start flag may be a specific value, for example: 02H. The command code number in the command field indicates a command, for example: 01H corresponds to a command to acquire the temperature of the object A, and 02H corresponds to a command to acquire the humidity of the object B. The data to be transmitted in the data field may be values of temperature, humidity, voltage value, current value, etc., which are determined according to the content required by the command corresponding to the command code number in the command field sent by the sending end. For example: the code number of the command sent by the sending end is 01H, then the sending end requires the receiving end to obtain the temperature of the target A, at this time, when the receiving end responds to the sending end, the data to be transmitted in the data field of the protocol frame sent by the receiving end is the temperature of the target A, and at this time, the byte number in the data byte digital field of the protocol frame is the byte number corresponding to the temperature of the target A. The end flag may be a specific value, such as: ddH. The check data in the check field is determined according to the check mode of the protocol frame, for example: the protocol frame adopts a sum check mode, and the check field stores a check sum which is the sum of values in a starting mark field, a data byte number field, a command field, a data field and an ending mark field.
In addition, for each field of the protocol frame, the number of bytes of each field may be specified, for example: the start flag field is 1 byte, the data byte number field is 2 bytes, the command field is 1 byte, the data field can specify a byte range, the end flag field is 1 byte, and the check field is 2 bytes. In addition, the maximum number of bytes of data of the protocol frame can be specified to be 200.
The data in the data field may be data required to execute the command corresponding to the command field.
For the above protocol frame, at least one state of the state machine includes: a start state, a data length high byte state, a data length low byte state, a command byte state, a receive data state, an end flag state, a check high byte state, and a check low byte state;
the determining an initial state of the at least one state comprises:
determining the starting state as the initial state.
That is, each protocol frame received by the receiving end starts processing from the start state.
The corresponding processing procedure for the different state settings is as follows:
when the current state is the start state,
the A2, comprising:
determining the starting mark field in the protocol frame, receiving the starting mark of the starting mark field of the protocol frame, judging whether the starting mark is the same as a preset standard starting mark, if so, determining that the next state is the data length high byte state, otherwise, determining that the next state is the starting state.
Specifically, the start flag of the start flag field of the protocol frame is a byte corresponding to the start state. The preset standard start flag is a standard for the start flag field, and when the standard start flag of the protocol frame is detected, it is described that this is the start of the protocol frame, and it is sufficient to start receiving each subsequent field of the protocol frame with the standard start flag. If the starting mark is the same as the preset standard starting mark, the protocol frame can be transferred to the next state for subsequent processing, if the starting mark is different from the preset standard starting mark, the processing of the protocol frame is ended, the information that the analysis of the protocol frame fails can be output, the protocol frame is restored to the starting state, and the next protocol frame is waited to be processed.
When the current state is the data length high byte state,
the A2, comprising:
determining the high byte of the data byte number field in the protocol frame, receiving the high byte of the data byte number field, calculating the first byte number corresponding to the high byte of the data byte number field, and determining the next state as the data length low byte state.
Specifically, the high byte of the digital field of the data byte is the byte corresponding to the high byte state of the data length.
For example, if the data byte number field is 0002H, the high byte of the data byte number field is 00, and the low byte of the data byte number field is 02; in the high byte state of the data length, only 00 is needed to be processed, and the first byte number is calculated.
When the current state is the data length low byte state,
the A2, comprising:
determining the low byte of the data byte digital field in the protocol frame, receiving the low byte of the data byte digital field, calculating the second byte number corresponding to the low byte of the data byte digital field, determining the first total byte number according to the first byte number and the second byte number, and determining the next state as the command byte state.
Specifically, the low byte of the digital field of the data byte is the byte corresponding to the low byte state of the data length.
For example, if the data byte number field is 0002H, the high byte of the data byte number field is 00, and the low byte of the data byte number field is 02; in the state of low byte of data length, only need to process 02, calculate the second byte number, and, calculate the first total byte number. And the first total byte number is the sum of the first byte number and the second byte number.
When the current state is the command byte state,
the A2, comprising:
determining the command code number in the command field in the protocol frame, receiving the command code number in the command field, judging whether the command code number is any one of at least one preset standard command code number, if so, determining a command corresponding to the command code number, and determining that the next state is the data receiving state, otherwise, determining that the next state is the starting state; wherein each standard command code number corresponds to at least one command.
Specifically, the command code number in the command field is the byte corresponding to the byte status of the command.
Specifically, when the command code number is not any one of the preset at least one standard command code number, it is determined that the protocol frame is in error, the processing of the protocol frame is ended, and information that the resolution of the protocol frame fails can also be output, and the protocol frame is restored to the starting state to wait for processing of the next protocol frame.
The commands corresponding to the standard command codes are fixed in advance, for example: two standard command codes are set, 01H corresponds to a command for acquiring the temperature of the target A, and 02H corresponds to a command for acquiring the humidity of the target B. At this time, if the command code number in the protocol frame is not any one of 01H and 02H, it indicates that the protocol frame has an error, and if it is one of them, the corresponding command is executed, for example: and if the command code number in the protocol frame is 01H, executing a command for acquiring the temperature of the target A.
The command field may indicate the purpose of a particular packet, which may be used to enable the receiving end to execute the corresponding command, or to inform the receiving end what data is in the data field. For example, the protocol frame sent by the sending end is a protocol frame a, the protocol frame a is used for sending a protocol frame B before responding to the receiving end, and the command code of the protocol frame B sent to the sending end before the receiving end is 01H, then, after the sending end executes a command corresponding to 01H, the temperature of the target a is stored in the data field of the protocol frame a, 01H is stored in the command field of the protocol frame a, and after the receiving end receives the protocol frame a, according to 01H in the command field of the protocol frame a, the temperature of the target a stored in the data field of the protocol frame a can be determined.
When the current state is the received data state,
the A2, comprising:
and taking the bytes to be received of the first total byte after the command code number as bytes corresponding to the state of the received data, receiving the bytes to be received of the first total byte after the command code number, and determining that the next state is the state of the end mark.
Specifically, since the number of bytes of data in the data field has already been determined in the previous data byte number field, only the first total byte needs to be received. For example, if the first total byte number in the data field is 10, only 10 bytes after the command code number need to be received in the data receiving state, and these 10 bytes are all data in the data field of the protocol frame.
When the current state is the end flag state,
the A2, comprising:
and taking a plurality of bytes of a preset byte after the byte to be received as a byte corresponding to the state of the end mark, receiving the plurality of bytes of the preset byte after the byte to be received, judging whether the plurality of bytes of the preset byte is the same as a preset standard end mark, if so, determining that the next state is the high byte checking state, otherwise, determining that the next state is the starting state.
Specifically, a number of bytes of a preset byte after the byte to be received is used as an end mark of the end mark field.
Specifically, the preset number of bytes is the length of the end flag field. For example: the length of the end flag field is 1 byte, and then 1 byte after the byte to be received is the byte corresponding to the end flag state.
When the current state is the check high byte state,
the A2, comprising:
determining the high byte of the check field in the protocol frame, receiving the high byte of the check field, calculating a first numerical value corresponding to the high byte of the check field, and determining that the next state is the check low byte state.
Specifically, the high byte of the check field is a byte corresponding to the check high byte state.
For example, if the data byte number field is 00e4H, the high byte of the data byte number field is 00, and the low byte of the data byte number field is e 4; in the state of checking the high byte, only 00 is needed to be processed, and the first numerical value is calculated.
When the current state is the check low byte state,
the A2, comprising:
determining the low byte of the check field in the protocol frame, receiving the low byte of the check field, calculating a second numerical value corresponding to the low byte of the check field, determining a total numerical value according to the first numerical value and the second numerical value, checking the protocol frame according to the total numerical value, outputting the analysis content of the protocol frame when the check is passed, determining that the next state is the starting state, and determining that the next state is the starting state when the check is not passed.
Specifically, the low byte of the check field is a byte corresponding to the check low byte state.
For example, if the data byte number field is 00e4H, the high byte of the data byte number field is 00, and the low byte of the data byte number field is e 4; in the check low byte state, only e4 needs to be processed to calculate the second value and calculate the total value. Wherein the total number is the sum of the first value and the second value.
When the sum is adopted and checked, the check field stores the check sum, and the checking of the protocol frame according to the total value comprises the following steps: and calculating the sum of numerical values in a starting mark field, a data byte numerical field, a command field, a data field and an ending mark field in the protocol frame, judging whether the sum is the same as the calculated total data or not, if so, passing the verification, otherwise, not passing the verification. And when the protocol frame passes the verification, the protocol frame is successfully analyzed, the starting state is returned, the next protocol frame is waited, and if the protocol frame does not pass the verification, the starting state is returned, and the next protocol frame is waited.
For example, if the value of the start flag field is 02H, the value of the data byte number field is 02H, the value of the command field is 03H, the value of the data field is 0H, and the value of the end flag field is ddH, then the sum of the values in the start flag field, the data byte number field, the command field, the data field, and the end flag field is calculated as: 02H +03H +0H + ddH is 00e4H, if the total value calculated for the check low byte status is 00e4H, the check is passed, and if it is not 00e4H, the check is not passed.
Different processing can be performed for different protocol frames, and the specific processing process is as follows:
the first mode is as follows:
the outputting the parsed content of the protocol frame includes:
outputting a command corresponding to the command code number in the protocol frame;
after the outputting the parsed content of the protocol frame, further comprising:
and executing the command corresponding to the command code, and responding to the sending end according to the command corresponding to the command code.
The embodiment is directed to a situation that a sending end needs to obtain data from a receiving end, at this time, data fields in a protocol frame sent by the sending end generally have no data, and the receiving end only needs to execute according to a command corresponding to a command code number in the protocol frame.
The second way is:
the outputting the parsed content of the protocol frame includes:
outputting the first total number of bytes to be received after the command code number in the protocol frame.
The embodiment is directed to a situation that a receiving end needs to acquire data from a transmitting end, that is, data acquired by a command corresponding to a command code number is in a data field in a protocol frame sent by the transmitting end. For example: the command corresponding to the command code number is as follows: the command to obtain the temperature of target a saves the temperature of target a in the data field.
As shown in fig. 2, an embodiment of the present invention provides a serial port-based communication method, including:
step 201: presetting a state machine of a receiving end and at least one state of the state machine, and setting a processing procedure corresponding to each state.
Specifically, at least one state, comprising: a start state, a data length high byte state, a data length low byte state, a command byte state, a receive data state, an end flag state, a check high byte state, and a check low byte state.
Step 202: and determining the starting state as the initial state, and taking the initial state as the current state.
Step 203: in the starting state, determining a starting mark field in the protocol frame, receiving a starting mark of the starting mark field of the protocol frame, judging whether the starting mark is the same as a preset standard starting mark, if so, executing the step 204, otherwise, executing the step 216.
Specifically, the protocol frame includes: a start flag field, a data byte number field, a command field, a data field, an end flag field, and a check field.
For example, the start flag field is 1 byte, the data byte number field is 2 bytes, the command field is 1 byte, the end flag field is 1 byte, and the check field is 2 bytes.
For example: the protocol frame is: 020002030000 dd 00e4, the start flag field is 02H, the number field of data bytes is 0002H, the command field is 03H, the data field is 0000H, the end flag field is ddH, and the check field is 00e 4H.
Step 204: and determining that the next state is the data length high byte state, and transferring to the data length high byte state.
Step 205: determining the high byte of the data byte digital field in the protocol frame in the data length high byte state, receiving the high byte of the data byte digital field, calculating the first byte number corresponding to the high byte of the data byte digital field, determining the next state as the data length low byte state, and transferring to the data length low byte state.
Step 206: determining the low byte of the data byte digital field in the protocol frame in the state of the low byte of the data length, receiving the low byte of the data byte digital field, calculating the second byte number corresponding to the low byte of the data byte digital field, determining the first total byte number according to the first byte number and the second byte number, determining the next state as the state of the command byte, and transferring to the state of the command byte.
Step 207: in the command byte state, determining a command code number in a command field in the protocol frame, receiving the command code number in the command field, judging whether the command code number is any one of at least one preset standard command code number, if so, executing step 208, otherwise, executing step 209.
Wherein each standard command code number corresponds to at least one command.
Step 208: and determining the command corresponding to the command code, determining that the next state is a data receiving state, transferring to the data receiving state, and executing step 210.
Step 209: and determining that the next state is a starting state, and transferring to the starting state.
Step 210: in the data receiving state, a plurality of bytes to be received of the first total byte after the command code number are taken as bytes corresponding to the data receiving state, the plurality of bytes to be received of the first total byte after the command code number are received, the next state is determined to be the end mark state, and the state is transferred to the end mark state.
Step 211: in the end mark state, taking a plurality of bytes of a preset byte after the byte to be received as a byte corresponding to the end mark state, receiving the plurality of bytes of the preset byte after the byte to be received, judging whether the plurality of bytes of the preset byte is the same as a preset standard end mark, if so, executing a step 212, otherwise, executing a step 213;
step 212: determining the next state to be the check high byte state, transition to the check high byte state, step 214 is performed.
Step 213: and determining that the next state is a starting state, and transferring to the starting state.
Step 214: and under the state of checking the high byte, determining the high byte of a check field in the protocol frame, receiving the high byte of the check field, calculating a first numerical value corresponding to the high byte of the check field, determining that the next state is a state of checking the low byte, and transferring to the state of checking the low byte.
Step 215: determining the low byte of a check field in a protocol frame in a check low byte state, receiving the low byte of the check field, calculating a second value corresponding to the low byte of the check field, determining a total value according to the first value and the second value, checking the protocol frame according to the total value, outputting the analysis content of the protocol frame when the check is passed, determining the next state as a starting state, and transferring to the starting state, and determining the next state as the starting state and transferring to the starting state when the check is not passed.
Step 216: and determining that the next state is a starting state, and transferring to the starting state.
As shown in fig. 3, a state transition diagram of a state machine according to an embodiment of the present invention is provided. The state machine is the state machine in the embodiment of fig. 2.
The embodiment of the invention can provide a communication method based on a serial port, wherein the serial port can be an RS-232C serial port, and the RS-232C serial port is used as a common low-speed communication interface and widely applied to various embedded systems. Since only the protocols of the physical layer and the link layer are defined in the RS232C standard, the communication of the application layer can be realized by the embodiment of the present invention.
The serial port-based communication method provided by the embodiment of the invention can be used for controlling the embedded system through the serial port by the external host, acquiring information and interacting some simple information. The protocol frame in the method has the advantages of simplicity, high efficiency, easy expansion and the like, and the method has the advantages of high efficiency, easy understanding and easy expansion by analyzing the protocol frame through the state machine.
The method provided by the embodiment of the invention has stronger portability and can be widely applied to various embedded systems.
In the embodiment of the invention, the protocol frame is analyzed by the state machine and processed according to the bytes, and the protocol frame does not need to be processed after all the protocol frames are received.
The embodiment of the invention can accurately and quickly judge all communication faults and recover communication in receiving a frame data packet, and can prompt a user of error information.
In the embodiment of the invention, when the protocol frame is used, the high byte can be sent first, and then the low byte can be sent.
The method provided by the embodiment of the invention can be realized by the following codes:
as shown in fig. 4, an embodiment of the present invention provides a receiving end, including:
a state machine 401 and a determination unit 402;
the state machine 401 is provided with at least one state, and each state is provided with a corresponding processing procedure;
the determining unit 402 is configured to determine an initial state of the at least one state, and use the initial state as a current state;
the state machine 401 is configured to perform:
a2: determining the byte corresponding to the current state in a protocol frame sent by a sending end according to the processing process corresponding to the current state, processing the byte corresponding to the current state, and determining the next state;
a3: transition to the next state, return to a2 with the next state as the current state.
In an embodiment of the present invention, the protocol frame includes:
a start flag field, a data byte number field, a command field, a data field, an end flag field, and a check field;
wherein,
the starting mark field is used for storing a starting mark;
the data field is used for storing data to be transmitted;
the data byte number field is used for storing the byte number of the data to be transmitted;
the command field is used for storing a command code number;
the end mark field is used for storing an end mark;
the check field is used for storing check data.
In an embodiment of the present invention, the at least one state includes: a start state, a data length high byte state, a data length low byte state, a command byte state, a receive data state, an end flag state, a check high byte state, and a check low byte state;
the determination unit is configured to determine the start state as the initial state;
the state machine is configured to perform:
when the current state is the start state,
the A2, comprising:
determining the starting mark field in the protocol frame, receiving the starting mark of the starting mark field of the protocol frame, judging whether the starting mark is the same as a preset standard starting mark, if so, determining that the next state is the data length high byte state, otherwise, determining that the next state is the starting state;
when the current state is the data length high byte state,
the A2, comprising:
determining the high byte of the data byte number field in the protocol frame, receiving the high byte of the data byte number field, calculating the first byte number corresponding to the high byte of the data byte number field, and determining the next state as the data length low byte state;
when the current state is the data length low byte state,
the A2, comprising:
determining the low byte of the data byte digital field in the protocol frame, receiving the low byte of the data byte digital field, calculating a second byte number corresponding to the low byte of the data byte digital field, determining a first total byte number according to the first byte number and the second byte number, and determining that the next state is the command byte state;
when the current state is the command byte state,
the A2, comprising:
determining the command code number in the command field in the protocol frame, receiving the command code number in the command field, judging whether the command code number is any one of at least one preset standard command code number, if so, determining a command corresponding to the command code number, and determining that the next state is the data receiving state, otherwise, determining that the next state is the starting state; wherein each standard command code number corresponds to at least one command;
when the current state is the received data state,
the A2, comprising:
taking the bytes to be received of the first total byte after the command code number as bytes corresponding to the state of the received data, receiving the bytes to be received of the first total byte after the command code number, and determining that the next state is the state of the end mark;
when the current state is the end flag state,
the A2, comprising:
taking a plurality of bytes of a preset byte after the byte to be received as a byte corresponding to the state of the end mark, receiving the plurality of bytes of the preset byte after the byte to be received, judging whether the plurality of bytes of the preset byte is the same as a preset standard end mark, if so, determining that the next state is the high byte checking state, otherwise, determining that the next state is the starting state;
when the current state is the check high byte state,
the A2, comprising:
determining the high byte of the check field in the protocol frame, receiving the high byte of the check field, calculating a first numerical value corresponding to the high byte of the check field, and determining that the next state is the check low byte state;
when the current state is the check low byte state,
the A2, comprising:
determining the low byte of the check field in the protocol frame, receiving the low byte of the check field, calculating a second numerical value corresponding to the low byte of the check field, determining a total numerical value according to the first numerical value and the second numerical value, checking the protocol frame according to the total numerical value, outputting the analysis content of the protocol frame when the check is passed, determining that the next state is the starting state, and determining that the next state is the starting state when the check is not passed.
In this embodiment of the present invention, when executing the analysis content of the output protocol frame, the state machine is specifically configured to:
outputting a command corresponding to the command code number in the protocol frame;
the state machine is further configured to execute the command corresponding to the command code number after the parsing content of the protocol frame is output, and respond to the sending end according to the command corresponding to the command code number.
In this embodiment of the present invention, when executing the analysis content of the output protocol frame, the state machine is specifically configured to:
outputting the first total number of bytes to be received after the command code number in the protocol frame.
As shown in fig. 5, an embodiment of the present invention provides a serial port-based communication system, including:
a sending end 501 and a receiving end 502 described in any of the embodiments of the present invention;
the sending end 501 is configured to send a protocol frame to the receiving end 502.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
The embodiment of the invention provides a readable medium which comprises an execution instruction, wherein when a processor of a storage controller executes the execution instruction, the storage controller executes any serial port-based communication method provided by the embodiment of the invention.
An embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus;
the memory is used for storing an execution instruction, the processor is connected with the memory through the bus, and when the memory controller runs, the processor executes the execution instruction stored in the memory, so that the memory controller executes any serial port-based communication method provided by the embodiment of the invention.
The embodiments of the invention have at least the following beneficial effects:
1. in the embodiment of the invention, the state machine is arranged at the receiving end, the protocol frame is arranged aiming at the serial port, the receiving end and the sending end which are connected through the serial port can communicate at the application layer through the protocol frame, the protocol frame can be analyzed through the state machine at the receiving end to obtain the information which needs to be transmitted by the sending end, and the communication at the application layer can be realized through the serial port.
2. The serial port-based communication method provided by the embodiment of the invention can be used for controlling the embedded system through the serial port by the external host, acquiring information and interacting some simple information. The protocol frame in the method has the advantages of simplicity, high efficiency, easy expansion and the like, and the method has the advantages of high efficiency, easy understanding and easy expansion by analyzing the protocol frame through the state machine.
3. In the embodiment of the invention, the protocol frame is analyzed by the state machine and processed according to the bytes, and the protocol frame does not need to be processed after all the protocol frames are received.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (10)
1. A serial port based communication method is characterized in that an application and receiving end comprises the following steps:
presetting a state machine of the receiving end and at least one state of the state machine, and setting a processing process corresponding to each state;
a1: determining an initial state in the at least one state, and taking the initial state as a current state;
a2: determining the byte corresponding to the current state in a protocol frame sent by a sending end according to the processing process corresponding to the current state by using the state machine, processing the byte corresponding to the current state and determining the next state;
a3: transition to the next state, return the next state as the current state to a 2.
2. The method of claim 1,
the protocol frame includes:
a start flag field, a data byte number field, a command field, a data field, an end flag field, and a check field;
wherein,
the starting mark field is used for storing a starting mark;
the data field is used for storing data to be transmitted;
the data byte number field is used for storing the byte number of the data to be transmitted;
the command field is used for storing a command code number;
the end mark field is used for storing an end mark;
the check field is used for storing check data.
3. The method of claim 2,
the at least one state comprises: a start state, a data length high byte state, a data length low byte state, a command byte state, a receive data state, an end flag state, a check high byte state, and a check low byte state;
the determining an initial state of the at least one state comprises:
determining the starting state as the initial state;
when the current state is the start state,
the A2, comprising:
determining the starting mark field in the protocol frame, receiving the starting mark of the starting mark field of the protocol frame, judging whether the starting mark is the same as a preset standard starting mark, if so, determining that the next state is the data length high byte state, otherwise, determining that the next state is the starting state;
when the current state is the data length high byte state,
the A2, comprising:
determining the high byte of the data byte number field in the protocol frame, receiving the high byte of the data byte number field, calculating the first byte number corresponding to the high byte of the data byte number field, and determining the next state as the data length low byte state;
when the current state is the data length low byte state,
the A2, comprising:
determining the low byte of the data byte digital field in the protocol frame, receiving the low byte of the data byte digital field, calculating a second byte number corresponding to the low byte of the data byte digital field, determining a first total byte number according to the first byte number and the second byte number, and determining that the next state is the command byte state;
when the current state is the command byte state,
the A2, comprising:
determining the command code number in the command field in the protocol frame, receiving the command code number in the command field, judging whether the command code number is any one of at least one preset standard command code number, if so, determining a command corresponding to the command code number, and determining that the next state is the data receiving state, otherwise, determining that the next state is the starting state; wherein each standard command code number corresponds to at least one command;
when the current state is the received data state,
the A2, comprising:
taking the bytes to be received of the first total byte after the command code number as bytes corresponding to the state of the received data, receiving the bytes to be received of the first total byte after the command code number, and determining that the next state is the state of the end mark;
when the current state is the end flag state,
the A2, comprising:
taking a plurality of bytes of a preset byte after the byte to be received as a byte corresponding to the state of the end mark, receiving the plurality of bytes of the preset byte after the byte to be received, judging whether the plurality of bytes of the preset byte is the same as a preset standard end mark, if so, determining that the next state is the high byte checking state, otherwise, determining that the next state is the starting state;
when the current state is the check high byte state,
the A2, comprising:
determining the high byte of the check field in the protocol frame, receiving the high byte of the check field, calculating a first numerical value corresponding to the high byte of the check field, and determining that the next state is the check low byte state;
when the current state is the check low byte state,
the A2, comprising:
determining the low byte of the check field in the protocol frame, receiving the low byte of the check field, calculating a second numerical value corresponding to the low byte of the check field, determining a total numerical value according to the first numerical value and the second numerical value, checking the protocol frame according to the total numerical value, outputting the analysis content of the protocol frame when the check is passed, determining that the next state is the starting state, and determining that the next state is the starting state when the check is not passed.
4. The method of claim 3,
the outputting the parsed content of the protocol frame includes:
outputting a command corresponding to the command code number in the protocol frame;
after the outputting the parsed content of the protocol frame, further comprising:
and executing the command corresponding to the command code, and responding to the sending end according to the command corresponding to the command code.
5. The method of claim 3,
the outputting the parsed content of the protocol frame includes:
outputting the first total number of bytes to be received after the command code number in the protocol frame.
6. A receiving end, comprising:
a state machine and a determination unit;
the state machine is provided with at least one state, and each state is provided with a corresponding processing process;
the determining unit is configured to determine an initial state of the at least one state, and use the initial state as a current state;
the state machine is configured to perform:
a2: determining the byte corresponding to the current state in a protocol frame sent by a sending end according to the processing process corresponding to the current state, processing the byte corresponding to the current state, and determining the next state;
a3: transition to the next state, return to a2 with the next state as the current state.
7. The receiving end according to claim 6,
the protocol frame includes:
a start flag field, a data byte number field, a command field, a data field, an end flag field, and a check field;
wherein,
the starting mark field is used for storing a starting mark;
the data field is used for storing data to be transmitted;
the data byte number field is used for storing the byte number of the data to be transmitted;
the command field is used for storing a command code number;
the end mark field is used for storing an end mark;
the check field is used for storing check data.
8. The receiving end according to claim 7,
the at least one state comprises: a start state, a data length high byte state, a data length low byte state, a command byte state, a receive data state, an end flag state, a check high byte state, and a check low byte state;
the determination unit is configured to determine the start state as the initial state;
the state machine is configured to perform:
when the current state is the start state,
the A2, comprising:
determining the starting mark field in the protocol frame, receiving the starting mark of the starting mark field of the protocol frame, judging whether the starting mark is the same as a preset standard starting mark, if so, determining that the next state is the data length high byte state, otherwise, determining that the next state is the starting state;
when the current state is the data length high byte state,
the A2, comprising:
determining the high byte of the data byte number field in the protocol frame, receiving the high byte of the data byte number field, calculating the first byte number corresponding to the high byte of the data byte number field, and determining the next state as the data length low byte state;
when the current state is the data length low byte state,
the A2, comprising:
determining the low byte of the data byte digital field in the protocol frame, receiving the low byte of the data byte digital field, calculating a second byte number corresponding to the low byte of the data byte digital field, determining a first total byte number according to the first byte number and the second byte number, and determining that the next state is the command byte state;
when the current state is the command byte state,
the A2, comprising:
determining the command code number in the command field in the protocol frame, receiving the command code number in the command field, judging whether the command code number is any one of at least one preset standard command code number, if so, determining a command corresponding to the command code number, and determining that the next state is the data receiving state, otherwise, determining that the next state is the starting state; wherein each standard command code number corresponds to at least one command;
when the current state is the received data state,
the A2, comprising:
taking the bytes to be received of the first total byte after the command code number as bytes corresponding to the state of the received data, receiving the bytes to be received of the first total byte after the command code number, and determining that the next state is the state of the end mark;
when the current state is the end flag state,
the A2, comprising:
taking a plurality of bytes of a preset byte after the byte to be received as a byte corresponding to the state of the end mark, receiving the plurality of bytes of the preset byte after the byte to be received, judging whether the plurality of bytes of the preset byte is the same as a preset standard end mark, if so, determining that the next state is the high byte checking state, otherwise, determining that the next state is the starting state;
when the current state is the check high byte state,
the A2, comprising:
determining the high byte of the check field in the protocol frame, receiving the high byte of the check field, calculating a first numerical value corresponding to the high byte of the check field, and determining that the next state is the check low byte state;
when the current state is the check low byte state,
the A2, comprising:
determining the low byte of the check field in the protocol frame, receiving the low byte of the check field, calculating a second numerical value corresponding to the low byte of the check field, determining a total numerical value according to the first numerical value and the second numerical value, checking the protocol frame according to the total numerical value, outputting the analysis content of the protocol frame when the check is passed, determining that the next state is the starting state, and determining that the next state is the starting state when the check is not passed.
9. The receiving end according to claim 8,
the state machine, when executing the analysis content of the output protocol frame, is specifically configured to:
outputting a command corresponding to the command code number in the protocol frame;
the state machine is further configured to execute the command corresponding to the command code number after the parsing content of the protocol frame is output, and respond to the sending end according to the command corresponding to the command code number;
or,
the state machine, when executing the analysis content of the output protocol frame, is specifically configured to:
outputting the first total number of bytes to be received after the command code number in the protocol frame.
10. A serial port based communication system, comprising:
a transmitting end and the receiving end of any one of claims 6 to 9;
the sending end is used for sending a protocol frame to the receiving end.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710506016.3A CN107294976A (en) | 2017-06-28 | 2017-06-28 | Communication means and system, receiving terminal based on serial ports |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710506016.3A CN107294976A (en) | 2017-06-28 | 2017-06-28 | Communication means and system, receiving terminal based on serial ports |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107294976A true CN107294976A (en) | 2017-10-24 |
Family
ID=60098955
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710506016.3A Pending CN107294976A (en) | 2017-06-28 | 2017-06-28 | Communication means and system, receiving terminal based on serial ports |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107294976A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108064037A (en) * | 2017-12-14 | 2018-05-22 | 北京中润远华科技有限公司 | A kind of command analysis method and device based on near-field communication |
CN108829629A (en) * | 2018-06-19 | 2018-11-16 | 夏华涛 | The means of communication and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7356027B1 (en) * | 2001-09-18 | 2008-04-08 | Ipolicy Networks Inc. | Application decoding engine for computer networks |
CN101833336A (en) * | 2010-04-28 | 2010-09-15 | 北京航空航天大学 | Dual-redundancy attitude control system and debug method of coaxial unmanned helicopter |
-
2017
- 2017-06-28 CN CN201710506016.3A patent/CN107294976A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7356027B1 (en) * | 2001-09-18 | 2008-04-08 | Ipolicy Networks Inc. | Application decoding engine for computer networks |
CN101833336A (en) * | 2010-04-28 | 2010-09-15 | 北京航空航天大学 | Dual-redundancy attitude control system and debug method of coaxial unmanned helicopter |
Non-Patent Citations (1)
Title |
---|
李莹,贾彬: "一种基于状态机的串口通信协议的设计与实现", 《电子设计工程》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108064037A (en) * | 2017-12-14 | 2018-05-22 | 北京中润远华科技有限公司 | A kind of command analysis method and device based on near-field communication |
CN108064037B (en) * | 2017-12-14 | 2020-09-11 | 北京中润远华科技有限公司 | Command analysis method and device based on near field communication |
CN108829629A (en) * | 2018-06-19 | 2018-11-16 | 夏华涛 | The means of communication and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110061896B (en) | MODBUS-RTU bus address conflict detection method | |
US8875154B2 (en) | Interface specific and parallel IPMI message handling at baseboard management controller | |
CN110351281B (en) | Universal data frame analysis method, device and equipment | |
EP3542276B1 (en) | Flow control in remote direct memory access data communications with mirroring of ring buffers | |
US9405758B2 (en) | Method and system for identifying file type | |
CN103929439B (en) | A kind of data transmission method and MODBUS server | |
CN110750285B (en) | Firmware upgrading method, device, computer equipment and storage medium | |
CN108647131B (en) | Output system of running log | |
CN107294976A (en) | Communication means and system, receiving terminal based on serial ports | |
US7466757B2 (en) | Method for transmitting data on a bus | |
US9934120B2 (en) | Method and apparatus for updating a system on chip (SOC) image from a host computer system without using DMA | |
CN114884935B (en) | Data upgrading method, device, electronic equipment and storage medium | |
WO2021134418A1 (en) | Data checking method and apparatus | |
JP5732806B2 (en) | Data transfer apparatus and data transfer method | |
CN107291641B (en) | Direct memory access control device for a computing unit and method for operating the same | |
CN109800202B (en) | PCIE (peripheral component interface express) -based data transmission system, method and device | |
CN116738745A (en) | Communication method, device, equipment and medium of electromagnetic transient simulation system | |
CN111351669B (en) | Fault diagnosis method and device, storage medium and vehicle | |
CN116204214A (en) | BMC upgrading method, device and system, electronic equipment and storage medium | |
CN114338848B (en) | Communication data processing method, device, programmable logic device, transmitting card and medium | |
CN111141015A (en) | Remote air conditioner control method | |
CN115562728A (en) | AT instruction analysis method, terminal and computer readable medium | |
CN114328080A (en) | Firmware state detection method and device and electronic equipment | |
WO2017104284A1 (en) | Data processing device, data processing method, and data processing program | |
CN113141603B (en) | Data communication method, system, master terminal device and slave terminal device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171024 |