CN116761196A - Recovery method and device for abnormal work of Bluetooth module - Google Patents

Recovery method and device for abnormal work of Bluetooth module Download PDF

Info

Publication number
CN116761196A
CN116761196A CN202311048228.3A CN202311048228A CN116761196A CN 116761196 A CN116761196 A CN 116761196A CN 202311048228 A CN202311048228 A CN 202311048228A CN 116761196 A CN116761196 A CN 116761196A
Authority
CN
China
Prior art keywords
bluetooth module
abnormal
bluetooth
module
condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311048228.3A
Other languages
Chinese (zh)
Other versions
CN116761196B (en
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 SDMC Technology Co Ltd
Original Assignee
Shenzhen SDMC 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 SDMC Technology Co Ltd filed Critical Shenzhen SDMC Technology Co Ltd
Priority to CN202311048228.3A priority Critical patent/CN116761196B/en
Publication of CN116761196A publication Critical patent/CN116761196A/en
Application granted granted Critical
Publication of CN116761196B publication Critical patent/CN116761196B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4425Monitoring of client processing errors or hardware failure
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application belongs to the technical field of Bluetooth, and particularly relates to a method and a device for recovering abnormal work of a Bluetooth module, which comprise the following steps: s1: receiving a Bluetooth module starting signal, starting a Bluetooth module process, and initializing the Bluetooth module; s2: polling, capturing and acquiring abnormal conditions of the Bluetooth module, and prompting abnormal connection of the Bluetooth module; s3: judging an abnormal event based on the abnormal condition of the Bluetooth module, and performing self-repairing of the Bluetooth module; s4: and acquiring the self-repairing condition of the Bluetooth module, and automatically restarting the Bluetooth module process when the preset condition is met. The abnormal condition of the Bluetooth module is acquired through polling capture, the corresponding abnormal event is judged, the self-repairing of the Bluetooth module and the restarting of the Bluetooth module process are sequentially tried, so that the normal operation of the Bluetooth module is recovered, the automatic reconnection of the Bluetooth module and the recovery of the Bluetooth module process are realized, and the use experience of a terminal user is improved.

Description

Recovery method and device for abnormal work of Bluetooth module
Technical Field
The application belongs to the technical field of Bluetooth, and particularly relates to a method and a device for recovering abnormal work of a Bluetooth module.
Background
At present, with the continuous development of bluetooth technology, bluetooth is widely used in smart tv box products. But because the various of its used environment, the circumstances that bluetooth module work was unusual can appear in the end user side unavoidable during the use, and then lead to the disconnection, the bluetooth remote controller that is connected with the smart television box also can't normally control the smart television box for end user is difficult to use, need manual restart or maintenance to resume more, has influenced end user's use experience.
Disclosure of Invention
The application provides a method and a device for recovering abnormal work of a Bluetooth module, which are used for acquiring abnormal conditions of the Bluetooth module through polling, judging corresponding abnormal events, sequentially trying to self-repair the Bluetooth module and restarting the Bluetooth module process so as to recover the normal work of the Bluetooth module, and realizing automatic reconnection of the Bluetooth module and recovery of the Bluetooth module process; meanwhile, the process restarting requirement of the Bluetooth module meets the preset condition, so that the restarting times of the Bluetooth module are reduced, the energy sources can be saved, the equipment stability is improved, and the use experience of a terminal user is improved.
A method for recovering abnormal work of a Bluetooth module comprises the following steps:
s1: receiving a Bluetooth module starting signal, starting a Bluetooth module process, and initializing the Bluetooth module;
s2: polling, capturing and acquiring abnormal conditions of the Bluetooth module, and prompting abnormal connection of the Bluetooth module;
s3: judging an abnormal event based on the abnormal condition of the Bluetooth module, and performing self-repairing of the Bluetooth module;
s4: and acquiring the self-repairing condition of the Bluetooth module, and restarting the Bluetooth module process when the preset condition is met.
Acquiring abnormal conditions of the Bluetooth module through polling capture, judging corresponding abnormal events, sequentially trying self-repairing of the Bluetooth module and restarting the Bluetooth module process to enable the Bluetooth module to recover normal operation, and realizing automatic reconnection of the Bluetooth module and recovery of the Bluetooth module process; meanwhile, the process restarting requirement of the Bluetooth module meets the preset condition, so that the restarting times of the Bluetooth module are reduced, the energy sources can be saved, the equipment stability is improved, and the use experience of a terminal user is improved.
Further, in the step S2, the process of capturing and acquiring abnormal conditions of the bluetooth module by polling specifically includes the following steps:
s21: capturing and acquiring abnormal conditions of the Bluetooth module by utilizing a Bluetooth Controller, and uploading the captured abnormal events to a Host HCI Driver;
s22: the abnormal condition of the Bluetooth module is actively detected at regular time by utilizing the intelligent television box.
Through utilizing bluetooth Controller passive capture and utilizing the unusual condition of intelligent TV box initiative detection bluetooth module, can be comprehensive, timely, effectual discovery bluetooth module unusual problem to can improve equipment stability and reliability, in order to improve end user's use experience, be convenient for better management and maintenance bluetooth module simultaneously and intelligent TV box.
Further, in S22, the process of actively detecting abnormal conditions of the bluetooth module by using the smart tv box at regular time specifically includes the following steps:
s221: the intelligent television box actively detects whether the Bluetooth module works normally every 10 seconds;
s2211: detecting the communication data interaction condition between the Bluetooth module and the Bluetooth peripheral to judge whether the data interaction works normally or not;
s2212: checking the ping packet instruction to judge whether the ping packet responds normally or not;
the ping packet instruction is a group of commands which are defined by the Bluetooth Vendor Specific instruction specification and are used for detecting whether the Bluetooth module is abnormal or not, and the commands are used for judging whether the data is abnormal or not;
s2213: carrying out local loop detection on a link between a host and a Bluetooth Controller, and judging whether the local loop works normally or not;
s222: the WIFI module of the intelligent television box is set to be in a remote loop test mode, and the connection of the WIFI module and the BT module of the Bluetooth module is set to be in remote loop detection for detecting whether the BT module of the Bluetooth module receives and transmits data normally or not;
the process for detecting whether the data transmitted and received by the BF module is normal is as follows:
the WIFI module of the intelligent television box receives the RF data packet transmitted by the BT module of the Bluetooth module and returns the RF data packet as is;
the BT module of the Bluetooth module receives the RF data packet returned by the WIFI module of the intelligent television box, performs data comparison with the originally transmitted RF data packet, and synchronously detects the signal quality of the Bluetooth module to judge whether the BT module of the Bluetooth module is abnormal.
By gradually detecting the communication data interaction condition, the ping packet instruction response condition, the local loop detection and the remote loop detection, whether the Bluetooth module has abnormal conditions or not is rapidly and effectively judged; and through carrying out the long-range loop detection, in order to distinguish the two connection condition, and detect bluetooth module's signal quality.
Further, in the step S3, based on the abnormal condition of the bluetooth module, an abnormal event is determined, and the process of performing self-repairing of the bluetooth module specifically includes the following steps:
s31: when the abnormal event is judged to be that the Bluetooth module enters an engineering mode, the Bluetooth Controller is controlled to be switched into a normal working mode through an HCI instruction;
s32: when the abnormal event is judged to be abnormal, controlling the Bluetooth Controller to reset software, so that the register is restored to normal configuration;
s33: when the abnormal event is judged to be HCI check error, switching a check mode or closing check;
s34: when the abnormal event is judged to be the baud rate abnormality, switching different baud rates;
s35: when the abnormal event is judged to be abnormal in flow control, switching the flow control mode or closing the flow control;
s36: and when the abnormal event is judged to be damage to the Bluetooth pairing information, error correction recovery is carried out or the backup information is covered.
The abnormal event type is judged through the abnormal condition of the Bluetooth module, and the self-repairing of the corresponding modules of the Bluetooth module is respectively carried out, so that the quick recovery of the functions of the modules can be realized, and the time and the cost can be saved.
Further, in the step S4, the method for determining the self-repairing condition of the bluetooth module includes:
detecting the module where the abnormal event is located again after the Bluetooth module is repaired automatically according to the abnormal event, and judging whether the abnormal event repaired automatically by the Bluetooth module still exists or not;
if the abnormal event still exists, the Bluetooth module is considered to fail to repair by itself;
if the abnormal event does not exist, the Bluetooth module is considered to be successfully repaired by itself.
Through detecting again to its place module after abnormal event restores by oneself, whether it is successful to judge by oneself, avoided needing to detect again and traversing all detection flow, can reduce time cost to in time obtain bluetooth module self-repairing result, in order to carry out next step operation.
Further, in S4, the process of restarting the bluetooth module process when the self-repairing condition of the bluetooth module is obtained and the preset condition is satisfied is as follows: when the Bluetooth module fails to repair by itself, the Bluetooth Android protocol stack is restarted and returned to the Host HCI Driver and the Bluetooth Controller, and the Bluetooth module is automatically restarted.
When the preset condition is met, namely the Bluetooth module fails to repair automatically or the abnormal event is an interrupt abnormality, the Bluetooth module is automatically reclosed to judge whether the abnormal condition of the Bluetooth module can be solved by restarting.
Further, after automatically restarting the bluetooth module process, the method further includes:
judging whether the process of the Bluetooth module after automatic restarting is abnormal or not;
when the restarted Bluetooth process is abnormal, a new Bluetooth module abnormal condition is obtained, the Bluetooth module abnormal condition is updated, and when the Bluetooth module abnormal event is returned to be executed and meets the preset condition, the Bluetooth module process is restarted again automatically until the automatic restarting times are greater than the preset times, the Bluetooth module process is closed, and a user is prompted to restart the intelligent television box manually or restore factory setting for re-detection; if the abnormal condition of the Bluetooth module can not be repaired, outputting a Bluetooth module fault prompt.
When the abnormal condition of the Bluetooth module cannot be solved by automatic restarting, the abnormal condition is recorded, when the automatic restarting times are larger than the preset conditions, manual restarting is carried out, or factory setting is restored, and the automatic restarting is carried out after operation, and fault prompt is output again under the condition that the automatic restarting cannot be restored, so that the operation of a terminal user can be reduced, and the user experience is convenient to improve.
A recovery device for abnormal work of a Bluetooth module comprises:
the starting module is used for receiving a Bluetooth module starting signal, starting a Bluetooth module process and initializing the Bluetooth module;
the detection and repair module is used for capturing and acquiring abnormal conditions of the Bluetooth module by utilizing the Bluetooth Controller or actively detecting abnormal conditions of the Bluetooth module at regular time by the intelligent television box and repairing abnormal events of the Bluetooth module by self;
and the restarting module is used for restarting the Bluetooth module process when the self-repairing Bluetooth module abnormal event fails and the BT module of the Bluetooth module receives and transmits data to detect abnormality.
The Bluetooth module is started through the starting module, the abnormal condition is detected through the detection and repair module, the abnormal condition is repaired by the detection and repair module, and when the abnormal condition cannot be repaired, the Bluetooth module process is restarted by the restarting module, so that the Bluetooth module process is recovered, and the user experience is improved.
A computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the method as described above.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs a method as described above.
The beneficial effects of the application are as follows:
according to the application, the abnormal condition of the Bluetooth module is acquired through polling capture, the corresponding abnormal event is judged, the self-repairing of the Bluetooth module is tried, and the Bluetooth module process is restarted in sequence, so that the normal work of the Bluetooth module is recovered, and the automatic reconnection of the Bluetooth module and the recovery of the Bluetooth module process are realized; meanwhile, the preset conditions are met aiming at the process restarting requirement of the Bluetooth module, so that the restarting times of the Bluetooth module are reduced, the energy sources can be saved, the equipment stability is improved, and the use experience of a terminal user is improved; through utilizing bluetooth Controller passive capture and utilizing the unusual condition of intelligent TV box initiative detection bluetooth module, can be comprehensive, timely, effectual discovery bluetooth module unusual problem to can improve equipment stability and reliability, in order to improve end user's use experience, be convenient for better management and maintenance bluetooth module simultaneously and intelligent TV box, through the unusual condition of bluetooth module, judge abnormal event type, and carry out the self-repairing of bluetooth module corresponding module respectively, or automatic restart, or manual restart, or output trouble suggestion, can save time and cost.
Drawings
FIG. 1 is a flow chart of example 1 of the present application;
FIG. 2 is a schematic diagram of a terminal device in a hardware operating environment according to an embodiment of the present application;
fig. 3 is a flowchart of a method for recovering abnormal operation of the bluetooth module in embodiment 2;
FIG. 4 is a schematic diagram of the system of the present application;
fig. 5 is a schematic structural diagram of a computer device according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. 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.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
Furthermore, in the following description, specific details are provided for the purpose of providing a thorough understanding of the examples, and it will be apparent to one skilled in the art that the specific meaning of the terms described above in the present application will be practiced with specificity.
Example 1
FIG. 1 shows a method for recovering abnormal operation of a Bluetooth module, which comprises the steps of acquiring abnormal conditions of the Bluetooth module by polling and capturing, judging corresponding abnormal events, sequentially trying to self-repair the Bluetooth module and restarting the Bluetooth module process so as to recover the normal operation of the Bluetooth module, thereby realizing automatic reconnection of the Bluetooth module and recovery of the Bluetooth module process; meanwhile, the process restarting requirement of the Bluetooth module meets the preset condition, so that the restarting times of the Bluetooth module are reduced, the energy sources can be saved, the equipment stability is improved, and the use experience of a terminal user is improved. The method specifically comprises the following steps:
s1: receiving a Bluetooth module starting signal, starting a Bluetooth module process, and initializing the Bluetooth module;
s2: polling, capturing and acquiring abnormal conditions of the Bluetooth module, and prompting abnormal connection of the Bluetooth module;
the process of acquiring abnormal conditions of the Bluetooth module by polling and capturing specifically comprises the following steps:
s21: capturing and acquiring abnormal conditions of the Bluetooth module by utilizing a Bluetooth Controller, and uploading the captured abnormal events to a Host HCI Driver;
s22: the abnormal condition of the Bluetooth module is actively detected at regular time by utilizing the intelligent television box.
The process for actively detecting abnormal conditions of the Bluetooth module at regular time by using the intelligent television box specifically comprises the following steps:
s221: the intelligent television box actively detects whether the Bluetooth module works normally every 10 seconds;
s2211: detecting the communication data interaction condition between the Bluetooth module and the Bluetooth peripheral to judge whether the data interaction works normally or not;
s2212: checking the ping packet instruction to judge whether the ping packet responds normally or not;
the ping packet instruction is a group of commands which are customized under the Bluetooth Vendor Specific instruction specification and are used for detecting whether the Bluetooth module is abnormal or not, and the commands are used for judging whether the data is abnormal or not.
In this embodiment, the ping packet instruction requests the bluetooth Controller to perform AES encryption processing on the data in the instruction, receives the encrypted data returned by the bluetooth Controller, compares the encrypted data with the expected data, or considers that the bluetooth Controller encryption module works abnormally without receiving the returned data, returns an abnormal code, and determines an abnormal event.
S2213: carrying out local loop detection on a link between a host and a Bluetooth Controller, and judging whether the local loop works normally or not;
the local loop detection uses local lookback made in the bluetooth standard protocol to detect whether the link between host and bluetooth Controller is abnormal.
In this embodiment, the Android system is utilized to transmit data to the bluetooth Controller, receive the data returned by the bluetooth Controller, and when the data is not equal to the transmitted data and is matched with the transmitted data, the communication link between the bluetooth module and the Android system is considered to be abnormal, an abnormal code is returned, and an abnormal event is determined.
S222: the WIFI module of the intelligent television box is set to be in a remote loop test mode, and the connection of the WIFI module and the BT module of the Bluetooth module is set to be in remote loop detection for detecting whether the BT module of the Bluetooth module receives and transmits data normally or not;
the process for detecting whether the data transmitted and received by the BF module is normal is as follows:
the WIFI module of the intelligent television box receives the RF data packet transmitted by the BT module of the Bluetooth module and returns the RF data packet as is;
the BT module of the Bluetooth module receives the RF data packet returned by the WIFI module of the intelligent television box, performs data comparison with the originally transmitted RF data packet, and synchronously detects the signal quality of the Bluetooth module to judge whether the BT module of the Bluetooth module is abnormal.
The remote loop detection uses remote lookback made in the Bluetooth standard protocol to detect whether the link between the WIFI module of the smart television box and the BT module of the Bluetooth module is abnormal.
It should be noted that, when the abnormal result of the remote loop detection is that the terminal is abnormal, the bluetooth module is not required to be repaired by itself, and the bluetooth module process is restarted directly; the terminal abnormality comprises abnormal data receiving and transmitting and larger signal quality deviation;
when the abnormal result of the remote loop detection is not abnormal at the terminal, the Bluetooth module is automatically repaired; the non-terminal abnormality includes low data receiving and transmitting efficiency and no packet loss.
The Bluetooth module abnormal condition can be comprehensively, timely and effectively found by utilizing the Bluetooth Controller to passively capture and utilizing the intelligent television box to actively detect the Bluetooth module abnormal condition, and the stability and the reliability of equipment can be improved, so that the use experience of a terminal user is improved, and meanwhile, the Bluetooth module and the intelligent television box are convenient to manage and maintain better; the communication data interaction condition, the ping packet instruction response condition, the local loop detection and the remote loop detection are detected step by step, so that whether the Bluetooth module has abnormal conditions or not can be rapidly and effectively judged; and through carrying out the long-range loop detection, in order to distinguish the two connection condition, and detect bluetooth module's signal quality.
Fig. 2 is a schematic diagram of a terminal device structure of a hardware operating environment where the local loop detection and the remote loop detection are located.
S3: judging an abnormal event based on the abnormal condition of the Bluetooth module, and performing self-repairing of the Bluetooth module;
the process for judging the abnormal event and carrying out self-repairing of the Bluetooth module based on the abnormal condition of the Bluetooth module specifically comprises the following steps:
s31: when the abnormal event is judged to be that the Bluetooth module enters an engineering mode, the Bluetooth Controller is controlled to be switched into a normal working mode through an HCI instruction;
s32: when the abnormal event is judged to be abnormal, controlling the Bluetooth Controller to reset software, so that the register is restored to normal configuration;
s33: when the abnormal event is judged to be HCI check error, switching a check mode or closing check;
s34: when the abnormal event is judged to be the baud rate abnormality, switching different baud rates;
s35: when the abnormal event is judged to be abnormal in flow control, switching the flow control mode or closing the flow control;
s36: and when the abnormal event is judged to be damage to the Bluetooth pairing information, error correction recovery is carried out or the backup information is covered.
The abnormal event type is judged through the abnormal condition of the Bluetooth module, and the self-repairing of the corresponding modules of the Bluetooth module is respectively carried out, so that the quick recovery of the functions of the modules can be realized, and the time and the cost can be saved.
S4: and acquiring the self-repairing condition of the Bluetooth module, and restarting the Bluetooth module process when the preset condition is met.
The method for judging the self-repairing condition of the Bluetooth module comprises the following steps:
detecting the module where the abnormal event is located again after the Bluetooth module is repaired automatically according to the abnormal event, and judging whether the abnormal event repaired automatically by the Bluetooth module still exists or not;
if the abnormal event still exists, the Bluetooth module is considered to fail to repair by itself;
if the abnormal event does not exist, the Bluetooth module is considered to be successfully repaired by itself.
Through detecting again to its place module after abnormal event restores by oneself, whether it is successful to judge by oneself, avoided needing to detect again and traversing all detection flow, can reduce time cost to in time obtain bluetooth module self-repairing result, in order to carry out next step operation.
Wherein, obtain bluetooth module self-repairing condition, when satisfying the condition of predetermineeing, restart bluetooth module process's process is: when the Bluetooth module fails to repair by itself, the Bluetooth Android protocol stack is restarted and returned to the Host HCI Driver and the Bluetooth Controller, and the Bluetooth module is automatically restarted.
When the preset condition is met, namely the Bluetooth module fails to repair automatically or the abnormal event is an interrupt abnormality, the Bluetooth module is automatically reclosed to judge whether the abnormal condition of the Bluetooth module can be solved by restarting.
After the bluetooth module process is restarted automatically, the method further comprises the following steps:
judging whether the process of the Bluetooth module after automatic restarting is abnormal or not;
when the restarted Bluetooth process is abnormal, a new Bluetooth module abnormal condition is obtained, the Bluetooth module abnormal condition is updated, and when the Bluetooth module abnormal event is returned to be executed and meets the preset condition, the Bluetooth module process is restarted again automatically until the automatic restarting times are greater than the preset times, the Bluetooth module process is closed, and a user is prompted to restart the intelligent television box manually or restore factory setting for re-detection; if the abnormal condition of the Bluetooth module can not be repaired, outputting a Bluetooth module fault prompt.
When the abnormal condition of the Bluetooth module cannot be solved by automatic restarting, the abnormal condition is recorded, when the automatic restarting times are larger than the preset conditions, manual restarting is carried out, or factory setting is restored, and the automatic restarting is carried out after operation, and fault prompt is output again under the condition that the automatic restarting cannot be restored, so that the operation of a terminal user can be reduced, and the user experience is convenient to improve.
Example 2
As shown in fig. 3, another method for recovering abnormal operation of a bluetooth module according to an embodiment of the present application includes:
t1: receiving a Bluetooth module starting signal, starting a Bluetooth module process, and initializing the Bluetooth module;
t2: polling, capturing and acquiring abnormal conditions of the Bluetooth module, and prompting abnormal connection of the Bluetooth module;
t21: capturing and acquiring abnormal conditions of the Bluetooth module by utilizing a Bluetooth Controller;
t211: when the Bluetooth Controller captures and acquires the abnormal condition of the Bluetooth module, the captured abnormal event is thrown to a Host HCI Driver, and the process is switched to T3;
t212: when the Bluetooth Controller does not capture and acquire abnormal conditions of the Bluetooth module, the process goes to T22;
t22: actively detecting abnormal conditions of the Bluetooth module at regular time by using the intelligent television box;
t221: the intelligent television box actively detects whether the Bluetooth module works normally every 10 seconds;
t2211: when judging that the Bluetooth module is in normal operation, turning to T222;
t2212: when judging that the Bluetooth module is not in normal operation, turning to T3;
t222: the WIFI module of the intelligent television box is set to be in a remote loop test mode, and the connection of the WIFI module and the BT module of the Bluetooth module is set to be in remote loop detection for detecting whether the BT module of the Bluetooth module receives and transmits data normally or not;
t2221: when the BT module of the Bluetooth module is judged to be in normal operation, the process is switched to T2;
t2222: when the BT module of the Bluetooth module is judged not to be in normal operation;
t22221: when judging that the abnormal condition of the BT module of the Bluetooth module for receiving and transmitting data is abnormal, switching to T42;
t22222: when judging that the abnormal condition of the BT module of the Bluetooth module for receiving and transmitting data is not abnormal, switching to T3;
t3: judging an abnormal event based on the abnormal condition of the Bluetooth module, and performing self-repairing of the Bluetooth module;
t4: and acquiring the self-repairing condition of the Bluetooth module, and automatically restarting the Bluetooth module process when the preset condition is met.
T41: when the Bluetooth module is successfully repaired by itself, the process is switched to T2;
t42: when the Bluetooth module fails to repair by itself, the Bluetooth Android protocol stack is restarted and returned to the Host HCI Driver and the Bluetooth Controller, the Bluetooth module is automatically restarted, and the Bluetooth module is automatically restarted and then is returned to T2;
t5: when the Bluetooth module is restarted automatically, acquiring a new abnormal condition of the Bluetooth module;
t51: when the Bluetooth module is restarted automatically, the Bluetooth module is free from abnormal conditions and is switched to T2;
t52: when the Bluetooth module is restarted automatically, the Bluetooth module still has abnormal conditions, and T2-T5 is repeated until the automatic restarting times of the Bluetooth module are greater than the preset times, the Bluetooth process is closed, and a user is prompted to perform manual operation on the intelligent television box;
t521: when the Bluetooth module can be restored to normal work by manual operation, the process is switched to T2;
t522: when the manual operation can not enable the Bluetooth module to resume normal operation, outputting a Bluetooth module fault prompt.
Example 3
As shown in fig. 4, this embodiment provides a recovery device for bluetooth module work abnormality, including starting module, detection repair module and restarting module, start bluetooth module through starting module, detect it through detection repair module to the abnormal conditions and repair by oneself to the abnormal conditions, when unable restoration, restart the module to bluetooth module process to resume bluetooth module process, in order to improve user experience sense.
The starting module is used for receiving a Bluetooth module starting signal, starting a Bluetooth module process and initializing the Bluetooth module;
the detection and repair module is used for capturing and acquiring abnormal conditions of the Bluetooth module by utilizing the Bluetooth Controller or actively detecting abnormal conditions of the Bluetooth module at regular time by the intelligent television box and repairing abnormal events of the Bluetooth module by self;
and the restarting module is used for restarting the Bluetooth module process when the self-repairing Bluetooth module abnormal event fails and the BT module of the Bluetooth module receives and transmits data to detect abnormality.
Example 4
Based on the same technical concept, as shown in fig. 5, the present embodiment further provides a computer device corresponding to the method provided in the foregoing embodiment, including a processor 2, a memory 1, and a bus, where the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to perform any one of the methods described above.
The memory 1 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc.
The memory 1 may in some embodiments be an internal storage unit of the bluetooth control device, such as a hard disk. The memory 1 may in other embodiments also be an external memory device of a bluetooth control apparatus, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like. Further, the memory 1 may also include both an internal memory unit and an external memory device of the bluetooth control apparatus. The memory 1 may be used not only for storing application software installed in the bluetooth control device and various kinds of data, such as codes of a program of the bluetooth control device, but also for temporarily storing data that has been output or is to be output.
The processor 2 may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for running program code or processing data stored in the memory 1, e.g. executing bluetooth control programs or the like.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method described in the method embodiments above. Wherein the storage medium may be a volatile or nonvolatile computer readable storage medium.
The computer program product for applying the page content refreshing method provided by the embodiment of the present application includes a computer readable storage medium storing program codes, and the instructions included in the program codes may be used to execute the steps of the method described in the method embodiment, specifically, refer to the method embodiment and are not repeated herein.
The disclosed embodiments also provide a computer program which, when executed by a processor, implements any of the methods of the previous embodiments. The computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It is to be understood that the same or similar parts in the above embodiments may be referred to each other, and that in some embodiments, the same or similar parts in other embodiments may be referred to.
It should be noted that in the description of the present application, the terms first, second, and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present application, unless otherwise indicated, a plurality of meanings means at least two.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (10)

1. The method for recovering the abnormal work of the Bluetooth module is characterized by comprising the following steps:
s1: receiving a Bluetooth module starting signal, starting a Bluetooth module process, and initializing the Bluetooth module;
s2: polling, capturing and acquiring abnormal conditions of the Bluetooth module, and prompting abnormal connection of the Bluetooth module;
s3: judging an abnormal event based on the abnormal condition of the Bluetooth module, and performing self-repairing of the Bluetooth module;
s4: and acquiring the self-repairing condition of the Bluetooth module, and restarting the Bluetooth module process when the preset condition is met.
2. The method for recovering abnormal operation of a bluetooth module according to claim 1, wherein in S2, the process of polling to capture abnormal conditions of the bluetooth module comprises the following steps:
s21: capturing and acquiring abnormal conditions of the Bluetooth module by utilizing a Bluetooth Controller, and uploading the captured abnormal events to a Host HCI Driver;
s22: the abnormal condition of the Bluetooth module is actively detected at regular time by utilizing the intelligent television box.
3. The method for recovering abnormal operation of bluetooth module according to claim 2, wherein in S22, the process of actively detecting abnormal conditions of bluetooth module by using smart tv box at regular time specifically comprises the following steps:
s221: the intelligent television box actively detects whether the Bluetooth module works normally every 10 seconds;
s2211: detecting the communication data interaction condition between the Bluetooth module and the Bluetooth peripheral to judge whether the data interaction works normally or not;
s2212: checking the ping packet instruction to judge whether the ping packet responds normally or not;
the ping packet instruction is a group of commands which are defined by the Bluetooth Vendor Specific instruction specification and are used for detecting whether the Bluetooth module is abnormal or not, and the commands are used for judging whether the data is abnormal or not;
s2213: carrying out local loop detection on a link between a host and a Bluetooth Controller, and judging whether the local loop works normally or not;
s222: the WIFI module of the intelligent television box is set to be in a remote loop test mode, and the connection of the WIFI module and the BT module of the Bluetooth module is set to be in remote loop detection for detecting whether the BT module of the Bluetooth module receives and transmits data normally or not;
the process for detecting whether the data transmitted and received by the BF module is normal is as follows:
the WIFI module of the intelligent television box receives the RF data packet transmitted by the BT module of the Bluetooth module and returns the RF data packet as is;
the BT module of the Bluetooth module receives the RF data packet returned by the WIFI module of the intelligent television box, performs data comparison with the originally transmitted RF data packet, and synchronously detects the signal quality of the Bluetooth module to judge whether the BT module of the Bluetooth module is abnormal.
4. The method for recovering abnormal operation of bluetooth module according to claim 3, wherein in S3, based on abnormal condition of bluetooth module, the process of distinguishing abnormal event and performing self-repairing of bluetooth module specifically comprises the following steps:
s31: when the abnormal event is judged to be that the Bluetooth module enters an engineering mode, the Bluetooth Controller is controlled to be switched into a normal working mode through an HCI instruction;
s32: when the abnormal event is judged to be abnormal, controlling the Bluetooth Controller to reset software, so that the register is restored to normal configuration;
s33: when the abnormal event is judged to be HCI check error, switching a check mode or closing check;
s34: when the abnormal event is judged to be the baud rate abnormality, switching different baud rates;
s35: when the abnormal event is judged to be abnormal in flow control, switching the flow control mode or closing the flow control;
s36: and when the abnormal event is judged to be damage to the Bluetooth pairing information, error correction recovery is carried out or the backup information is covered.
5. The method for recovering abnormal operation of a bluetooth module according to claim 4, wherein in S4, the method for determining the self-repairing condition of the bluetooth module is as follows:
detecting the module where the abnormal event is located again after the Bluetooth module is repaired automatically according to the abnormal event, and judging whether the abnormal event repaired automatically by the Bluetooth module still exists or not;
if the abnormal event still exists, the Bluetooth module is considered to fail to repair by itself;
if the abnormal event does not exist, the Bluetooth module is considered to be successfully repaired by itself.
6. The method for recovering abnormal operation of a bluetooth module according to claim 5, wherein in S4, the process of restarting the bluetooth module process when the self-repairing condition of the bluetooth module is obtained and the preset condition is satisfied is as follows: when the Bluetooth module fails to repair by itself, the Bluetooth Android protocol stack is restarted and returned to the Host HCI Driver and the Bluetooth Controller, and the Bluetooth module is automatically restarted.
7. The method for recovering from abnormal operation of a bluetooth module according to claim 6, wherein after automatically restarting the bluetooth module process, the method further comprises:
judging whether the process of the Bluetooth module after automatic restarting is abnormal or not;
when the restarted Bluetooth process is abnormal, a new Bluetooth module abnormal condition is obtained, the Bluetooth module abnormal condition is updated, and when the Bluetooth module abnormal event is returned to be executed and meets the preset condition, the Bluetooth module process is restarted again automatically until the automatic restarting times are greater than the preset times, the Bluetooth module process is closed, and a user is prompted to restart the intelligent television box manually or restore factory setting for re-detection; if the abnormal condition of the Bluetooth module can not be repaired, outputting a Bluetooth module fault prompt.
8. The apparatus for recovering from abnormal operation of a bluetooth module according to claim 1, comprising:
the starting module is used for receiving a Bluetooth module starting signal, starting a Bluetooth module process and initializing the Bluetooth module;
the detection and repair module is used for capturing and acquiring abnormal conditions of the Bluetooth module by utilizing the Bluetooth Controller or actively detecting abnormal conditions of the Bluetooth module at regular time by the intelligent television box and repairing abnormal events of the Bluetooth module by self;
and the restarting module is used for restarting the Bluetooth module process when the self-repairing Bluetooth module abnormal event fails and the BT module of the Bluetooth module receives and transmits data to detect abnormality.
9. A computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication over the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the method according to any of claims 1 to 7.
CN202311048228.3A 2023-08-21 2023-08-21 Recovery method and device for abnormal work of Bluetooth module Active CN116761196B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311048228.3A CN116761196B (en) 2023-08-21 2023-08-21 Recovery method and device for abnormal work of Bluetooth module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311048228.3A CN116761196B (en) 2023-08-21 2023-08-21 Recovery method and device for abnormal work of Bluetooth module

Publications (2)

Publication Number Publication Date
CN116761196A true CN116761196A (en) 2023-09-15
CN116761196B CN116761196B (en) 2023-12-22

Family

ID=87957627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311048228.3A Active CN116761196B (en) 2023-08-21 2023-08-21 Recovery method and device for abnormal work of Bluetooth module

Country Status (1)

Country Link
CN (1) CN116761196B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030137414A1 (en) * 2002-01-18 2003-07-24 Gvc Corporation Method for warning abnormal connection between two bluetooth devices
US20100144271A1 (en) * 2008-12-04 2010-06-10 Victor Zhodzishsky Method and system for a reduced usb polling rate to save power on a bluetooth host
CN105392115A (en) * 2015-12-03 2016-03-09 上海卓易科技股份有限公司 Automatic Bluetooth reconnection method
CN109245832A (en) * 2018-09-29 2019-01-18 上海与德科技有限公司 Test method, system and the test equipment of bluetooth mould group
CN112612593A (en) * 2020-12-28 2021-04-06 深圳Tcl新技术有限公司 Bluetooth control method, device, terminal equipment and computer readable storage medium
WO2022056081A1 (en) * 2020-09-10 2022-03-17 Arris Enterprises Llc A wireless device and a method for automatic recovery from failures
CN115190648A (en) * 2022-06-07 2022-10-14 海信视像科技股份有限公司 Bluetooth module, display device and Bluetooth abnormity recovery method
CN115328743A (en) * 2022-10-13 2022-11-11 深圳市华曦达科技股份有限公司 Android device abnormity early warning processing method and system and readable storage medium
CN115623464A (en) * 2022-11-22 2023-01-17 石家庄科林电气股份有限公司 Fault processing method and device for Bluetooth module of electric energy meter and electric energy meter

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030137414A1 (en) * 2002-01-18 2003-07-24 Gvc Corporation Method for warning abnormal connection between two bluetooth devices
US20100144271A1 (en) * 2008-12-04 2010-06-10 Victor Zhodzishsky Method and system for a reduced usb polling rate to save power on a bluetooth host
CN105392115A (en) * 2015-12-03 2016-03-09 上海卓易科技股份有限公司 Automatic Bluetooth reconnection method
CN109245832A (en) * 2018-09-29 2019-01-18 上海与德科技有限公司 Test method, system and the test equipment of bluetooth mould group
WO2022056081A1 (en) * 2020-09-10 2022-03-17 Arris Enterprises Llc A wireless device and a method for automatic recovery from failures
CN112612593A (en) * 2020-12-28 2021-04-06 深圳Tcl新技术有限公司 Bluetooth control method, device, terminal equipment and computer readable storage medium
CN115190648A (en) * 2022-06-07 2022-10-14 海信视像科技股份有限公司 Bluetooth module, display device and Bluetooth abnormity recovery method
CN115328743A (en) * 2022-10-13 2022-11-11 深圳市华曦达科技股份有限公司 Android device abnormity early warning processing method and system and readable storage medium
CN115623464A (en) * 2022-11-22 2023-01-17 石家庄科林电气股份有限公司 Fault processing method and device for Bluetooth module of electric energy meter and electric energy meter

Also Published As

Publication number Publication date
CN116761196B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
US5901320A (en) Communication system configured to enhance system reliability using special program version management
JP6958308B2 (en) In-vehicle update device, program, and how to update the program or data
CN104899065A (en) Method and system for batch online recovery and software online upgrading
CN110116408B (en) Robot safety control method, robot and computer readable storage medium
CN106886438A (en) System remote update method based on FPGA
CN101426077A (en) Method for on-line updating television set software through Internet
CN104090796A (en) Embedded device program updating method and system
CN101951391A (en) Method, device and system for remotely upgrading monitoring equipment
CN113064757B (en) Server firmware self-recovery system and server
CN102945177A (en) Programmable logic controller (PLC) firmware upgrading system and method
WO2016048845A1 (en) Over-the-air updates for ble devices
CN112291621A (en) System upgrading automation test method, device and test equipment
CN101883254A (en) IP unicast loading upgrading device and method for interactive television set top box
CN103428333A (en) Mobile terminal, server and error restoration method
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
JP3626741B2 (en) Data transfer system
CN116761196B (en) Recovery method and device for abnormal work of Bluetooth module
TWI548253B (en) System and method for correcting at commands in a mobile phone with double cards
CN113362584B (en) Communication method and device and unmanned aerial vehicle
CN111522571B (en) Equipment upgrading method and device, terminal equipment and storage medium
CN114826981B (en) System and method for realizing application resident in cloud mobile phone
CN112181461B (en) Upgrading method, network module, equipment, server and upgrading system
CN112181454B (en) Remote upgrading system and method for unattended equipment
US9058264B2 (en) Method for repairing communication abnormality between data card and host and data card
CN115733729A (en) Communication fault processing method, system and equipment

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