CN110730439A - Method and device for dynamically connecting Bluetooth equipment - Google Patents

Method and device for dynamically connecting Bluetooth equipment Download PDF

Info

Publication number
CN110730439A
CN110730439A CN201910822355.1A CN201910822355A CN110730439A CN 110730439 A CN110730439 A CN 110730439A CN 201910822355 A CN201910822355 A CN 201910822355A CN 110730439 A CN110730439 A CN 110730439A
Authority
CN
China
Prior art keywords
bluetooth
connection control
control protocol
equipment
bluetooth device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910822355.1A
Other languages
Chinese (zh)
Other versions
CN110730439B (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.)
Suning Intelligent Terminal Co Ltd
Original Assignee
Suning Intelligent Terminal 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 Suning Intelligent Terminal Co Ltd filed Critical Suning Intelligent Terminal Co Ltd
Priority to CN201910822355.1A priority Critical patent/CN110730439B/en
Publication of CN110730439A publication Critical patent/CN110730439A/en
Application granted granted Critical
Publication of CN110730439B publication Critical patent/CN110730439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and a device for dynamically connecting Bluetooth equipment. The method applied to the background server comprises the following steps: receiving APP version information sent by a client, and returning a corresponding supportable device list to the client according to the APP version information; and receiving the information of the Bluetooth equipment to be connected, which is sent by the client and obtained according to the supportable equipment list, and returning a corresponding Bluetooth equipment connection control protocol according to the information of the Bluetooth equipment to be connected. The invention can connect the Bluetooth equipment based on different Bluetooth equipment connection control protocols through one client, does not need a user to download a new client additionally, and reduces the occupation of the memory of the terminal.

Description

Method and device for dynamically connecting Bluetooth equipment
Technical Field
The present invention relates to the field of communication connection technologies, and in particular, to a method and an apparatus for dynamically connecting bluetooth devices.
Background
Most bluetooth peripheral equipment all need supporting customer end at present, and supporting customer end can only connect this bluetooth equipment, perhaps connects the bluetooth equipment based on same set of agreement, leads to the user to need download the application client that a plurality of bluetooth are connected like this, occupies terminal memory to when bluetooth equipment connection control agreement updates, the user need download again or update application client, just can with bluetooth equipment adaptation, influence user experience.
Disclosure of Invention
In order to solve the problems of the prior art, the invention provides a method and a device for dynamically connecting Bluetooth equipment. The technical scheme is as follows:
in one aspect, a method for dynamically connecting bluetooth devices is provided, which is applied to a background server, and includes:
receiving APP version information sent by a client, and returning a corresponding supportable device list to the client according to the APP version information;
and receiving the information of the Bluetooth equipment to be connected, which is sent by the client and obtained according to the supportable equipment list, and returning a corresponding Bluetooth equipment connection control protocol according to the information of the Bluetooth equipment to be connected.
Further, the method further comprises:
when a Bluetooth device connection control protocol is updated, sending a protocol update notification and a new Bluetooth device connection control protocol to a client;
or the like, or, alternatively,
when a Bluetooth device is connected with a control protocol to be updated, a protocol update notification is sent to the client;
and receiving a protocol acquisition request sent by the client, and sending a new Bluetooth equipment connection control protocol.
Further, the bluetooth device connection control protocol includes a plurality of bluetooth device connection control protocols corresponding to the types of the bluetooth devices, and includes a plurality of bluetooth device connection control protocols corresponding to the types of the bluetooth devices.
Further, the information of the bluetooth device to be connected includes: the model of the Bluetooth device to be connected.
In another aspect, a method for dynamically connecting bluetooth devices is provided, which is applied to a client and includes:
the APP version information is sent to a background server;
receiving a supportable device list returned by the background server;
obtaining Bluetooth equipment to be connected by searching and combining the supportable equipment list;
acquiring the information of the Bluetooth device to be connected, and sending the information of the Bluetooth device to be connected to the background server;
receiving a Bluetooth device connection control protocol corresponding to the Bluetooth device to be connected, which is returned by the background server;
and establishing a Bluetooth connection control module according to the Bluetooth device connection control protocol, and establishing Bluetooth connection with the current available device.
Further, the Bluetooth device to be connected is obtained by searching and combining the supportable device list; the method comprises the following steps:
searching Bluetooth equipment, comparing the searched Bluetooth equipment with the supportable equipment list, and determining the Bluetooth equipment belonging to the supportable equipment list as currently available Bluetooth equipment;
and determining the Bluetooth devices to be connected in the currently available Bluetooth devices.
Further, the method further comprises:
receiving a protocol updating notice sent by the background server, determining whether to update a Bluetooth device connection control protocol, and if so, receiving a new Bluetooth device connection control protocol, or receiving the protocol updating notice sent by the background server, sending a protocol acquisition request to the background server, and receiving the new Bluetooth device connection control protocol;
and establishing a Bluetooth connection control module according to the new Bluetooth equipment connection control protocol, and establishing Bluetooth connection with the current available equipment.
Further, after establishing the bluetooth connection, the method further comprises:
sending a service request to Bluetooth equipment, wherein the data format of the service request is generated according to the connection control protocol of the Bluetooth equipment;
and receiving an execution result returned by the Bluetooth equipment, and analyzing execution result data according to the connection control protocol of the Bluetooth equipment.
Further, the bluetooth device connection control protocol includes a plurality of bluetooth device connection control protocols corresponding to the types of the bluetooth devices, and includes a plurality of bluetooth device connection control protocols corresponding to the types of the bluetooth devices.
Further, the information of the bluetooth device to be connected includes: the model of the Bluetooth device to be connected.
In another aspect, a background server is provided, including:
the first storage module is used for storing a supportable device list;
the second storage module is used for storing a Bluetooth device connection control protocol;
the communication module is used for receiving the APP version information, sending a supportable device list corresponding to the APP version information, receiving the information of the to-be-connected Bluetooth device sent by the client and obtained according to the supportable device list, and returning a corresponding Bluetooth device connection control protocol according to the information of the to-be-connected Bluetooth device.
Further, the information of the bluetooth device to be connected includes: the model of the Bluetooth device to be connected.
Further, the communication module is further configured to: when the Bluetooth equipment connection control protocol is updated, sending a protocol update notification and a new Bluetooth equipment connection control protocol to a client, or when the Bluetooth equipment connection control protocol is updated, sending a protocol update notification to the client; and receiving a protocol acquisition request sent by the client, and sending a new Bluetooth equipment connection control protocol.
Further, the bluetooth device connection control protocol includes a plurality of bluetooth device connection control protocols corresponding to the types of the bluetooth devices, and includes a plurality of bluetooth device connection control protocols corresponding to the types of the bluetooth devices.
In another aspect, a client with a bluetooth connection function is provided, including:
the storage module is used for storing APP version information;
the device to be connected acquisition module is used for acquiring the Bluetooth device to be connected by searching and combining the supportable device list and acquiring the information of the Bluetooth device to be connected;
the communication module is used for receiving a supportable device list returned by the background server and receiving a Bluetooth device connection control protocol corresponding to the Bluetooth device to be connected and returned by the background server;
and the Bluetooth connection control establishing module is used for establishing a Bluetooth connection control module according to the Bluetooth device connection control protocol and establishing Bluetooth connection with the Bluetooth device to be connected.
Further, the client further comprises:
the searching module is used for searching nearby Bluetooth equipment;
a current available device confirmation module, configured to compare the searched bluetooth device with the supportable device list, and determine the bluetooth device belonging to the supportable device list as a current available bluetooth device;
and the device to be connected confirming module is used for confirming the Bluetooth device to be connected in the currently available Bluetooth devices.
Further, the information of the bluetooth device to be connected includes: the model of the Bluetooth device to be connected.
Further, the communication module is further configured to receive a protocol update notification and a new bluetooth device connection control protocol sent by the background server, or receive the protocol update notification sent by the background server, send a protocol acquisition request to the background server, and receive the new bluetooth device connection control protocol;
the Bluetooth connection control establishing module is also used for establishing a Bluetooth connection control module according to a new Bluetooth device connection control protocol and establishing Bluetooth connection with the current available device.
Further, the air conditioner is provided with a fan,
the client further comprises:
the user interaction module is used for receiving a user instruction;
the user instruction analysis module comprises a plurality of user instruction analysis modules with different functions, and the user instruction analysis modules are respectively used for analyzing the user instruction according to respective functions;
the protocol encapsulation module comprises encapsulation modules supporting different Bluetooth device connection control protocols, and is respectively used for encapsulating the analyzed user instruction according to the data format requirements of the Bluetooth device connection control protocol, generating a service request, and analyzing an execution result returned by the Bluetooth device according to the Bluetooth device connection control protocol;
the communication module is further configured to send the service request to a bluetooth device.
Furthermore, the bluetooth device connection control protocol includes a plurality of bluetooth device connection control protocols corresponding to the bluetooth device types, and includes a plurality of bluetooth device connection control protocols corresponding to the bluetooth device models.
The technical scheme provided by the invention has the beneficial effects that:
1. the invention realizes that one client is connected with the Bluetooth peripheral equipment based on different Bluetooth equipment connection control protocols, a user does not need to download a new client additionally, and the occupation of the memory of the terminal is reduced;
2. if the Bluetooth peripheral equipment is upgraded and the existing protocol needs to be changed, the invention can dynamically send a new Bluetooth equipment connection control protocol to the client from the background without updating the client;
3. the invention can realize the connection control protocol of the Bluetooth equipment of different types and models in a targeted way by background configuration so as to achieve better user experience.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for dynamically connecting bluetooth devices according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a method for dynamically connecting bluetooth devices according to embodiment 1 of the present invention;
fig. 3 is a flowchart of interaction between a client and a backend server according to embodiment 1 of the present invention;
fig. 4 is a schematic diagram of functional modules of a client and a background server according to embodiment 1 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in 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 obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The so-called bluetooth technology is a short-range radio technology by which short-range communication can be achieved between devices and facilities. Based on the fact that various Bluetooth devices are required to be transported, nowadays, terminal devices such as a Bluetooth mouse, a Bluetooth keyboard, a Bluetooth earphone and a Bluetooth sound box are visible everywhere, and great convenience is brought to our lives. Because the existing Bluetooth devices are various, the basic classic Bluetooth device connection control protocol cannot meet all functional requirements, for example, in the connection control of the Bluetooth headset, the functions of upgrading OTA firmware and acquiring the double-ear electric quantity of the TWS headset cannot be realized. Therefore in order to adapt to the diversification of the control requirements of the Bluetooth equipment, each Bluetooth equipment manufacturer has one own set of Bluetooth equipment connection control protocol, the Bluetooth equipment connection control protocol is defined by each Bluetooth equipment manufacturer, the Bluetooth equipment of each manufacturer can only use the APP provided by the manufacturer to perform connection control, and before the Bluetooth equipment is used, the user needs to download the APP on the terminal, and then the peripheral Bluetooth equipment corresponding to the APP can be controlled through the APP. When a user needs to add a Bluetooth device suitable for the connection control protocol of other Bluetooth devices, a new client needs to be downloaded. With the increase of bluetooth equipment, a terminal often needs to download three to four applications APP, occupies the terminal equipment memory, leads to the equipment operation card to pause. In order to solve the above problems, embodiments of the present invention provide a method and an apparatus for dynamically connecting a bluetooth device, which can implement connection control of bluetooth peripheral devices based on different protocols by using one APP, and do not need to download multiple APPs, thereby improving user experience.
Example 1
As shown in fig. 1, a method for dynamically connecting bluetooth devices, applied to a background server, includes:
receiving APP version information including a client version number sent by a client, and returning a corresponding supportable device list to the client according to the APP version information;
and receiving the information of the Bluetooth equipment to be connected, which is sent by the client and obtained according to the supportable equipment list and comprises the model of the Bluetooth equipment to be connected, and returning a corresponding Bluetooth equipment connection control protocol according to the information of the Bluetooth equipment to be connected.
In the method, the supportable device list corresponds to APP version information (such as APP version number), and different version numbers correspond to different supportable device lists. The bluetooth device connection control protocol is a latest json-encapsulated protocol corresponding to bluetooth device information (such as bluetooth device model), and specifies a connection mode of the bluetooth device and a data format of a control command.
In the method, the background server can only store the used Bluetooth protocol, the cloud end stores all the Bluetooth protocols, and technicians can configure the updated Bluetooth protocol through the cloud end. And when the Bluetooth device connection control protocol is updated, sending a protocol update notification and a new Bluetooth device connection control protocol to the application client, or when the Bluetooth device connection control protocol is updated, sending only the protocol update notification to the application client, and after receiving a protocol acquisition request of the client, sending the new Bluetooth device connection control protocol. The stored Bluetooth device connection control protocols comprise a plurality of Bluetooth device connection control protocols corresponding to the types of the Bluetooth devices and a plurality of Bluetooth device connection control protocols corresponding to the types of the Bluetooth devices, and the background server determines after receiving the types of the Bluetooth devices and selects the corresponding Bluetooth device connection control protocols to return to the client according to the types and the types of the Bluetooth devices to be connected.
As shown in fig. 4, a background server for executing the method for dynamically connecting bluetooth devices includes:
the first storage module is used for storing a supportable device list;
the second storage module is used for storing a Bluetooth device connection control protocol;
the communication module is used for receiving APP version information including a client version number, sending a supportable device list corresponding to the APP version information, receiving to-be-connected Bluetooth device information including the type of to-be-connected Bluetooth devices, and returning a corresponding Bluetooth device connection control protocol according to the to-be-connected Bluetooth device information.
The communication module is also used for receiving a Bluetooth equipment connection control protocol updating signal, sending a protocol updating notice to the client and sending a new Bluetooth equipment connection control protocol; or when the Bluetooth equipment is connected with the control protocol to be updated, sending a protocol update notification to the client; and receiving a protocol acquisition request sent by the client, and sending a new Bluetooth equipment connection control protocol.
As shown in fig. 2, a method for dynamically connecting bluetooth devices, applied to an application client, includes:
the APP version information including the client version number is sent to a background server;
receiving a supportable device list returned by the background server;
obtaining Bluetooth equipment to be connected by searching and combining the supportable equipment list;
acquiring the Bluetooth device information to be connected including the model of the Bluetooth device to be connected, and sending the Bluetooth device information to be connected to the background server;
receiving a Bluetooth device connection control protocol corresponding to the Bluetooth device to be connected, which is returned by the background server, wherein the Bluetooth device connection control protocol is stored in the background server and/or the cloud;
and establishing a Bluetooth connection control module according to the Bluetooth device connection control protocol, and establishing Bluetooth connection with the current available device.
In the method, the bluetooth connection control module is mainly used for establishing connection with the bluetooth device, wherein the connection comprises related control class objects and data entity class objects.
In the above method, the determining the model of the currently available device according to the list of supportable devices includes:
searching Bluetooth equipment, comparing the searched Bluetooth equipment with the supportable equipment list, and determining the Bluetooth equipment belonging to the supportable equipment list as currently available Bluetooth equipment;
and determining the Bluetooth devices to be connected in the currently available Bluetooth devices.
When a protocol is updated, receiving a protocol updating notice and a new Bluetooth equipment connection control protocol sent by the background server, or receiving the protocol updating notice sent by the background server, sending a protocol acquisition request to the background server, and receiving the new Bluetooth equipment connection control protocol;
and establishing a Bluetooth connection control module according to a new Bluetooth equipment connection control protocol, and establishing Bluetooth connection with the current available equipment.
The Bluetooth device connection control system comprises a plurality of Bluetooth device connection control protocols corresponding to the types of the Bluetooth devices and a plurality of Bluetooth device connection control protocols corresponding to the types of the Bluetooth devices.
After establishing the Bluetooth connection, the client sends a service request with a data format conforming to a Bluetooth equipment connection control protocol to the Bluetooth equipment; the Bluetooth equipment executes according to the service request and sends an execution result to the client, and after receiving the execution result, the client analyzes the execution result data according to the Bluetooth equipment connection control protocol and displays the execution result data to the user.
In the method, the client decomposes the user instruction into the primary service request generating modules with different function requirements, and then correspondingly encapsulates the primary service request according to the requirement format of the corresponding Bluetooth equipment connection control protocol to generate the service request. Therefore, when receiving the user instruction, the user instruction is only responsible for receiving the user instruction without considering a protocol corresponding to the functional requirement, and the decoupling of the Bluetooth control data transmission is improved.
As shown in fig. 4, the client executing the dynamic bluetooth device connection method includes:
the storage module is used for storing APP version information comprising a client version number;
the available equipment acquisition module is used for acquiring the Bluetooth equipment to be connected including the model of the Bluetooth equipment to be connected by searching and combining the supportable equipment list and acquiring the information of the Bluetooth equipment to be connected;
the communication module is used for establishing long connection with a background server, receiving a supportable device list returned by the background server and receiving a Bluetooth device connection control protocol corresponding to the current available device returned by the background server;
and the Bluetooth connection control establishing module is used for establishing a Bluetooth connection control module according to the Bluetooth device connection control protocol and establishing Bluetooth connection with the Bluetooth device to be connected.
The searching module is used for searching nearby Bluetooth equipment;
a current available device confirmation module, configured to compare the searched bluetooth device with the supportable device list, and determine the bluetooth device belonging to the supportable device list as a current available bluetooth device;
the device to be connected confirming module is used for confirming the Bluetooth device to be connected in the currently available Bluetooth devices;
the user interaction module is used for receiving a user instruction;
the system comprises a plurality of user instruction analysis modules, a plurality of user instruction analysis modules and a plurality of control modules, wherein the user instruction analysis modules are respectively used for analyzing the user instructions according to respective functions, such as a firmware upgrading function module, an electric quantity obtaining function module, a recording function module and the like;
the protocol encapsulation modules are provided with a plurality of modules, respectively encapsulate the user instruction according to the data format requirement of the Bluetooth equipment connection control protocol, generate a service request, and analyze an execution result returned by the Bluetooth equipment according to the Bluetooth equipment connection control protocol;
in the application client, the communication module is further configured to receive a protocol update notification and a new bluetooth device connection control protocol sent by the background server; the Bluetooth connection control creation module is also used for creating the Bluetooth connection control module according to a new Bluetooth device connection control protocol, creating Bluetooth connection with the current available device, and receiving a service request which is sent by the Bluetooth device and comprises a function requirement and Bluetooth device connection control protocol information after the Bluetooth connection is successfully created.
Specifically, the interaction process of the background server and the application client is as shown in fig. 3:
the client is started and long connection is established with the background server;
the client sends APP version information to the background server;
after receiving the APP version information, the background server sends a supportable device list corresponding to the version information to the client;
the client searches nearby Bluetooth equipment, compares the searched Bluetooth equipment with the supportable equipment list, and determines the Bluetooth equipment belonging to the supportable equipment list as currently available Bluetooth equipment;
if the number of the currently available Bluetooth devices is multiple, determining the Bluetooth device to be connected according to a user selection instruction or a history record, and if one currently available Bluetooth device is available, automatically defaulting the Bluetooth device to be connected to the Bluetooth device to be connected, or determining the Bluetooth device to be connected according to user selection;
the client side sends the model of the Bluetooth device to be connected to the background server;
the background server sends a corresponding Bluetooth device connection control protocol to the client according to the model of the connected Bluetooth device;
and after receiving the Bluetooth device connection control protocol, the client establishes a Bluetooth connection control module according to the Bluetooth device connection control protocol and connects the Bluetooth device.
When the Bluetooth equipment connection control protocol is updated, the background server sends a protocol update notice and a new Bluetooth equipment connection control protocol to the client;
the client determines that the Bluetooth equipment connection control protocol needs to be updated, and then receives the new Bluetooth equipment connection control protocol;
and the client establishes a Bluetooth connection control module according to the new Bluetooth equipment connection control protocol and establishes Bluetooth connection with the Bluetooth equipment.
After the bluetooth connection is successfully established, the user interaction module acquires a user instruction, the user instruction analysis module analyzes the user instruction according to the function setting of the user instruction, for example, the user instruction includes two requests of acquiring electric quantity and upgrading firmware, so that the corresponding electric quantity acquisition module acquires the electric quantity acquisition instruction in the user instruction, and the firmware upgrading module acquires the firmware upgrading instruction in the user instruction. Each user instruction analysis module sends the analyzed user instruction to a protocol encapsulation module for encapsulation, for example, the user instruction is made based on the bluetooth device a, and then the user instruction is sent to the protocol encapsulation module corresponding to the bluetooth device a for encapsulation of the user instruction to generate a service request. The client side sends a service request to the Bluetooth equipment, the data format of the service request is generated according to a Bluetooth equipment connection control protocol, the Bluetooth equipment executes the function to generate an execution result, the execution result is returned to the client side, and the client side analyzes and generates execution result data according to the Bluetooth equipment connection control protocol. In the method, the receiving of the user instruction, the instruction analysis and the generation of the service request are all completed by different modules, so that the decoupling degree of the internal modules of the client is improved.
Example 2
In this embodiment, the method and the apparatus disclosed in the present invention are explained by taking connection of a bluetooth headset as an example and combining three angles, namely, a client, a background server, and a bluetooth headset.
The client receives a starting instruction of a user and starts the client;
after starting, the client sends a long connection request to a background server;
the background server receives the long connection request, and the client successfully establishes long connection with the background server;
after the long connection is established successfully, the client sends the current version number of the APP to the background server;
after receiving the APP version number, the background server inquires a supportable device list matched with the current version number according to the APP version number and sends the supportable device list to the client;
the client searches the Bluetooth equipment and determines the searched Bluetooth equipment belonging to the supportable equipment list as the currently available Bluetooth equipment;
when a plurality of searched currently available Bluetooth devices are available, determining the Bluetooth device to be connected according to the selection of a user, and when only one searched device is available, directly determining the current device as the Bluetooth device to be connected according to a preset or historical record;
the client acquires the determined model of the Bluetooth device to be connected and sends the model to the background server;
after receiving the model of the Bluetooth device to be connected, the background server searches a corresponding Bluetooth device connection control protocol according to the model and returns the Bluetooth device connection control protocol to the client;
the client establishes a Bluetooth connection control module according to a Bluetooth device connection control protocol and sends a Bluetooth connection request to the Bluetooth headset;
and after receiving the request, the Bluetooth headset establishes Bluetooth connection with the client.
After the Bluetooth connection is successfully established, the user sends a control command to the Bluetooth headset through the client, and the Bluetooth headset can respond. If the client wants to acquire the electric quantity condition of the earphone, a service request for acquiring the electric quantity condition is sent to the Bluetooth earphone, the data format of the service request is generated according to a Bluetooth device connection control protocol, the Bluetooth earphone acquires electric quantity information according to the service request, data of the electric quantity information is formatted according to the Bluetooth device connection control protocol, the acquired electric quantity condition of the earphone is sent to the client, and after the client receives the electric quantity condition, the electric quantity condition is analyzed and displayed to a user.
The Bluetooth device connection control protocol is stored in a background server and a cloud terminal at the same time, wherein the background server stores the Bluetooth device connection control protocol used by a user in history, the cloud terminal stores all the Bluetooth device connection control protocols, when the Bluetooth device connection control protocol is updated, the Bluetooth device connection control protocol needs to be configured from the cloud terminal, the cloud terminal server sends a protocol update notification to the background server, the background server sends the protocol update notification to a client terminal, and the client terminal determines whether to update the protocol according to a user instruction or a preset update condition;
and if the protocol is determined to be updated, disconnecting the Bluetooth connection with the Bluetooth headset, reestablishing the Bluetooth connection control module according to the new Bluetooth equipment connection control protocol, and establishing the Bluetooth connection with the Bluetooth headset. If the protocol is not updated, the connection with the Bluetooth headset is kept based on the original Bluetooth equipment connection control protocol.
The method for Bluetooth connection disclosed by the embodiment of the invention determines the supportable device list according to the version number of the client, determines the Bluetooth device to be connected according to the supportable device list, determines the Bluetooth device connection control protocol according to the type of the Bluetooth to be connected, and can select the Bluetooth device connection control protocol compared with the traditional Bluetooth connection, so that one client can be suitable for the connection of different Bluetooth devices.
In the above bluetooth connection method, the background server includes:
the first storage module is used for storing a supportable device list;
the second storage module is used for storing a Bluetooth device connection control protocol;
the communication module is used for establishing long connection with the client, receiving the version number of the client, sending a supportable device list corresponding to the version number, receiving the model of the Bluetooth device to be connected, returning a Bluetooth device connection control protocol corresponding to the model of the Bluetooth device to be connected, receiving a protocol update notification sent by the cloud server, and sending the protocol update notification and a new Bluetooth device connection control protocol to the client.
The client comprises:
the storage module is used for storing the version number of the client;
the device to be connected acquisition module is used for acquiring the Bluetooth device to be connected by searching and combining the supportable device list and acquiring the model of the Bluetooth device to be connected; the device to be connected acquisition module comprises: the searching module is used for searching nearby Bluetooth equipment; a current available device confirmation module, configured to compare the searched bluetooth device with the supportable device list, and determine the bluetooth device belonging to the supportable device list as a current available bluetooth device; the device to be connected confirming module is used for confirming the Bluetooth device to be connected in the currently available Bluetooth devices;
the communication module is used for establishing long connection with the background server, receiving a supportable device list returned by the background server, receiving a Bluetooth device connection control protocol corresponding to the Bluetooth device to be connected and returned by the background server, receiving a protocol update notice sent by the background server, receiving a new Bluetooth device connection control protocol and sending a service request to the Bluetooth device;
the Bluetooth connection control creation module is used for creating a Bluetooth connection control module according to a Bluetooth device connection control protocol or a new Bluetooth device connection control protocol and creating Bluetooth connection with the Bluetooth device to be connected;
the user interaction module is used for receiving a user instruction;
the user instruction analysis module is used for analyzing the user instruction according to respective functions;
and the protocol encapsulation module is used for encapsulating the preliminary service request according to the data format requirement of the Bluetooth device connection control protocol, generating a service request and analyzing an execution result returned by the Bluetooth device according to the Bluetooth device connection control protocol.
The connection method and the device of the Bluetooth equipment provided by the invention have the beneficial effects that:
1. the invention realizes the connection of the Bluetooth peripheral equipment based on different protocols based on one client, does not need a user to additionally present a new client, and reduces the occupation of the memory of the terminal;
2. if the Bluetooth peripheral equipment is upgraded and the existing protocol needs to be changed, the invention can dynamically send a new Bluetooth equipment connection control protocol to the client from the background without updating the client;
3. the invention can realize the connection control protocol of the Bluetooth equipment which is pertinently optimized for different types and different users through the background configuration, so as to achieve better user experience.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method for dynamically connecting Bluetooth equipment is applied to a background server and comprises the following steps:
receiving APP version information sent by a client, and returning a corresponding supportable device list to the client according to the APP version information;
and receiving the information of the Bluetooth equipment to be connected, which is sent by the client and obtained according to the supportable equipment list, and returning a corresponding Bluetooth equipment connection control protocol according to the information of the Bluetooth equipment to be connected.
2. The method of claim 1, wherein the method further comprises:
when a Bluetooth device connection control protocol is updated, sending a protocol update notification and a new Bluetooth device connection control protocol to a client;
or the like, or, alternatively,
when a Bluetooth device is connected with a control protocol to be updated, a protocol update notification is sent to the client;
and receiving a protocol acquisition request sent by the client, and sending a new Bluetooth equipment connection control protocol.
3. The method of claim 1, wherein the bluetooth device connection control protocol comprises a bluetooth device connection control protocol corresponding to a bluetooth device type and comprises a bluetooth device connection control protocol corresponding to a bluetooth device model.
4. The method of claim 1, wherein the information of the bluetooth device to be connected comprises: the model of the Bluetooth device to be connected.
5. A method for dynamically connecting Bluetooth equipment is applied to a client and comprises the following steps:
the APP version information is sent to a background server;
receiving a supportable device list returned by the background server;
obtaining Bluetooth equipment to be connected by searching and combining the supportable equipment list;
acquiring information of Bluetooth equipment to be connected, and sending the information of the Bluetooth equipment to be connected to the background server;
receiving a Bluetooth device connection control protocol corresponding to the Bluetooth device to be connected, which is returned by the background server;
and establishing a Bluetooth connection control module according to the Bluetooth device connection control protocol, and establishing Bluetooth connection with the current available device.
6. The method according to claim 5, wherein the bluetooth device to be connected is obtained by searching and combining the supportable device list; the method comprises the following steps:
searching Bluetooth equipment, comparing the searched Bluetooth equipment with the supportable equipment list, and determining the Bluetooth equipment belonging to the supportable equipment list as currently available Bluetooth equipment;
and determining the Bluetooth devices to be connected in the currently available Bluetooth devices.
7. The method of claim 5, wherein the method further comprises:
receiving a protocol updating notice sent by the background server, determining whether to update a Bluetooth device connection control protocol, and if so, receiving a new Bluetooth device connection control protocol, or receiving the protocol updating notice sent by the background server, sending a protocol acquisition request to the background server, and receiving the new Bluetooth device connection control protocol;
and establishing a Bluetooth connection control module according to the new Bluetooth equipment connection control protocol, and establishing Bluetooth connection with the current available equipment.
8. A method for dynamically connecting Bluetooth devices as claimed in any one of claims 5 to 7, wherein after establishing a Bluetooth connection, the method further comprises:
sending the service request to a Bluetooth device, wherein the data format of the service request is generated according to the connection control protocol of the Bluetooth device;
and receiving an execution result returned by the Bluetooth equipment, and analyzing execution result data according to the connection control protocol of the Bluetooth equipment.
9. A backend server, comprising:
the first storage module is used for storing a supportable device list;
the second storage module is used for storing a Bluetooth device connection control protocol;
the communication module is used for receiving the APP version information, sending a supportable device list corresponding to the APP version information, receiving the information of the to-be-connected Bluetooth device sent by the client and obtained according to the supportable device list, and returning a corresponding Bluetooth device connection control protocol according to the information of the to-be-connected Bluetooth device.
10. A client having bluetooth connectivity capability, comprising:
the storage module is used for storing APP version information;
the device to be connected acquisition module is used for acquiring the Bluetooth device to be connected by searching and combining the supportable device list and acquiring the information of the Bluetooth device to be connected;
the communication module is used for receiving a supportable device list returned by the background server and receiving a Bluetooth device connection control protocol corresponding to the Bluetooth device to be connected and returned by the background server;
and the Bluetooth connection control establishing module is used for establishing a Bluetooth connection control module according to the Bluetooth device connection control protocol and establishing Bluetooth connection with the Bluetooth device to be connected.
CN201910822355.1A 2019-09-02 2019-09-02 Method and device for dynamically connecting Bluetooth equipment Active CN110730439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910822355.1A CN110730439B (en) 2019-09-02 2019-09-02 Method and device for dynamically connecting Bluetooth equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910822355.1A CN110730439B (en) 2019-09-02 2019-09-02 Method and device for dynamically connecting Bluetooth equipment

Publications (2)

Publication Number Publication Date
CN110730439A true CN110730439A (en) 2020-01-24
CN110730439B CN110730439B (en) 2022-09-20

Family

ID=69218774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910822355.1A Active CN110730439B (en) 2019-09-02 2019-09-02 Method and device for dynamically connecting Bluetooth equipment

Country Status (1)

Country Link
CN (1) CN110730439B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080214110A1 (en) * 2006-12-22 2008-09-04 Samsung Electronics Co., Ltd. Apparatus and method for exchanging active profile in bluetooth communication system
US20100190440A1 (en) * 2009-01-29 2010-07-29 Samsung Electronics Co., Ltd. Method for searching and connecting bluetooth devices and apparatus using the same
CN102332940A (en) * 2011-07-29 2012-01-25 上海合合信息科技发展有限公司 Data transmission method and system making use of Bluetooth wireless technology
CN105204911A (en) * 2015-10-15 2015-12-30 成都艾克尔特医疗科技有限公司 Method and system for upgrading firmware of vital sign monitoring bracelet
WO2017000371A1 (en) * 2015-07-01 2017-01-05 中兴通讯股份有限公司 Method, apparatus and system for adjusting output of bluetooth device, and storage medium
CN106612130A (en) * 2015-10-26 2017-05-03 现代自动车株式会社 Method and apparatus for resolving bluetooth compatibility problem
US20170171028A1 (en) * 2015-12-15 2017-06-15 Wipro Limited Method and a system for sideband server management
CN107659920A (en) * 2017-09-06 2018-02-02 北京小鸟看看科技有限公司 Bluetooth connecting method, bluetooth equipment, mobile terminal, wear display device system
CN107889092A (en) * 2017-11-30 2018-04-06 广东欧珀移动通信有限公司 Bluetooth devices control method, device, terminal device and storage medium
CN108206997A (en) * 2017-12-15 2018-06-26 中兴通讯股份有限公司 Bluetooth connecting method and device
CN108390783A (en) * 2018-02-13 2018-08-10 广东嘉泰智能技术有限公司 A kind of configuration method and device of bluetooth equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080214110A1 (en) * 2006-12-22 2008-09-04 Samsung Electronics Co., Ltd. Apparatus and method for exchanging active profile in bluetooth communication system
US20100190440A1 (en) * 2009-01-29 2010-07-29 Samsung Electronics Co., Ltd. Method for searching and connecting bluetooth devices and apparatus using the same
CN102332940A (en) * 2011-07-29 2012-01-25 上海合合信息科技发展有限公司 Data transmission method and system making use of Bluetooth wireless technology
WO2017000371A1 (en) * 2015-07-01 2017-01-05 中兴通讯股份有限公司 Method, apparatus and system for adjusting output of bluetooth device, and storage medium
CN105204911A (en) * 2015-10-15 2015-12-30 成都艾克尔特医疗科技有限公司 Method and system for upgrading firmware of vital sign monitoring bracelet
CN106612130A (en) * 2015-10-26 2017-05-03 现代自动车株式会社 Method and apparatus for resolving bluetooth compatibility problem
US20170171028A1 (en) * 2015-12-15 2017-06-15 Wipro Limited Method and a system for sideband server management
CN107659920A (en) * 2017-09-06 2018-02-02 北京小鸟看看科技有限公司 Bluetooth connecting method, bluetooth equipment, mobile terminal, wear display device system
CN107889092A (en) * 2017-11-30 2018-04-06 广东欧珀移动通信有限公司 Bluetooth devices control method, device, terminal device and storage medium
CN108206997A (en) * 2017-12-15 2018-06-26 中兴通讯股份有限公司 Bluetooth connecting method and device
WO2019114303A1 (en) * 2017-12-15 2019-06-20 中兴通讯股份有限公司 Bluetooth connection method and device
CN108390783A (en) * 2018-02-13 2018-08-10 广东嘉泰智能技术有限公司 A kind of configuration method and device of bluetooth equipment

Also Published As

Publication number Publication date
CN110730439B (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN107168765B (en) Method and system for remotely compiling software
CN108376078A (en) Upgrade method, device and the household appliance of equipment
WO2019134306A1 (en) Message processing method, device, terminal apparatus, and readable storage medium
CN111158738B (en) Headset firmware upgrading method and device and readable storage medium
WO2015143794A1 (en) Creating and upgrading methods, server, terminal, upgrading system, and storage media
CN113168332B (en) Data processing method and device and mobile terminal
CN114116364A (en) Chip debugging method, storage medium, related device and system
CN114756306A (en) Service calling method, device, equipment and storage medium
CN115114044A (en) Message pushing method, device, equipment and medium
EP3091435A1 (en) Resource management method and device for terminal system
CN112230969B (en) Method and equipment for formatting user space storage area in firmware upgrading process
KR101732186B1 (en) Apparatus and method for providing device management package and method to be provided the device management package
CN113094064A (en) Gateway software module upgrading method, device, equipment and storage medium
CN110730439B (en) Method and device for dynamically connecting Bluetooth equipment
CN112035129A (en) Method and device for driver installation and upgrade and computer equipment
CN110602688A (en) Terminal software upgrading method and upgrading system
CN115484158A (en) Communication configuration method and device of vehicle-mounted equipment based on eSIM card
CN109344096A (en) A kind of method, apparatus, equipment and storage medium connecting external equipment
CN114900387A (en) Cross-platform fusion access method, system, gateway and storage medium of equipment
CN113645599A (en) Information processing method based on electronic equipment interaction and first electronic equipment
CN109800229B (en) Data access method and related equipment
CN113934146A (en) Method and device for controlling Internet of things equipment and electronic equipment
CN105704577A (en) Terminal function configuration method and device
CN112230945A (en) Method and device for improving equipment compatibility, electronic equipment and storage medium
CN113422791A (en) Cloud service configuration method and device, electronic equipment and computer-readable 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