CN109542477B - Upgrading method and device applied to earphone, electronic equipment and storage medium - Google Patents

Upgrading method and device applied to earphone, electronic equipment and storage medium Download PDF

Info

Publication number
CN109542477B
CN109542477B CN201811324610.1A CN201811324610A CN109542477B CN 109542477 B CN109542477 B CN 109542477B CN 201811324610 A CN201811324610 A CN 201811324610A CN 109542477 B CN109542477 B CN 109542477B
Authority
CN
China
Prior art keywords
upgrade
earphone
timer
upgrading
time
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
Application number
CN201811324610.1A
Other languages
Chinese (zh)
Other versions
CN109542477A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811324610.1A priority Critical patent/CN109542477B/en
Publication of CN109542477A publication Critical patent/CN109542477A/en
Application granted granted Critical
Publication of CN109542477B publication Critical patent/CN109542477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Abstract

The present application relates to the field of listening devices. The application provides an upgrading method and device applied to earphones, electronic equipment and a storage medium, wherein the upgrading method applied to the earphones comprises the following steps: when the upgrade starts, starting a preset first timer, wherein the timing time of the first timer is more than or equal to the time required by the upgrade of the earphone; judging whether the upgrading is finished or not after the time of the first timer is up; if the upgrade is not completed, the earphone is restarted; the earphone initiates connection with a terminal; and restarting upgrading and starting the first timer. The method and the device avoid the situation that the Bluetooth headset cannot be continuously upgraded and cannot be recovered to be used after the Bluetooth headset is abnormal in the software upgrading process.

Description

Upgrading method and device applied to earphone, electronic equipment and storage medium
Technical Field
The present application relates to the field of listening devices, and in particular, to an upgrade method and apparatus applied to a headset, an electronic device, and a storage medium.
Background
Bluetooth (Bluetooth) earphones enable users to get rid of the constraint of connecting wires, are convenient to use, and are more and more popular in application. The bluetooth headset software may need to be upgraded, but in the upgrading process, an exception may occur, and the headset enters an error state, so that the upgrading cannot be continued and the headset cannot be used.
Disclosure of Invention
The application provides an upgrading method and device applied to an earphone, electronic equipment and a storage medium, and avoids the situation that the Bluetooth earphone cannot be continuously upgraded and cannot be recovered to be used after the Bluetooth earphone is abnormal in the software upgrading process.
In a first aspect, the present application provides an upgrade method applied to a headset, including:
when the upgrade starts, starting a preset first timer, wherein the timing time of the first timer is more than or equal to the time required by the upgrade of the earphone;
judging whether the upgrading is finished or not after the time of the first timer is up;
if the upgrade is not completed, the earphone is restarted;
the earphone initiates connection with a terminal;
and restarting upgrading and starting the first timer.
Wherein, if the upgrade is not completed, restarting the headset further comprises:
and if the upgrade is not completed, starting a preset second timer, judging whether the upgrade is completed or not after the time of the second timer is up, and if the upgrade is not completed, restarting the earphone.
Wherein the timing time of the second timer is less than the timing time of the first timer.
Wherein, after the time of the first timer is up, judging whether the upgrade is completed comprises: and judging whether the upgrade is finished or not by detecting the software version of the earphone.
Wherein, after the time of the first timer is up, judging whether the upgrade is completed comprises: and judging whether the upgrade is finished or not by detecting whether the upgrade program is finished or not.
Wherein the initiating of the connection with the terminal by the headset comprises:
the earphone is connected with the terminal;
and the earphone receives an upgrading request sent by the terminal.
Wherein, after the earphone is connected with the terminal, the earphone comprises:
and the earphone sends the information of failed upgrade and/or the software version information of the earphone to the terminal.
In a second aspect, the present application provides an upgrade apparatus applied to a headset, including:
the starting unit is used for starting a preset first timer when the upgrade starts, and the timing time of the first timer is more than or equal to the time required by the upgrade of the earphone;
the judging unit is used for judging whether the upgrading is finished or not after the time of the first timer is up;
the restarting unit is used for restarting the earphone if the upgrading is not completed;
the initiating unit is used for initiating the connection between the earphone and the terminal;
and the restarting unit is used for restarting upgrading and starting the first timer.
Wherein the restart unit is further configured to:
and if the upgrade is not completed, starting a preset second timer, judging whether the upgrade is completed or not after the time of the second timer is up, and if the upgrade is not completed, restarting the earphone.
In a third aspect, the present application provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the methods described above.
The upgrading method applied to the earphone has the following beneficial effects:
in the upgrading method, when upgrading is started, a preset first timer is started, wherein the timing time of the first timer is longer than or equal to the time required by upgrading of the earphone, and after the time of the first timer is reached, whether upgrading is finished is detected. If the upgrade is not completed, it is indicated that the upgrade process is likely to be abnormal, the earphone enters an error state, the upgrade of the earphone is blocked, and the earphone cannot be recovered by the earphone. After the earphone is restarted, connection with the terminal is initiated, and after the connection with the terminal is established, upgrading is continued. In this application, if the earphone upgrading in-process appears unusually, can restart the earphone after first timer time reaches to avoided bluetooth headset to appear unusually back in the software upgrading in-process, bluetooth headset can not continue upgrading and can not resume the condition of using.
Drawings
FIG. 1 is a schematic diagram of an exemplary application scenario of the upgrade method of the present application;
FIG. 2 is a first flowchart illustrating an upgrading method according to the present application;
FIG. 3 is a second flowchart illustrating an upgrade method according to the present application;
fig. 4 is a schematic structural diagram of the upgrading apparatus of the present application.
Detailed Description
The present application is further described with reference to the following figures and examples.
In the following description, the terms "first" and "second" are used for descriptive purposes only and are not intended to indicate or imply relative importance. The following description provides embodiments of the present application, where different embodiments may be substituted or combined, and thus the present application is intended to include all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then this application should also be considered to include an embodiment that includes one or more of all other possible combinations of A, B, C, D, even though this embodiment may not be explicitly recited in text below.
In the following description, the expressions "have", "may have", "include" and "include" or "may include" and "may include" indicate the presence of corresponding features (e.g., elements such as values, functions, operations or components), but do not preclude the presence of additional features.
In the following description, when one element (e.g., a first element) is referred to as being "operatively or communicatively coupled" or "connected" to another element (e.g., a second element), it may be directly coupled or connected to the other element or intervening elements (e.g., third elements) may be present. On the other hand, when one element (e.g., a first element) is referred to as being "directly coupled" or "directly connected" to another element (e.g., a second element), it is understood that there are no intervening elements (e.g., third elements).
The following description provides examples, and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the disclosure. Various examples may omit, substitute, or add various procedures or components as appropriate. For example, the described methods may be performed in an order different than the order described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
Fig. 1 is a schematic view of an exemplary application scenario of the upgrading method of the present application, as shown in fig. 1, a Bluetooth (Bluetooth) headset 20 is one of headset products that we often use, and when in use, the Bluetooth headset 20 performs Bluetooth communication with an external terminal 10 (such as a mobile phone, etc.) through a Bluetooth adapter inside the Bluetooth headset, reads audio data in the terminal 10, and performs audio output through an audio output module. The bluetooth headset 20 can realize wireless connection and is convenient to use. In the present application, the terminal 10 may be, for example, a mobile phone, a tablet computer, a Personal computer, a notebook, a desktop computer, a server, a Personal Digital Assistant (PDA), an e-book reader, a mobile medical device, a camera, a wearable device, a multimedia player, and the like, but is not limited thereto.
The bluetooth headset software may need to be upgraded, and since the bluetooth headset does not flow out of a hardware interface, such as a Universal Serial Bus (USB), the software upgrading cannot be performed in a wired manner. The bluetooth headset can be upgraded in a bluetooth mode, for example, that is, the upgrade software is downloaded to the terminal first, and then the terminal sends the upgrade software to the headset for upgrading in the bluetooth mode. However, during the upgrade process, an exception may occur, for example, an upgrade software version error, a bluetooth communication exception, or a user error operation may all cause the upgrade exception. When the upgrade is abnormal, the earphone enters an error state, so that the upgrade cannot be continued and the earphone cannot be used.
In view of the above problems, the present application provides an upgrade method applied to an earphone, where a preset first timer is started when the upgrade starts, where a timing time of the first timer is greater than or equal to a time required for upgrading the earphone, and after the time of the first timer reaches, whether the upgrade is completed is detected. If the upgrade is not completed, it is indicated that the upgrade process is likely to be abnormal, the earphone enters an error state, the upgrade of the earphone is blocked, and the earphone cannot be recovered by the earphone. After the earphone is restarted, connection with the terminal is initiated, and after the connection with the terminal is established, upgrading is continued. In this application, if the earphone upgrading in-process appears unusually, can restart the earphone after first timer time reaches to avoided bluetooth headset to appear unusually back in the software upgrading in-process, bluetooth headset can not continue upgrading and can not resume the condition of using.
In order to facilitate understanding of those skilled in the art, the present application provides a specific implementation process of the technical solution provided by the present application through the following embodiments.
Example one
Fig. 2 is a schematic flow diagram of a first upgrade method applied to an earphone according to the present application, as shown in fig. 2, the upgrade method of this embodiment includes step 101, when the upgrade starts, starting a preset first timer, where a timing time of the first timer is greater than or equal to a time required for upgrading the earphone; 103, judging whether the upgrade is finished or not after the time of the first timer is up, if the upgrade is finished, executing step 111, ending the process, and if the upgrade is not finished, executing step 105; 105, restarting the earphone; step 107, the earphone initiates connection with the terminal; and step 109, restarting upgrading and starting the first timer. Step 101-109 is described below.
Step 101, when the upgrade starts, starting a preset first timer, wherein the timing time of the first timer is longer than or equal to the time required by the upgrade of the earphone.
In some embodiments, the software upgrade for the bluetooth headset may be, for example, an Over The Air (OTA) upgrade. The upgrade process may include, for example, the terminal downloading the upgrade software to the terminal, e.g., a memory card of the terminal, via a Wireless Fidelity (Wi-Fi) network, a 3rd-Generation (3G) or a 4 th-Generation (4G) network. After downloading, the terminal sends an upgrade request to the Bluetooth headset, the Bluetooth headset agrees with the upgrade request, the terminal sends upgrade software to the headset in a Bluetooth mode, and the headset receives the upgrade software and then carries out upgrading.
In some embodiments, during upgrading, the bluetooth headset acquires the size of the upgraded software from the terminal, checks whether the storage space is enough according to the size of the upgraded software, sends information of insufficient storage space to the terminal if the storage space is not enough, and displays the information of insufficient storage space of the bluetooth headset on an interface of the terminal for prompting a user. Because the size of the upgrade software is matched with the storage space of the Bluetooth headset under normal conditions, if the size of the upgrade software is larger than the storage space of the Bluetooth headset, the version of the upgrade software downloaded by a user is possibly wrong, and the user is prompted to check the version of the upgrade software downloaded to the terminal, so that the upgrade failure caused by upgrading by using a wrong software package is avoided.
In some embodiments, the headset upgrading process further includes: the method comprises the steps of obtaining the battery power of the earphone, sending information that the battery power is low and charging is needed to a terminal when the battery power is smaller than a preset threshold value, and prompting a user to charge the Bluetooth earphone on an interface of the terminal. Because in the upgrading process, the electric quantity consumption is bigger than that in normal use, so guarantee that bluetooth headset has sufficient electric quantity, avoid upgrading the failure because of the electric quantity is not enough in the upgrading process.
In some embodiments, the bluetooth headset upgrade is started when the bluetooth headset upgrade is started, and a preset first timer is started, for example, the bluetooth headset upgrade may be started simultaneously with the start of the first timer. The first timer may be set before or during this step. The timing time of the first timer may be greater than or equal to the time required for headset upgrade. The time required by the normal upgrade of the earphone can be set according to actual measurement, for example, for a certain type of bluetooth earphone, the time required by the normal upgrade of the earphone can be measured for many times, and the time required by the normal upgrade of the earphone can be an average value of the multiple measurements or a maximum value of the multiple measurements. The timing time of the first timer may be equal to or longer than the time required for normal upgrade of the earphone, for example, 5%, 10%, 16% longer than the time required for normal upgrade of the earphone. In other embodiments, the timing time of the first timer may also be an empirical value or a time set according to actual needs.
And 103, judging whether the upgrading is finished or not after the time of the first timer is up, if so, executing step 111, ending the process, and if not, executing step 105.
In some embodiments, after the first timer has expired, the headset determines whether the upgrade is complete, for example, by detecting the software version of the headset, because the software version of the headset is still the original version if the upgrade is not complete. The earphone can also judge whether the upgrade is finished by detecting whether the upgrade program is finished, and if the upgrade program (or process) is still executed, the upgrade is not finished.
After the first timer time is reached, if the upgrade is completed, step 111 is executed, and the process ends. If the upgrade is not completed, it is likely that the upgrade process of the headset is abnormal, and the headset enters an error state, after the time of the first timer reaches, it is indicated that the upgrade of the bluetooth headset is not completed within normal time, the headset is likely to be abnormal, and the headset enters the error state, and the upgrade of the headset at this time cannot be continued, and the headset cannot be normally used, and in this case, the subsequent step 105 is executed.
Step 105, the headset is restarted.
In some embodiments, after the first timer time is reached, the headset is restarted if the upgrade has not been completed. By restarting the earphone, the current error state of the earphone can be ended, the earphone is connected with the terminal again, the upgrade is restarted, and the condition that the earphone cannot be used again after being upgraded is avoided.
Step 107, the headset initiates a connection with the terminal.
In some embodiments, this step includes establishing a connection between the headset and the terminal; and the earphone receives an upgrading request sent by the terminal.
In some embodiments, after the headset restart is completed, a connection with the terminal is initiated. For example, the terminal acquires a paired device list, and if there is no bluetooth headset to be upgraded in the device list displayed by the terminal, the terminal needs to search again. After searching the Bluetooth earphone, the terminal is matched and connected with the earphone. A process can be newly established in the terminal and used for monitoring the connection state of the earphone and the terminal, and when the connection is abnormal, the user is prompted in time, so that the fault can be conveniently positioned and processed by the user.
In some embodiments, after the headset establishes the connection with the terminal, the headset sends the information of failed upgrade and/or the software version information of the headset to the terminal. After receiving the information of the earphone upgrading failure, the terminal knows that the earphone upgrading failure occurs; after the terminal receives the software version information of the earphone, the terminal compares the software version information with the previous software version of the earphone, the terminal finds that the current software version of the earphone is the same as the previous version of the earphone, and therefore the terminal can know that the Bluetooth earphone fails to be upgraded. And after the terminal obtains the information of the upgrade failure of the earphone, sending an upgrade request to the earphone, receiving the upgrade request by the earphone, sending the upgrade software to the earphone again by the terminal in a Bluetooth mode after the earphone agrees with the upgrade request, and restarting the upgrade of the earphone. Optionally, the headset and the terminal may communicate with each other by using communication protocols such as a bluetooth Audio Distribution Profile (A2 DP), a hands-Free function (HFP), a headset function (HSP), and the like, and the headset adds information to be sent to the communication protocols.
And step 109, restarting upgrading and starting the first timer.
In some embodiments, the upgrade is restarted after the headset has established a connection with the terminal, and likewise the first timer is started, i.e. each time the upgrade is started, the first timer is started with the start of the upgrade. Through the first timer, in the upgrading process, when the earphone enters an error state abnormally, namely the time of the first timer reaches, the earphone is restarted, and after the earphone is restarted, software upgrading is restarted, so that the condition that the earphone is always in a state that upgrading cannot be continued and cannot be used normally is avoided.
In some embodiments, after the upgrade of the earphone is restarted, the terminal sends the upgrade software to the earphone again, and since the terminal sends a part of the upgrade software to the earphone, in order to reduce the upgrade time and improve the efficiency, in this application, the earphone stores the upgrade software data that has been received in the last upgrade, and in this upgrade, after the earphone obtains the attributes of the upgrade software, such as name, size, format, and the like, from the terminal, the earphone searches for whether the upgrade software is stored in the storage space of the earphone, and if so, detects whether the upgrade software is complete, and if not, for the part that has been stored in the earphone, the terminal is not required to resend again, that is, the earphone sends the required software upgrade data to the terminal. Therefore, in the embodiment, when the terminal sends the upgrade software to the earphone, only the part of the earphone which is not stored is needed to be sent, and the whole upgrade software is not needed to be sent again, so that the upgrade time is reduced, and the working efficiency is improved.
The application provides a fool-proof mechanism for Bluetooth headset software upgrading. The method is applied to the earphone upgrading method, when the upgrading is started, the preset first timer is started, wherein the timing time of the first timer is longer than or equal to the time required by the earphone upgrading, and after the time of the first timer is reached, whether the upgrading is finished is detected. If the upgrade is not completed, it is indicated that the upgrade process is likely to be abnormal, the earphone enters an error state, the upgrade of the earphone is blocked, and the earphone cannot be recovered by the earphone. After the earphone is restarted, connection with the terminal is initiated, and after the connection with the terminal is established, upgrading is continued. In this application, if the earphone upgrading in-process appears unusually, can restart the earphone after first timer time reaches to avoided bluetooth headset to appear unusually back in the software upgrading in-process, bluetooth headset can not continue upgrading and can not resume the condition of using.
Example two
Fig. 3 is a schematic flow diagram of a second upgrade method of the present application, as shown in fig. 3, the upgrade method of this embodiment includes step 201, when the upgrade starts, starting a preset first timer, where the timing time of the first timer is greater than or equal to the time required for upgrading the earphone; step 203, after the time of the first timer is up, judging whether the upgrade is completed, if the upgrade is completed, executing step 211, ending the process, and if the upgrade is not completed, executing step 204A; step 204A, starting a preset second timer; step 204B, after the time of the second timer is reached, judging whether the upgrade is completed, if the upgrade is completed, executing step 213, ending the process, and if the upgrade is not completed, executing step 205; step 205, restarting the earphone; step 207, the earphone initiates the connection with the terminal; step 209, restart the upgrade and start the first timer. Step 201 and step 209 are described below.
Step 201, when the upgrade starts, a preset first timer is started, and the timing time of the first timer is longer than or equal to the time required by the upgrade of the earphone.
This step is substantially the same as step 101, and for related points, refer to the description of step 101.
Step 203, after the time of the first timer is reached, judging whether the upgrade is completed, if the upgrade is completed, executing step 211, ending the process, and if the upgrade is not completed, executing step 204A.
In some embodiments, after the first timer has expired, the headset determines whether the upgrade is complete, for example, by detecting the software version of the headset, because the software version of the headset is still the original version if the upgrade is not complete. The earphone can also judge whether the upgrade is finished by detecting whether the upgrade program is finished, and if the upgrade program (or process) is still executed, the upgrade is not finished. If the upgrade is complete, step 111 is performed and the process ends. The difference between this step and step 103 is that if the upgrade is not completed, step 204A is executed to start a preset second timer.
In step 204A, a preset second timer is started.
In some embodiments, after the first timer has expired, a second timer is started if the bluetooth headset has not been upgraded. The second timer may be set before or during this step. The timing time of the second timer may be an empirical value or a time set according to actual needs, for example, for a certain model of bluetooth headset, the time of normal upgrade may be measured multiple times to obtain an average value of the multiple measurements, a difference between each measured value and the average value may be used as the timing time of the second timer, and a variance of the multiple measurements may also be used as the timing time of the second timer; the timing time of the second timer may also be set to 2%, 6%, 11%, etc. of the timing time of the first timer.
And step 204B, judging whether the upgrade is finished or not after the time of the second timer is reached, if the upgrade is finished, executing step 213, ending the process, and if the upgrade is not finished, executing step 205.
In some embodiments, after the second timer reaches, the headset determines whether the upgrade is completed, if the upgrade is completed, step 213 is executed, the upgrade process is ended, and if the upgrade is not completed, step 205 is executed, and the headset is restarted. In this embodiment, after the time of the first timer reaches, the earphone is not restarted immediately, but the second timer is started, and after the time of the second timer reaches, whether the earphone is upgraded is finished is determined, and if the earphone is not upgraded, the earphone is restarted. In this embodiment, the second timer has a fine-tuning function on the basis of the first timer, that is, after the time of the first timer is reached, if the upgrade is completed, the process is ended, and if the upgrade is not completed, the process is waited for a little more, and the waiting time is the timing time of the second timer. The embodiment mainly aims at the situation that the upgrading is slightly slower than the normal upgrading speed and is slightly longer, but no abnormity occurs in the upgrading process, for the situation, after the first timer is reached, the upgrading is still normally performed, only the speed is slightly slower, and if the earphone is restarted at the moment, the normally performed upgrading is stopped, so that the upgrading time is increased, and the efficiency is reduced. In the embodiment, by setting the second timer, after the time of the first timer reaches, the timing time of the second timer is waited, and if the upgrade is not completed, the earphone is restarted, so that the upgrade which is normally performed is stopped, the work efficiency of the upgrade is improved, the power consumption of the earphone is saved, and the control of the upgrade process is more flexible. In some embodiments, the timing time of the second timer is less than the timing time of the first timer.
In some embodiments, the headset detects whether the upgrade is completed, and if the first timer or the second timer is not stopped yet when the upgrade is completed, the first timer or the second timer is stopped, which is beneficial to saving power consumption of the headset.
Step 205, restart the headset.
This step is substantially the same as step 105, and for the relevant part, refer to the description of step 105.
Step 207, the headset initiates a connection with the terminal.
This step is substantially the same as step 107, and for related points, refer to the description of step 107.
Step 209, restart the upgrade and start the first timer.
This step is substantially the same as step 109, and reference is made to the description of step 109 for relevant points.
The embodiment not only has the effect of the first embodiment, but also waits for the timing time of the second timer after the time of the first timer reaches through setting the second timer, and restarts the earphone if the upgrade is not completed, so that the upgrade which is normally performed is stopped, the work efficiency of the upgrade is improved, the power consumption of the earphone is saved, and the control of the upgrade process is more flexible.
The present application further provides an upgrade apparatus applied to a headset, fig. 4 is a schematic structural diagram of the upgrade apparatus of the present application, as shown in fig. 4, the upgrade apparatus 30 of this embodiment includes: the starting unit 31 is used for starting a preset first timer when the upgrade starts, wherein the timing time of the first timer is longer than or equal to the time required by the upgrade of the earphone; a judging unit 33, configured to judge whether the upgrade is completed after the time of the first timer is reached; a restart unit 35 for restarting the earphone if the upgrade is not completed; an initiating unit 37 for initiating a connection with the terminal by the headset; a restart unit 39 for restarting the upgrade starts the first timer.
Optionally, the restarting unit 35 is further configured to:
and if the upgrade is not completed, starting a preset second timer, judging whether the upgrade is completed or not after the time of the second timer is up, and if the upgrade is not completed, restarting the earphone.
Optionally, the timing time of the second timer is less than the timing time of the first timer.
Optionally, the determining unit 33 is configured to:
judging whether the upgrade is finished or not by detecting the software version of the earphone; or judging whether the upgrade is finished by detecting whether the upgrade program is finished.
Optionally, the initiating unit 37 is configured to:
the earphone is connected with the terminal;
and the earphone receives an upgrading request sent by the terminal.
Optionally, the apparatus further includes a sending unit, configured to:
and the earphone sends the information of the upgrade failure and/or the software version information of the earphone to the terminal.
In this specification, for an embodiment of an upgrade apparatus applied to a headset, the content is substantially the same as that of an embodiment of an upgrade method applied to the headset, and for the relevant points, reference is made to the description of the embodiment of the upgrade method applied to the headset.
It is clear to a person skilled in the art that the solution of the present application can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, an FPGA (Field-ProgrammaBLE Gate Array), an IC (Integrated Circuit), or the like.
The processing units and/or modules of the present application may be implemented by analog circuits that perform the functions described herein, or may be implemented by software that performs the functions described herein.
The application also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the steps of the method are realized when the processor executes the program. The electronic equipment of the application can be a Bluetooth headset and can also be other electronic equipment.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
All functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (9)

1. An upgrade method applied to earphones is characterized by comprising the following steps:
when the upgrade starts, starting a preset first timer, wherein the timing time of the first timer is more than or equal to the time required by the upgrade of the earphone;
judging whether the upgrading is finished or not after the time of the first timer is up;
if the upgrade is not completed, the earphone is restarted;
the earphone initiates connection with a terminal;
restarting upgrading and starting the first timer;
wherein, if the upgrade is not completed, restarting the headset further comprises:
and if the upgrade is not completed, starting a preset second timer, judging whether the upgrade is completed or not after the time of the second timer is up, and if the upgrade is not completed, restarting the earphone.
2. The method of claim 1, wherein the timing time of the second timer is less than the timing time of the first timer.
3. The method of any of claims 1-2, wherein determining whether an upgrade is complete after the first timer time is reached comprises:
and judging whether the upgrade is finished or not by detecting the software version of the earphone.
4. The method of any of claims 1-2, wherein determining whether an upgrade is complete after the first timer time is reached comprises:
and judging whether the upgrade is finished or not by detecting whether the upgrade program is finished or not.
5. The method of any of claims 1-2, wherein the headset initiating a connection with a terminal comprises:
the earphone is connected with the terminal;
and the earphone receives an upgrading request sent by the terminal.
6. The method of claim 5, wherein the establishing the connection between the headset and the terminal comprises:
and the earphone sends the information of failed upgrade and/or the software version information of the earphone to the terminal.
7. An upgrade apparatus applied to a headset, comprising:
the starting unit is used for starting a preset first timer when the upgrade starts, and the timing time of the first timer is more than or equal to the time required by the upgrade of the earphone;
the judging unit is used for judging whether the upgrading is finished or not after the time of the first timer is up;
the restarting unit is used for restarting the earphone if the upgrading is not completed;
the initiating unit is used for initiating the connection between the earphone and the terminal;
the restarting unit is used for restarting upgrading and starting the first timer;
wherein the restart unit is further configured to include:
and if the upgrade is not completed, starting a preset second timer, judging whether the upgrade is completed or not after the time of the second timer is up, and if the upgrade is not completed, restarting the earphone.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1-6 are implemented when the program is executed by the processor.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201811324610.1A 2018-11-08 2018-11-08 Upgrading method and device applied to earphone, electronic equipment and storage medium Active CN109542477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811324610.1A CN109542477B (en) 2018-11-08 2018-11-08 Upgrading method and device applied to earphone, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811324610.1A CN109542477B (en) 2018-11-08 2018-11-08 Upgrading method and device applied to earphone, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109542477A CN109542477A (en) 2019-03-29
CN109542477B true CN109542477B (en) 2022-03-04

Family

ID=65844793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811324610.1A Active CN109542477B (en) 2018-11-08 2018-11-08 Upgrading method and device applied to earphone, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109542477B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111200811B (en) * 2019-12-29 2022-03-18 歌尔科技有限公司 TWS earphone, upgrading method and device thereof and readable storage medium
CN111158738B (en) * 2019-12-30 2023-10-24 青岛歌尔智能传感器有限公司 Headset firmware upgrading method and device and readable storage medium
CN112104028B (en) * 2020-09-10 2022-05-10 歌尔科技有限公司 Charging device, electric quantity correction method of wireless earphone and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441608A (en) * 2002-02-28 2003-09-10 明基电通股份有限公司 Mobile communication capable of detecting and transceiving voice and digital data
CN101610501A (en) * 2009-07-16 2009-12-23 中兴通讯股份有限公司 Device firmware upgrade system and method, device management server and portable terminal
CN102065139A (en) * 2010-11-25 2011-05-18 青岛海信信芯科技有限公司 Software upgrading method and device and multimedia terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509121B2 (en) * 2005-04-18 2009-03-24 Terax Communication Technologies Inc. Method of updating firmware using object push profile in the bluetooth object exchange protocol

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1441608A (en) * 2002-02-28 2003-09-10 明基电通股份有限公司 Mobile communication capable of detecting and transceiving voice and digital data
CN101610501A (en) * 2009-07-16 2009-12-23 中兴通讯股份有限公司 Device firmware upgrade system and method, device management server and portable terminal
CN102065139A (en) * 2010-11-25 2011-05-18 青岛海信信芯科技有限公司 Software upgrading method and device and multimedia terminal

Also Published As

Publication number Publication date
CN109542477A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN109542477B (en) Upgrading method and device applied to earphone, electronic equipment and storage medium
EP3091719B1 (en) Method for short-range wireless communication and electronic device using the same
CN108429979B (en) Charging box upgrading method, charging box, wireless headset and TWS headset
JP6571341B2 (en) Power supply method, device and program for audio use
US9468027B2 (en) Method for controlling a Bluetooth connection
US20170013346A1 (en) Electronic device and method for controlling power signal using the same
WO2017063192A1 (en) Charging method, mobile terminal, and charging device
EP3089046B1 (en) Electronic device operating method and electronic device for supporting the same
EP3955694A1 (en) Method and apparatus for back-connecting bluetooth device, terminal and computer-readable storage medium
WO2017063191A1 (en) Method of eliminating interference on touch screen from charger, and mobile terminal
WO2014086139A1 (en) Method and device for controlling shutdown of terminal
US9819321B2 (en) Method and apparatus for automatically controlling gain based on sensitivity of microphone in electronic device
CN115622177B (en) Charging method, mobile terminal and storage medium
US11977618B2 (en) Electronic device and control method
US20190363560A1 (en) Method for Determining Charger, Related Device, and System
CN110825411A (en) Upgrading method and device for TWS (two way satellite System) earphone system and computer-readable storage medium
WO2019203797A1 (en) Firmware setup menu options for docking stations
CN111246199B (en) Control method and device for camera test, terminal equipment and storage medium
CN109144596B (en) Quick starting method, device, terminal, server and system
CN112346553A (en) Electronic device for reducing power consumption and operation method thereof
US11393467B2 (en) Electronic device, control method, and storage medium
KR20210049585A (en) Electronic device for providing communication service and method thereof
CN114237378B (en) Electronic device
CN107391157B (en) Mobile terminal and method for identifying mobile storage device
WO2022166698A1 (en) Charging control method and apparatus, electronic device, and charger

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