CN118012801A - Communication method, system and related device - Google Patents

Communication method, system and related device Download PDF

Info

Publication number
CN118012801A
CN118012801A CN202311738227.1A CN202311738227A CN118012801A CN 118012801 A CN118012801 A CN 118012801A CN 202311738227 A CN202311738227 A CN 202311738227A CN 118012801 A CN118012801 A CN 118012801A
Authority
CN
China
Prior art keywords
peripheral interface
serial peripheral
universal asynchronous
transmitter
asynchronous receiver
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
Application number
CN202311738227.1A
Other languages
Chinese (zh)
Inventor
李鑫旺
肖悦赏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Neoway Technology Co Ltd
Original Assignee
Shenzhen Neoway Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Neoway Technology Co Ltd filed Critical Shenzhen Neoway Technology Co Ltd
Priority to CN202311738227.1A priority Critical patent/CN118012801A/en
Publication of CN118012801A publication Critical patent/CN118012801A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a communication method, a communication system and a related device. The communication method comprises the following steps: the first universal asynchronous receiver-transmitter of the terminal equipment sends a prompt instruction to the second universal asynchronous receiver-transmitter of the mobile terminal to inform the mobile terminal of receiving first service data, the first serial peripheral interface of the terminal equipment initiates data writing operation to the second serial peripheral interface of the mobile terminal to write the first service data into the mobile terminal in response to the first universal asynchronous receiver-transmitter receiving the first prompt response sent by the second universal asynchronous receiver-transmitter, and the first serial peripheral interface initiates data reading operation to the second serial peripheral interface to read the second service data from the mobile terminal in response to the first universal asynchronous receiver-transmitter receiving the second prompt response sent by the second universal asynchronous receiver-transmitter. By the method, communication between the terminal equipment and the mobile terminal can be realized, the data transmission efficiency is improved, and meanwhile, the complexity of a communication interaction flow is reduced.

Description

Communication method, system and related device
Technical Field
The present application relates to the field of internet of things communication technologies, and in particular, to a communication method, a terminal device, a mobile terminal, a communication system, and a storage medium.
Background
In the field of internet of things communication, an AT (Attention) instruction is used for interaction and data transmission between a TE (Terminal Equipment) and an MT (Mobile Terminal) in internet of things equipment, wherein the TE is used as a user interface or a control unit for processing user input and logic control of the equipment, and the MT is used as a communication module for performing data transmission with an external network. The AT transmission Data generally includes two parts, namely a control command (Commands) and Service Data (Data), and is widely used in internet of things network modules such as GPRS (GENERAL PACKET Radio Service), 4G (4 th Generation Mobile Communication Technolog, fourth generation mobile communication technology), NB-IoT (Narrow Band Internet of Things ), wi-Fi (WIRELESS FIDELITY, wireless fidelity), and Bluetooth (Bluetooth).
Along with the increase of the scale and the data volume of the internet of things, higher requirements are also put forward on the efficiency and the stability of AT transmission. There are many different protocols for AT data transmission communication AT present, among which, the most commonly used is based on using UART (Universal Asynchronous Receiver/Transmitter ) and using SPI (SERIAL PERIPHERAL INTERFACE, serial peripheral interface) protocols, which provide corresponding interfaces and implementation modes in most communication modules, and have strong versatility and operability. However, the UART protocol has a low transmission rate, which is not suitable for some application scenarios that require high-speed data transmission, and the SPI protocol also requires a handshake procedure between the master device and the slave device to transmit and receive data when transmitting data, which is complex and inefficient.
Disclosure of Invention
The application mainly provides a communication method, a communication system and a related device, and aims to solve the technical problems that the existing prompt data transmission communication scheme can not improve data transmission efficiency and reduce interaction flow complexity at the same time.
In order to solve the technical problems, the application adopts the following technical scheme: a communication method is provided. The communication method comprises the following steps: a first universal asynchronous receiver-transmitter of the terminal equipment sends a prompt instruction to a second universal asynchronous receiver-transmitter of the mobile terminal so as to inform the mobile terminal of receiving first service data; in response to the first universal asynchronous receiver-transmitter receiving a first prompt response sent by the second universal asynchronous receiver-transmitter, the first serial peripheral interface of the terminal equipment initiates a data writing operation to the second serial peripheral interface of the mobile terminal so as to write the first service data into the mobile terminal; wherein the first prompt reply is used for representing that the second serial peripheral interface is in a state of receiving the first service data.
In some embodiments, the communication method further comprises: in response to the first universal asynchronous receiver-transmitter receiving a second prompt reply sent by the second universal asynchronous receiver-transmitter, the first serial peripheral interface initiates a data read operation to the second serial peripheral interface to read second service data from the mobile terminal; the second prompt response is used for notifying the terminal equipment to receive the second service data.
In order to solve the technical problems, the application adopts the following technical scheme: yet another communication method is provided. The communication method comprises the following steps: the method comprises the steps that a second universal asynchronous receiver-transmitter of the mobile terminal receives a prompt instruction sent by a first universal asynchronous receiver-transmitter of terminal equipment, wherein the prompt instruction is used for prompting the mobile terminal to receive first service data; the second universal asynchronous receiver-transmitter transmits a first prompt response to the first universal asynchronous receiver-transmitter, wherein the first prompt response is used for representing that a second serial peripheral interface of the mobile terminal is in a state of receiving the first service data; the second serial peripheral interface receives a data writing operation initiated by the first serial peripheral interface of the terminal equipment so as to write the first service data.
In some embodiments, the communication method further comprises: the second universal asynchronous receiver-transmitter transmits a second prompt response to the first universal asynchronous receiver-transmitter to inform the terminal equipment of receiving second service data; the second serial peripheral interface receives a data read operation initiated by the first serial peripheral interface to allow the first serial peripheral interface to read the second service data from the second serial peripheral interface.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a terminal device comprising a processor and a memory interconnected, said memory storing a computer program, said processor being connected to a first universal asynchronous receiver-transmitter and a first serial peripheral interface, said processor implementing the steps of the communication method as described above in the previous step when said computer program is executed.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a mobile terminal comprising a processor and a memory interconnected, said memory storing a computer program, said processor being connected to a second universal asynchronous receiver-transmitter and to a second serial peripheral interface, said processor implementing the steps of the latter communication method as described above when said computer program is executed.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a communication system comprising a terminal device and a mobile terminal, the terminal device comprising a first universal asynchronous receiver-transmitter and a first serial peripheral interface, the mobile terminal comprising a second universal asynchronous receiver-transmitter and a second serial peripheral interface, the first universal asynchronous receiver-transmitter and the second universal asynchronous receiver-transmitter being arranged to transmit interactive data, the second serial peripheral interface and the first serial peripheral interface being arranged to transmit traffic data.
In some embodiments, the first universal asynchronous receiver-transmitter transmits a prompt instruction to the second universal asynchronous receiver-transmitter to inform the mobile terminal of receiving first service data; the second universal asynchronous transceiver sends a first prompt response to the first asynchronous transceiver, wherein the first prompt response is used for representing that the second serial peripheral interface is in a state of receiving the first service data; the first serial peripheral interface writes the first service data to the second serial peripheral interface.
In some embodiments, the second universal asynchronous receiver-transmitter transmits a second prompt acknowledgement to the first universal asynchronous receiver-transmitter to inform the terminal device of receipt of second service data; the first serial peripheral interface initiates a data read operation to the second serial peripheral interface to read the second traffic data from the second serial peripheral interface.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a storage medium having stored thereon program data, wherein the program data, when executed by a processor, implements the steps of the communication method as described above.
The beneficial effects of the application are as follows: the application discloses a communication method, a communication system and a related device, which are different from the prior art. The application respectively carries out data interaction and service data transmission between the terminal equipment and the mobile terminal through the universal asynchronous transceiver and the serial peripheral interface, and utilizes the characteristics of simple interaction of the universal asynchronous transceiver and quick data transmission of the serial peripheral interface to realize a communication method which effectively reduces the complexity of an interaction flow while improving the data transmission efficiency, and improves the efficiency and the flexibility of data interaction and data transmission. In addition, the universal asynchronous receiver-transmitter and the serial peripheral interface are universal in terminal equipment and mobile terminals of the Internet of things equipment, so that the universal asynchronous receiver-transmitter and the serial peripheral interface have stronger compatibility and applicability, and can be effectively and reliably deployed and applied to various Internet of things equipment.
Drawings
For a clearer description of embodiments of the application or of solutions in the prior art, the drawings that are necessary for the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are only some embodiments of the application, from which, without the inventive effort, other drawings can be obtained for a person skilled in the art, in which:
FIG. 1 is a schematic diagram of one embodiment of a prior art UART-based communication method;
FIG. 2 is a schematic diagram of one embodiment of a prior art serial peripheral interface based communication method;
FIG. 3 is a schematic diagram of another embodiment of a prior art serial peripheral interface based communication method;
FIG. 4 is a flow chart of an embodiment of a communication method provided by the present application;
FIG. 5 is a flow chart of another embodiment of a communication method provided by the present application;
Fig. 6 is a schematic structural diagram of an embodiment of a terminal device provided by the present application;
fig. 7 is a schematic structural diagram of an embodiment of a mobile terminal according to the present application;
FIG. 8 is a schematic diagram of an embodiment of a communication system provided by the present application;
fig. 9 is a schematic structural diagram of an embodiment of a storage medium according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first," "second," "third," and the like in embodiments of the present application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", and "a third" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an embodiment of a conventional universal asynchronous receiver-based communication method.
The existing communication method based on the universal asynchronous transceivers is an asynchronous full duplex communication method, and each universal asynchronous transceiver comprises two interfaces, namely a Tx (Transmit end) and an Rx (Receive end). The transmitting end of the universal asynchronous receiver of the terminal equipment and the mobile terminal is connected with the receiving end of the opposite end, and the receiving end is connected with the transmitting end of the opposite end so as to communicate. In the existing method, the terminal equipment can directly send the prompt instruction to the mobile terminal and perform data query, and the mobile terminal can also directly perform prompt response and data reporting, so that the interaction between the control command and the service data for AT data transmission is very convenient. Wherein the transmission rate of the communication method based on the universal asynchronous receiver is based on the setting of the baud rate value, the baud rate value is expressed as bps (bit per second), for example, the bit rate value is set as 115200bps, and 115200 bits of data can be transmitted per second.
However, the transmission rate of the conventional universal asynchronous receiver depends on factors such as the clock frequency, the frequency division rate coefficient, the sampling time and the like of the universal asynchronous receiver, the maximum data transmission rate is generally between 230kbps and 460kbps, and the maximum data transmission rate cannot meet the requirement of the internet of things equipment on service data, for example, in the interaction of a certain smart home, the voice data amount of five seconds of which is usually about 1.5Mbps (1 mbps=1000 kbps) when the voice assistant turns on, if the transmission rate is 300kbps, the time of 5 seconds is required, and a certain time is required for processing the voice data, which obviously cannot meet the actual requirement on response time and response speed. Therefore, the communication method based on the universal asynchronous receiver/transmitter is not applicable in these application scenarios requiring high-speed data transmission.
Referring to fig. 2 and 3, fig. 2 is a schematic diagram of a terminal device sending data to a mobile terminal according to an embodiment of a conventional communication method based on a serial peripheral interface, and fig. 3 is a schematic diagram of a mobile terminal reporting data to a terminal device according to another embodiment of a conventional communication method based on a serial peripheral interface.
The existing communication method based on the Serial peripheral interfaces is a high-speed synchronous full duplex communication method, each Serial peripheral interface includes four pins of SCLK (Serial Clock line), MOSI (Master Output Slave Input, master input slave input line), MISO (Master Input Slave Output, master input slave output line), SS (SLAVE SELECT, slave select line), wherein the Serial Clock line is generated by the master and controls the communication speed, and is used for synchronizing data transmission between the master and the slave, the master output slave input line is used for transmitting data or instructions to the slave, the master input slave output line is used for transmitting data or status to the master, the slave select line is used for the master to select which slave to communicate with, and omission can be made in the communication process of the single terminal device and the single mobile terminal. The communication method based on the serial peripheral interface has the speed of 10Mbps to 20Mbps, and the data transmission rate of the communication method is far higher than that of the communication method based on the universal asynchronous receiver, so that the communication method can better adapt to the communication requirement of the Internet of things equipment.
The terminal equipment and the mobile terminal are based on the communication of the serial peripheral interface, wherein the terminal equipment is used as a host, and the mobile terminal is used as a slave. Communication methods based on serial peripheral interfaces provide that communication between two devices must be initiated by a master device, but when AT command data interaction is performed, a slave machine needs to report some data, and if the slave machine needs to report data to a host machine, a handshake signal needs to be added to inform the host machine to perform a read operation, and subsequent data transmission can be performed after handshake is completed.
Referring to fig. 2, when the communication method based on the serial peripheral interface is applied to a terminal device sending data to a mobile terminal, the terminal device needs to send a prompt instruction to the mobile terminal first, after receiving the prompt instruction, the mobile terminal needs to trigger GPIO (General Purpose Input-Output) interrupt if the data is allowed to be received, after responding to the interrupt, the interrupt device reads and detects the state of the mobile terminal for receiving the data again, and sends the data to the mobile terminal, and sends an end prompt to the mobile terminal after the data sending is finished, so as to inform the mobile terminal that the data sending is finished.
Referring to fig. 3, when the communication method based on the serial peripheral interface is applied to reporting data to the terminal device by the mobile terminal, the mobile terminal writes a flag bit to indicate that the terminal device is allowed to read and trigger the GPIO interrupt, the terminal device responds to the state that the terminal reads and detects the data receiving state of the mobile terminal, the terminal device initiates a data reading operation to receive the data, and after the receiving is finished, the terminal device sends an end prompt to the mobile terminal.
As can be seen from the embodiments of fig. 2 and fig. 3, when the control command of the AT and the service data are transmitted by using the serial peripheral interface, multiple interactions are required, the flow is complex, and the actual effective service data transmission efficiency is low. Especially, when the mobile terminal needs to report data to the terminal equipment, the data transmission cannot be actively initiated, and after a handshake signal is added to inform the terminal equipment to generate a terminal signal, the terminal equipment initiates a data reading operation, so that the software interaction process is complex.
Therefore, the existing communication methods described based on fig. 1 to 3 cannot simultaneously improve the data transmission efficiency and reduce the complexity of the interaction flow, and have certain limitations when applied to data interaction and transmission communication between the terminal device and the mobile terminal of the internet of things device.
Referring to fig. 4, fig. 4 is a schematic diagram of an embodiment of a communication method according to the present application, where the communication method includes:
Step 11: the first universal asynchronous receiver-transmitter of the terminal device sends a prompt instruction to the second universal asynchronous receiver-transmitter of the mobile terminal to inform the mobile terminal of receiving the first service data.
Step 12: in response to the first universal asynchronous receiver-transmitter receiving the first prompt reply sent by the second universal asynchronous receiver-transmitter, the first serial peripheral interface of the terminal equipment initiates a data writing operation to the second serial peripheral interface of the mobile terminal to write the first service data into the mobile terminal.
The first prompt response is used for representing that the second serial peripheral interface is in a state of receiving the first service data.
Step 13: in response to the first universal asynchronous receiver-transmitter receiving the second prompt reply sent by the second universal asynchronous receiver-transmitter, the first serial peripheral interface initiates a data read operation to the second serial peripheral interface to read the second service data from the mobile terminal.
The second prompt response is used for notifying the terminal equipment to receive second service data.
The steps 11 to 13 are steps of the communication method described in fig. 4, and are applied to interaction and data transmission between the terminal device side and the mobile terminal, wherein the first prompt response and the second prompt response are both received through the first universal asynchronous transceiver, the prompt instruction is sent out through the first universal asynchronous transceiver, the first service data is sent out through the first serial peripheral interface, and the second service data is received through the first serial peripheral interface. The prompting instruction, the first response instruction and the second response instruction are set according to AT control command rules interacted between the terminal equipment and the mobile terminal, so long as corresponding functions can be realized. For example, the prompting instruction may be an instruction such as "at+cusd" in the AT instruction set, for sending a request for receiving the first service data to the mobile terminal, the first prompting response may include a response instruction such as "OK" or "CONNECT" for notifying that the terminal device is ready to receive the first service data, and the second prompting response may include a response instruction such as "READ" or "RING" for notifying that the terminal device starts to READ the second service data.
In the communication method, the prompt instruction, the first response instruction and the second response instruction are transmitted through the universal asynchronous receiver-transmitter, so that the communication method can be directly transmitted to the opposite end without handshake, the data size of the interaction data is small, the interaction of the AT control command can be rapidly completed by using the universal asynchronous receiver-transmitter, the data interaction efficiency is improved, the complexity of the interaction process is reduced, and the complexity of corresponding software development is reduced. Meanwhile, in the communication method, the first serial peripheral interface initiates data writing operation and data reading operation to the second serial peripheral interface, and the data writing operation and the data reading operation are transmitted through the serial peripheral interface, and the serial peripheral interface is only used for transmitting corresponding service data in the process, so that a complex handshake flow in the existing method is omitted, the transmission efficiency is high, and the communication is reliable. In addition, in the method, the mobile terminal can have more initiative and can directly and actively initiate data response and data reporting without being limited by a master-slave mode of the serial peripheral interface, so that the mobile terminal can interact with the terminal equipment more flexibly, and the communication efficiency and reliability are improved. The communication method can simultaneously give consideration to the improvement of data transmission efficiency and the reduction of complexity of an interaction flow, can improve the efficiency and the reliability of data transmission when being applied to data interaction and transmission communication between terminal equipment and a mobile terminal of the Internet of things equipment, and can effectively improve the efficiency and the reliability of data transmission and reduce the complexity of the interaction flow by transmitting a prompt instruction, a first response instruction and a second response instruction through a universal asynchronous transceiver and initiating data writing operation and data reading operation to a second serial peripheral interface by a first serial peripheral interface.
Referring to fig. 5, fig. 5 is a flow chart of another embodiment of a communication method according to the present application, where the communication method includes:
Step 21: the second universal asynchronous receiver-transmitter of the mobile terminal receives the prompt instruction sent by the first universal asynchronous receiver-transmitter of the terminal equipment.
The prompting instruction is used for prompting the mobile terminal to receive the first service data.
Step 22: the second universal asynchronous receiver transmitter transmits a first prompt acknowledgement to the first universal asynchronous receiver transmitter.
Wherein the first prompt response is used for representing that the second serial peripheral interface of the mobile terminal is in a state of receiving the first service data
Step 23: the second serial peripheral interface receives a data writing operation initiated by the first serial peripheral interface of the terminal equipment so as to write first service data.
Step 24: the second universal asynchronous receiver-transmitter transmits a second prompt response to the first universal asynchronous receiver-transmitter to inform the terminal device of receiving the second service data.
Step 25: the second serial peripheral interface receives a data read operation initiated by the first serial peripheral interface to allow the first serial peripheral interface to read second traffic data from the second serial peripheral interface.
The steps 21 to 25 are steps of the communication method described in fig. 5, and are applied to interaction and data transmission between the mobile terminal side and the terminal device, where the first prompt response and the second prompt response are both sent by the second universal asynchronous transceiver, the prompt instruction is received by the second universal asynchronous transceiver, the first service data is received by the second serial peripheral interface, and the second service data is sent by the second serial peripheral interface. The specific process steps, embodiments and advantages of the method can be referred to the communication method described in fig. 4, and will not be described herein.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a terminal device according to the present application.
The terminal device 30 comprises a memory 31 and a processor 32 connected to each other, the memory 31 storing a computer program, the processor 32 being connected to a first universal asynchronous receiver-transmitter 33 and to a first serial peripheral interface 34, the processor 32 implementing the steps of the communication method as described in fig. 4 when the computer program is executed.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of a mobile terminal according to the present application.
The mobile terminal 40 comprises a memory 41 and a processor 42 connected to each other, the memory 41 storing a computer program, the processor 42 being connected to a second universal asynchronous receiver-transmitter 43 and to a second serial peripheral interface 44, the processor 42 executing the computer program to perform the steps of the communication method as described in fig. 5.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of a communication system according to the present application.
The communication system 50 comprises a terminal device 30 comprising a first universal asynchronous receiver-transmitter 33 and a first serial peripheral interface 34, and a mobile terminal 40 comprising a second universal asynchronous receiver-transmitter 43 and a second serial peripheral interface 44, the first universal asynchronous receiver-transmitter 33 and the second universal asynchronous receiver-transmitter 43 being arranged to transmit interactive data, and the second serial peripheral interface 34 and the first serial peripheral interface 44 being arranged to transmit traffic data. The terminal device and the mobile terminal may be, besides the terminal device described in fig. 6 or the mobile terminal described in fig. 7, another terminal device or mobile terminal that is independently developed, so long as the terminal device and the mobile terminal have a corresponding universal asynchronous transceiver and a serial peripheral interface.
The interactive data, i.e. data required for interaction between the terminal device and the mobile terminal, is used for informing the opposite terminal, controlling the opposite terminal or receiving the opposite terminal information, for example, the interactive data may include the foregoing prompt instruction, the AT control command including the first prompt response and the second prompt response, and the corresponding response, and may also include, for example, signal strength of the terminal device or the mobile terminal, network coverage area, battery power, various status information of the current time, etc., and according to the status information, corresponding responsive or triggered control may be performed, where the interactive data generally has a relatively small information amount, so that effective and reliable data transmission may also be performed through the universal asynchronous receiver. The service data, that is, the aforementioned first service data written into the mobile terminal by the terminal device, or the second service data reported to the terminal device by the mobile terminal, may be in various forms, such as text information, image information, audio information, application programs, etc., and these service data are used for performing various service operations and information exchange, and generally have a relatively large information volume, so as to meet the time and speed requirements of the time communication of the internet of things device, the service data may be transmitted by a high-speed communication method based on a serial peripheral interface.
Because the terminal equipment and the mobile terminal used in the existing internet of things equipment are generally provided with the universal asynchronous receiver-transmitter and the serial peripheral interface, and have certain uniformity in terms of protocol, for example, the setting of the bit rate value of the universal asynchronous receiver-transmitter, the setting of the master-slave property of the serial peripheral interface and the like have similar standards, or the serial peripheral interface and the mobile terminal can be adjusted through an internal program or a parameter adjusting interface, so that the terminal equipment and the mobile terminal can coordinate to operate, and effective and reliable data transmission is performed. Therefore, the communication system has stronger compatibility and applicability, can be well applied to various Internet of things equipment, performs efficient interaction control and data transmission, and can effectively reduce the complexity of an interaction flow while improving the data transmission efficiency.
Optionally, the first universal asynchronous receiver-transmitter transmits a prompt instruction to the second universal asynchronous receiver-transmitter to inform the mobile terminal of receiving the first service data. The second universal asynchronous transceiver transmits a first hint response to the first asynchronous transceiver, the first hint response being used to characterize the second serial peripheral interface as being in a state to receive the first traffic data. The first serial peripheral interface writes first traffic data to the second serial peripheral interface.
Optionally, the second universal asynchronous receiver-transmitter transmits a second prompt acknowledgement to the first universal asynchronous receiver-transmitter to inform the terminal device of the receipt of the second service data. The first serial peripheral interface initiates a data read operation to the second serial peripheral interface to read second traffic data from the second serial peripheral interface.
In the communication system, interactive control and data transmission are carried out between terminal equipment and a mobile terminal, wherein the system is embodied as two communication situations, one is that the terminal equipment writes first service data into the mobile terminal, and the other is that the mobile terminal reports second service data to the terminal equipment, and the two communication situations can be well realized in the system. The specific process steps, embodiments and advantages of the method may be referred to as the communication method described in fig. 4 or fig. 5, and will not be described herein.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of a storage medium according to the present application.
The storage medium 60 stores program data 61, which program data 61, when executed by a processor, implements the communication method as described in fig. 4 to 5.
The program data 61 is stored in a storage medium 60 comprising instructions for causing a network device (which may be a router, personal computer, server, etc.) or processor to perform all or part of the steps of the method according to various embodiments of the application.
Alternatively, the storage medium 60 may be a usb disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM), a magnetic disk, or an optical disk, or other various media that can store the program data 61.
The application discloses a communication method, a communication system and a related device, which are different from the prior art. The application respectively carries out data interaction and service data transmission between the terminal equipment and the mobile terminal through the universal asynchronous transceiver and the serial peripheral interface, and utilizes the characteristics of simple interaction of the universal asynchronous transceiver and quick data transmission of the serial peripheral interface to realize a communication method which effectively reduces the complexity of an interaction flow while improving the data transmission efficiency, and improves the efficiency and the flexibility of data interaction and data transmission. In addition, the universal asynchronous receiver-transmitter and the serial peripheral interface are universal in terminal equipment and mobile terminals of the Internet of things equipment, so that the universal asynchronous receiver-transmitter and the serial peripheral interface have stronger compatibility and applicability, and can be effectively and reliably deployed and applied to various Internet of things equipment.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the storage medium embodiments and the electronic device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
In the several embodiments provided in the present application, it should be understood that the disclosed method, terminal device, mobile terminal, communication system and storage medium may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing description is only illustrative of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present application.

Claims (10)

1. A method of communication, comprising:
a first universal asynchronous receiver-transmitter of the terminal equipment sends a prompt instruction to a second universal asynchronous receiver-transmitter of the mobile terminal so as to inform the mobile terminal of receiving first service data;
In response to the first universal asynchronous receiver-transmitter receiving a first prompt response sent by the second universal asynchronous receiver-transmitter, the first serial peripheral interface of the terminal equipment initiates a data writing operation to the second serial peripheral interface of the mobile terminal so as to write the first service data into the mobile terminal;
wherein the first prompt reply is used for representing that the second serial peripheral interface is in a state of receiving the first service data.
2. The communication method according to claim 1, characterized in that the communication method further comprises:
in response to the first universal asynchronous receiver-transmitter receiving a second prompt reply sent by the second universal asynchronous receiver-transmitter, the first serial peripheral interface initiates a data read operation to the second serial peripheral interface to read second service data from the mobile terminal;
The second prompt response is used for notifying the terminal equipment to receive the second service data.
3. A method of communication, comprising:
the method comprises the steps that a second universal asynchronous receiver-transmitter of the mobile terminal receives a prompt instruction sent by a first universal asynchronous receiver-transmitter of terminal equipment, wherein the prompt instruction is used for prompting the mobile terminal to receive first service data;
the second universal asynchronous receiver-transmitter transmits a first prompt response to the first universal asynchronous receiver-transmitter, wherein the first prompt response is used for representing that a second serial peripheral interface of the mobile terminal is in a state of receiving the first service data;
The second serial peripheral interface receives a data writing operation initiated by the first serial peripheral interface of the terminal equipment so as to write the first service data.
4. A communication method according to claim 3, characterized in that the communication method further comprises:
the second universal asynchronous receiver-transmitter transmits a second prompt response to the first universal asynchronous receiver-transmitter to inform the terminal equipment of receiving second service data;
the second serial peripheral interface receives a data read operation initiated by the first serial peripheral interface to allow the first serial peripheral interface to read the second service data from the second serial peripheral interface.
5. A terminal device comprising a processor and a memory connected to each other, the memory storing a computer program, the processor being connected to a first universal asynchronous receiver-transmitter and a first serial peripheral interface, the processor implementing the steps of the communication method according to claim 1 or 2 when the computer program is executed.
6. A mobile terminal comprising a processor and a memory connected to each other, the memory storing a computer program, the processor being connected to a second universal asynchronous receiver-transmitter and to a second serial peripheral interface, the processor implementing the steps of the communication method according to claim 3 or 4 when the computer program is executed.
7. A communication system comprising a terminal device and a mobile terminal, the terminal device comprising a first universal asynchronous receiver-transmitter and a first serial peripheral interface, the mobile terminal comprising a second universal asynchronous receiver-transmitter and a second serial peripheral interface, the first universal asynchronous receiver-transmitter and the second universal asynchronous receiver-transmitter being arranged to transmit interactive data, the second serial peripheral interface and the first serial peripheral interface being arranged to transmit traffic data.
8. The communication system of claim 7, wherein the first universal asynchronous receiver-transmitter transmits a prompt to the second universal asynchronous receiver-transmitter to inform the mobile terminal of receiving first service data; the second universal asynchronous transceiver sends a first prompt response to the first asynchronous transceiver, wherein the first prompt response is used for representing that the second serial peripheral interface is in a state of receiving the first service data; the first serial peripheral interface writes the first service data to the second serial peripheral interface.
9. The communication system of claim 8, wherein the second universal asynchronous receiver-transmitter transmits a second prompt acknowledgement to the first universal asynchronous receiver-transmitter to inform the terminal device of receipt of second service data; the first serial peripheral interface initiates a data read operation to the second serial peripheral interface to read the second traffic data from the second serial peripheral interface.
10. A storage medium having stored thereon program data, wherein the program data, when executed by a processor, implement the steps of the communication method according to any of claims 1 to 4.
CN202311738227.1A 2023-12-15 2023-12-15 Communication method, system and related device Pending CN118012801A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311738227.1A CN118012801A (en) 2023-12-15 2023-12-15 Communication method, system and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311738227.1A CN118012801A (en) 2023-12-15 2023-12-15 Communication method, system and related device

Publications (1)

Publication Number Publication Date
CN118012801A true CN118012801A (en) 2024-05-10

Family

ID=90951032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311738227.1A Pending CN118012801A (en) 2023-12-15 2023-12-15 Communication method, system and related device

Country Status (1)

Country Link
CN (1) CN118012801A (en)

Similar Documents

Publication Publication Date Title
CN110089040B (en) Data transmission method and sending end equipment
CN102739634B (en) Host device suspending communication link to client device based on client device notification
WO2017049548A1 (en) Mobile terminal, power supply adapter, and upgrading method thereof
CN101634976B (en) Method and terminal for providing Bluetooth function for computer
CN106415490B (en) Mobile terminal, power adapter and upgrading method thereof
US20060160569A1 (en) Cellular phone and portable storage device using the same
KR20010094310A (en) Receipt data processing method in communication device supporting Bluetooth wireless communication
EP2206312A2 (en) Pairing exchange
CN104135339A (en) Bluetooth low-power-consumption communication method, Bluetooth equipment and system
CN111510899B (en) Bluetooth transmission method and device
CN111277988B (en) Method for improving Bluetooth transmission speed of WeChat applet
WO2022161004A1 (en) Baud rate switching method and apparatus for uart communication, and initiator terminal
US20110117847A1 (en) Electronic apparatus and communication control method
CN108475241B (en) SPI-based data transmission method and device
WO2022012644A1 (en) Data transmission method employing charging cable, and electronic devices
CN102202132B (en) Method, system and equipment for initializing networking equipment
CN110213020A (en) Data transmission method, terminal, system and device based on bluetooth peripheral hardware
CN111163387A (en) TWS earphone upgrading method and device, charging box and storage medium
WO2017049549A1 (en) Mobile terminal, power supply adapter, and upgrading method thereof
CN113054716B (en) Charging chip, charging device and mobile terminal
US7970352B2 (en) Wireless communication device
CN113949116B (en) Data transmission method and device
CN115912567A (en) Data transmission method based on charging cable and electronic equipment
CN118012801A (en) Communication method, system and related device
CN114490491A (en) Data transmission method and device based on charging cable

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication