CN112948007B - Initialization method and device of Bluetooth sound box and Bluetooth sound box - Google Patents

Initialization method and device of Bluetooth sound box and Bluetooth sound box Download PDF

Info

Publication number
CN112948007B
CN112948007B CN202110142727.3A CN202110142727A CN112948007B CN 112948007 B CN112948007 B CN 112948007B CN 202110142727 A CN202110142727 A CN 202110142727A CN 112948007 B CN112948007 B CN 112948007B
Authority
CN
China
Prior art keywords
bluetooth
configuration information
sound box
host equipment
host
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
CN202110142727.3A
Other languages
Chinese (zh)
Other versions
CN112948007A (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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202110142727.3A priority Critical patent/CN112948007B/en
Publication of CN112948007A publication Critical patent/CN112948007A/en
Application granted granted Critical
Publication of CN112948007B publication Critical patent/CN112948007B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses an initialization method of a Bluetooth sound box, which comprises the steps of firstly establishing a corresponding relation between configuration information in the Bluetooth sound box and host equipment, firstly determining host equipment to be connected after a subsequent Bluetooth sound box is started, determining corresponding configuration information of the host equipment to be connected based on the corresponding relation, and only loading the corresponding configuration information of the host equipment to be connected to initialize the Bluetooth function corresponding to the loaded configuration information. Therefore, by adopting the initialization mode, the Bluetooth sound box does not need to load all configuration information every time, all Bluetooth functions are initialized, resources of the Bluetooth sound box are saved, abnormal conditions such as communication interruption and noise caused by fewer resources of the Bluetooth sound box are reduced, and the working reliability of the Bluetooth sound box is improved. The invention also discloses an initializing device of the Bluetooth sound box and the Bluetooth sound box, which have the same beneficial effects as the initializing method of the Bluetooth sound box.

Description

Initialization method and device of Bluetooth sound box and Bluetooth sound box
Technical Field
The present invention relates to the field of bluetooth devices, and in particular, to a method and apparatus for initializing a bluetooth speaker, and a bluetooth speaker.
Background
The Bluetooth function supported by the Bluetooth sound box after leaving the factory is determined. In the prior art, a bluetooth speaker will load all bluetooth functions supported by the bluetooth speaker after the bluetooth speaker is powered on, so as to initialize the bluetooth functions corresponding to the configuration information. However, a host device connected with the bluetooth speaker, such as a mobile phone, may not support a certain bluetooth function or certain bluetooth functions of the bluetooth speaker, for example, the host device does not support a phone book transmission function, so that the corresponding bluetooth function is not used in the connection, which causes waste of resources of the bluetooth speaker, and may cause communication interruption, noise and other anomalies when the remaining resources of the bluetooth speaker are less, thereby reducing the working reliability of the bluetooth speaker.
Disclosure of Invention
The invention aims to provide a method and a device for initializing a Bluetooth sound box and the Bluetooth sound box, which save the resources of the Bluetooth sound box, reduce the occurrence of abnormal conditions such as communication interruption and noise caused by fewer resources of the Bluetooth sound box and improve the working reliability of the Bluetooth sound box.
In order to solve the technical problems, the invention provides an initialization method of a Bluetooth sound box, which comprises the following steps:
pre-establishing a corresponding relation between configuration information in the Bluetooth sound box and host equipment;
when the Bluetooth sound box is started, determining host equipment to be connected;
determining corresponding configuration information of the host equipment to be connected based on the corresponding relation between the host equipment to be connected and the corresponding relation;
and loading the determined configuration information to initialize the Bluetooth function corresponding to the loaded configuration information.
Preferably, pre-establishing a correspondence between the host device and configuration information in the bluetooth speaker includes:
after the Bluetooth sound box is started to initialize an initial Bluetooth function, if a pairing instruction sent by host equipment is received, a supported Bluetooth function inquiry instruction is sent to the host equipment;
determining Bluetooth functions supported by the host equipment based on a reply instruction returned by the host equipment;
and determining the host device to correspondingly configure information based on the determined Bluetooth function.
Preferably, determining the host device to correspondingly configure information based on the determined bluetooth function includes:
judging whether the determined Bluetooth function is completely initialized;
if all the configuration information is initialized, the configuration information is connected with the host equipment in a pairing mode, and the determined configuration information corresponding to the Bluetooth function is determined to be the configuration information corresponding to the host equipment;
if not, judging whether the uninitialized Bluetooth function in the determined Bluetooth functions is supported by the Bluetooth sound box;
if supported by the Bluetooth sound box, loading configuration information corresponding to the uninitialized Bluetooth function in the determined Bluetooth functions, carrying out pairing connection with the host equipment, and determining the configuration information corresponding to the determined Bluetooth function as configuration information corresponding to the host equipment;
and if the Bluetooth sound box is not supported by the Bluetooth sound box, carrying out pairing connection with the host equipment, and determining the configuration information corresponding to the initialized Bluetooth function in the determined Bluetooth functions as the configuration information corresponding to the host equipment.
Preferably, after determining the host device to configure the information accordingly based on the determined bluetooth function, the method further includes:
correspondingly storing configuration information of the host equipment into a configuration file;
and establishing a corresponding relation between the configuration file and the host equipment.
Preferably, before determining the host device to be connected, the method further includes:
judging whether the host device is paired with the host device;
if yes, entering a step of determining the host equipment to be connected;
if not, loading configuration information corresponding to all Bluetooth functions supported by the Bluetooth sound box so as to initialize the Bluetooth functions corresponding to the loaded configuration information;
determining a host device to be connected, comprising:
a host device to be connected is determined from the paired host devices.
Preferably, the attribute of the configuration file includes an identification of the host device and a timestamp for recording a connection time with the host device;
after the pairing connection with the host device, the method further comprises:
updating a timestamp in an attribute of a configuration file corresponding to a host device connected with the Bluetooth sound box;
determining a host device to be connected from the paired host devices, comprising:
judging whether the paired host equipment has only one;
if yes, determining the paired host equipment as the host equipment to be connected;
if not, determining the host equipment corresponding to the configuration file with the timestamp closest to the current time as the host equipment to be connected.
Preferably, after initializing the bluetooth function corresponding to the loaded configuration information, the method further comprises:
after receiving a first reconnection instruction sent by a reconnection host device, determining configuration information corresponding to the reconnection host device based on the correspondence;
judging whether the loaded configuration information comprises all configuration information corresponding to the back connection host equipment;
if so, carrying out reconnection connection with the reconnection host equipment;
and if the configuration information does not include the configuration information, loading the configuration information which is not loaded in the configuration information corresponding to the reconnection host equipment, and performing reconnection with the reconnection host equipment.
Preferably, after initializing the bluetooth function corresponding to the loaded configuration information, the method further comprises:
and when the reconnection condition is met, sending a second reconnection instruction to the host equipment to be connected.
In order to solve the technical problem, the invention also provides an initializing device of the Bluetooth sound box, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the initialization method of the Bluetooth sound box when executing the computer program.
In order to solve the technical problems, the invention also provides a Bluetooth sound box, which comprises the initializing device of the Bluetooth sound box.
The invention provides an initialization method of a Bluetooth sound box, which comprises the steps of firstly establishing a corresponding relation between configuration information in the Bluetooth sound box and host equipment, firstly determining host equipment to be connected after a subsequent Bluetooth sound box is started, determining corresponding configuration information of the host equipment to be connected based on the corresponding relation, and only loading the corresponding configuration information of the host equipment to be connected to initialize the Bluetooth function corresponding to the loaded configuration information. Therefore, by adopting the initialization mode, the Bluetooth sound box does not need to load all configuration information every time, all Bluetooth functions are initialized, resources of the Bluetooth sound box are saved, abnormal conditions such as communication interruption and noise caused by fewer resources of the Bluetooth sound box are reduced, and the working reliability of the Bluetooth sound box is improved.
The invention also provides an initializing device of the Bluetooth sound box and the Bluetooth sound box, which have the same beneficial effects as the initializing method of the Bluetooth sound box.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a process flow chart of an initialization method of a bluetooth speaker provided by the invention;
fig. 2 is a schematic structural diagram of an initializing device for a bluetooth speaker according to the present invention.
Detailed Description
The core of the invention is to provide an initialization method and device of a Bluetooth sound box and the Bluetooth sound box, so that the resources of the Bluetooth sound box are saved, the occurrence of abnormal conditions such as communication interruption and noise caused by fewer resources of the Bluetooth sound box is reduced, and the working reliability of the Bluetooth sound box is improved.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a process flow chart of an initialization method of a bluetooth speaker according to the present invention.
The method comprises the following steps:
s11: pre-establishing a corresponding relation between configuration information in a Bluetooth sound box and host equipment;
s12: when the Bluetooth sound box is started, determining host equipment to be connected;
s13: determining corresponding configuration information of the host equipment to be connected based on the host equipment to be connected and the corresponding relation;
s14: and loading the determined configuration information to initialize the Bluetooth function corresponding to the loaded configuration information.
The bluetooth speaker is built with configuration information of all bluetooth functions supported by the bluetooth speaker when leaving the factory, such as configuration information of audio frequency transmission of host equipment, configuration information of sound size of the bluetooth speaker controlled by the host equipment, configuration information of telephone book transmission of the host equipment to the bluetooth speaker, and the like. Furthermore, the applicant considers that the bluetooth functions supported by different host devices are also different from bluetooth speaker, for example, a host device supports bluetooth functions that transmit a phonebook to a bluetooth speaker, and some host devices do not support. Therefore, in the prior art, if all configuration information is loaded when the Bluetooth sound box is started, all Bluetooth functions are initialized, and after the Bluetooth sound box is connected with host equipment, the situation that some Bluetooth functions are not used all the time can occur, so that the waste of Bluetooth sound box resources is caused.
To solve this problem, in the present application, it is considered that bluetooth functions between bluetooth speakers and the bluetooth devices supported by different host apparatuses are different, that is, configuration information is different corresponding to bluetooth functions between bluetooth speakers and the bluetooth devices supported by different host apparatuses. For example, the bluetooth speaker includes configuration information 1, configuration information 2 … and configuration information 6, the configuration information of the host device 1 is configuration information 1, configuration information 2 and configuration information 3, the configuration information of the host device 2 is configuration information 1, configuration information 2, configuration information 4 and configuration information 6, and the configuration information of the host device 3 is configuration information 1, configuration information 2 … and configuration information 6. The corresponding relation between the configuration information in the Bluetooth sound box and different host devices can be established firstly, so that when the Bluetooth sound box is started, the host device to be connected is determined, the corresponding configuration information of the host device to be connected is determined based on the host device to be connected and the corresponding relation, and only the corresponding configuration information of the host device to be connected is needed to be loaded subsequently, so that the loaded configuration information corresponds to the Bluetooth function.
Specifically, in practical application, the bluetooth speaker may first purposely establish a pairing connection with each host device, so as to acquire bluetooth functions supported by each host device, and further determine corresponding configuration information of each host device, so that loading is directly invoked in a subsequent use process. The connection with each host device is not specially established, but the configuration information corresponding to the host device is determined when the Bluetooth sound box is first paired with a certain host device in the normal use process of the Bluetooth sound box, so that loading is directly invoked in the subsequent use process. Which mode is adopted specifically depends on the actual situation.
The host device may be a mobile phone, a bracelet, or the like, which is not particularly limited herein.
Therefore, by adopting the initialization mode, the Bluetooth sound box does not need to load all configuration information every time, all Bluetooth functions are initialized, resources of the Bluetooth sound box are saved, abnormal conditions such as communication interruption and noise caused by fewer resources of the Bluetooth sound box are reduced, and the working reliability of the Bluetooth sound box is improved.
Based on the above embodiments:
as a preferred embodiment, pre-establishing a correspondence between configuration information in a bluetooth speaker and a host device includes:
after the Bluetooth sound box is started to initialize an initial Bluetooth function, if a pairing instruction sent by host equipment is received, a supported Bluetooth function inquiry instruction is sent to the host equipment;
determining Bluetooth functions supported by the host equipment based on the reply instruction returned by the host equipment;
the host device is determined to correspondingly configure information based on the determined bluetooth function.
It should be noted that, the bluetooth speaker must load configuration information and initialize bluetooth functions corresponding to the loaded configuration information at the beginning, where if the bluetooth speaker is not already paired with the host device, the initial bluetooth functions herein refer to all bluetooth functions supported by the bluetooth speaker; if the bluetooth speaker is paired with the host device, the initial bluetooth function may be a bluetooth function corresponding to the host device to be connected, which is determined when the host device is powered on.
After the Bluetooth sound box is started to initialize an initial Bluetooth function, if a certain host device is to be connected with the Bluetooth sound box and the host device is to be connected with the Bluetooth sound box for the first time, the host device sends a pairing instruction to the Bluetooth sound box, if the Bluetooth sound box receives the pairing instruction sent by the host device, the Bluetooth sound box sends a supported Bluetooth function inquiry instruction to the host device so as to inquire the Bluetooth function supported by the host device between the host device and the Bluetooth sound box, the host device sends a reply instruction to the Bluetooth sound box after receiving the supported Bluetooth function inquiry instruction, the Bluetooth sound box determines the Bluetooth function supported by the host device based on the reply instruction, and finally, the host device correspondingly configures information based on the determined Bluetooth function.
Therefore, when the Bluetooth sound box is connected with the host equipment in a primary pairing mode, the corresponding configuration information of the host equipment can be determined, and then when the host equipment to be connected of the Bluetooth sound box is the host equipment, the corresponding configuration information of the host equipment can be directly called to load, so that resources of the Bluetooth sound box are saved, abnormal conditions such as communication interruption and noise caused by fewer resources of the Bluetooth sound box are reduced, and the working reliability of the Bluetooth sound box is improved.
In addition, it should be noted that in the prior art, if the host device is connected with the bluetooth speaker for the first time, the host device needs to send a pairing instruction to the bluetooth speaker generally, and the host device is connected with the bluetooth speaker again next time in a back connection manner generally, so that the host device does not need to pair again.
As a preferred embodiment, determining host device corresponding configuration information based on the determined bluetooth function includes:
judging whether the determined Bluetooth function is completely initialized;
if all the configuration information is initialized, the configuration information is connected with the host equipment in a pairing mode, and the determined configuration information corresponding to the Bluetooth function is determined to be the configuration information corresponding to the host equipment;
if not, judging whether the uninitialized Bluetooth function in the determined Bluetooth functions is supported by the Bluetooth sound box;
if supported by the Bluetooth sound box, loading configuration information corresponding to the uninitialized Bluetooth function in the determined Bluetooth functions, carrying out pairing connection with the host equipment, and determining the configuration information corresponding to the determined Bluetooth function as configuration information corresponding to the host equipment;
if the Bluetooth sound box is not supported by the Bluetooth sound box, the Bluetooth sound box is connected with the host equipment in a pairing mode, and the configuration information corresponding to the initialized Bluetooth function in the determined Bluetooth functions is determined as the configuration information corresponding to the host equipment.
Specifically, after determining the bluetooth function supported by the host device to be paired, considering that the bluetooth speaker has initialized the initial bluetooth function when being powered on, in order to ensure the normal operation of the bluetooth function between the two after being connected with the host device to be paired, it is necessary to first determine whether the bluetooth function supported by the host device is completely initialized, if so, pair-connect with the host device, and determine the configuration information corresponding to the determined bluetooth function as the configuration information corresponding to the host device. If not all initialized (for example, when initializing the initial bluetooth function, it may be the bluetooth function initialized by other host devices last time (instead of all bluetooth functions of the sound box)), judging whether the uninitialized bluetooth function in the determined bluetooth functions is supported by the bluetooth sound box, if so, loading configuration information corresponding to the uninitialized bluetooth function in the determined bluetooth functions, performing pairing connection with the host device, and determining the configuration information corresponding to the determined bluetooth function as configuration information corresponding to the host device. If the Bluetooth sound box is not supported by the Bluetooth sound box, the Bluetooth sound box is connected with the host equipment in a pairing mode, and the configuration information corresponding to the initialized Bluetooth function in the determined Bluetooth functions is determined as the configuration information corresponding to the host equipment.
Therefore, in the application, after determining the bluetooth function supported by the host device to be connected in a pairing manner, the bluetooth function supported by the bluetooth speaker can be selected from the bluetooth functions, and finally, the configuration information corresponding to the bluetooth function supported by both the bluetooth speaker and the host device is determined as the configuration information corresponding to the host device, and the pairing connection between the bluetooth speaker and the host device is established. Based on this, follow-up when the host computer equipment that waits to connect of bluetooth speaker is this host computer equipment, alright direct call this host computer equipment corresponds configuration information and carries out the loading, has saved bluetooth speaker's resource, has reduced the emergence of abnormal conditions such as communication interruption, noise that lead to because bluetooth speaker resource is less, has improved bluetooth speaker's operational reliability.
As a preferred embodiment, after determining the host device corresponding configuration information based on the determined bluetooth function, further comprising:
correspondingly storing configuration information of the host equipment into a configuration file;
and establishing a corresponding relation between the configuration file and the host equipment.
In this application, the configuration information corresponding to each host device may be saved in a configuration file, that is, one configuration file corresponding to each host device, so as to establish a correspondence between the configuration file and the host device. And in the subsequent use process, after the host equipment to be connected is determined, calling the configuration file corresponding to the host equipment to be connected, and loading each piece of configuration information corresponding to the host equipment. Therefore, the method is convenient for calling and loading the corresponding configuration information of each host, and improves the initialization efficiency of the Bluetooth sound box.
In addition, considering that the bluetooth speaker sometimes needs to load all configuration information, all the configuration information in the bluetooth speaker may also be separately placed in one configuration file, for example, may be named as a full configuration file.
As a preferred embodiment, before determining the host device to be connected, further comprising:
judging whether the host device is paired with the host device;
if yes, entering a step of determining the host equipment to be connected;
if not, loading the corresponding configuration information of all the Bluetooth functions supported by the Bluetooth sound box so as to initialize the Bluetooth functions corresponding to the loaded configuration information;
determining a host device to be connected, comprising:
a host device to be connected is determined from the paired host devices.
Specifically, when the bluetooth speaker is powered on, since configuration information is to be loaded to initialize bluetooth functions, the bluetooth speaker may be paired with the host device or may not be paired with the host device, where paired refers to that some pairing information of the bluetooth speaker when previously paired with the host device is stored in the bluetooth speaker, if the bluetooth speaker is paired with the host device, the host device to be connected may be determined from the paired host devices, and if the bluetooth speaker is not paired with the host device, the bluetooth speaker may be connected with any host device, so as to ensure effective connection with each host device, and at this time, configuration information corresponding to all bluetooth functions supported by the bluetooth speaker is directly loaded to initialize bluetooth functions corresponding to the loaded configuration information.
As a preferred embodiment, the attributes of the configuration file include an identification of the host device and a timestamp for recording the connection time with the host device;
after the pairing connection with the host device, the method further comprises:
updating a timestamp in an attribute of a configuration file corresponding to a host device connected with the Bluetooth sound box;
determining a host device to be connected from the paired host devices, comprising:
judging whether the paired host equipment has only one;
if yes, determining the paired host equipment as the host equipment to be connected;
if not, determining the host equipment corresponding to the configuration file with the timestamp closest to the current time as the host equipment to be connected.
Specifically, in order to establish a correspondence between the host device and the configuration file, the attribute of the configuration file may include an identifier of the host device, where the identifier is used to uniquely indicate the host device, and the identifier may, but is not limited to, a bluetooth MAC address of the host device, and in practical application, the name of the configuration file may include a bluetooth MAC address of the host device corresponding to the identifier.
In addition, in consideration of the fact that the bluetooth speaker has a high probability of being connected to the recently connected host device after the bluetooth speaker is powered on, in the present application, the configuration file further includes a timestamp for recording the connection time with the host device. The name of the configuration file may specifically be bluetooth MAC address_timestamp of the host device xml, and the name of the total configuration file may be whole_availability.
Each time a bluetooth speaker is connected to a host device, the bluetooth speaker updates the timestamp of the host device, wherein the connection pairs connect and connect back. When the Bluetooth sound box is started, if the Bluetooth sound box is paired with the host equipment, judging whether the number of the paired host equipment is 1, if so, directly determining that the paired host equipment is the host equipment to be connected, otherwise, determining that the host equipment corresponding to the configuration file with the timestamp closest to the current time is the host equipment to be connected.
Therefore, the method for determining the to-be-connected host equipment has high accuracy, and only the corresponding configuration information of the to-be-connected host equipment is needed to be loaded in the follow-up process so as to initialize the Bluetooth function corresponding to the loaded configuration information. Therefore, by adopting the initialization mode, the Bluetooth sound box does not need to load all configuration information every time, all Bluetooth functions are initialized, resources of the Bluetooth sound box are saved, abnormal conditions such as communication interruption and noise caused by fewer resources of the Bluetooth sound box are reduced, and the working reliability of the Bluetooth sound box is improved.
As a preferred embodiment, after initializing the loaded configuration information to correspond to the bluetooth function, the method further includes:
after receiving a first reconnection instruction sent by the reconnection host equipment, determining configuration information corresponding to the reconnection host equipment based on the correspondence relation;
judging whether the loaded configuration information comprises all configuration information corresponding to the back connection host equipment;
if so, carrying out reconnection connection with the reconnection host equipment;
if the configuration information does not include the configuration information, loading the configuration information which is not loaded in the configuration information corresponding to the reconnection host equipment, and performing reconnection connection with the reconnection host equipment.
It should be noted that, in this embodiment, the connected host device refers to a host device paired with the bluetooth speaker.
After initializing the Bluetooth function corresponding to the loaded configuration information, if the Bluetooth sound box receives a first reconnection instruction sent by the reconnection host equipment, determining the configuration information corresponding to the reconnection host equipment based on the corresponding relation, then judging whether all Bluetooth functions supported by the reconnection host equipment are initialized, specifically judging whether the loaded configuration information comprises all the configuration information corresponding to the reconnection host equipment, and if so, performing reconnection with the reconnection host equipment; otherwise, loading the unloaded configuration information in the configuration information corresponding to the reconnection host equipment, and performing reconnection connection with the reconnection host equipment.
It should be noted that, even if the subsequent bluetooth speaker is not connected to the host device, but connected to other paired host devices, only the configuration information that is not loaded in the configuration information corresponding to the reconnection host device needs to be loaded in a supplementary manner, and the subsequent bluetooth speaker is connected to the reconnection host device in a reconnection manner.
Therefore, by adopting the initialization mode in the application, even if the host equipment to be connected is not the reconnection host equipment, the loaded configuration information does not comprise all the configuration information corresponding to the reconnection host equipment, and only the unloaded configuration information in the configuration information corresponding to the reconnection host equipment is required to be additionally loaded, at the moment, the loaded configuration information is still possibly less than all the configuration information in the Bluetooth sound box, the resources of the Bluetooth sound box are still saved, the occurrence of abnormal conditions such as communication interruption, noise and the like caused by fewer resources of the Bluetooth sound box is reduced, and the working reliability of the Bluetooth sound box is improved.
As a preferred embodiment, after the bluetooth speaker is connected to the host device in a reconnection manner, the method further includes:
the timestamp in the attribute of the profile corresponding to the connected host device with which the bluetooth speaker is connected is updated.
As a preferred embodiment, after initializing the loaded configuration information to correspond to the bluetooth function, the method further includes:
and when the reconnection condition is met, sending a second reconnection instruction to the host equipment to be connected.
Specifically, when the bluetooth sound box is in reconnection with the host equipment, the reconnection can be initiated by the host equipment, or initiated by the bluetooth sound box, and when the bluetooth sound box is in reconnection, after the bluetooth sound box is started, if a reconnection condition is met, a second reconnection instruction is sent to the host equipment to be connected so as to be in reconnection with the host equipment to be connected. The preset time may be, but not limited to, 10s, or may be, after receiving a feedback start instruction sent by a user, or may be in other manners, which is not particularly limited herein.
It can be seen that, after loading the configuration information corresponding to the host device to be connected and when the connection condition is satisfied, the bluetooth speaker sends a second connection instruction to the host device to be connected so as to connect with the host device to be connected. The Bluetooth sound box has the advantages that resources of the Bluetooth sound box are saved, abnormal conditions such as communication interruption and noise caused by fewer resources of the Bluetooth sound box are reduced, and the working reliability of the Bluetooth sound box is improved.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an initializing device for a bluetooth speaker according to the present invention, where the initializing device includes:
a memory 21 for storing a computer program;
the processor 22 is configured to execute the computer program to implement the steps of the method for initializing the bluetooth speaker as described above.
For the description of the initialization device of the bluetooth speaker provided by the present invention, please refer to the above method embodiment, and the description of the present invention is omitted herein.
The invention also provides a Bluetooth sound box, which comprises the initializing device of the Bluetooth sound box.
For the description of the bluetooth speaker provided by the present invention, refer to the above method embodiment, and the description of the present invention is omitted herein.
It should be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. The initialization method of the Bluetooth sound box is characterized by comprising the following steps of:
pre-establishing a corresponding relation between configuration information in the Bluetooth sound box and host equipment;
when the Bluetooth sound box is started, determining host equipment to be connected;
determining corresponding configuration information of the host equipment to be connected based on the corresponding relation between the host equipment to be connected and the corresponding relation;
loading the determined configuration information to initialize the Bluetooth function corresponding to the loaded configuration information;
the method for pre-establishing the corresponding relation between the host equipment and the configuration information in the Bluetooth sound box comprises the following steps:
after the Bluetooth sound box is started to initialize an initial Bluetooth function, if a pairing instruction sent by host equipment is received, a supported Bluetooth function inquiry instruction is sent to the host equipment; if the Bluetooth sound box is not matched with the host equipment, the initial Bluetooth function is all Bluetooth functions supported by the Bluetooth sound box; if the Bluetooth sound box is matched with the host equipment, the initial Bluetooth function is a Bluetooth function of the host equipment to be connected, which is determined when the Bluetooth sound box is started;
determining Bluetooth functions supported by the host equipment based on a reply instruction returned by the host equipment;
and determining the host device to correspondingly configure information based on the determined Bluetooth function.
2. The method of initializing a bluetooth speaker of claim 1, wherein determining the host device to correspondingly configure information based on the determined bluetooth function comprises:
judging whether the determined Bluetooth function is completely initialized;
if all the configuration information is initialized, the configuration information is connected with the host equipment in a pairing mode, and the determined configuration information corresponding to the Bluetooth function is determined to be the configuration information corresponding to the host equipment;
if not, judging whether the uninitialized Bluetooth function in the determined Bluetooth functions is supported by the Bluetooth sound box;
if supported by the Bluetooth sound box, loading configuration information corresponding to the uninitialized Bluetooth function in the determined Bluetooth functions, carrying out pairing connection with the host equipment, and determining the configuration information corresponding to the determined Bluetooth function as configuration information corresponding to the host equipment;
and if the Bluetooth sound box is not supported by the Bluetooth sound box, carrying out pairing connection with the host equipment, and determining the configuration information corresponding to the initialized Bluetooth function in the determined Bluetooth functions as the configuration information corresponding to the host equipment.
3. The method of initializing a bluetooth speaker according to claim 2, further comprising, after determining the host device to correspondingly configure information based on the determined bluetooth function:
correspondingly storing configuration information of the host equipment into a configuration file;
and establishing a corresponding relation between the configuration file and the host equipment.
4. The method for initializing a bluetooth speaker according to claim 3, further comprising, before determining the host device to be connected:
judging whether the host device is paired with the host device;
if yes, entering a step of determining the host equipment to be connected;
if not, loading configuration information corresponding to all Bluetooth functions supported by the Bluetooth sound box so as to initialize the Bluetooth functions corresponding to the loaded configuration information;
determining a host device to be connected, comprising:
a host device to be connected is determined from the paired host devices.
5. The method of initializing a bluetooth speaker according to claim 4, wherein the attributes of the profile include an identification of the host device and a time stamp for recording a connection time with the host device;
after the pairing connection with the host device, the method further comprises:
updating a timestamp in an attribute of a configuration file corresponding to a host device connected with the Bluetooth sound box;
determining a host device to be connected from the paired host devices, comprising:
judging whether the paired host equipment has only one;
if yes, determining the paired host equipment as the host equipment to be connected;
if not, determining the host equipment corresponding to the configuration file with the timestamp closest to the current time as the host equipment to be connected.
6. The method for initializing a bluetooth speaker according to any one of claims 1 to 5, further comprising, after initializing the loaded configuration information corresponding to the bluetooth function:
after receiving a first reconnection instruction sent by a reconnection host device, determining configuration information corresponding to the reconnection host device based on the correspondence;
judging whether the loaded configuration information comprises all configuration information corresponding to the back connection host equipment;
if so, carrying out reconnection connection with the reconnection host equipment;
and if the configuration information does not include the configuration information, loading the configuration information which is not loaded in the configuration information corresponding to the reconnection host equipment, and performing reconnection with the reconnection host equipment.
7. The method for initializing a bluetooth speaker according to any one of claims 1 to 5, further comprising, after initializing the loaded configuration information corresponding to the bluetooth function:
and when the reconnection condition is met, sending a second reconnection instruction to the host equipment to be connected.
8. An initializing device of a bluetooth speaker, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for initializing a bluetooth speaker according to any one of claims 1 to 7 when executing the computer program.
9. A bluetooth speaker comprising the initializing device of claim 8.
CN202110142727.3A 2021-02-02 2021-02-02 Initialization method and device of Bluetooth sound box and Bluetooth sound box Active CN112948007B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110142727.3A CN112948007B (en) 2021-02-02 2021-02-02 Initialization method and device of Bluetooth sound box and Bluetooth sound box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110142727.3A CN112948007B (en) 2021-02-02 2021-02-02 Initialization method and device of Bluetooth sound box and Bluetooth sound box

Publications (2)

Publication Number Publication Date
CN112948007A CN112948007A (en) 2021-06-11
CN112948007B true CN112948007B (en) 2023-06-16

Family

ID=76241532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110142727.3A Active CN112948007B (en) 2021-02-02 2021-02-02 Initialization method and device of Bluetooth sound box and Bluetooth sound box

Country Status (1)

Country Link
CN (1) CN112948007B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502369A (en) * 2016-10-28 2017-03-15 青岛海信电器股份有限公司 Power consumption management method and equipment
CN110300393A (en) * 2018-03-23 2019-10-01 阿尔卑斯通信器件技术(上海)有限公司 Bluetooth communication device, Bluetooth communication system and Bluetooth communication method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102378400B (en) * 2010-08-23 2015-01-28 中兴通讯股份有限公司 Management method and device of Bluetooth services
CN103118337B (en) * 2011-11-17 2015-08-12 中兴通讯股份有限公司 For the information processing method of bluetooth equipment, device and bluetooth equipment thereof
CN105487887B (en) * 2015-11-24 2021-01-08 惠州Tcl移动通信有限公司 Bluetooth starting method and Bluetooth device
US20170339265A1 (en) * 2016-05-20 2017-11-23 Qualcomm Incorporated User equipment service management
CN107770758A (en) * 2017-09-21 2018-03-06 深圳市汉普电子技术开发有限公司 The bluetooth of Baffle Box of Bluetooth returns even method, Baffle Box of Bluetooth and storage medium
US11856498B2 (en) * 2018-12-26 2023-12-26 Honor Device Co., Ltd. Bluetooth device connection method and device
CN110177357B (en) * 2019-05-17 2022-06-07 Oppo广东移动通信有限公司 Bluetooth management method, mobile terminal and computer storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502369A (en) * 2016-10-28 2017-03-15 青岛海信电器股份有限公司 Power consumption management method and equipment
CN110300393A (en) * 2018-03-23 2019-10-01 阿尔卑斯通信器件技术(上海)有限公司 Bluetooth communication device, Bluetooth communication system and Bluetooth communication method

Also Published As

Publication number Publication date
CN112948007A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
CN106658359B (en) Bluetooth connection method, device and communication system
US8572599B2 (en) Provisioning device make and model information for firmware over-the-air (FOTA)
JP5153893B2 (en) Communication device, communication system, and inter-device connection method
CN111246441B (en) Method, system and storage medium for connecting Bluetooth headset and terminal
US20100330909A1 (en) Voice-enabled walk-through pairing of telecommunications devices
EP2608496B1 (en) Firmware upgrade function for deskphone electronic protocol converter
KR20090090801A (en) Method and apparatus for updating firmware in portable terminal
CN110996405A (en) Earphone connection method, terminal, earphone box and computer readable storage medium
US10908889B2 (en) Method, user equipment, and application server for downloading application
KR20190065786A (en) Method for reconnecting bluetooth communication and apparatus using the same
KR101034554B1 (en) Method and apparatus for controlling voice quality of portable device
CN112235404B (en) Method and equipment for silent upgrading of earphone and charging box
WO2021052054A1 (en) Method for plug-in implementation and system for plug-in implementation
CN112203179A (en) TWS earphone, automatic reconnection method and device thereof, and computer storage medium
CN110602683B (en) Bluetooth control method, device, mobile terminal and storage medium
CN112948007B (en) Initialization method and device of Bluetooth sound box and Bluetooth sound box
CN111435318A (en) Dex optimization method of application program and terminal
CN110944313A (en) Bluetooth connection method, device, storage medium and terminal
CN111314895A (en) Bluetooth-based wireless upgrading method and device, server and electronic equipment
KR20150000666A (en) Method for providing a hearing aid compatibility and an electronic device thereof
CN107015830B (en) Method and device for upgrading audio playing system and audio playing equipment
JP2009086754A (en) Software update method and mobile terminal
KR100593843B1 (en) An application program management system for a mobile telecommunication terminal
JP3958714B2 (en) Mobile communication device
CN112825538B (en) Application starting method and device, terminal equipment and storage medium

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