Bluetooth peripheral upgrading method and device, terminal equipment and storage medium

文档序号:1802519 发布日期:2021-11-05 浏览:19次 中文

阅读说明:本技术 蓝牙外设升级方法、装置、终端设备及存储介质 (Bluetooth peripheral upgrading method and device, terminal equipment and storage medium ) 是由 孔景滔 于 2021-07-05 设计创作,主要内容包括:本申请实施例公开了一种蓝牙外设升级方法、装置、终端设备及存储介质,属于终端技术领域,能够解决在回连场景下,若终端设备更新了蓝牙外设对应的固件,不能及时对蓝牙外设执行相应固件升级的问题。该方法包括:若确定是该终端设备更新蓝牙外设对应的固件后的首次开机,则设置与更新后的目标固件对应的固件升级标志;若检测到该蓝牙外设,且检测到该固件升级标志,则将该目标固件发送至该蓝牙外设,以使该蓝牙外设执行固件升级。(The embodiment of the application discloses a Bluetooth peripheral upgrading method and device, terminal equipment and a storage medium, belongs to the technical field of terminals, and can solve the problem that corresponding firmware upgrading cannot be executed on the Bluetooth peripheral in time if the terminal equipment updates firmware corresponding to the Bluetooth peripheral in a back-connection scene. The method comprises the following steps: if the terminal equipment is determined to be started for the first time after the firmware corresponding to the Bluetooth peripheral is updated, setting a firmware upgrading mark corresponding to the updated target firmware; and if the Bluetooth peripheral is detected and the firmware upgrading mark is detected, sending the target firmware to the Bluetooth peripheral so that the Bluetooth peripheral executes firmware upgrading.)

1. A Bluetooth peripheral upgrading method is applied to terminal equipment and comprises the following steps:

if the terminal equipment is determined to be started for the first time after the firmware corresponding to the Bluetooth peripheral is updated, setting a firmware upgrading mark corresponding to the updated target firmware;

and if the Bluetooth peripheral is detected and the firmware upgrading mark is detected, the target firmware is sent to the Bluetooth peripheral so that the Bluetooth peripheral executes firmware upgrading.

2. The method of claim 1, wherein after setting a firmware upgrade flag corresponding to the updated target firmware, the method further comprises:

when the target firmware is determined to be sent completely, the firmware upgrading mark is cancelled;

alternatively, the first and second electrodes may be,

and when the terminal equipment is shut down or restarted, the firmware upgrading mark is cancelled.

3. The method according to claim 2, wherein after canceling the firmware upgrade flag when the terminal device is powered off or restarted, the method further comprises:

if the terminal equipment is determined not to be started up for the first time after updating the firmware corresponding to the Bluetooth peripheral equipment, and part of firmware in the target firmware is not sent to the Bluetooth peripheral equipment, setting an upgrading mark corresponding to the part of firmware;

and if the Bluetooth peripheral is detected and the upgrading mark is detected, sending the part of firmware to the Bluetooth peripheral so that the Bluetooth peripheral executes firmware upgrading.

4. The method of any one of claims 1 to 3, wherein if a Bluetooth peripheral is detected and the firmware upgrade flag is detected, sending the target firmware to the Bluetooth peripheral comprises:

if the Bluetooth peripheral to be connected is detected and the firmware upgrading mark is detected, determining whether the Bluetooth peripheral is successfully paired once;

and if the target firmware is successfully paired with the Bluetooth peripheral, sending the target firmware to the Bluetooth peripheral.

5. The method of claim 4, wherein after sending the target firmware to the Bluetooth peripheral, the method further comprises:

and carrying out loop connection with the Bluetooth peripheral.

6. The method of claim 4, wherein after determining whether the pairing with the Bluetooth peripheral was successful, the method further comprises:

and if the Bluetooth peripheral equipment is determined not to be successfully paired, the target firmware is paired with the Bluetooth peripheral equipment, and after the pairing is successful, the target firmware is sent to the Bluetooth peripheral equipment, so that the Bluetooth peripheral equipment executes firmware upgrading.

7. The method according to any one of claims 1 to 3, wherein before the terminal device is determined to be powered on for the first time after the firmware corresponding to the Bluetooth peripheral is updated, the method further includes:

determining whether pairing with the Bluetooth peripheral has been successful;

and if the terminal equipment is successfully paired with the Bluetooth peripheral equipment once, determining whether the terminal equipment is started for the first time after updating the firmware corresponding to the Bluetooth peripheral equipment.

8. The method of claim 7, wherein after sending the target firmware to the Bluetooth peripheral, the method further comprises:

the Bluetooth peripheral is connected back;

alternatively, the first and second electrodes may be,

the method further includes, after determining whether the terminal device is powered on for the first time after updating the firmware corresponding to the bluetooth peripheral, the method further includes:

and if the terminal equipment is determined not to be started for the first time after the firmware corresponding to the Bluetooth peripheral equipment is updated, the terminal equipment is connected with the Bluetooth peripheral equipment in a loop mode.

9. The method of claim 7, wherein after determining whether the pairing with the Bluetooth peripheral was successful, the method further comprises:

and if the Bluetooth peripheral equipment is successfully paired, pairing with the Bluetooth peripheral equipment, and after the pairing is successful, sending a target firmware to the Bluetooth peripheral equipment to enable the Bluetooth peripheral equipment to execute firmware upgrading if the target firmware with the current firmware version different from that of the Bluetooth peripheral equipment exists in the terminal equipment.

10. The method of claim 1, wherein if a bluetooth peripheral is detected and the firmware upgrade flag is detected, sending the target firmware to the bluetooth peripheral comprises:

and if the Bluetooth peripheral is detected to be in an idle state and the firmware upgrading mark is detected, sending the target firmware to the Bluetooth peripheral.

11. A bluetooth peripheral upgrading apparatus, the apparatus comprising: the device comprises a setting module and a sending module;

the setting module is used for setting a firmware upgrading mark corresponding to the updated target firmware if the terminal equipment is determined to be started for the first time after the firmware corresponding to the Bluetooth peripheral is updated;

the sending module is configured to send the target firmware to the bluetooth peripheral device if the bluetooth peripheral device is detected and the firmware upgrade flag is detected, so that the bluetooth peripheral device executes firmware upgrade.

12. A terminal device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the bluetooth peripheral upgrade method according to any one of claims 1 to 10.

13. A readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the bluetooth peripheral upgrading method according to any of claims 1 to 10.

Technical Field

The present application relates to the field of terminal technologies, and in particular, to a method and an apparatus for upgrading a bluetooth peripheral, a terminal device, and a storage medium.

Background

In order to avoid interference between wireless signals of different devices, the terminal device and the peripheral device may be connected by a bluetooth pairing technology, and such a peripheral device is hereinafter referred to as a bluetooth peripheral device.

Currently, in the process of connecting a terminal device with a bluetooth peripheral, if bluetooth pairing has not been performed, the terminal device connects through bluetooth pairing, and once bluetooth pairing is successful (and pairing is not released), the terminal device subsequently connects through loopback. However, in order to improve the connection speed between the terminal device and the bluetooth peripheral, only in the bluetooth pairing connection process, after the pairing is successful, the terminal device can detect whether the bluetooth peripheral needs to be upgraded (namely, the version (hereinafter referred to as a first version) of the firmware of the bluetooth peripheral stored in the terminal device, then the version (hereinafter referred to as a second version) of the firmware in the bluetooth peripheral is received from the bluetooth peripheral, and then the first version is compared with the second version, if not, the terminal device sends the firmware of the bluetooth peripheral in the terminal device to the bluetooth peripheral so as to enable the bluetooth peripheral to execute firmware upgrade; and in the process of the back connection, the terminal equipment cannot detect whether the Bluetooth peripheral equipment needs to be upgraded or not. That is, firmware upgrade may be performed on the bluetooth peripheral only during the bluetooth pairing connection process, and firmware upgrade may not be performed on the bluetooth peripheral during the loopback connection process.

Therefore, the problem that corresponding firmware upgrading cannot be executed on the Bluetooth peripheral in time if the terminal equipment updates the firmware corresponding to the Bluetooth peripheral in the back-connection scene can be caused.

Disclosure of Invention

The embodiment of the application provides a Bluetooth peripheral upgrading method and device, a terminal device and a storage medium, and aims to solve the problem that corresponding firmware upgrading cannot be executed on a Bluetooth peripheral in time if the terminal device updates a firmware corresponding to the Bluetooth peripheral in a back-connection scene.

In a first aspect of the embodiments of the present application, a method for upgrading a bluetooth peripheral is provided, where the method is applied to a terminal device, and the method includes: if the terminal equipment is determined to be started for the first time after the firmware corresponding to the Bluetooth peripheral is updated, setting a firmware upgrading mark corresponding to the updated target firmware; and if the Bluetooth peripheral is detected and the firmware upgrading mark is detected, sending the target firmware to the Bluetooth peripheral so that the Bluetooth peripheral executes firmware upgrading.

In a second aspect of the embodiments of the present application, there is provided a bluetooth peripheral upgrading apparatus, including: the device comprises a setting module and a sending module; the setting module is used for setting a firmware upgrading mark corresponding to an updated target firmware if the terminal equipment is determined to be started for the first time after the firmware corresponding to the Bluetooth peripheral is updated; the sending module is configured to send the target firmware to the bluetooth peripheral device if the bluetooth peripheral device is detected and the firmware upgrade flag is detected, so that the bluetooth peripheral device executes firmware upgrade.

In a third aspect of the embodiments of the present application, a terminal device is provided, where the terminal device includes a processor, a memory, and a program or an instruction stored in the memory and executable on the processor, and the program or the instruction, when executed by the processor, implements the steps of the bluetooth peripheral upgrading method according to the first aspect.

In a fourth aspect of the embodiments of the present application, a readable storage medium is provided, where a program or an instruction is stored, and the program or the instruction, when executed by a processor, implements the steps of the bluetooth peripheral upgrading method according to the first aspect.

In a fifth aspect of the embodiments of the present application, a chip is provided, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the bluetooth peripheral upgrading method according to the first aspect.

In the embodiment of the application, the terminal equipment can set a firmware upgrading mark corresponding to the updated target firmware if the terminal equipment is started for the first time after the firmware corresponding to the Bluetooth peripheral is updated; and if the Bluetooth peripheral is detected and the firmware upgrading mark is detected, sending the target firmware to the Bluetooth peripheral so that the Bluetooth peripheral executes firmware upgrading. In the scheme, if the terminal equipment is determined to be started for the first time after updating the firmware corresponding to the Bluetooth peripheral equipment, the firmware upgrading mark is set, and if the terminal equipment is not started for the first time, the firmware upgrading mark is not set, so that if the Bluetooth peripheral equipment is detected and the firmware upgrading mark is detected, the firmware upgrading is executed on the Bluetooth peripheral equipment by sending the target firmware to the Bluetooth peripheral equipment, and if the Bluetooth peripheral equipment is detected and the firmware upgrading mark is not detected, the firmware upgrading is not executed on the Bluetooth peripheral equipment by sending the target firmware to the Bluetooth peripheral equipment. Therefore, the flexibility of firmware upgrading performed on the Bluetooth peripheral can be improved, the firmware upgrading is performed on the Bluetooth peripheral based on the firmware upgrading mark, processes of detecting the version of the Bluetooth peripheral in the terminal equipment, obtaining the current version of the Bluetooth peripheral, comparing whether the two versions are the same and the like are not needed in the process of upgrading the Bluetooth peripheral, and the upgrading efficiency of the Bluetooth peripheral can be improved. In addition, the corresponding firmware upgrading can be executed on the Bluetooth peripheral in time after the terminal equipment updates the firmware corresponding to the Bluetooth peripheral.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the embodiments and the drawings used in the description of the prior art, and obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained according to the drawings.

Fig. 1A is a schematic diagram of a bluetooth peripheral upgrading system according to an embodiment of the present application;

fig. 1B is a schematic structural diagram of a bluetooth peripheral upgrading system according to an embodiment of the present application;

fig. 1C is a second schematic structural diagram of a bluetooth peripheral upgrading system according to an embodiment of the present application;

fig. 2A is a schematic flowchart of a bluetooth peripheral upgrading method according to an embodiment of the present disclosure;

fig. 2B is a second schematic flowchart of a bluetooth peripheral upgrading method according to an embodiment of the present application;

fig. 2C is a third schematic flowchart of a bluetooth peripheral upgrading method according to the embodiment of the present application;

fig. 2D is a fourth schematic flowchart of a bluetooth peripheral upgrading method according to an embodiment of the present disclosure;

fig. 3 is a fifth flowchart illustrating a method for upgrading a bluetooth peripheral according to an embodiment of the present application;

fig. 4 is a block diagram of a bluetooth peripheral upgrading apparatus according to an embodiment of the present disclosure;

fig. 5 is a schematic diagram of a hardware structure of a television according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.

The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.

Fig. 1A is a schematic diagram of a bluetooth peripheral upgrading system according to an embodiment of the present application. The system at least comprises: a terminal device 11 and a bluetooth peripheral 12. The terminal device 11 and the bluetooth peripheral 12 can perform bluetooth connection through bluetooth pairing.

Referring to fig. 1A, as shown in fig. 1B, a schematic structural diagram of a possible bluetooth peripheral upgrading system is shown in this embodiment of the present application. The terminal device 11 at least includes an upgrade module 111 and a bluetooth peripheral module 112, where the upgrade module 111 is configured to control upgrade of the terminal device itself, and the bluetooth peripheral module 112 is independent from the upgrade module 111 and configured to control firmware upgrade of a bluetooth peripheral device, in this embodiment of the application, the upgrade module 111 is configured to write a firmware upgrade flag into the bluetooth peripheral module 112 when the bluetooth peripheral module 112 obtains a firmware to be upgraded, and the bluetooth peripheral module 112 performs firmware upgrade on the bluetooth peripheral device 12 based on the firmware upgrade flag.

Referring to fig. 1A, as shown in fig. 1C, a schematic structural diagram of a possible bluetooth peripheral upgrading system according to an embodiment of the present application is shown. The terminal device 11 at least includes an upgrade module 111, a bluetooth peripheral module 112, and a system attribute module 113. The upgrading module 111 is configured to control upgrading of the terminal device, and the system attribute module 113 is configured to control a system attribute of the terminal device; the bluetooth peripheral module 112 is independent from the upgrade module 111 and the system attribute module 113, and is used for controlling firmware upgrade of the bluetooth peripheral. In this embodiment of the application, the upgrade module 111 is configured to write a firmware upgrade flag into the system attribute module 113 when the bluetooth peripheral module 112 obtains the firmware to be upgraded; the bluetooth peripheral module 112 performs firmware upgrade on the bluetooth peripheral 12 by reading the firmware upgrade flag from the system attribute module 113 and then performing firmware upgrade based on the firmware upgrade flag.

It should be noted that, in this embodiment of the application, the upgrade module 111 in fig. 1B or the upgrade module 111 and the system attribute module 113 in fig. 1C may also be a newly added module, and have a related function of the upgrade module 111 and the system attribute module 113 on a firmware upgrade flag.

The bluetooth peripheral upgrading method provided by the embodiment of the application can be applied to any scene in which firmware upgrading needs to be performed on the bluetooth peripheral, for example, after the bluetooth is successfully paired in the bluetooth pairing connection process, before reconnection, after connection, and when the bluetooth peripheral is in an idle state, the bluetooth peripheral upgrading method can be applied to other scenes, and the embodiment of the application is not limited. In the scheme, if the terminal equipment is determined to be started for the first time after updating the firmware corresponding to the Bluetooth peripheral equipment, the firmware upgrading mark is set, and if the terminal equipment is not started for the first time, the firmware upgrading mark is not set, so that if the Bluetooth peripheral equipment is detected and the firmware upgrading mark is detected, the firmware upgrading is executed on the Bluetooth peripheral equipment by sending the target firmware to the Bluetooth peripheral equipment, and if the Bluetooth peripheral equipment is detected and the firmware upgrading mark is not detected, the firmware upgrading is not executed on the Bluetooth peripheral equipment by sending the target firmware to the Bluetooth peripheral equipment. Therefore, the flexibility of firmware upgrading performed on the Bluetooth peripheral can be improved, the firmware upgrading is performed on the Bluetooth peripheral based on the firmware upgrading mark, processes of detecting the version of the Bluetooth peripheral in the terminal equipment, obtaining the current version of the Bluetooth peripheral, comparing whether the two versions are the same and the like are not needed in the process of upgrading the Bluetooth peripheral, and the upgrading efficiency of the Bluetooth peripheral can be improved. In addition, the corresponding firmware upgrading can be executed on the Bluetooth peripheral in time after the terminal equipment updates the firmware corresponding to the Bluetooth peripheral.

The terminal device in the embodiment of the present application may be a mobile phone, a computer, a vehicle-mounted terminal device, a Television (TV), and the like, and the embodiment of the present application is not particularly limited. When the terminal equipment is a mobile phone, the Bluetooth peripheral equipment can be a Bluetooth touch pen, a Bluetooth sound box, a Bluetooth earphone and the like; when the terminal equipment is a computer, the Bluetooth peripheral equipment can be a Bluetooth mouse, a Bluetooth keyboard, a Bluetooth touch pen, a Bluetooth sound box, a Bluetooth earphone and the like; when the terminal equipment is vehicle-mounted terminal equipment, the Bluetooth peripheral equipment can be a Bluetooth key, a Bluetooth sound box and the like; when the terminal equipment is a television, the Bluetooth peripheral equipment can be a Bluetooth remote controller, a Bluetooth sound box, a Bluetooth earphone and the like; the method can be determined according to actual use requirements, and the embodiment of the application is not particularly limited.

The following describes an application scenario of the present embodiment by taking the terminal device as a television and the bluetooth remote controller as an example.

Currently, remote controllers are classified into the following three categories according to signal classification:

the first category: infrared remote controller

The main principle of the infrared remote controller is to control the television by infrared light, namely invisible light. After receiving the infrared rays, the television converts the infrared rays into digital signals which can be identified by the television. The infrared remote controller can remotely control the television at a longer distance. However, due to the limitation of infrared ray, the infrared remote controller cannot pass through obstacles to perform remote control or remotely control a television at a large angle, and has poor anti-interference capability and low cost. Therefore, infrared remote controllers are mostly used on some common home televisions.

The second category: 2.4 gigahertz (GHz) wireless remote controller

At present, along with the gradual increase of the popularity of wireless remote control in a television remote controller, the transmission mode of 2.4G remote control signals can effectively solve the defect of infrared remote control, the television can be remotely controlled at various angles, the operation is 360-degree and free of dead angle, the omnibearing three-dimensional coverage is the advantage of the 2.4G remote controller and is also one of the best types of the existing remote controllers, but the cost is too high.

The third category: bluetooth remote controller

The Bluetooth remote controller has the advantages that the completely independent signal transmission channel can be realized through pairing with the television, so that the interference between wireless signals of different devices can be avoided, the Bluetooth remote controller is used as a supplement of a 2.4GHz technology, a more perfect effect is achieved, and a dual-protection signal transmission effect is realized. However, when the bluetooth remote controller is used for the first time, the remote controller and the device need to be manually paired, and therefore, a situation in which the operation of the device is delayed may occur.

At present, most televisions equipped with Bluetooth remote controllers on the market can upgrade the firmware of the Bluetooth remote controllers only after being successfully paired with the televisions, and once the Bluetooth remote controllers are paired, the firmware can not be upgraded in the next startup process and the connection process can be directly returned (the Bluetooth remote controllers are automatically connected) in order to improve the startup speed and the Bluetooth connection speed. Generally, the firmware of the bluetooth remote controller is upgraded along with the whole television system, but the upgrade of the television is completed only when the firmware of the bluetooth remote controller is updated in the television (upgraded in the television) and not when the upgrade of the bluetooth remote controller is completed, the firmware needs to be transmitted to the bluetooth remote controller for completing the upgrade, and the transmission process is performed only when the remote controllers are paired again.

After the television detects the system upgrading packet, the system upgrading packet is downloaded to the television, then the television is restarted by restarting the recovery module to be upgraded, the part is the native upgrading mechanism of the android system of the television, the upgrading of the Bluetooth remote controller is independent of the mechanism, when the television is started for the first time after the upgrading is finished, if the television is matched with the Bluetooth remote controller before the upgrading, the television has memory, and the television skips the firmware upgrading of the Bluetooth remote controller and directly performs the reconnection.

Therefore, the disadvantage of the above scheme is that even if the firmware of the bluetooth remote controller is upgraded in the television, the firmware of the bluetooth remote controller cannot be upgraded until the firmware of the bluetooth remote controller is paired with the bluetooth remote controller before the memory of the television, and the firmware upgrade cannot be performed until the remote controller is paired again, so that the repair of many problems of the bluetooth remote controller is not synchronized to the bluetooth remote controller in time, and the user experience is greatly influenced.

The execution main body of the bluetooth peripheral upgrading method provided by the embodiment of the present application may be the terminal device, or may also be a functional module and/or a functional entity capable of implementing the bluetooth peripheral upgrading method in the terminal device, which may be specifically determined according to actual use requirements, and the embodiment of the present application is not limited.

The method, the apparatus, the terminal device and the storage medium for upgrading the bluetooth peripheral provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.

As shown in fig. 2A, an embodiment of the present application provides a bluetooth peripheral upgrading method, and an execution subject is taken as a terminal device as an example to exemplarily describe the bluetooth peripheral upgrading method provided in the embodiment of the present application. The method may include steps 201 through 202 described below.

201. And if the terminal equipment is determined to be started for the first time after the terminal equipment updates the firmware corresponding to the Bluetooth peripheral, setting a firmware upgrading mark corresponding to the updated target firmware.

It can be understood that the terminal device downloads the target firmware (firmware to be upgraded) corresponding to the bluetooth peripheral from the network or the server, and updates the originally stored bluetooth peripheral firmware in the terminal device to the target firmware, which means that the terminal device updates the firmware corresponding to the bluetooth peripheral.

Optionally, the terminal device may update the originally stored bluetooth peripheral firmware of the terminal device to a target firmware by shutting down or restarting the terminal device (for example, updating the target firmware to a bluetooth peripheral module in the terminal device), which indicates that the terminal device updates the firmware corresponding to the bluetooth peripheral.

Optionally, a firmware flag corresponding to the bluetooth peripheral exists in the terminal device, and the firmware flag is a firmware upgrade flag (or a valid firmware flag) when the value of the firmware flag is 1 (or 0), and is a non-firmware upgrade flag (or an invalid firmware flag) when the value of the firmware flag is 0 (or 1). Then setting the firmware upgrade flag may be to modify the value of the firmware flag (it is understood that by changing the attributes of the firmware flag, the firmware flag is changed from invalid to valid, which may be referred to as a firmware upgrade flag, and the firmware flag is invalid which may be referred to as a non-firmware upgrade flag).

Alternatively, the terminal device may set the firmware upgrade flag to generate or write the firmware upgrade flag (firmware upgrade flag is present from none).

In the embodiment of the present application, the firmware upgrade flag may also be set in other manners, which is not limited herein.

Illustratively, if the firmware upgrade flag value is 1 (indicating that the firmware flag is valid) indicates that the terminal device needs to perform firmware upgrade on the bluetooth peripheral, the non-firmware upgrade flag value is 0 (indicating that the firmware flag is invalid) indicates that the terminal device does not need to perform firmware upgrade on the bluetooth peripheral.

Illustratively, if the firmware upgrade flag value of 0 (indicating that the firmware flag is valid) indicates that the terminal device needs to perform firmware upgrade on the bluetooth peripheral, the non-firmware upgrade flag value of 1 (indicating that the firmware flag is invalid) indicates that the terminal device does not need to perform firmware upgrade on the bluetooth peripheral.

Optionally, in this embodiment of the application, based on fig. 1B, the terminal device may directly set a firmware upgrade flag in the bluetooth peripheral module 112 through the upgrade module 111.

Optionally, in this embodiment of the application, based on fig. 1C, the terminal device may set a firmware upgrade flag in the system attribute module 113 through the upgrade module 111, and the bluetooth peripheral module 112 reads the firmware upgrade flag from the system attribute module 113.

In the embodiment of the present application, a firmware upgrade flag may also be set through other modules, which may specifically be determined according to actual use requirements, and the embodiment of the present application is not limited.

It can be understood that the terminal device sets the firmware upgrading flag when the terminal device is first powered on after determining that the terminal device updates the firmware corresponding to the bluetooth peripheral, and does not set the firmware upgrading flag when the terminal device is not first powered on after determining that the terminal device updates the firmware corresponding to the bluetooth peripheral, so that the terminal device can upgrade the firmware of the bluetooth device based on the firmware upgrading flag when the terminal device is first powered on after determining that the terminal device updates the firmware corresponding to the bluetooth peripheral. Therefore, the firmware upgrading can be timely executed on the Bluetooth peripheral.

202. And if the terminal equipment detects the Bluetooth peripheral equipment and detects the firmware upgrading mark, the target firmware is sent to the Bluetooth peripheral equipment so that the Bluetooth peripheral equipment executes firmware upgrading.

The firmware upgrading mark is used for indicating that the terminal equipment updates the firmware corresponding to the Bluetooth peripheral equipment, and the Bluetooth peripheral equipment does not update the corresponding firmware.

The target firmware is the firmware which corresponds to the Bluetooth peripheral and is updated by the terminal equipment.

It can be understood that the firmware upgrade flag is used to instruct the terminal device to update the firmware corresponding to the bluetooth peripheral, so that if the firmware upgrade flag is detected, it indicates that the terminal device has upgraded the firmware corresponding to the bluetooth peripheral; and if the firmware upgrading mark is not detected, the terminal equipment does not upgrade the firmware corresponding to the Bluetooth peripheral. If the terminal equipment detects the Bluetooth peripheral equipment and detects a firmware upgrading mark, the target firmware is sent to the Bluetooth peripheral equipment so that the Bluetooth peripheral equipment executes firmware upgrading; if the terminal device only detects the Bluetooth peripheral and does not detect the firmware upgrading mark, the terminal device indicates that the firmware upgrading of the Bluetooth peripheral is not required to be executed.

The process of sending the target firmware to the bluetooth peripheral may refer to the related art, and the embodiment of the present application is not limited. And after receiving the target firmware, the Bluetooth peripheral upgrades the firmware according to the target firmware. The process of firmware upgrade of the specific bluetooth peripheral according to the target firmware may refer to the related art, and the embodiment of the present application is not limited.

In the embodiment of the application, whether the firmware upgrading flag exists or not is used for indicating whether the terminal device upgrades the firmware corresponding to the bluetooth peripheral device, and whether the firmware upgrading needs to be executed on the bluetooth peripheral device or not is determined based on whether the firmware upgrading flag exists or not (whether the firmware corresponding to the firmware upgrading flag is sent to the bluetooth peripheral device or not is used for enabling the bluetooth peripheral device to execute the firmware upgrading).

Optionally, with reference to fig. 2A, as shown in fig. 2B, before the step 201, the method for upgrading a bluetooth peripheral provided in this embodiment of the present application may further include the following step 203, where the step 201 may be specifically implemented by the following step 201 a.

203. And the terminal equipment determines whether the terminal equipment is started for the first time after the firmware corresponding to the Bluetooth peripheral equipment is updated.

It can be understood that, if the terminal device is determined to be the first startup after the terminal device updates the firmware corresponding to the bluetooth peripheral, the following step 201a is executed, and if it is determined that the terminal device is not the first startup after the terminal device updates the firmware corresponding to the bluetooth peripheral, the firmware upgrade flag is not set.

Optionally, if it is determined that the terminal device is not started for the first time after updating the firmware corresponding to the bluetooth peripheral, it may be determined whether the terminal device is successfully paired with the bluetooth peripheral once, and if it is determined that the terminal device is successfully paired with the bluetooth peripheral once, the terminal device is reconnected with the bluetooth peripheral, otherwise, the terminal device is paired with the bluetooth peripheral.

Optionally, if it is determined that the pairing with the bluetooth peripheral device is successful before step 203, performing a loop connection with the bluetooth peripheral device when it is determined that the terminal device is not turned on for the first time after updating the firmware corresponding to the bluetooth peripheral device.

201a, the terminal device sets the firmware upgrading mark.

It can be understood that if the terminal device is determined to be powered on for the first time after updating the firmware corresponding to the bluetooth peripheral, the firmware upgrade flag is set.

In the embodiment of the application, the terminal device sets the firmware upgrading flag when the terminal device is started for the first time after the terminal device updates the firmware corresponding to the bluetooth peripheral, and the firmware upgrading flag is not set when the terminal device is not started for the first time, so that the terminal device does not repeatedly set the firmware upgrading flag when the terminal device is started every time after the terminal device updates the firmware corresponding to the bluetooth peripheral, and the firmware upgrading is repeatedly executed on the bluetooth peripheral based on the firmware upgrading flag, thereby causing unnecessary upgrading and further influencing the starting speed and the connection speed.

Alternatively, in conjunction with fig. 2B, as shown in fig. 2C, the above step 202 may be implemented by the following steps 202a to 202B. Optionally, after step 202b described below, the method for upgrading a bluetooth peripheral provided by the embodiment of the present application may further include step 204 described below. Optionally, as shown in fig. 2C, after step 202a described below, the bluetooth peripheral upgrading method provided in this embodiment of the application may further include step 205 described below.

202a, if the terminal device detects the bluetooth peripheral to be connected and detects the firmware upgrading mark, determining whether the terminal device is successfully paired with the bluetooth peripheral once.

It is understood that if the terminal device determines that the terminal device has been successfully paired with the bluetooth peripheral, step 202b is performed, and if the terminal device determines that the terminal device has not been successfully paired with the bluetooth peripheral, step 205 is performed.

202b, the terminal device sends the target firmware to the Bluetooth peripheral.

204. The terminal equipment is connected back with the Bluetooth peripheral.

205. And the terminal equipment is paired with the Bluetooth peripheral equipment, and after the pairing is successful, the target firmware is sent to the Bluetooth peripheral equipment.

The process of pairing the terminal device and the bluetooth peripheral device may refer to the prior art, and the embodiment of the present application is not limited.

In the embodiment of the application, if the terminal equipment is successfully paired with the Bluetooth peripheral equipment once, the terminal equipment does not need to be paired with the Bluetooth equipment again, and can be directly connected back to the Bluetooth peripheral equipment, so that the starting speed and the connection speed can be increased.

Optionally, with reference to fig. 2B, as shown in fig. 2D, before the step 203, the method for upgrading a bluetooth peripheral provided by the embodiment of the present application may further include a step 206 described below, and after the step 202, the method for upgrading a bluetooth peripheral provided by the embodiment of the present application may further include a step 207 described below. Optionally, as shown in fig. 2D, after step 206 described below, the bluetooth peripheral upgrading method provided in this embodiment may further include step 208 described below.

206. The terminal device determines whether the pairing with the bluetooth peripheral has been successful.

If the terminal device determines that the pairing with the bluetooth peripheral device has been successful, the above step 203 is executed, and if the pairing with the bluetooth peripheral device has not been successful, the following step 208 is executed.

Step 203 is to determine whether the terminal device is powered on for the first time after the terminal device updates the firmware corresponding to the bluetooth peripheral device if the terminal device is successfully paired with the bluetooth peripheral device.

Optionally, after the step 203, if it is determined that the terminal device is not powered on for the first time after the firmware corresponding to the bluetooth peripheral is updated, the following step 207 is executed; if it is determined that the terminal device is powered on for the first time after updating the firmware corresponding to the bluetooth peripheral, the following step 207 is executed after the step 201.

207. The terminal equipment is connected back with the Bluetooth peripheral.

208. And after the terminal equipment is successfully paired with the Bluetooth peripheral equipment, if the terminal equipment is detected to have target firmware with a version different from that of the current firmware of the Bluetooth peripheral equipment, the target firmware is sent to the Bluetooth peripheral equipment so that the Bluetooth peripheral equipment executes firmware upgrading.

The process of pairing the terminal device and the bluetooth peripheral device may refer to the prior art, and the embodiment of the present application is not limited.

In step 208, after the terminal device is successfully paired (indicating that the terminal device and the bluetooth peripheral device are successfully connected and can be normally used), detecting whether (a specific position of) the terminal device has a target firmware with a version different from that of the current firmware of the bluetooth peripheral device, if so, performing firmware upgrade on the bluetooth peripheral device based on the target firmware, and after the firmware upgrade is successful, the bluetooth peripheral device can be normally used; if the Bluetooth peripheral does not exist, firmware upgrading does not need to be executed on the Bluetooth peripheral, and the Bluetooth peripheral can be normally used. Reference may be made to the related art, which is not described herein in detail.

In the embodiment of the application, the terminal equipment can control the Bluetooth peripheral equipment to execute firmware upgrading through the firmware upgrading mark under the condition that the terminal equipment is successfully paired with the Bluetooth peripheral equipment once, and upgrade according to the existing Bluetooth peripheral equipment firmware upgrading scheme under the condition that the terminal equipment is not successfully paired with the Bluetooth peripheral equipment, so that the modification of the Bluetooth peripheral equipment firmware upgrading scheme is less.

It will be appreciated that a loopback refers to a direct connection back to a previously paired device without pairing.

In the embodiment of the application, the terminal equipment is directly connected back with the Bluetooth peripheral equipment under the condition that the terminal equipment is successfully paired with the Bluetooth peripheral equipment once, so that the starting speed and the Bluetooth connection speed can be improved.

The process of the terminal device and the bluetooth peripheral device performing the back connection may refer to the related art, and the embodiment of the present application is not limited.

Alternatively, the step 202 may be specifically realized by the following step 202 c.

201c, if the terminal device detects that the bluetooth peripheral is in an idle state and detects the firmware upgrading mark, the terminal device sends the target firmware to the bluetooth peripheral.

It will be appreciated that the idle state, i.e. the state in which the bluetooth peripheral is not in use by the user.

Optionally, if the terminal device does not receive any instruction of the user through the bluetooth peripheral within the preset duration, the terminal device may determine that the bluetooth peripheral is in the idle state.

The preset duration can be set according to actual use requirements, and the embodiment of the application is not limited.

Optionally, when the terminal device determines that the bluetooth peripheral is in the idle state and detects the firmware upgrade flag, the terminal device may instruct the bluetooth peripheral to switch from the user instruction transmission mode with the terminal device to the firmware transmission mode, and after receiving a reply from the bluetooth peripheral that has been switched to the firmware transmission mode, send the target firmware to the bluetooth peripheral to perform firmware upgrade on the bluetooth peripheral.

Optionally, in the transmission process of the target firmware, if the bluetooth peripheral receives a user instruction, the firmware transmission may be interrupted, the firmware transmission mode is switched to the user instruction transmission mode, and the user instruction is transmitted to the terminal device.

Optionally, the terminal device may instruct the bluetooth peripheral to switch from the user instruction transmission mode with the terminal device to the firmware transmission mode when it is determined that the bluetooth peripheral is in the idle state next time and the firmware upgrade flag is detected, and continue to transmit the firmware by continuing the node during the last interruption after receiving the switch to the firmware transmission mode replied by the bluetooth peripheral until the target firmware transmission is completed.

Alternatively, the terminal device may instruct the bluetooth peripheral to switch from the firmware transmission mode to the user instruction transmission mode after determining that the target firmware transmission is completed.

In the embodiment of the application, when the Bluetooth peripheral is in an idle state and the firmware upgrading mark is detected, the firmware upgrading is executed on the Bluetooth peripheral, so that the normal use of a user is not influenced, the starting speed, the connection speed or the speed of a corresponding user instruction can be increased, and the user experience can be improved.

Optionally, after the step 202, the method for upgrading a bluetooth peripheral provided by the embodiment of the present application may further include the following step 209.

209. And the terminal equipment cancels the firmware upgrading mark when determining that the target firmware is sent completely.

Optionally, the canceling the firmware upgrade flag may specifically include: and deleting the firmware upgrading mark, and changing the firmware mark from valid to invalid.

Illustratively, if the firmware upgrade flag is set to generate or write the firmware upgrade flag, the firmware upgrade flag is cancelled to delete the firmware upgrade flag. If the firmware upgrading mark is set to change the firmware mark from invalid to valid, the firmware upgrading mark is cancelled to change the firmware mark from valid to invalid.

Illustratively, the firmware upgrade flag is 1, and when the firmware flag is modified from 1 to 0, it indicates that the firmware upgrade flag is modified to be a non-firmware upgrade flag.

It can be understood that, if the terminal device is powered off or restarted when the target firmware is not sent completely, the firmware upgrading flag is not cancelled, and after the terminal device is powered on next time, the terminal device can continue to send the firmware which is not sent completely to the bluetooth peripheral device according to the firmware upgrading flag, so that the bluetooth peripheral device executes firmware upgrading, and the terminal device does not cancel the firmware upgrading flag until the target firmware is sent completely.

In the embodiment of the application, after the target firmware is sent, the firmware upgrading mark is cancelled, so that the terminal equipment can be ensured not to repeatedly send the target firmware to the Bluetooth equipment, and therefore, the Bluetooth peripheral equipment can not repeatedly execute firmware upgrading to cause unnecessary expenses.

Optionally, after step 201, the method for upgrading a bluetooth peripheral provided by the embodiment of the present application may further include step 210 described below.

210. And when the terminal equipment is shut down or restarted, the firmware upgrading mark is cancelled.

For the description of canceling the firmware upgrade flag, reference may be made to the description of canceling the firmware upgrade flag in step 209, which is not described herein again.

Illustratively, the terminal device may cancel the firmware upgrade flag after determining that the bluetooth peripheral is upgraded successfully; the firmware upgrading mark can also be cancelled when the terminal equipment is shut down or restarted; the method can be determined according to actual use requirements, and the embodiment of the application is not limited.

Optionally, in this embodiment of the application, the terminal device may control to cancel the firmware upgrade flag through the upgrade module 111, or through the upgrade module 111 and the system attribute module 113; the firmware upgrading mark can also be controlled to be cancelled through the Bluetooth remote controller module 112; the firmware upgrading mark can be controlled to be cancelled through other modules, and the firmware upgrading mark can be determined according to actual use requirements, and the embodiment of the application is not limited.

In the embodiment of the application, the firmware upgrading mark is cancelled, so that the terminal equipment can be ensured not to repeatedly send the target firmware to the Bluetooth equipment, and therefore, the Bluetooth peripheral equipment can not repeatedly execute firmware upgrading to cause unnecessary expenses.

Optionally, if the terminal device is powered off or restarted when the target firmware is not completely sent, and the firmware upgrade flag is cancelled, the terminal device may set an upgrade flag corresponding to the unsent firmware when the terminal device is powered on next time, and continue to send the unsent firmware to the bluetooth peripheral device according to the upgrade flag, so that the bluetooth peripheral device executes firmware upgrade.

Illustratively, after the step 210, the bluetooth peripheral upgrading method provided by the embodiment of the present application may further include the following steps 211 to 212.

211. And if the terminal equipment is determined to be the terminal equipment which is not started for the first time after updating the firmware corresponding to the Bluetooth peripheral equipment and part of the firmware in the target firmware is not sent to the Bluetooth peripheral equipment, setting an upgrading mark corresponding to the part of the firmware.

212. And if the terminal equipment detects the Bluetooth peripheral equipment and detects the upgrading mark, sending the part of firmware to the Bluetooth peripheral equipment so as to enable the Bluetooth peripheral equipment to execute firmware upgrading.

The description of the upgrade flag may refer to the above description of the firmware upgrade flag, which is not repeated herein. And when the terminal equipment is shut down or restarted, the upgrading mark is cancelled.

In the embodiment of the application, if the terminal device is powered off or restarted and the firmware upgrading flag is cancelled when the target firmware is not sent completely, the upgrading flag of the unsent part of the firmware is set when the terminal device is powered on next time, and part of the firmware is sent to the Bluetooth peripheral equipment according to the upgrading flag, so that the Bluetooth peripheral equipment executes firmware upgrading, the target firmware can be guaranteed to be sent completely, and the Bluetooth peripheral equipment can be guaranteed to finish firmware upgrading.

Optionally, in this embodiment of the application, the firmware upgrade flag may not be cancelled, and when it is determined that the terminal device is powered on for the first time after updating the firmware corresponding to the bluetooth peripheral, the firmware upgrade flag is updated, so that the firmware upgrade flag corresponds to the newly updated firmware. Under the condition, if the terminal device detects the Bluetooth peripheral to be connected, detects a firmware upgrading mark and determines that the connection with the Bluetooth peripheral is the first connection after the target firmware is updated, the target firmware is sent to the Bluetooth peripheral so that the Bluetooth peripheral executes firmware upgrading; if the connection with the Bluetooth peripheral is determined not to be the first connection after the target firmware is updated, the target firmware is not sent to the Bluetooth peripheral, namely the Bluetooth peripheral does not need firmware upgrade.

Optionally, in step 202, specifically, when the remaining power of the terminal device is greater than a preset threshold (the preset threshold may be determined according to an actual usage requirement, and is not limited in this embodiment), if a bluetooth peripheral is detected and a firmware upgrade flag is detected, the target firmware is sent to the bluetooth peripheral, so that the bluetooth peripheral executes firmware upgrade; in other cases, if the Bluetooth peripheral is detected and the firmware upgrading mark is detected, the target firmware is sent to the Bluetooth peripheral so that the Bluetooth peripheral executes firmware upgrading; the method can be determined according to actual use requirements, and the embodiment of the application is not limited.

Exemplarily, as shown in fig. 3, based on fig. 1C, taking the terminal device as a television and the bluetooth external device as a bluetooth remote controller as an example, the method for upgrading the bluetooth external device provided in the embodiment of the present application may be specifically implemented through the following steps 301 to 315.

301. The television is in normal operation.

302. And the upgrading module of the television detects that the upgrading is needed and finishes downloading the upgrading package.

303. And the television carries out installation of the upgrade package through the recovery module.

And in the process of upgrading the television, the television is upgraded, and besides the upgrading and updating of the television, the updating of the Bluetooth remote controller firmware in the television is also included (the updated Bluetooth remote controller firmware is the target firmware).

304. And (5) restarting the television.

305. The television is turned on.

306. The television determines whether the pairing with the bluetooth peripheral was successful.

If yes, step 307 described below is performed, and if no, step 313 described below is performed.

307. The upgrading module of the television determines whether the television is started for the first time after being upgraded.

If yes, go to step 308, described below, and if no, the upgrade module of the tv does not write the firmware upgrade flag in the system attribute module.

308. And the upgrading module of the television writes a firmware upgrading mark in the system attribute module.

309. The bluetooth remote controller module of the television reads the firmware upgrade flag from the system attribute module.

310. And when detecting the firmware upgrading mark, the Bluetooth remote controller module of the television sends the target firmware to the Bluetooth remote controller so that the Bluetooth remote controller executes firmware upgrading.

After the bluetooth remote controller upgrade is completed, the following step 311 is performed.

311. The television automatically returns to the Bluetooth remote controller.

312. The television normally runs, and the Bluetooth remote controller is normally used.

313. The television is paired with the Bluetooth remote controller.

May include starting pairing, which is successful.

314. The television detects whether the target firmware is present at a particular location in the television.

The version of the target firmware is different from the version of the corresponding firmware in the bluetooth remote control. And the television detects the version of the target firmware, receives the version of the corresponding firmware in the Bluetooth remote controller from the Bluetooth remote controller, compares the two versions, if the two versions are different, the target firmware to be upgraded exists, and if the two versions are the same, the target firmware to be upgraded does not exist.

If it is detected that the target firmware exists in a specific location in the television, the following step 315 is performed, otherwise, the following step 312 is performed.

315. And the Bluetooth remote controller module of the television sends the target firmware to the Bluetooth remote controller so that the Bluetooth remote controller executes firmware upgrading.

After the upgrade is complete, step 312 is performed.

Based on fig. 1C and fig. 3, in the embodiment of the present application, through the combination of the upgrade module, the system attribute module, and the bluetooth remote controller module, the bluetooth remote controller can update the firmware (upgrade firmware) in time after the system is upgraded, so that the firmware of the bluetooth remote controller with the major problem repaired can be synchronized to the bluetooth remote controller in the user's hand in time, thereby greatly improving the user experience and facilitating the television developer to repair the problem.

Fig. 4 is a block diagram of a bluetooth peripheral upgrading apparatus according to an embodiment of the present disclosure, where the bluetooth peripheral upgrading apparatus may be the terminal device, a functional module and/or a functional entity capable of implementing the bluetooth peripheral upgrading method in the terminal device, or another apparatus, and the embodiment of the present disclosure is not limited. As shown in fig. 4, the bluetooth peripheral upgrading apparatus includes: a setting module 401 and a sending module 402; the setting module 401 is configured to set a firmware upgrade flag corresponding to an updated target firmware if it is determined that the terminal device is started up for the first time after updating the firmware corresponding to the bluetooth peripheral; the sending module 402 is configured to send the target firmware to the bluetooth peripheral device if the bluetooth peripheral device is detected and the firmware upgrade flag is detected, so that the bluetooth peripheral device executes firmware upgrade.

Optionally, the bluetooth peripheral upgrading apparatus further includes: a cancellation module; the cancellation module is configured to, after setting a firmware upgrade flag corresponding to the updated target firmware, cancel the firmware upgrade flag when it is determined that the target firmware is completely sent.

Optionally, the bluetooth peripheral upgrading apparatus further includes: a cancellation module; the cancelling module is configured to cancel the firmware upgrade flag when the terminal device is powered off or restarted after the firmware upgrade flag corresponding to the updated target firmware is set.

Optionally, the setting module 401 is further configured to, after the cancelling module cancels the firmware upgrade flag when the terminal device is powered off or restarted, set an upgrade flag corresponding to a part of firmware if it is determined that the terminal device is not powered on for the first time after the firmware corresponding to the bluetooth peripheral is updated, and the part of firmware in the target firmware is not sent to the bluetooth peripheral; the sending module 402 is further configured to send the part of firmware to the bluetooth peripheral device if the bluetooth peripheral device is detected and the upgrade flag is detected, so that the bluetooth peripheral device executes firmware upgrade.

Optionally, the sending module 402 is specifically configured to determine whether the bluetooth peripheral device is successfully paired with the bluetooth peripheral device once if the bluetooth peripheral device to be connected is detected and the firmware upgrade flag is detected; and if the target firmware is successfully paired with the Bluetooth peripheral, sending the target firmware to the Bluetooth peripheral.

Optionally, the bluetooth peripheral upgrading apparatus further includes: connecting the modules back; the back connection module is used for back connection with the Bluetooth peripheral after the target firmware is sent to the Bluetooth peripheral.

Optionally, the bluetooth peripheral upgrading apparatus further includes: a processing module; the processing module is used for pairing with the Bluetooth peripheral after determining whether the Bluetooth peripheral is successfully paired once or not, and if the Bluetooth peripheral is not successfully paired, the processing module is used for pairing with the Bluetooth peripheral and sending the target firmware to the Bluetooth peripheral after the pairing is successful so that the Bluetooth peripheral executes firmware upgrading.

Optionally, the bluetooth peripheral upgrading apparatus further includes: a determination module; the determining module is used for determining whether the terminal equipment is successfully paired with the Bluetooth peripheral before a firmware upgrading mark corresponding to an updated target firmware is set if the terminal equipment is started for the first time after the firmware corresponding to the Bluetooth peripheral is updated; and if the terminal equipment is successfully paired with the Bluetooth peripheral equipment, determining whether the terminal equipment is started for the first time after the firmware corresponding to the Bluetooth peripheral equipment is updated.

Optionally, the bluetooth peripheral upgrading apparatus further includes: connecting the modules back; the back connection module is used for carrying out back connection with the Bluetooth peripheral after the target firmware is sent to the Bluetooth peripheral; or the reconnection module is configured to perform reconnection with the bluetooth peripheral if the terminal device is determined not to be started for the first time after the firmware corresponding to the bluetooth peripheral is updated by the terminal device is determined to be started for the first time.

Optionally, the bluetooth peripheral upgrading apparatus further includes: a processing module; the processing module is used for pairing with the Bluetooth peripheral after determining whether the Bluetooth peripheral is successfully paired once or not, if the Bluetooth peripheral is not successfully paired, the processing module is used for pairing with the Bluetooth peripheral, and after the pairing is successful, if the terminal equipment is detected to have target firmware different from the current firmware version of the Bluetooth peripheral, the target firmware is sent to the Bluetooth peripheral so that the Bluetooth peripheral executes firmware upgrading.

Optionally, the sending module 402 is specifically configured to send the target firmware to the bluetooth peripheral if it is detected that the bluetooth peripheral is in an idle state and the firmware upgrade flag is detected.

In this embodiment of the application, each module may implement the bluetooth peripheral upgrading method provided by the foregoing method embodiment, and may achieve the same technical effect, and for avoiding repetition, details are not repeated here.

Fig. 5 is a schematic diagram of a hardware structure of a television for implementing various embodiments of the present application, as shown in fig. 5, the television includes, but is not limited to: a Radio Frequency (RF) circuit 501, a memory 502, a processor 503, a display unit 504, an audio circuit 505, a wireless fidelity (WiFi) module 506, a bluetooth module 507, and the like. Among other things, the RF circuit 501 includes a receiver 5011 and a transmitter 5012. Those skilled in the art will appreciate that the television architecture shown in fig. 5 does not constitute a limitation of the television, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.

The RF circuit 501 may be used to transmit and receive information. Including, for example, receiving information from a bluetooth peripheral, and transmitting information to a bluetooth peripheral, etc. In general, RF circuit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. Further, the RF circuit 501 may also receive a video signal, an audio signal, and the like from a network or other devices through wireless communication, wired communication, or the like.

The memory 502 may be used to store software programs and modules, and the processor 503 executes various functional applications and data processing of the television by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, a video playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the television, etc. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

The processor 503 is a control center of the tv, connects various parts of the whole tv by using various interfaces and lines, and performs various functions of the tv and processes data by running or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the tv. Alternatively, the processor 503 may include one or more processing units; the processor 503 may integrate an application processor, which mainly handles operating systems and application programs, etc., and a modem processor, which mainly handles wireless communications (e.g., audio-video signals). It will be appreciated that the modem processor described above may not be integrated into the processor 503.

The display unit 504 may be used to display information input by the bluetooth peripheral or information provided to the user and various menus of the television. The display unit 504 may include a display panel 5041, and optionally, the display panel 5041 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting diode (OLED), or the like.

The audio circuit 505 includes a speaker 5051 and a microphone 5052. The audio circuit 505 can transmit the electrical signal converted from the received audio data to the speaker 5051, and the electrical signal is converted into a sound signal by the speaker 5051 and is output; on the other hand, the microphone 5052 converts the collected sound signal into an electric signal, receives it by the audio circuit 505, converts it into audio data, processes it by the audio data output processor 503, and outputs it to the memory 502 for further processing.

WiFi belongs to short-distance wireless transmission technology, and the television can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 506, and wireless broadband internet access is provided for the user. Although fig. 5 shows the WiFi module 506, it is understood that it does not belong to the essential constitution of the television, and may be omitted entirely as needed within the scope not changing the essence of the invention.

Bluetooth module 507 can be used to pair through the bluetooth with the bluetooth peripheral hardware and carry out the bluetooth and be connected, and the bluetooth peripheral hardware can be bluetooth remote controller, bluetooth speaker, bluetooth headset etc. and this application embodiment does not do the restriction. For different bluetooth peripherals, the bluetooth module 507 includes a corresponding bluetooth peripheral module, for example, for a bluetooth remote controller, the bluetooth module 507 includes a bluetooth remote controller module. The bluetooth module 507 may also be used for bluetooth connection with other devices (such as a mobile phone, a television, etc.), which is not described herein again.

The television may further include other modules and the like, and the embodiment of the present application is not limited.

In this embodiment, the processor 503 is configured to set a firmware upgrade flag corresponding to an updated target firmware if it is determined that the terminal device is started up for the first time after updating the firmware corresponding to the bluetooth peripheral; and if the Bluetooth peripheral is detected and the firmware upgrading mark is detected, sending the target firmware to the Bluetooth peripheral so as to enable the Bluetooth peripheral to execute firmware upgrading.

Optionally, the processor 503 is further configured to cancel the firmware upgrade flag when it is determined that the target firmware transmission is completed after the firmware upgrade flag corresponding to the updated target firmware is set.

Optionally, the processor 503 is further configured to cancel the firmware upgrade flag when the terminal device is powered off or restarted after the firmware upgrade flag corresponding to the updated target firmware is set.

Optionally, the processor 503 is further configured to, after the firmware upgrade flag is cancelled when the terminal device is powered off or restarted, set an upgrade flag corresponding to a part of firmware if it is determined that the terminal device is not powered on for the first time after the firmware corresponding to the bluetooth peripheral is updated and the part of firmware in the target firmware is not sent to the bluetooth peripheral; and if the Bluetooth peripheral is detected and the upgrading mark is detected, sending the part of firmware to the Bluetooth peripheral so as to enable the Bluetooth peripheral to execute firmware upgrading.

Optionally, the processor 503 is specifically configured to determine whether the bluetooth peripheral device is successfully paired with the bluetooth peripheral device once if the bluetooth peripheral device to be connected is detected and the firmware upgrade flag is detected; and if the target firmware is successfully paired with the Bluetooth peripheral, sending the target firmware to the Bluetooth peripheral.

Optionally, the processor 503 is further configured to loop back with the bluetooth peripheral after sending the target firmware to the bluetooth peripheral.

Optionally, the processor 503 is further configured to, after determining whether the pairing with the bluetooth peripheral device has been successful, if it is determined that the pairing with the bluetooth peripheral device has not been successful, perform pairing with the bluetooth peripheral device, and after the pairing is successful, send the target firmware to the bluetooth peripheral device, so that the bluetooth peripheral device performs firmware upgrade.

Optionally, the processor 503 is further configured to determine whether the pairing with the bluetooth peripheral is successful before setting a firmware upgrade flag corresponding to an updated target firmware if it is determined that the terminal device is turned on for the first time after updating the firmware corresponding to the bluetooth peripheral; and if the terminal equipment is successfully paired with the Bluetooth peripheral equipment, determining whether the terminal equipment is started for the first time after the firmware corresponding to the Bluetooth peripheral equipment is updated.

Optionally, the processor 503 is further configured to perform a loop connection with the bluetooth peripheral after determining that the terminal device is powered on for the first time after updating the firmware corresponding to the bluetooth peripheral and sending the target firmware to the bluetooth peripheral.

Optionally, the processor 503 is further configured to, after determining whether the terminal device is powered on for the first time after updating the firmware corresponding to the bluetooth peripheral, perform a loopback with the bluetooth peripheral if the terminal device is not powered on for the first time after updating the firmware corresponding to the bluetooth peripheral.

Optionally, the processor 503 is further configured to, after determining whether the pairing with the bluetooth peripheral has been successful, if the pairing with the bluetooth peripheral has not been successful, perform pairing with the bluetooth peripheral, and after the pairing is successful, if it is detected that a target firmware different from a current firmware version of the bluetooth peripheral exists in the terminal device, send the target firmware to the bluetooth peripheral, so that the bluetooth peripheral executes firmware upgrade.

Optionally, the processor 503 is specifically configured to send the target firmware to the bluetooth peripheral if it is detected that the bluetooth peripheral is in an idle state and the firmware upgrade flag is detected.

The beneficial effects of the various implementation manners in this embodiment may specifically refer to the beneficial effects of the corresponding implementation manners in the above embodiment of the bluetooth peripheral upgrading method, and are not described herein again to avoid repetition.

An embodiment of the present application further provides a terminal device, where the terminal device may include: the processor, the memory, and the program or the instruction stored in the memory and capable of running on the processor, when being executed by the processor, the program or the instruction can implement each process of the bluetooth peripheral upgrading method provided by the above method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.

The embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the bluetooth peripheral upgrading method provided in the foregoing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.

The embodiment of the present application further provides a computer program product, where the computer program product includes a computer instruction, and when the computer program product runs on a processor, the processor executes the computer instruction, so as to implement each process of the bluetooth peripheral upgrading method provided in the foregoing method embodiment, and achieve the same technical effect, and in order to avoid repetition, details are not repeated here.

The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, the processor is configured to run a program or an instruction, implement each process of the above-mentioned bluetooth peripheral upgrading method embodiment, and can achieve the same technical effect, and for avoiding repetition, the details are not repeated here.

It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.

In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, server and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:管理回放组

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类