CN115037795A - Multi-machine communication method for embedded equipment - Google Patents
Multi-machine communication method for embedded equipment Download PDFInfo
- Publication number
- CN115037795A CN115037795A CN202210685081.8A CN202210685081A CN115037795A CN 115037795 A CN115037795 A CN 115037795A CN 202210685081 A CN202210685081 A CN 202210685081A CN 115037795 A CN115037795 A CN 115037795A
- Authority
- CN
- China
- Prior art keywords
- response
- request
- data
- receives
- instruction
- 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.)
- Granted
Links
- 230000006854 communication Effects 0.000 title claims abstract description 70
- 238000004891 communication Methods 0.000 title claims abstract description 59
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000005540 biological transmission Effects 0.000 claims abstract description 20
- 230000004044 response Effects 0.000 claims description 88
- 230000008569 process Effects 0.000 claims description 2
- 230000000977 initiatory effect Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
- H04L63/123—Applying verification of the received information received data contents, e.g. message integrity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Communication Control (AREA)
- Computer And Data Communications (AREA)
Abstract
The embedded equipment multi-computer communication method disclosed by the invention comprises the steps of registering the embedded equipment, adding the ARP list, starting the MCF and transmitting data, unifying the format of a data transmission layer by setting the ID of the list recording equipment, being conveniently and quickly applied to various bottom layer links, and ensuring the integrity and the safety of the data by supporting ACK, error retransmission and data encryption.
Description
Technical Field
The invention relates to the field of communication, in particular to an embedded device multi-machine communication method.
Background
An embedded Multi-machine Communication protocol MCF (Multi-machine Communication Framework) is widely applied to systems such as an automation system, an internet of things, a vehicle-mounted system, an aerospace system and the like. In the multi-machine communication system, each single chip microcomputer can be used as a host or a slave; the data communication mode is based on a request/response model, namely, a requester sends a data request during multi-machine communication, a responder analyzes the data after receiving the data of the requester, and returns response data within specified time to finish a data communication process.
Conventional multi-machine communication protocols generally employ a single link: UART, CAN, TCP or other communication ports are divided into a host and a slave, and a question-answer communication mode is adopted, so that the efficiency is low;
the link layer and the data transmission layer are mixed together, when a new communication interface is replaced, the whole communication system needs to be redesigned, so that the system is very inconvenient to upgrade and transition, and cannot be conveniently transplanted to a new platform;
most of the traditional UART communication protocols are in point-to-point communication modes, data cannot be sent to all single-chip microcomputers in the current link, and the efficiency is low.
For example, the patent with application number 200410000214.5 discloses a method for realizing RS485 master-slave multi-machine communication by using a universal asynchronous receiver/transmitter in the communication field, when UART is used as a host to call a number, or is used as a slave to wait for the host to call a number, the UART character frame format is set to be an address frame format; when the UART sends information data to the bus or receives the information data from the bus, the character frame format of the UART is set as the information data frame format, when the character frame format received by the UART from the RS485 bus is different from the character frame format set by the UART, a frame format error occurs, and the frame format error is simply discarded in an interruption receiving program.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a multi-machine communication method of an embedded device, which is used for solving the problem of low transmission efficiency of information transmission between the conventional multi-machine communication host and the slave machines.
The invention is realized by the following technical scheme.
The multi-machine communication method of the invention comprises the following steps: registering the embedded equipment; adding an ARP list; starting the MCF; data transmission, wherein:
registering a plurality of embedded devices, wherein the embedded devices are registered before communication starts and each embedded device is provided with a unique identification ID;
adding an ARP list, wherein the ARP list is used for managing the ID relationship between the ID of the embedded equipment and the ID of the related communication port of the embedded equipment;
starting an MCF (magnetic control frequency), wherein the MCF comprises a host and a plurality of slaves, and ports of the host and the slaves are in receiving/sending states;
and data transmission, wherein a data session is established between the host and the slave, the request end sends a request data instruction, the response end receives and processes the request data and returns a response result, the request end receives the response data, and the session is closed after the data transmission is completed.
Further, the ID of the embedded device is set on the bottom port for data request, response and ACK.
Further, after the ARP list is used for communication start, the transmission layer searches for the ID of the communication port related to the transmission layer in the ARP list through the ID of the embedded device, and determines the transmission mode of the bottom link layer through the ID of the communication port.
Further, the transmission mode of the bottom link layer comprises a plurality of serial ports, and the serial ports comprise UART, SPI, TCP and BLE.
Further, the data transmission comprises a basic data communication process; a data communication process through an agent; and (4) carrying out data communication flow with an ACK function.
Furthermore, the basic data communication process comprises a request end and a response end,
the request end sends a request data instruction;
the response terminal receives the request data processing instruction and generates a response result;
the response end sends a return result instruction;
and the request end receives a return result instruction and receives a response result.
Furthermore, the data communication process through the proxy comprises a request end, a proxy and a response end,
the request end sends a request data instruction;
the agent receives and forwards a request data instruction;
the response terminal receives the request data processing instruction and generates a response result;
the response end sends a return result instruction;
the agent receives and forwards a response return result instruction;
and the request end receives a return result instruction and receives a response result.
Furthermore, the data communication flow with the ACK function comprises a request end and a response end,
the request end sends a request data instruction;
the response terminal receives a request data processing instruction and sends a request ACK;
the request end receives ACK;
the response end sends a return result instruction;
the request end receives a response result and sends a response ACK;
the responding terminal receives a response ACK.
Furthermore, the data communication process with the ACK function through the proxy comprises a request end, a proxy and a response end,
the request end sends a request data instruction;
the agent receives and forwards a request data instruction;
the response terminal receives a request data processing instruction, sends a request ACK and sends a return response result;
the proxy receives the request ACK, receives and forwards a response instruction;
the request end receives a request ACK;
the request end receives a response instruction and sends a response ACK;
the proxy receives and forwards a response ACK;
the responding terminal receives a response ACK.
The invention has the beneficial effects that: by setting the list recording equipment ID, the format of a data transmission layer is unified, and the method can be conveniently and quickly applied to various bottom layer links; by supporting ACK, error retransmission and data encryption, the integrity and the safety of the data are guaranteed.
Drawings
FIG. 1 is a schematic diagram of module relationships according to an embodiment of the present invention;
FIG. 2 is a flow chart of the method of the present invention;
FIG. 3 is a basic data communication flow diagram of the present invention;
FIG. 4 is a flow chart of data communication through the proxy according to the present invention;
FIG. 5 is a flow chart of data communication with ACK functionality according to the present invention;
fig. 6 is a flow chart of data communication through the proxy with ACK function according to the present invention.
Detailed Description
The technical solution of the present invention is further described below, but the scope of the claimed invention is not limited to the described.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Examples
When the application is applied to the field of wearable devices, as shown in fig. 1, the mobile terminal 100 includes a WeChat A101, an application A102, an application B103, a first MCF module 104, and a first Bluetooth module 105;
the wearable terminal 200 comprises an application C201, an application D202, a WeChat B203, a second MCF module 204 and a second Bluetooth module 205;
when the wechat 101 in the mobile terminal 100 receives a message, the first MCF module packetizes message data, the message data packet is sent to the wearable terminal 200 through the first bluetooth module 105, the second bluetooth module 205 in the wearable terminal 200 receives the message data packet, and the second MCF module 204 depacketizes the data packet and transmits the data packet to the wechat B203.
With reference to the above specific implementation field, the embodiment performs the following steps in the communication process as shown in fig. 2:
s101, starting communication;
the S102 system registers the unique identification ID for the embedded device, and adds an ARP list for managing the relationship between the device ID and the port ID, the transmission layer searches the port ID in the ARP list through the device ID, and determines the transmission mode of a bottom link layer through the port ID. By the ARP list, which bottom layer communication protocol is used for communication between the current equipment and the target equipment can be visually determined, so that the application layer can use the protocol conveniently;
s103, initializing and starting the MCF module to prepare for processing information communication between the master and the slave;
s104, establishing a data session between the host and the slave, sending a request data instruction by the request end, receiving and processing request data and returning a response result by the response end, receiving response data by the request end, and closing the session after the data is transmitted; the message data packets of S103 and S104 are transmitted from the mobile terminal 100 to the wearable terminal 200 in various and non-sensible transmission manners, and the data session between the master and the slave may be in any form as shown in fig. 3 to 5.
The basic data communication flow shown in fig. 3 includes a request end and a response end, and the execution steps are as follows:
a request end sends a request data instruction;
the response terminal receives the request data processing instruction and generates a response result;
the response end sends a return result instruction;
the request end receives the return result instruction and receives the response result.
The data communication process through the proxy shown in fig. 4 includes a request end, a proxy, and a response end, and the execution steps are as follows:
a request end sends a request data instruction;
the agent receives and forwards a request data instruction;
the response end receives the request data processing instruction and generates a response result;
the response end sends a return result instruction;
the agent receives and forwards a response return result instruction;
the request end receives the return result instruction and receives the response result.
The data communication flow with the ACK function shown in fig. 5 includes a request end and a response end, and the execution steps are as follows:
a request end sends a request data instruction;
the response end receives a request data processing instruction and sends a request ACK;
the request terminal receives the ACK;
the response end sends a return result instruction;
the request end receives the response result and sends a response ACK;
the responding end receives the response ACK.
The data communication flow with ACK function through proxy shown in fig. 6 includes a request end, a proxy, and a response end, and the execution steps are as follows:
a request end sends a request data instruction;
the agent receives and forwards a request data instruction;
the response end receives the request data processing instruction, sends a request ACK and sends a return response result;
the agent receives the request ACK, receives and forwards a response instruction;
the request end receives the request ACK;
the request end receives the response instruction and sends a response ACK;
the agent receives and forwards the response ACK;
the responding end receives the response ACK.
It should be understood by those skilled in the art that the above embodiments are for illustrative purposes only and are not intended to limit the present invention, and that changes and modifications to the above embodiments may fall within the scope of the appended claims.
Claims (9)
1. A multi-machine communication method of embedded equipment is characterized by comprising the following steps:
registering a plurality of embedded devices, wherein the embedded devices are registered before communication starts and each embedded device is provided with a unique identification ID;
adding an ARP list, wherein the ARP list is used for managing the ID relationship between the ID of the embedded equipment and the ID of the related communication port of the embedded equipment;
starting an MCF (magnetic control frequency), wherein the MCF comprises a host and a plurality of slaves, and ports of the host and the slaves are in receiving/sending states;
and data transmission, wherein a data session is established between the host and the slave, the request end sends a request data instruction, the response end receives and processes the request data and returns a response result, the request end receives the response data, and the session is closed after the data is transmitted.
2. The embedded device multi-machine communication method as claimed in claim 1, wherein the ID of the embedded device is set at the bottom port for request, response and ACK of data.
3. The embedded device multi-machine communication method as claimed in claim 1, wherein after the ARP list is used for communication initiation, the transport layer searches the ARP list for the ID of the communication port related to the embedded device through the ID of the embedded device, and determines the underlying link layer transmission mode through the ID of the communication port.
4. The embedded device multi-machine communication method according to claim 3, wherein the underlying link layer transmission mode includes a plurality of serial ports, and the serial ports include UART, SPI, TCP, BLE.
5. The multi-machine communication method for embedded devices according to claim 1, wherein the data transmission comprises a basic data communication process; a data communication process through an agent; a data communication flow with an ACK function; and carrying out data communication flow with an ACK function through the proxy.
6. The multi-machine communication method for embedded devices as claimed in claim 5, wherein the basic data communication process comprises a request end and a response end,
the request end sends a request data instruction;
the response terminal receives the request data processing instruction and generates a response result;
the response end sends a return result instruction;
and the request end receives a return result instruction and receives a response result.
7. The embedded device multi-machine communication method according to claim 5, wherein the data communication flow through the proxy comprises a request end, a proxy and a response end,
the request end sends a request data instruction;
the agent receives and forwards a request data instruction;
the response terminal receives the request data processing instruction and generates a response result;
the response end sends a return result instruction;
the proxy receives and forwards a response return result instruction;
and the request end receives a return result instruction and receives a response result.
8. The embedded device multi-machine communication method as claimed in claim 5, wherein the data communication flow with ACK function includes a request end, a response end,
the request end sends a request data instruction;
the response terminal receives a request data processing instruction and sends a request ACK;
the request terminal receives ACK;
the response end sends a return result instruction;
the request end receives a response result and sends a response ACK;
the responding terminal receives a response ACK.
9. The embedded device multi-machine communication method according to claim 5, wherein the data communication flow with ACK function through the proxy comprises a request end, a proxy and a response end,
the request end sends a request data instruction;
the agent receives and forwards a request data instruction;
the response terminal receives a request data processing instruction, sends a request ACK and sends a return response result;
the proxy receives the request ACK, receives and forwards a response instruction;
the request end receives a request ACK;
the request end receives a response instruction and sends a response ACK;
the proxy receives and forwards a response ACK;
the responding terminal receives a response ACK.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210685081.8A CN115037795B (en) | 2022-06-16 | 2022-06-16 | Multi-machine communication method for embedded equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210685081.8A CN115037795B (en) | 2022-06-16 | 2022-06-16 | Multi-machine communication method for embedded equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115037795A true CN115037795A (en) | 2022-09-09 |
CN115037795B CN115037795B (en) | 2024-02-02 |
Family
ID=83124397
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210685081.8A Active CN115037795B (en) | 2022-06-16 | 2022-06-16 | Multi-machine communication method for embedded equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115037795B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105471897A (en) * | 2015-12-28 | 2016-04-06 | 上海庆科信息技术有限公司 | Embedded device cloud service access method and system |
CN105491017A (en) * | 2015-11-23 | 2016-04-13 | 泰华智慧产业集团股份有限公司 | RS485 bus multi-device multi-protocol analysis method and RS485 bus multi-device multi-protocol analysis system |
CN105721264A (en) * | 2016-04-19 | 2016-06-29 | 河海大学常州校区 | Competition data exchange system based on embedded technique |
CN106921716A (en) * | 2015-12-28 | 2017-07-04 | 阿里巴巴集团控股有限公司 | The method and device of the network service process of debugging embedded equipment |
CN107179740A (en) * | 2017-06-23 | 2017-09-19 | 杭州电子科技大学 | The Compilation Method and embedded system of Embedded PLC |
-
2022
- 2022-06-16 CN CN202210685081.8A patent/CN115037795B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105491017A (en) * | 2015-11-23 | 2016-04-13 | 泰华智慧产业集团股份有限公司 | RS485 bus multi-device multi-protocol analysis method and RS485 bus multi-device multi-protocol analysis system |
CN105471897A (en) * | 2015-12-28 | 2016-04-06 | 上海庆科信息技术有限公司 | Embedded device cloud service access method and system |
CN106921716A (en) * | 2015-12-28 | 2017-07-04 | 阿里巴巴集团控股有限公司 | The method and device of the network service process of debugging embedded equipment |
CN105721264A (en) * | 2016-04-19 | 2016-06-29 | 河海大学常州校区 | Competition data exchange system based on embedded technique |
CN107179740A (en) * | 2017-06-23 | 2017-09-19 | 杭州电子科技大学 | The Compilation Method and embedded system of Embedded PLC |
Non-Patent Citations (1)
Title |
---|
宋文辉, 余楚中: "嵌入式智能客房控制终端的 设计与实现", 《现代建筑电气》, pages 9 - 12 * |
Also Published As
Publication number | Publication date |
---|---|
CN115037795B (en) | 2024-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109116832A (en) | Vehicle diagnostic data wireless communication method | |
CN111541688A (en) | Embedded system compatible with multiple protocols, data processing method and device | |
CN111404739B (en) | System for configuring serial port networking attribute | |
CN107222379A (en) | A kind of method and apparatus of serial communication | |
CN110430110B (en) | On-site bus gateway and protocol conversion method thereof | |
US20060280174A1 (en) | Method and system for establishing a data link layer protocol on a physical layer port connection | |
CN115037795A (en) | Multi-machine communication method for embedded equipment | |
JP3569149B2 (en) | Communication control device | |
US9619005B2 (en) | Apparatus and method for saving power of USB device | |
CN111586182B (en) | Data transmission method and device | |
JPH0473178B2 (en) | ||
WO2012019376A1 (en) | Method and apparatus for implementing network device function of wireless communication terminal | |
KR100412237B1 (en) | A user-level sockets layer and method for interfacing communication using the sockets layer | |
CN111107663B (en) | Data transmission method and device, storage medium and electronic device | |
JP2004246750A (en) | Usb communication method | |
CN108701103B (en) | Direct memory access control device for a computing unit with a working memory | |
JP2770177B2 (en) | Link interface module of programmable controller | |
CN115865554A (en) | Real-time industrial field bus driving system under mips architecture | |
CN118646714A (en) | Vehicle data transmission method and device, electronic equipment and storage medium | |
CN117596143A (en) | Real-time virtualization architecture and platform integrating computing and network | |
KR0141294B1 (en) | Processor for connecting electronic electronic switch | |
CN118353978A (en) | AUTOSAR protocol stack communication method, device, equipment and vehicle | |
JP2005348224A (en) | Radio communication method and radio communication apparatus | |
JP5181332B2 (en) | COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM | |
CN102202041A (en) | Data receiving method applied to server |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |