WO2021121287A1 - 通信模块间通信方法、装置、计算机设备和可读存储介质 - Google Patents
通信模块间通信方法、装置、计算机设备和可读存储介质 Download PDFInfo
- Publication number
- WO2021121287A1 WO2021121287A1 PCT/CN2020/136921 CN2020136921W WO2021121287A1 WO 2021121287 A1 WO2021121287 A1 WO 2021121287A1 CN 2020136921 W CN2020136921 W CN 2020136921W WO 2021121287 A1 WO2021121287 A1 WO 2021121287A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- communication
- communication module
- data
- module
- modules
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- 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/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
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Definitions
- the present invention relates to the field of mobile communication technology, in particular to a communication method, device, computer equipment and readable storage medium between communication modules.
- Communication equipment is a device that transmits communication data. Some communication equipment is equipped with multiple communication modules, and multiple communication modules can communicate with each other; for example, as a communication device, a repeater station can be set up to cover different Frequency band communication module.
- the network frequency of the operator is distributed in various frequency bands, and the same operator may need to have a repeater that supports one, two, or even three frequency bands in different coverage areas for base station signal transfer, and the repeater is set with the corresponding frequency band Of multiple communication modules.
- the communication modules of different frequency bands in the repeater mainly communicate through serial communication.
- an embodiment of the present application provides a communication method between communication modules, which is applied to a first communication module of a plurality of communication modules included in a communication device, and serial communication is adopted between the plurality of communication modules.
- a communication module is any one of the plurality of communication modules, and the method includes:
- the encapsulated data is sent to the second communication module of the plurality of communication modules through the serial port of the first communication module, and the first communication module and the second communication module are in the same network segment.
- a virtual network device is provided in the first communication module, and the acquiring communication data includes:
- the encapsulating the communication data according to the encapsulation format of Ethernet data to obtain the encapsulated data includes:
- the sending the encapsulated data to the second communication module of the plurality of communication modules through the serial port of the first communication module includes:
- the encapsulated data is read from the sending buffer, and the encapsulated data is sent to the second communication module of the plurality of communication modules through the serial port of the first communication module.
- the method further includes:
- the target data is obtained by encapsulating according to the encapsulation format of Ethernet data
- the decapsulating the target data to obtain the decapsulated data includes:
- the target data is read from the receiving buffer, and header information and trailer information included in the target data are removed to obtain decapsulated data.
- a virtual network device is provided in the first communication module, and the method further includes:
- the decapsulated data is transferred to the application layer through the virtual network device.
- the method further includes:
- the IP address of the virtual network device included in the first communication module is set, and the network segment of the IP address is the same as the network segment corresponding to the second communication module, so
- the communication mode includes master mode or slave mode.
- the setting the IP address of the virtual network device included in the first communication module based on the current communication mode of the first communication module includes:
- the current communication mode of the first communication module is the host mode
- a virtual network bridge is created and the IP address of the virtual network bridge is set; the virtual network bridge is used for the virtual network device and the first communication The module's external connection network port connection;
- the IP address of the virtual network bridge is set to the IP address of the virtual network device.
- the method further includes:
- the IP address of the virtual bridge is set to the IP address of the externally connected network port, so that the external commissioning module can pass the IP address of the externally connected network port to be the same as the IP address of the virtual bridge
- Each communication module of the network segment is commissioned.
- the setting the IP address of the virtual network device included in the first communication module based on the current communication mode of the first communication module includes:
- the current communication mode of the first communication module is the slave mode, acquiring the IP network segment corresponding to the communication module whose current communication mode is the master mode;
- the IP address of the virtual network device is set, and the network segment of the IP address of the virtual network device is consistent with the obtained IP network segment.
- the method further includes:
- the current communication mode of the first communication module is the master mode or the slave mode.
- an embodiment of the present application provides a communication device between communication modules, which is provided in a first communication module among a plurality of communication modules included in a communication device, and serial communication is adopted between the plurality of communication modules.
- the communication module is any one of the multiple communication modules, and the device includes:
- the encapsulation module is used to encapsulate the communication data according to the encapsulation format of Ethernet data to obtain the encapsulated data;
- the sending module is configured to send the encapsulated data to the second communication module of the plurality of communication modules through the serial port of the first communication module, where the first communication module and the second communication module are located The same network segment.
- an embodiment of the present application provides a computer device that includes multiple communication modules, each of the communication modules includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program when the computer program is executed. The steps of the method as described in the first aspect above.
- an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
- the multiple communication modules included in the communication device of the present application adopt serial port communication, and the first communication module of the multiple communication modules obtains communication data; the communication data is encapsulated according to the encapsulation format of Ethernet data, and the encapsulation is obtained.
- the data; the encapsulated data is sent to the second communication module of the plurality of communication modules through the serial port of the first communication module, and the first communication module and the second communication module are on the same network Section; Therefore, the data transmitted between the first communication module and the second communication module is encapsulated according to the encapsulation format of Ethernet data, which avoids the transmission between the first communication module and the second communication module in the traditional technology It is serial data. Since serial data has no start and end characters, a complete serial data packet may be sent multiple times during serial transmission, which causes the problem of slow transmission rate. This application improves the communication rate between the first communication module and the second communication module.
- FIG. 1 is an application environment diagram of a communication method between communication modules provided by an embodiment
- FIG. 2 is a schematic flowchart of a communication method between communication modules provided by an embodiment
- FIG. 3 is a schematic flowchart of a communication method between communication modules provided by an embodiment
- FIG. 4 is a schematic diagram of detailed steps of step S300 in an embodiment
- FIG. 5 is a schematic flowchart of a communication method between communication modules provided by an embodiment
- FIG. 6 is a schematic diagram of detailed steps of step S420 in an embodiment
- FIG. 7 is a schematic flowchart of a communication method between communication modules provided by an embodiment
- FIG. 8 is a schematic flowchart of a communication method between communication modules provided by an embodiment
- FIG. 9 is a schematic diagram of detailed steps of step S500 in an embodiment
- FIG. 10 is a schematic diagram of detailed steps of step S500 in an embodiment
- Fig. 11 is a structural block diagram of a communication device between communication modules provided by an embodiment.
- the communication method between communication modules provided in this application can be applied to the application environment as shown in FIG. 1.
- the communication device includes multiple communication modules, and serial communication is adopted between the multiple communication modules.
- This application provides The communication method between communication modules is specifically applied to a first communication module, and the first communication module is any one of a plurality of communication modules included in a communication device.
- the communication device can be a repeater.
- the communication method, device, computer equipment, and readable storage medium between communication modules provided by the embodiments of the present application are intended to solve the problem that the communication rate is Slow technical issues.
- the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail through the embodiments and the accompanying drawings.
- the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
- the execution subject may be a communication device between communication modules, and the communication device between communication modules may be implemented as the first communication through software, hardware, or a combination of software and hardware. Part or all of the module.
- the execution subject is the first communication module as an example for description.
- FIG. 2 shows a flowchart of a communication method between communication modules provided by an embodiment of the present application.
- the communication method between communication modules in this embodiment may include the following steps:
- Step S100 Obtain communication data.
- the communication data acquired by the first communication module is the serial port data sent by the application layer.
- the first communication module after obtaining the serial port data sent by the application layer, the first communication module directly sends the serial port data to the second communication module through the serial port. Since the serial port data does not have the start and end characters, during the serial port transmission, the serial port data may be split and sent to the second communication module multiple times, thereby causing a slow transmission rate between the first communication module and the second communication module.
- step S200 the communication data is encapsulated according to the encapsulation format of the Ethernet data to obtain the encapsulated data.
- the first communication module obtains the communication data and encapsulates the communication data according to the encapsulation format of the Ethernet data. Specifically, the communication data is encapsulated according to the Ethernet frame format, and the corresponding header information is added to the communication data. And the end of the packet information to get the encapsulated data.
- Ethernet frame formats There are multiple Ethernet frame formats.
- the header information and the packet trailer information added to the communication data are different depending on the selected Ethernet frame format.
- common Ethernet frame formats include Ethernet II and IEEE 802.3 formats.
- Ethernet II contains a Type field.
- the Type field describes the type of data packet following the Ethernet header. For example, when Type is 0x8000, it is an IP protocol packet. , When the Type is 8060, it is an ARP protocol packet; and in the IEEE 802.3 format, this position is the length field.
- This embodiment does not specifically limit the encapsulation format adopted by the first communication module.
- step S300 the encapsulated data is sent to the second communication module of the plurality of communication modules through the serial port of the first communication module.
- the first communication module and the second communication module are in the same network segment to ensure that the second communication module can recognize the encapsulated data sent by the first communication module.
- the first communication module encapsulates the communication data according to the encapsulation format of the Ethernet data. After obtaining the encapsulated data, the encapsulated data is sent to the communication device through the serial port of the first communication module.
- the second communication module in the module Therefore, the encapsulated data transmitted between the first communication module and the second communication module is Ethernet data.
- the serial port is transmitted, it will be based on the packet header information and packet tail information of the encapsulated data. To send a complete packet.
- the multiple communication modules included in the communication device adopt serial communication, and the connection structure between the communication modules is relatively simple, which avoids the use of Ethernet connection between multiple communication modules to cause more communication lines and network port volume.
- the problem is relatively large, which affects the miniaturization of equipment.
- the multiple communication modules included in the communication device adopt serial port communication, and the first communication module of the multiple communication modules obtains communication data; the communication data is encapsulated according to the encapsulation format of Ethernet data to obtain the encapsulated data;
- the encapsulated data is sent to the second communication module of the multiple communication modules through the serial port of the first communication module, and the first communication module and the second communication module are in the same network segment; therefore, the first communication module and the second communication module in this embodiment
- the data transmitted between the two communication modules is encapsulated according to the encapsulation format of the Ethernet data, which avoids that in the traditional technology, the serial data is transmitted between the first communication module and the second communication module, because the serial data does not start and end When the serial port is transmitting, a complete serial port data packet may be sent multiple times, which causes the problem of slow transmission rate.
- This embodiment improves the communication rate between the first communication module and the second communication module.
- Fig. 3 is a schematic flowchart of a communication method between communication modules provided by another embodiment.
- a virtual network device is provided in the first communication module of this embodiment, and step S100 of this embodiment includes:
- step S110 the communication data transmitted by the application layer is received through the virtual network device.
- the multiple communication modules included in the communication device are respectively created with corresponding virtual network devices, and the IP addresses of each virtual network device are in the same network segment to ensure that multiple communication modules can be based on Ethernet data
- the encapsulation format of the encapsulated data is communicated.
- the first communication module receives the communication data transmitted by the application layer through the virtual network device. Specifically, the first communication module monitors the data of the virtual network port of the virtual network device, and obtains the communication data from the virtual network port. The communication data is transmitted from the application layer to the virtual network port. Network equipment; after the first communication module obtains the communication data, it encapsulates the communication data according to the encapsulation format of the Ethernet data to obtain the encapsulated data; the encapsulated data is sent to multiple communication modules through the serial port of the first communication module The second communication module. As a result, the communication rate between the first communication module and the second communication module is improved.
- step S300 includes step S310 and step S320, specifically:
- step S310 the encapsulated data is stored in the sending buffer.
- the communication module writes the encapsulated data to the serial port at a fast rate, and the serial port transmits the encapsulated data at a slower rate, it is easy to cause the communication module to write the encapsulated data of the serial port, and the data is lost due to the time being sent by the serial port. problem.
- the first communication module is provided with a sending buffer.
- the first communication module obtains the communication data, and encapsulates the communication data according to the encapsulation format of the Ethernet data. After obtaining the encapsulated data, the encapsulated data is stored in the transmission Cache.
- Step S320 Read the encapsulated data from the sending buffer, and send the encapsulated data to the second communication module of the plurality of communication modules through the serial port of the first communication module.
- the first communication module stores the encapsulated data in the sending buffer, then reads the encapsulated data from the sending buffer, and sends the encapsulated data to the second communication among the multiple communication modules through the serial port of the first communication module.
- Fig. 5 is a schematic flowchart of a communication method between communication modules provided by another embodiment.
- the communication method between communication modules in this embodiment further includes:
- Step S410 Read the target data from the serial port of the first communication module.
- the target data is encapsulated according to the encapsulation format of the Ethernet data.
- the transmitting end first obtains communication data, which can be serial data sent by the application layer, and then transfers the communication data.
- the encapsulation is performed according to the encapsulation format of the Ethernet data to obtain the encapsulated data, and then the encapsulated data is sent to the serial port of the first communication module through the serial port of the communication module of the current transmitting end.
- the first communication module monitors the data of the serial port, and reads the encapsulated data sent by the sending end from the serial port of the first communication module, that is, the target data.
- Step S420 Decapsulate the target data to obtain decapsulated data.
- the first communication module decapsulates the encapsulation format of the target data. Specifically, it decapsulates the header information and the end of the target data to obtain the decapsulated serial port data.
- the application layer obtains the serial port data, and the serial port Data is processed.
- the network communication of the application layer is realized based on the physical connection of the serial ports of each communication module.
- the physical layer uses serial data communication
- the application layer uses Ethernet data for processing.
- TCP, UDP, FTP, TFTP and other network protocols can flexibly use TCP, UDP, FTP, TFTP and other network protocols to achieve different business requirements and applications
- the layer does not need to deal with the specific data packet sending problem of the bottom layer, which improves the development efficiency of application layer software.
- step S420 includes step S421 and step S422, specifically:
- step S421 the target data is stored in the receiving buffer.
- the first communication module is provided with a receiving buffer, and after the first communication module reads the target data from the serial port of the first communication module, the target data is stored in the receiving buffer.
- step S422 the target data is read from the receiving buffer, and the header information and the trailer information included in the target data are removed to obtain the decapsulated data.
- the first communication module reads the stored target data from the receiving buffer, and removes the header information and the end of the packet included in the target data to obtain the serial port data after decapsulation.
- the application layer obtains the serial port data and sends the data to the serial port. Data is processed. This avoids the problem of data loss caused by the inconsistency between the rate at which the first communication module obtains the target data and the rate at which the application layer obtains the decapsulated data during the data transmission process, and the accuracy of data transmission is ensured.
- FIG. 7 is a schematic flowchart of a communication method between communication modules provided by another embodiment.
- a virtual network device is provided in the first communication module of this embodiment, and the communication method between communication modules of this embodiment further includes:
- step S430 the decapsulated data is transferred to the application layer through the virtual network device.
- the other communication modules are used as the transmitting end, and the application layer software of the transmitting end sends the communication.
- Data is sent to the virtual network device of the sending end, the sending end reads the communication data from the virtual network device, and the sending end encapsulates the communication data according to the encapsulation format of the Ethernet data to obtain the encapsulated data, and save the encapsulated data for transmission In the buffer; the sending end reads the encapsulated data from the sending buffer, and sends the encapsulated data to the first communication module through the serial port of the sending end.
- the first communication module that is, the serial port of the receiving end
- receives the target data that is, after the encapsulated data
- the first communication module stores the target data in the receiving buffer, and reads the target data from the receiving buffer, and transfers the target data to the receiving buffer.
- the header information and the trailer information included in the data are removed to obtain the decapsulated serial port data
- the decapsulated serial port data is sent to the virtual network device of the first communication module, and the application layer is from the port of the virtual network device of the first communication module Read the decapsulated serial port data for processing. It can be understood that, among the multiple communication modules included in the communication device, any one of the communication modules can be used as a sending end or a receiving end.
- the communication modules of the communication equipment are connected by serial ports.
- the communication module converts serial data and Ethernet data.
- the physical layer uses serial data communication
- the application layer uses Ethernet data for processing, which improves the development of application layer software. The efficiency improves the communication rate between the communication modules in the communication equipment.
- FIG. 8 is a schematic flowchart of a communication method between communication modules provided by another embodiment.
- the communication method between communication modules in this embodiment further includes:
- Step S500 based on the current communication mode of the first communication module, set the IP address of the virtual network device included in the first communication module.
- the network segment of the IP address is the same as the network segment corresponding to the second communication module, and the communication mode includes a master mode or a slave mode.
- the first communication module recognizes that the current communication mode of the first communication module is the master mode or the slave mode according to the state of the DIP switch of the first communication module; specifically, each communication module included in the communication device is set There are DIP switches.
- the different states of the DIP switches indicate different communication modes of the current communication module, for example, indicate master mode, slave 1 mode, slave 2 mode, and so on.
- step S500 in this embodiment includes step S510 and step S520, specifically:
- step S510 if the current communication mode of the first communication module is the host mode, a virtual network bridge is created, and the IP address of the virtual network bridge is set.
- the virtual network bridge is used to connect the virtual network device with the external connection network port of the first communication module.
- step S520 the IP address of the virtual network bridge is set as the IP address of the virtual network device.
- the communication device of this embodiment includes the communication module 1, the communication module 2 and the communication module 3 as shown in FIG.
- the dial switch is set to 00; the communication module 2 is used as the slave 1 mode, the dial switch is set to 01, the communication module 3 is used as the slave 2 mode, the dial switch is set to 11, the first communication module of this embodiment is shown in Figure 1 Communication module 1 shown.
- each communication module includes two serial ports: serial port 1 and serial port 2.
- the MCU of the communication module 1 is connected to the serial port 1 and the serial port 2
- the MCU of the communication module 2 is connected to the serial port 1
- the MCU of the communication module 3 is connected to the serial port 2
- the serial ports 1 and 2 of the three communication modules are respectively connected through terminals. Therefore, the communication module 1 can communicate with the communication module 2 through the serial port 1 and communicate with the communication module 3 through the serial port 2.
- the serial port 2 of the communication module 2 is used to directly communicate the serial port data between the communication module 1 and the communication module 3.
- Each communication module creates a corresponding virtual network device.
- the first communication module recognizes that the current communication mode of the first communication module is the host mode according to the state of the dial switch of the first communication module, it creates a network bridge through system commands and sets the network
- the IP address of the bridge for example, is set to 192.168.10.100, and the IP address of the virtual network bridge is set to the IP address of the virtual network device of the first communication module.
- step S500 in this embodiment further includes step S530:
- Step S530 Set the IP address of the virtual bridge to the IP address of the externally connected network port, so that the external commissioning module can communicate with the IP address of the virtual bridge on the same network segment through the IP address of the externally connected network port. Commission the module.
- the first communication module sets the IP address of the virtual network bridge as the IP address of the external connection network port, that is, adds the virtual network port of the virtual network device of the first communication module and the external connection network port to the network bridge.
- the communication module 2 is in the slave 1 mode, and the communication module 2 sets the IP address of its virtual network device to the same network segment as the IP address of the bridge, for example, set it to 192.168.10.101.
- Communication module 3 is in slave 2 mode.
- Communication module 3 sets the IP address of its virtual network device to the same network segment as the IP address of the bridge, and is different from the IP address of the virtual network device of communication module 2, for example, set to 192.168.10.102 .
- a network connection is established between the communication module 1, the communication module 2, and the communication module 3.
- FIG. 10 is a schematic diagram of detailed steps of step S500 in another embodiment.
- step S500 in this embodiment includes step S540 and step S550, specifically:
- Step S540 If the current communication mode of the first communication module is the slave mode, obtain the IP network segment corresponding to the communication module whose current communication mode is the master mode.
- step S550 the IP address of the virtual network device is set, and the network segment of the IP address of the virtual network device is consistent with the obtained IP network segment.
- the current communication mode of the first communication module is the slave mode, that is, the first communication module is the communication module 2 or the communication module 3 shown in Figure 1, then the communication module whose current communication mode is the master mode is obtained The corresponding IP network segment is to obtain the IP network segment corresponding to the communication module 1.
- the communication module 1 After the communication module 1 completes the setting of the IP address of the network bridge, the virtual network port and the external connection network port of the virtual network device of the communication module 1 are all classified into the network bridge, that is, both are the same as the IP address of the network bridge.
- the first communication module obtains the bridge IP address of the communication module 1, determines the network segment, and sets the IP address of the virtual network device of the first communication module, and connects the network segment of the IP address of the virtual network device of the first communication module with the communication module Keep the same IP network segment of 1 to establish a connection.
- each communication module of the communication device includes two serial ports, and the two serial ports of each communication module are connected by terminals.
- the serial port 1 of each communication module is connected to the serial port 1 of other communication modules.
- the serial port 2 of each communication module is connected to the serial port 2 of other communication modules.
- the communication protocol between the communication modules is master-slave communication.
- Each communication module is provided with a DIP switch, and each communication module determines the current working mode of the communication module according to the state of the corresponding DIP switch.
- the working modes include master mode, slave 1 mode, and slave 2 mode. When the communication module is in different working modes, choose whether to connect to serial port 1 and serial port 2 on the physical connection.
- the host mode is connected to serial port 1 and serial port 2, and slave machine 1 Mode is connected to serial port 1, and slave 2 mode is connected to serial port 2.
- slave machine 1 Mode is connected to serial port 1
- slave 2 mode is connected to serial port 2.
- the communication device Take the communication device as a repeater as an example.
- dual-frequency equipment two communication modules are used, and the states of the DIP switches are respectively set to master mode and slave 1 mode.
- a tri-band device choose three communication modules and set the status of the DIP switch as master mode, slave 1 mode, slave 2 mode, and so on.
- the network port of the virtual network device can be regarded as a common network port to operate on it.
- the communication module 1 in the master mode needs to poll the communication module 2 in the slave mode regularly or The data of communication module 3, because communication module 1, communication module 2 and communication module 3 are in the same network segment, each communication module sets its fixed port as a UDP port, and communication module 1 can be connected to communication module 2 or communication module 3. Establish UDP connections between them.
- the communication module 1 and the communication module 2, the communication module 1 and the communication module 3 can be connected through UDP for query, setting and other operations.
- communication module 2 or communication module 3 needs to download files from communication module 1, communication module 1 builds an FTP server, communication module 2 or communication module 3 acts as an FTP client to establish an FTP connection with communication module 1 through a virtual network device , So you can download or upload the specified file from the communication module 1. It avoids the problem of slow transmission efficiency in the traditional technology, which only uses serial data to communicate between the host and the slave, and the file transmission must be through the master-slave communication protocol.
- the commissioning tool can be directly connected to the communication module 2 and the communication module 3 through the external connection network port of the communication module 1 for commissioning.
- the master-slave communication protocol is required to perform the commissioning.
- the commissioning tool can only perform commissioning on the host, resulting in low commissioning efficiency. Therefore, this application improves the commissioning efficiency and the production efficiency of communication equipment.
- a communication device between communication modules is provided, which is provided in a first communication module among a plurality of communication modules included in a communication device, and serial communication is adopted between the plurality of communication modules.
- the first communication module is any one of the multiple communication modules, and the device includes:
- the obtaining module 10 is used to obtain communication data
- the encapsulation module 20 is configured to encapsulate the communication data according to the encapsulation format of Ethernet data to obtain encapsulated data;
- the sending module 30 is configured to send the encapsulated data to the second communication module of the plurality of communication modules through the serial port of the first communication module, the first communication module and the second communication module In the same network segment.
- a virtual network device is provided in the first communication module, and the obtaining module 10 includes:
- the first acquiring unit is configured to receive the communication data delivered by the application layer through the virtual network device.
- the packaging module 20 includes:
- the encapsulation unit is used to add corresponding header information and trailer information to the communication data to obtain encapsulated data.
- the sending module 30 includes:
- the first storing unit is used to store the encapsulated data in the sending buffer
- the sending unit is configured to read the encapsulated data from the sending buffer, and send the encapsulated data to the second communication among the plurality of communication modules through the serial port of the first communication module Module.
- the device further includes:
- a reading module configured to read target data from the serial port of the first communication module; the target data is obtained by encapsulating according to the encapsulation format of Ethernet data;
- the decapsulation module is used to decapsulate the target data to obtain the decapsulated data.
- the decapsulation module includes:
- the second storing unit is used to store the target data in the receiving buffer
- the decapsulation unit is configured to read the target data from the receiving buffer, and remove the header information and the trailer information included in the target data to obtain the decapsulated data.
- a virtual network device is provided in the first communication module, and the apparatus further includes:
- the transfer module is used to transfer the decapsulated data to the application layer through the virtual network device.
- the device further includes:
- the setting module is configured to set the IP address of the virtual network device included in the first communication module based on the current communication mode of the first communication module, and the network segment of the IP address corresponds to the second communication module
- the network segments are the same, and the communication mode includes a master mode or a slave mode.
- the setting module includes:
- the creation unit is configured to create a virtual network bridge and set the IP address of the virtual network bridge if the current communication mode of the first communication module is the host mode; the virtual network bridge is used for the virtual network device and The external connection network port of the first communication module is connected;
- the first setting unit is configured to set the IP address of the virtual network bridge as the IP address of the virtual network device.
- the device further includes:
- the second setting unit is configured to set the IP address of the virtual network bridge to the IP address of the externally connected network port, so that the external commissioning module can use the IP address of the externally connected network port to communicate with the virtual Each communication module whose IP address of the bridge is on the same network segment is commissioned.
- the setting module includes:
- the second obtaining unit is configured to obtain the IP network segment corresponding to the communication module whose current communication mode is the master mode if the current communication mode of the first communication module is the slave mode;
- the third setting unit is configured to set the IP address of the virtual network device, and keep the network segment of the IP address of the virtual network device consistent with the obtained IP network segment.
- the device further includes:
- the identification module is used to identify the current communication mode of the first communication module as the master mode or the slave mode according to the state of the DIP switch of the first communication module.
- the communication device between communication modules provided in this embodiment can execute the foregoing embodiment of the communication method between communication modules, and its implementation principles and technical effects are similar, and will not be repeated here.
- Each module in the above-mentioned inter-module communication device may be implemented in whole or in part by software, hardware, and a combination thereof.
- the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
- a computer device including multiple communication modules, each communication module includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when the processor executes the computer program:
- the second communication module, the first communication module and the second communication module are in the same network segment.
- Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Ramb microsecond) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchronous chain Channel
- RDRAM synchronous chain Channel
- RDRAM direct RAM
- DRAM direct memory bus dynamic RAM
- RDRAM memory bus dynamic RAM
- a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
- the second communication module, the first communication module and the second communication module are in the same network segment.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Systems (AREA)
- Communication Control (AREA)
Abstract
Description
Claims (15)
- 一种通信模块间通信方法,其特征在于,应用于通讯设备包括的多个通信模块中的第一通信模块,所述多个通信模块之间采用串口通信,所述第一通信模块是所述多个通信模块中的任一个,所述方法包括:获取通信数据;将所述通信数据按照以太网数据的封装格式进行封装,得到封装后的数据;通过所述第一通信模块的串口将所述封装后的数据发送至所述多个通信模块中的第二通信模块,所述第一通信模块与所述第二通信模块处于同一网段。
- 根据权利要求1所述的方法,其特征在于,所述第一通信模块中设置有虚拟网络设备,所述获取通信数据,包括:通过所述虚拟网络设备接收应用层传递的所述通信数据。
- 根据权利要求1所述的方法,其特征在于,所述将所述通信数据按照以太网数据的封装格式进行封装,得到封装后的数据,包括:对所述通信数据添加对应的包头信息和包尾信息,得到封装后的数据。
- 根据权利要求1所述的方法,其特征在于,所述通过所述第一通信模块的串口将所述封装后的数据发送至所述多个通信模块中的第二通信模块,包括:将所述封装后的数据存入发送缓存;从所述发送缓存中读取所述封装后的数据,并通过所述第一通信模块的串口将所述封装后的数据发送至所述多个通信模块中的第二通信模块。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:从所述第一通信模块的串口读取目标数据;所述目标数据是按照以太网数据的封装格式进行封装得到的;对所述目标数据进行解封装,得到解封装后的数据。
- 根据权利要求5所述的方法,其特征在于,所述对所述目标数据进行解封装,得到解封装后的数据,包括:将所述目标数据存入接收缓存;从所述接收缓存中读取所述目标数据,并将所述目标数据包括的包头信息和包尾信息解除,得到解封装后的数据。
- 根据权利要求6所述的方法,其特征在于,所述第一通信模块中设置有虚拟网络设备,所述方法还包括:通过所述虚拟网络设备将所述解封装后的数据传递至应用层。
- 根据权利要求2或7所述的方法,其特征在于,所述方法还包括:基于所述第一通信模块当前的通信模式,设置所述第一通信模块包括的虚拟网络设备的IP地址,所述IP地址的网段和所述第二通信模块所对应的网段相同,所述通信模式包括主机模式或从机模式。
- 根据权利要求8所述的方法,其特征在于,所述基于所述第一通信模块当前的通信模式,设置所述第一通信模块包括的虚拟网络设备的IP地址,包括:若所述第一通信模块当前的通信模式为主机模式,则创建虚拟网桥,并设置所述虚拟网桥的IP地址;所述虚拟网桥用于所述虚拟网络设备与所述第一通信模块的对外连接网口连接;将所述虚拟网桥的IP地址设置为所述虚拟网络设备的IP地址。
- 根据权利要求9所述的方法,其特征在于,所述方法还包括:将所述虚拟网桥的IP地址设置为所述对外连接网口的IP地址,以供外部调测模块通过所述对外连接网口的IP地址,对与所述虚拟网桥的IP地址处于同一网段的各通信模块进行调测。
- 根据权利要求8所述的方法,其特征在于,所述基于所述第一通信模块当前的通信模式,设置所述第一通信模块包括的虚拟网络设备的IP地址,包括:若所述第一通信模块当前的通信模式为从机模式,则获取当前通信模式为主机模式的通信模块所对应的IP网段;设置所述虚拟网络设备的IP地址,并将所述虚拟网络设备的IP地址的网段与获取到的所述IP网段保持一致。
- 根据权利要求8所述的方法,其特征在于,所述方法还包括:根据所述第一通信模块的拨码开关的状态,识别所述第一通信模块当前的通信模式为主机模式或从机模式。
- 一种通信模块间通信装置,其特征在于,设置于通讯设备包括的多个 通信模块中的第一通信模块,所述多个通信模块之间采用串口通信,所述第一通信模块是所述多个通信模块中的任一个,所述装置包括:获取模块,用于获取通信数据;封装模块,用于将所述通信数据按照以太网数据的封装格式进行封装,得到封装后的数据;发送模块,用于通过所述第一通信模块的串口将所述封装后的数据发送至所述多个通信模块中的第二通信模块,所述第一通信模块与所述第二通信模块处于同一网段。
- 一种计算机设备,包括多个通信模块,各所述通信模块包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至12中任一项所述方法的步骤。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至12中任一项所述的方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911300852.1A CN111221622B (zh) | 2019-12-17 | 2019-12-17 | 通信模块间通信方法、装置、计算机设备和可读存储介质 |
CN201911300852.1 | 2019-12-17 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021121287A1 true WO2021121287A1 (zh) | 2021-06-24 |
Family
ID=70806053
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/136921 WO2021121287A1 (zh) | 2019-12-17 | 2020-12-16 | 通信模块间通信方法、装置、计算机设备和可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111221622B (zh) |
WO (1) | WO2021121287A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116321518A (zh) * | 2022-09-08 | 2023-06-23 | 深圳市丰润达科技有限公司 | 网络连接状态的提示方法、装置、控制模块及存储介质 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111221622B (zh) * | 2019-12-17 | 2023-10-24 | 京信网络系统股份有限公司 | 通信模块间通信方法、装置、计算机设备和可读存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104408906A (zh) * | 2014-12-17 | 2015-03-11 | 国家电网公司 | 一种td-lte无线通信集中器以及电表数据采集方法 |
CN106936944A (zh) * | 2017-03-31 | 2017-07-07 | 苏州科达科技股份有限公司 | 一种检测及处理网络地址冲突的方法及装置 |
CN107426263A (zh) * | 2016-05-24 | 2017-12-01 | 中兴通讯股份有限公司 | 数据包的发送、接收方法及装置、电子设备 |
CN109412651A (zh) * | 2018-11-08 | 2019-03-01 | 普联技术有限公司 | 蓝牙覆盖范围扩展系统及方法 |
CN111221622A (zh) * | 2019-12-17 | 2020-06-02 | 京信通信系统(中国)有限公司 | 通信模块间通信方法、装置、计算机设备和可读存储介质 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8269622B2 (en) * | 2009-03-17 | 2012-09-18 | Jetlun Corporation | Method and system for intelligent energy network management control system |
CN101616088B (zh) * | 2009-06-29 | 2011-12-07 | 中兴通讯股份有限公司 | 一种虚拟网口的实现方法及实现虚拟网口的嵌入式设备 |
CN103152771B (zh) * | 2013-02-23 | 2015-08-12 | 广州市弘宇科技有限公司 | 中高速无线传感网络的通信系统 |
CN103259735B (zh) * | 2013-05-15 | 2016-05-11 | 重庆邮电大学 | 一种基于NetFPGA的可编程虚拟化路由器的通信方法 |
CN204334633U (zh) * | 2014-12-24 | 2015-05-13 | 刘俊彪 | 一种多串口医疗网关及系统 |
CN106130897B (zh) * | 2016-06-08 | 2019-05-31 | 成都万纬信息技术有限公司 | 基于路由模拟的性能优化方法 |
CN108563518A (zh) * | 2018-04-08 | 2018-09-21 | 广州视源电子科技股份有限公司 | 主从机通信方法、装置、终端设备及存储介质 |
-
2019
- 2019-12-17 CN CN201911300852.1A patent/CN111221622B/zh active Active
-
2020
- 2020-12-16 WO PCT/CN2020/136921 patent/WO2021121287A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104408906A (zh) * | 2014-12-17 | 2015-03-11 | 国家电网公司 | 一种td-lte无线通信集中器以及电表数据采集方法 |
CN107426263A (zh) * | 2016-05-24 | 2017-12-01 | 中兴通讯股份有限公司 | 数据包的发送、接收方法及装置、电子设备 |
CN106936944A (zh) * | 2017-03-31 | 2017-07-07 | 苏州科达科技股份有限公司 | 一种检测及处理网络地址冲突的方法及装置 |
CN109412651A (zh) * | 2018-11-08 | 2019-03-01 | 普联技术有限公司 | 蓝牙覆盖范围扩展系统及方法 |
CN111221622A (zh) * | 2019-12-17 | 2020-06-02 | 京信通信系统(中国)有限公司 | 通信模块间通信方法、装置、计算机设备和可读存储介质 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116321518A (zh) * | 2022-09-08 | 2023-06-23 | 深圳市丰润达科技有限公司 | 网络连接状态的提示方法、装置、控制模块及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN111221622A (zh) | 2020-06-02 |
CN111221622B (zh) | 2023-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021121287A1 (zh) | 通信模块间通信方法、装置、计算机设备和可读存储介质 | |
CN103166874B (zh) | 一种报文转发方法及设备 | |
JP2018535574A (ja) | 端末の相互接続方法、装置及び記憶媒体 | |
CN111464419B (zh) | 一种基于总线网络通信的数据传输控制方法 | |
CN102123002B (zh) | 一种基于IPsec的频率同步方法和相关设备 | |
CN113228567B (zh) | 一种信息处理的方法、装置和信息处理系统 | |
US9503309B2 (en) | Ethernet communication system and method based on MMC/SD interface | |
JP6402583B2 (ja) | 中継装置、中継システム、中継方法、及び、プログラム | |
EP3435691B1 (en) | Communication control device, wireless machine, communication control system, communication control method and program | |
CN105472023A (zh) | 一种远程直接存储器存取的方法及装置 | |
CN110912810A (zh) | 数据传输的方法、智能网关、计算机设备和存储介质 | |
CN105338657A (zh) | eUICC卡与管理平台的连接方法和eUICC卡 | |
JP5698366B2 (ja) | 制御方法、装置、及びシステム | |
CN103297311A (zh) | 无线接入点控制和提供协议数据隧道的实现方法及装置 | |
CN112866439A (zh) | 数据处理方法、装置及系统 | |
CN110875896A (zh) | 报文处理方法、装置及电子设备 | |
KR20010084769A (ko) | 이더넷용 티씨피/아이피 모뎀 | |
CN111917621B (zh) | 通信设备的网管服务器与网元的通信方法及系统 | |
CN102932208A (zh) | 站点监控方法及装置 | |
US20220109659A1 (en) | Computer network with an ip subnetwork and a non-ip subnetwork and backend device, gateway, frontend device therefore and procedure for operation thereof | |
CN115550104A (zh) | Axi总线扩展方法、装置、电子设备及存储介质 | |
KR101454879B1 (ko) | 복수의 통신 인터페이스를 구비한 통신 장치 및 복수의 통신 인터페이스에서의 데이터 처리 방법 | |
CN108848090B (zh) | 基于ipsec的报文转发方法、网关设备及系统 | |
CN111867153A (zh) | 一种终端、网关设备和数据处理方法 | |
KR101947169B1 (ko) | IP 터널링을 이용한IoT 디바이스제어 방법 및장치 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20902912 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20902912 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 020223) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20902912 Country of ref document: EP Kind code of ref document: A1 |