CN109413632B - Bluetooth connection optimization method and system for embedded system - Google Patents
Bluetooth connection optimization method and system for embedded system Download PDFInfo
- Publication number
- CN109413632B CN109413632B CN201811546199.2A CN201811546199A CN109413632B CN 109413632 B CN109413632 B CN 109413632B CN 201811546199 A CN201811546199 A CN 201811546199A CN 109413632 B CN109413632 B CN 109413632B
- Authority
- CN
- China
- Prior art keywords
- module
- user
- bluetooth
- instruction
- information
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention provides an embedded system Bluetooth connection optimization method and a system, the method comprises that a user sends an operation instruction to Bluetooth through an interactive device, the interactive device firstly feeds back successful operation information to the user after receiving the operation instruction, meanwhile, the interactive device sends the operation instruction to the Bluetooth bottom layer protocol stack, the bottom layer protocol stack responds and processes the operation instruction, and generating a processing result signal, sending the processing result signal to the interactive device, identifying the processing result signal by the interactive device, if the processing result signal is an operation success signal, the interactive device does not process the processing result signal, if the processing result signal is an operation failure signal, the interactive device feeds back operation failure information to the user, adopting a protocol to screen user instructions, avoiding the repeated user instructions from causing pressure on a Bluetooth protocol stack, meanwhile, the purpose of prompting the user is achieved by a method of feeding back information in advance, and the user is prevented from blindly repeating the operation for many times under the condition that the feedback information is not received.
Description
Technical Field
The invention relates to the technical field of wireless transmission, in particular to a Bluetooth connection optimization method for an embedded system.
Background
Bluetooth has a great deal of applications in various embedded devices today, including mobile phones that we often use on a daily basis. However, due to the complexity of the bluetooth protocol itself and the implementation methods of each device to the bluetooth protocol stack are different, there is a response delay in the connection and operation process between bluetooth devices, especially in the operating environment of the vehicle-mounted system, which is mainly reflected in that when the bluetooth is turned on or when the user continuously clicks the play/pause button, the embedded system causes a short delay in the system response due to the frequent operation of the bluetooth, resulting in a feeling of system deadlock for the user. The Bluetooth equipment follows up the bottom layer communication and still communicates through the serial port, so that the timing sequence problem exists, the user can not consider the problem during operation, the confusion of the Bluetooth communication timing sequence can be caused by repeated and frequent clicks on the interface, and if the Bluetooth equipment is not controlled, the Bluetooth bottom layer can break down, so that the connection can not be finally realized. The vehicle-mounted system is a system which has extremely high requirements on stability, and the occurrence of such problems cannot be allowed at all. In order to optimize the operation experience of a user when the user operates the related Bluetooth functions and enhance the stability of a vehicle-mounted system, the method for improving the operation experience of the user is provided.
Disclosure of Invention
In view of this, the present invention provides an embedded system bluetooth connection optimization method and system, which can overcome the problem that an operator frequently operates a system to cause system crash, so that bluetooth devices cannot be normally connected.
The technical scheme of the invention is realized as follows: the invention provides a Bluetooth connection optimization method of an embedded system, which comprises the following steps:
step one, a user sends an operation instruction to Bluetooth through an interactive device, the interactive device firstly feeds back operation success information to the user after receiving the operation instruction, and meanwhile the interactive device sends the operation instruction to a Bluetooth bottom layer protocol stack;
step two, the Bluetooth bottom layer protocol stack responds and processes the operation instruction, and simultaneously generates a processing result signal which is sent to the interactive equipment;
and step three, the interactive equipment identifies the processing result signal, if the processing result signal is an operation success signal, the interactive equipment does not process the processing result signal, and if the processing result signal is an operation failure signal, the interactive equipment feeds back operation failure information to a user.
On the basis of the above technical solution, preferably, when the interactive device sends the operation instruction to the bluetooth bottom layer protocol stack in the step one, the method further includes determining an operation frequency of the operation instruction and then sending the operation instruction to the bluetooth bottom layer protocol stack.
On the basis of the above technical solution, preferably, the operation frequency judgment includes: presetting a maximum value A of the operation frequency, if the frequency value of the operation instruction is greater than A, recording the operation action and feeding back information of overhigh operation frequency to the interactive equipment, and if the frequency value of the operation instruction is not greater than A, sending the operation instruction to a Bluetooth bottom layer protocol stack.
On the basis of the above technical solution, preferably, if the frequency value of the operation instruction is greater than a, the last operation is sent to the bluetooth bottom layer protocol stack.
The invention also provides an embedded system Bluetooth connection optimization system, which comprises an interaction module, a protocol module, a Bluetooth protocol stack and an instruction judgment module, wherein a user issues an instruction through the interaction module, and simultaneously obtains feedback information through the interaction module, the protocol module is used for receiving the user instruction from the interaction module and transmitting the user instruction to the Bluetooth protocol stack according to a preset protocol, the Bluetooth protocol stack receives the user instruction from the protocol module, processes and feeds back the user instruction, the feedback information is sent to the instruction judgment module, and the instruction judgment module judges the feedback information and outputs a judgment result to the interaction module.
Further preferably, the protocol module feeds back a successful connection instruction to the interactive module while receiving the user instruction from the interactive module, and the interactive module feeds back successful connection information to the user.
On the basis of the above technical solution, preferably, the instruction determination module further includes an overtime determination submodule, where the overtime determination submodule records an overtime upper limit B, the protocol module sends the user instruction to the bluetooth protocol stack and also sends the same user instruction to the overtime determination submodule, the overtime determination submodule records timing information a of the user instruction, and when the overtime determination submodule receives the determination result information from the determination module, records timing information B of the determination result information, and compares the sizes of (B-a) and (B).
On the basis of the above technical solution, preferably, when the determination result is that the connection is successful and (B-a) is not greater than B, the feedback information of the interaction module is not changed, and if (B-a) is greater than B or the determination result is that the connection is unsuccessful, the interaction module corrects the feedback information to be unsuccessful.
Compared with the prior art, the method and the system for optimizing the Bluetooth connection of the embedded system have the following beneficial effects:
(1) the connection optimization method solves the problems that the system is crashed and the Bluetooth cannot be connected due to the fact that time sequence confusion is easy to occur in conventional Bluetooth serial port communication, a protocol is adopted to screen user instructions, the pressure of repeated user instructions on a Bluetooth protocol stack is avoided, meanwhile, the purpose of prompting a user is achieved through a method of feeding back information in advance, and the user is prevented from blindly and repeatedly carrying out repeated operation under the condition that the feedback information is not received;
(2) the connection optimization system of the invention does not need to upgrade hardware equipment on the basis of the original equipment, and can achieve the optimization purpose through system updating.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of the working flow of the Bluetooth connection optimization method of the embedded system according to the present invention;
fig. 2 is a block diagram of the bluetooth connection optimization method of the embedded system according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, the bluetooth connection optimization method for an embedded system of the present invention includes the following steps:
firstly, a user sends an operation instruction to a Bluetooth device through an interactive device, the interactive device firstly feeds back operation success information to the user after receiving the operation instruction, the user can receive pre-feedback information as fast as possible so as to avoid repeated operation, and meanwhile, the interactive device sends the operation instruction to a Bluetooth bottom layer protocol stack;
step two, the Bluetooth bottom layer protocol stack responds and processes the operation instruction, and simultaneously generates a processing result signal which is sent to the interactive equipment;
and step three, the interactive equipment identifies the processing result signal, if the processing result signal is a success signal, the interactive equipment does not perform corresponding processing, and if the processing result signal is an operation failure signal, the interactive equipment feeds back operation failure information to the user.
In the above embodiment, the interactive device will make a previous feedback result on the operation of the user, so that the user can receive the feedback information more quickly, and repeated signal input to the system under the condition that the real feedback information is not received is avoided, so that the device is not stuck.
In a specific embodiment, when the interactive device sends the operation instruction to the bluetooth bottom layer protocol stack in the step one, the method further includes determining an operation frequency of the operation instruction and sending the operation instruction to the bluetooth bottom layer protocol stack.
In the above embodiment, the operation frequency determination treasury: presetting a maximum value A of the operation frequency, if the frequency value of the operation instruction is greater than A, recording the operation action and feeding back information of overhigh operation frequency to the interactive equipment, and if the frequency value of the operation instruction is not greater than A, sending the operation instruction to a Bluetooth bottom layer protocol stack.
In the above embodiment, if the frequency value of the operation instruction is greater than a, the last operation is sent to the bluetooth protocol stack.
The above embodiment effectively avoids adverse effects on the equipment caused by overhigh operation frequency of the user, screens information with overhigh frequency, and only selects one operation within a specified time as an effective operation for transmission.
As shown in fig. 2, an embedded system bluetooth connection optimization system, including interactive module, protocol module, bluetooth protocol stack and instruction judgment module, the user gives the instruction through interactive module, the user obtains feedback information through interactive module simultaneously, protocol module is used for receiving the user's instruction from interactive module, and transmit the user's instruction to bluetooth protocol stack according to the predetermined protocol, bluetooth protocol stack receives the user's instruction from protocol module, handle and feedback user's instruction simultaneously, feedback information sends to instruction judgment module, instruction judgment module judges feedback information and outputs the judgment result for interactive module.
In a specific embodiment, the protocol module receives a user instruction from the interaction module, and simultaneously feeds back a successful connection instruction to the interaction module, and the interaction module feeds back successful connection information to the user.
In a specific embodiment, the instruction judgment module further includes a timeout judgment submodule, where the timeout judgment submodule records a timeout time upper limit B, the protocol module sends the user instruction to the bluetooth protocol stack and also sends the same user instruction to the timeout judgment submodule, the timeout judgment submodule records timing information a of the user instruction, and when the timeout judgment submodule receives the judgment result information from the judgment module, records timing information B of the judgment result information, and compares the sizes of (B-a) and (B).
In the above embodiment, if the determination result is that the connection is successful and (B-a) is not greater than B, the information fed back to the user by the interaction module remains unchanged and is still successful in operation; and if the (B-a) is larger than the B or the judgment result is unsuccessful connection, the interactive module corrects the information fed back to the user into operation failure.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (6)
1. A Bluetooth connection optimization method for an embedded system is characterized by comprising the following steps:
step one, a user sends an operation instruction to Bluetooth through an interactive device, the interactive device firstly feeds back operation success information to the user after receiving the operation instruction, and meanwhile, the interactive device judges the operation frequency of the operation instruction and then sends the operation instruction to a Bluetooth bottom layer protocol stack;
step two, the Bluetooth bottom layer protocol stack responds and processes the operation instruction, and simultaneously generates a processing result signal which is sent to the interactive equipment;
and step three, the interactive equipment identifies the processing result signal, if the processing result signal is an operation success signal, the interactive equipment does not process the processing result signal, and if the processing result signal is an operation failure signal, the interactive equipment feeds back operation failure information to a user.
2. The embedded system bluetooth connection optimization method of claim 1, wherein the operating frequency determination comprises: presetting a maximum value A of the operation frequency, if the frequency value of the operation instruction is greater than A, recording the operation action and feeding back information of overhigh operation frequency to the interactive equipment, and if the frequency value of the operation instruction is not greater than A, sending the operation instruction to a Bluetooth bottom layer protocol stack.
3. The embedded system bluetooth connection optimization method of claim 2, wherein if the frequency value of the operation command is greater than a, the last operation is sent to the bluetooth bottom layer protocol stack.
4. A bluetooth connection optimization system of an embedded system is characterized by comprising an interaction module, a protocol module, a bluetooth protocol stack and an instruction judgment module, wherein a user issues an instruction through the interaction module, and simultaneously obtains feedback information through the interaction module;
the protocol module feeds back a successful connection instruction to the interaction module when receiving the user instruction from the interaction module, and the interaction module feeds back successful connection information to the user.
5. The embedded system bluetooth connection optimization system of claim 4, wherein the instruction determination module further includes a timeout determination sub-module, the timeout determination sub-module records a timeout time upper limit B, the protocol module sends the user instruction to the bluetooth protocol stack and also sends the same user instruction to the timeout determination sub-module, the timeout determination sub-module records timing information a of the user instruction, when the timeout determination sub-module receives the determination result information from the determination module, the timing information B of the determination result information is recorded, and the sizes of (B-a) and B are compared.
6. The embedded system as claimed in claim 5, wherein when the determination result is successful, and (B-a) is not greater than B, the feedback information of the interactive module is unchanged, and if (B-a) is greater than B or the determination result is unsuccessful, the interactive module corrects the feedback information to be unsuccessful.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811546199.2A CN109413632B (en) | 2018-12-17 | 2018-12-17 | Bluetooth connection optimization method and system for embedded system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811546199.2A CN109413632B (en) | 2018-12-17 | 2018-12-17 | Bluetooth connection optimization method and system for embedded system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109413632A CN109413632A (en) | 2019-03-01 |
CN109413632B true CN109413632B (en) | 2021-12-28 |
Family
ID=65459727
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811546199.2A Active CN109413632B (en) | 2018-12-17 | 2018-12-17 | Bluetooth connection optimization method and system for embedded system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109413632B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111417099A (en) * | 2020-04-10 | 2020-07-14 | 北京百瑞互联技术有限公司 | Method and system for preventing Bluetooth connection disconnection |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101924582A (en) * | 2010-07-29 | 2010-12-22 | 上海慧翰信息技术有限公司 | Communication device and middleware thereof |
TWI517614B (en) * | 2013-05-24 | 2016-01-11 | 凌通科技股份有限公司 | Bluetooth data/control message transmission module, interaction system and method thereof |
CN104918124B (en) * | 2015-05-11 | 2017-12-08 | 腾讯科技(北京)有限公司 | Living broadcast interactive system, method for sending information, message receiving method and device |
CN106182007B (en) * | 2016-08-09 | 2018-07-27 | 北京光年无限科技有限公司 | A kind of interim card processing method and processing device for intelligent robot |
CN206411851U (en) * | 2016-12-27 | 2017-08-15 | 珠海格力电器股份有限公司 | Remote controller, air conditioner remote controller and control system |
-
2018
- 2018-12-17 CN CN201811546199.2A patent/CN109413632B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109413632A (en) | 2019-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4812941B2 (en) | Voice input device having a period of interest | |
CN107195305B (en) | Information processing method and electronic equipment | |
EP3462803B1 (en) | Method for managing bluetooth connection and master bluetooth device | |
US7515943B2 (en) | Automotive hands-free apparatus | |
EP2993802B1 (en) | Near field communication-based data transmission method and apparatus, and near field communication device | |
US20130002623A1 (en) | Image Display Apparatus and Control Method | |
US20110285570A1 (en) | Radio communication module, remote controller, and radio system | |
US20100262651A1 (en) | Method to prevent server overload for broadcast protocols by adaptively applying prescribed response behavior profiles | |
CN1728777A (en) | Video camera apparatus | |
CN113157300A (en) | Data processing method, device and storage medium | |
EP3343352A1 (en) | Method, apparatus and device for instructing operations on terminal device | |
CN109413632B (en) | Bluetooth connection optimization method and system for embedded system | |
CN110300187A (en) | A kind of remote assistance method and terminal, server and system of cross-terminal | |
CN112764891B (en) | Electronic terminal and method for controlling application | |
CN107682535B (en) | Method for remotely controlling computer based on smart phone platform | |
CN114389648A (en) | Signal transmission method and device, terminal equipment, intelligent equipment and electronic equipment | |
CN104284011A (en) | Information processing method and electronic device | |
CN210442789U (en) | Touch display device and system | |
CN102694816B (en) | The implementation method of remote subscriber interface, Apparatus and system | |
CN105187878A (en) | Television Bluetooth connection method and device | |
CN111131895B (en) | Method for interacting with arc power amplifier equipment through arc/arc switch related to android | |
CN115567518B (en) | Device, system and method for reorienting camera of cloud desktop | |
CN108880696B (en) | Frequency configuration handshaking method and system, terminal and computer readable storage medium | |
CN106604094B (en) | Input method and system | |
CN112468982B (en) | Calling method and calling device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |