WO2023005274A1 - 蓝牙连接方法、蓝牙设备、系统、电子设备及存储介质 - Google Patents
蓝牙连接方法、蓝牙设备、系统、电子设备及存储介质 Download PDFInfo
- Publication number
- WO2023005274A1 WO2023005274A1 PCT/CN2022/087734 CN2022087734W WO2023005274A1 WO 2023005274 A1 WO2023005274 A1 WO 2023005274A1 CN 2022087734 W CN2022087734 W CN 2022087734W WO 2023005274 A1 WO2023005274 A1 WO 2023005274A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- bluetooth
- connection
- slave device
- bluetooth slave
- master 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/11—Allocation or use of connection identifiers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
Definitions
- the invention relates to the technical field of bluetooth, in particular to a bluetooth connection method, a bluetooth master device, a bluetooth slave device, a bluetooth system, an electronic device and a computer storage medium.
- Bluetooth technology is a wireless technology standard that enables short-range data exchange between fixed and mobile devices and building personal area networks.
- the essence of Bluetooth technology is to establish a general radio air interface to build a communication environment between fixed equipment or mobile equipment, and to further combine communication technology with computer technology to enable various 3C equipment (communication products Communication, computer products Computer, Consumer electronics (Consumer) can communicate and operate within a short distance without wires or cables connecting each other.
- 3C equipment communication products Communication, computer products Computer, Consumer electronics (Consumer) can communicate and operate within a short distance without wires or cables connecting each other.
- Bluetooth slave devices there is no difference between multiple Bluetooth slave devices for the Bluetooth master device.
- Each Bluetooth slave device can be connected to the master device, and only one Bluetooth slave device can be connected to the Bluetooth master device at the same time.
- This connection method will cause a specific Bluetooth slave device to fail to connect to the Bluetooth master device preferentially. For example, in a vehicle-mounted Bluetooth system, if the driver's Bluetooth device cannot be connected to the vehicle-mounted Bluetooth first, the purpose of freeing the driver's hands and reducing the risk of traffic accidents cannot be achieved, and driving safety cannot be guaranteed.
- the present disclosure aims at the above-mentioned deficiencies in the prior art, and provides a Bluetooth connection method, a Bluetooth master device, a Bluetooth slave device, a Bluetooth system, an electronic device, and a computer storage medium.
- an embodiment of the present disclosure provides a Bluetooth connection method, the method comprising:
- the identification information includes at least identity information of the first Bluetooth slave device that sends the connection request.
- the connection authority includes a connection priority.
- the connection state of the current Bluetooth master device is that the current Bluetooth master device has established a Bluetooth connection with the second Bluetooth slave device
- the current connection status of the master device and the connection authority of the first Bluetooth slave device determine the steps of the target Bluetooth connection slave device including:
- the connection priority of the first Bluetooth slave device is higher than the connection priority of the second Bluetooth slave device, the first Bluetooth slave device is determined as the target Bluetooth connection slave device.
- the method further includes:
- the connection authority includes a connection priority.
- the step of determining the target Bluetooth connection slave device according to the current connection status of the current Bluetooth master device and the connection authority of the first Bluetooth slave device includes:
- the first Bluetooth slave device with the highest connection priority among the first Bluetooth slave devices is determined as the target Bluetooth connection slave device.
- the identification information includes a mandatory access control MAC address
- the paired device information includes the correspondence between the MAC addresses of the Bluetooth slave devices that have been paired with the current Bluetooth master device and the connection priority.
- the step of determining the connection authority of the first Bluetooth slave device according to the determined identification information and the pre-stored paired device information includes:
- the method also includes:
- the paired device information includes a correspondence between identification information of each Bluetooth slave device paired with the current Bluetooth master device and a connection authority, the connection authority includes a connection priority, and the method further includes:
- the third Bluetooth slave device In response to receiving a permission update request sent by a third Bluetooth slave device, update the corresponding connection permission in the paired device information according to the permission update request; wherein, the third Bluetooth slave device is the same as the current Bluetooth master The Bluetooth slave device with the highest connection priority among the Bluetooth slave devices paired by the device.
- the identification information includes identity information
- the connection permission also includes operation permission
- the method further includes:
- the Bluetooth master device is a vehicle Bluetooth
- the method also includes:
- control the display panel of the current master device In response to receiving a Bluetooth search request sent by any Bluetooth slave device, control the display panel of the current master device to display the vehicle Bluetooth icon.
- an embodiment of the present disclosure provides a Bluetooth connection method, the method comprising:
- the method also includes:
- a permission update request is sent to the Bluetooth master device to update the pre-stored paired device information of the Bluetooth master device.
- the method also includes:
- an embodiment of the present disclosure provides a Bluetooth master device, where the Bluetooth master device includes:
- the receiving module is configured to receive a connection request
- the identification processing module is configured to determine the identification information of the first Bluetooth slave device that sends the connection request according to the connection request received by the receiving module;
- the authority processing module is configured to determine the connection authority of the first Bluetooth slave device according to the identification information of the first Bluetooth slave device and the pre-stored paired device information;
- the connection processing module is configured to determine a device connected to the current Bluetooth master device by Bluetooth according to the current connection state of the current Bluetooth master device and the connection authority of the first Bluetooth slave device.
- an embodiment of the present disclosure provides a Bluetooth slave device, and the Bluetooth slave device includes:
- a sending module configured to send a connection request to a Bluetooth master device, so that the Bluetooth master device processes the connection according to the identification information carried in the connection request, the paired device information pre-stored by the Bluetooth master device, and the current connection status ask.
- an embodiment of the present disclosure provides a bluetooth system, wherein the bluetooth system includes the aforementioned bluetooth master device and at least one aforementioned bluetooth slave device.
- an electronic device including:
- processors one or more processors
- the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the aforementioned Bluetooth connection method.
- an embodiment of the present disclosure provides a computer storage medium, on which a computer program is stored, wherein, when the program is executed, the aforementioned Bluetooth connection method is implemented.
- the Bluetooth connection method provided by the embodiment of the present disclosure determines the identification information of the first Bluetooth slave device sending the connection request according to the received connection request, and determines the first Bluetooth slave device according to the identification information of the first Bluetooth slave device and the pre-stored paired device information.
- the connection authority of the slave device can be based on the identification information of the Bluetooth slave device, the pre-stored paired device of the current Bluetooth master device Information and the current connection status determine the Bluetooth slave device with the highest connection authority as the target Bluetooth slave device, so that the Bluetooth master device can establish a Bluetooth connection with the target Bluetooth slave device, and ensure that a specific Bluetooth slave device can be preferentially connected to the Bluetooth master device, improving The security of Bluetooth connection and the experience of using Bluetooth.
- the driver's Bluetooth is connected to the car Bluetooth firstly from the device, so as to achieve the purpose of freeing the driver's hands and reducing the hidden dangers of traffic accidents, ensuring driving safety, improving the security of Bluetooth connection, the safety of the car system and the driver's Bluetooth experience. .
- FIG. 1 is a schematic flowchart of a Bluetooth connection method on a Bluetooth master device side provided by an embodiment of the present disclosure
- FIG. 2 is a schematic flow diagram of a bluetooth master device determining a target bluetooth connection slave device provided by an embodiment of the present disclosure
- FIG. 3 is a schematic flow diagram of a Bluetooth master device updating paired device information provided by an embodiment of the present disclosure
- Fig. 4 is a schematic flow chart of updating connection authority in paired device information provided by an embodiment of the present disclosure
- FIG. 5 is a schematic diagram of default permission assignment provided by an embodiment of the present disclosure.
- Fig. 6 is a schematic diagram of the paired device information of the on-board Bluetooth provided by an embodiment of the present disclosure
- FIG. 7 is a schematic flow diagram of a bluetooth master device processing an operation request from a bluetooth slave device according to an embodiment of the present disclosure
- FIG. 8 is a schematic flowchart of a Bluetooth slave device-side Bluetooth connection method provided by an embodiment of the present disclosure
- FIG. 9 is a schematic flow diagram of a Bluetooth slave device requesting to pair with a Bluetooth Zhu device according to an embodiment of the present disclosure.
- FIG. 10 is a block diagram 1 of a Bluetooth master device provided by an embodiment of the present disclosure.
- FIG. 11 is a second schematic diagram of a module of a Bluetooth master device provided by an embodiment of the present disclosure.
- FIG. 12 is a third schematic diagram of a module of a Bluetooth master device provided by an embodiment of the present disclosure.
- FIG. 13 is a schematic diagram of a vehicle-mounted Bluetooth system provided by an embodiment of the present disclosure.
- FIG. 14 is a block diagram 1 of a Bluetooth slave device provided by an embodiment of the present disclosure.
- FIG. 15 is a second block diagram of a Bluetooth slave device provided by an embodiment of the present disclosure.
- Embodiments described herein may be described with reference to plan views and/or cross-sectional views by way of idealized schematic illustrations of the present disclosure. Accordingly, the example illustrations may be modified according to manufacturing techniques and/or tolerances. Therefore, the embodiments are not limited to the ones shown in the drawings but include modifications of configurations formed based on manufacturing processes. Accordingly, the regions illustrated in the figures have schematic properties, and the shapes of the regions shown in the figures illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.
- An embodiment of the present disclosure provides a Bluetooth connection method, which can be applied to a Bluetooth system including a Bluetooth master device and at least one Bluetooth slave device. As shown in Figure 1, when the method is applied to the Bluetooth master device, the following steps may be included:
- step S11 the identification information of the first Bluetooth slave device sending the connection request is determined according to the received connection request.
- step S12 the connection authority of the first Bluetooth slave device is determined according to the identification information of the first Bluetooth slave device and the pre-stored paired device information.
- step S13 determine the target Bluetooth connection slave device according to the current connection state of the current Bluetooth master device and the connection authority of the first Bluetooth slave device.
- the identification information of different Bluetooth slave devices should be different, so that the Bluetooth master device can distinguish and identify, and any information that can be used to distinguish the Bluetooth slave devices can be used as the identification information of the Bluetooth slave devices.
- the Bluetooth slave device can send a connection request in the form of a BLE broadcast message to the Bluetooth master device through the BLE (Bluetooth Low Energy, Bluetooth Low Energy) protocol.
- BLE Bluetooth Low Energy, Bluetooth Low Energy
- the Bluetooth master device can obtain the identification information of the first Bluetooth slave device therefrom.
- the paired device information pre-stored by the Bluetooth master device records the configuration information of any Bluetooth slave device paired with the current Bluetooth master device, and still distinguishes the configuration information of different Bluetooth slave devices according to the identification information of the Bluetooth slave device. Therefore, the Bluetooth master device can determine the connection authority configured for the first Bluetooth slave device according to the identification information of the first Bluetooth slave device and the pre-stored paired device information.
- the current connection status of the Bluetooth master device may include: whether the Bluetooth master device has currently established a Bluetooth connection with the Bluetooth slave device, the specific Bluetooth slave device that has currently established a Bluetooth connection with the Bluetooth master device, and so on.
- the bluetooth master device can compare the connection authority of each bluetooth slave device (or each bluetooth slave device requesting connection and the bluetooth slave device currently connected to the bluetooth master device) according to the current connection status and the connection authority of the first bluetooth slave device, Determine the Bluetooth slave device with the highest connection authority as the target Bluetooth slave device, the target Bluetooth slave device is the Bluetooth master device that intends to establish a Bluetooth connection with it after receiving the connection request sent by the first Bluetooth slave device . After determining the target Bluetooth slave device according to the current connection state of the current Bluetooth master device and the connection authority of the first Bluetooth slave device, the Bluetooth master device can establish a Bluetooth connection with the target Bluetooth slave device.
- the Bluetooth connection method determines the identification information of the first Bluetooth slave device that sends the connection request according to the received connection request, and determines the identification information of the first Bluetooth slave device according to the identification information of the first Bluetooth slave device and
- the pre-stored paired device information determines the connection authority of the first Bluetooth slave device, and determines the target Bluetooth connection slave device according to the current connection status of the current Bluetooth master device and the connection authority of the first Bluetooth slave device, and can be based on the identification information of the Bluetooth slave device,
- the pre-stored paired device information of the current Bluetooth master device and the current connection status determine the Bluetooth slave device with the highest connection authority as the target Bluetooth slave device, so that the Bluetooth master device can establish a Bluetooth connection with the target Bluetooth slave device, ensuring that the specific Bluetooth slave The device can be preferentially connected to the Bluetooth master device, improving the security of the Bluetooth connection and the experience of using the Bluetooth.
- the driver's Bluetooth is connected to the car Bluetooth firstly from the device, so as to achieve the purpose of freeing the driver's hands and reducing the hidden dangers of traffic accidents, ensuring driving safety, improving the security of Bluetooth connection, the safety of the car system and the driver's Bluetooth experience. .
- the owner of the Bluetooth slave device that sends the connection request often has a certain relationship with the owner of the Bluetooth master device.
- the owner of the Bluetooth slave device can be a family member, friend, etc. of the owner of the Bluetooth master device.
- the Bluetooth master device can also send its own identity information, such as "driver”, "family member", “friend” and so on, so that the Bluetooth master device can process the connection request.
- the identification information includes at least identity information of the first Bluetooth slave device that sends the connection request.
- the address information and device name can also be used as the identification information of the Bluetooth slave device.
- any other information other than the identity information, address information, and device name can also be used.
- the information that can be used to distinguish the Bluetooth slave device is used as the identification information of the Bluetooth slave device.
- the Bluetooth master device Since only one Bluetooth slave device can connect to the Bluetooth master device at the same time, at present, if the Bluetooth master device has established a Bluetooth connection with a Bluetooth slave device, other Bluetooth slave devices must establish a Bluetooth connection with the Bluetooth master device. Artificially disconnect the current Bluetooth connection of the Bluetooth master device first, and then connect the Bluetooth master device with the other Bluetooth slave devices. For this reason, the embodiment of the present disclosure proposes that if the Bluetooth master device has established a Bluetooth connection with the Bluetooth slave device but has received a connection request sent by another Bluetooth slave device, the Bluetooth master device can automatically compare the connection authority of the Bluetooth slave device that requests the connection. and the connection authority of the currently connected bluetooth slave device to determine the bluetooth slave device with the highest connection authority, so as to automatically establish a bluetooth connection with the bluetooth slave device with the highest connection authority.
- the connection authority includes the connection priority.
- the step of determining the target Bluetooth connection slave device according to the current connection state of the current Bluetooth master device and the connection authority of the first Bluetooth slave device may include the following steps:
- step S131 the connection priority of the second Bluetooth slave device is determined.
- step S132 if the connection priority of the first Bluetooth slave device is higher than that of the second Bluetooth slave device, the first Bluetooth slave device is determined as the target Bluetooth connection slave device.
- the Bluetooth master device can further determine that the connection priority of the second Bluetooth slave device is Specifically, the Bluetooth master device can query the pre-stored paired device information according to the identification information of the second Bluetooth slave device, and determine the connection priority configured for the second Bluetooth slave device.
- the Bluetooth master device After determining the connection priority of the first Bluetooth slave device and the connection priority of the second Bluetooth slave device, the Bluetooth master device can compare the connection priority of the first Bluetooth slave device with the connection priority of the second Bluetooth slave device, In the case that the connection priority of the first Bluetooth slave device is higher than that of the second Bluetooth slave device, the first Bluetooth slave device may be determined as the target Bluetooth connection slave device.
- any Bluetooth slave device when the connection priority of any Bluetooth slave device is higher than the connection priority of the second Bluetooth slave device, the "any Bluetooth slave device" can be determined is the target Bluetooth connection slave device; if there are multiple first Bluetooth slave devices whose connection priority is higher than that of the second Bluetooth slave device, the connection priority can be higher than that of the second Bluetooth slave device.
- the first Bluetooth slave device that sends the connection request earliest among the first Bluetooth slave devices is determined as the target Bluetooth connection slave device.
- the Bluetooth connection method provided by the embodiment of the present disclosure, if the current Bluetooth master device has established a Bluetooth connection with the second Bluetooth slave device, then determine the connection priority of the second Bluetooth slave device. When the connection priority of a Bluetooth slave device is higher than that of the second Bluetooth slave device, the first Bluetooth slave device is determined as the target Bluetooth connection slave device.
- the Bluetooth master device automatically compares the connection priority of the Bluetooth slave device requesting connection with the connection priority of the connected Bluetooth slave device, and determines the Bluetooth slave device with the highest connection priority as the target Bluetooth connection slave device, regardless of the specific Bluetooth slave device Whether it is the second Bluetooth slave device that has established a Bluetooth connection with the Bluetooth master device, or the first Bluetooth slave device that requests to establish a Bluetooth connection with the Bluetooth master device, it can be automatically and quickly determined by the Bluetooth master device as the target Bluetooth connection slave device , and then give priority to establishing a Bluetooth connection with the Bluetooth master device, without manually switching connections between multiple Bluetooth slave devices, improving the security of the Bluetooth connection and the Bluetooth user experience.
- the Bluetooth master device may first automatically disconnect the Bluetooth connection with the second Bluetooth slave device, and then establish a Bluetooth connection with the first Bluetooth slave device.
- the method may further include the following steps: disconnecting the second Bluetooth slave device Bluetooth connection.
- the Bluetooth master device can establish a Bluetooth connection with the target Bluetooth-connected slave device.
- the Bluetooth master device Since only one Bluetooth slave device can be connected to the Bluetooth master device at the same time, at present, if the Bluetooth master device does not currently establish a Bluetooth connection with any Bluetooth slave device and receives connection requests sent by multiple Bluetooth slave devices, the Bluetooth master device The device will respond to the earliest connection request and establish a Bluetooth connection with the Bluetooth slave device that sent the connection request earliest. This will result in certain bluetooth slave devices not being able to preferentially connect to the bluetooth master. For this reason, the embodiment of the present disclosure proposes that if the Bluetooth master device has not established a Bluetooth connection with any Bluetooth slave device but has received connection requests sent by multiple Bluetooth slave devices, the Bluetooth master device can automatically compare the Bluetooth slave devices that request connection. The connection authority is determined to determine the Bluetooth slave device with the highest connection authority, so as to automatically establish a Bluetooth connection with the Bluetooth slave device with the highest connection authority.
- the connection authority includes a connection priority.
- the step of determining the target Bluetooth connection slave device according to the current connection status of the current Bluetooth master device and the connection authority of the first Bluetooth slave device may include the following steps: The first Bluetooth slave device with the highest connection priority among the first Bluetooth slave devices is determined as the target Bluetooth connection slave device.
- the Bluetooth master device can establish a Bluetooth connection with the target Bluetooth slave device.
- Each Bluetooth slave device has a unique MAC (Mandatory Access Control) address, and different Bluetooth slave device MAC addresses are also different, so the MAC address of the Bluetooth slave device can be used as the identification information of the Bluetooth slave device, and in In the pre-stored paired device information, the configuration information of different Bluetooth slave devices is distinguished according to the MAC addresses of the Bluetooth slave devices.
- MAC Media Access Control
- the identification information includes a MAC address
- the paired device information includes the correspondence between the MAC addresses and connection priorities of each Bluetooth slave device paired with the current Bluetooth master device, so
- the step of determining the connection authority of the first bluetooth slave device according to the determined identification information and the pre-stored paired device information may include the following steps: querying the corresponding relationship according to the determined MAC address of the first bluetooth slave device , to determine the connection authority of the first Bluetooth slave device.
- the Bluetooth master device pre-stores the paired device information, which records the configuration information of any Bluetooth slave device that has been paired with the current Bluetooth master device, and still distinguishes the configuration information of different Bluetooth slave devices according to the identification information of the Bluetooth slave device. Therefore, whenever a Bluetooth slave device is successfully paired with the Bluetooth master device, the Bluetooth master device can update the paired device information.
- the method may further include the following steps:
- step S21 in response to receiving the pairing request, verify the security verification information carried in the pairing request.
- step S22 when the verification is passed, the paired device information is updated according to the identification information carried in the pairing request.
- the pairing request sent by the Bluetooth slave device is generated based on the security instruction input by the user.
- the Bluetooth slave device may pre-agreed with the Bluetooth master device on security verification information different from the PIN, and the Bluetooth slave device may also provide security verification information when requesting to be paired with the Bluetooth master device.
- the security verification information is consistent with the security verification information corresponding to the Bluetooth slave device stored in the current Bluetooth master device, it can be considered that the identity of the Bluetooth slave device is legal, and the security verification information has passed the verification.
- the Bluetooth master device can pass the pairing request, and add the configuration information of the Bluetooth slave device sending the pairing request to the paired device information according to the identification information carried in the pairing request.
- the owner of a specific bluetooth slave device is often also the owner of the bluetooth master device, or the one with the highest frequency of use of the bluetooth master device.
- the paired device information pre-stored by the Bluetooth master device records the connection authority of each Bluetooth slave device that has been paired with the current Bluetooth master device. After a specific Bluetooth slave device establishes a Bluetooth connection with the Bluetooth master device, it can modify other Bluetooth slave devices. to ensure the security of the Bluetooth connection and the experience of using the Bluetooth.
- the paired device information includes the correspondence between the identification information of each Bluetooth slave device paired with the current Bluetooth master device and the connection authority, and the connection authority includes the connection priority, as shown in Figure 4
- the method may also include the following steps:
- step S31 in response to receiving the authority update request sent by the third Bluetooth slave device, the corresponding connection authority in the paired device information is updated according to the authority update request; wherein, the third Bluetooth slave device is paired with the current Bluetooth master device The bluetooth slave device with the highest priority is connected to each bluetooth slave device.
- the first Bluetooth slave device refers to the Bluetooth slave device that sends the connection request
- the second Bluetooth slave device refers to the Bluetooth slave device currently connected to the Bluetooth master device
- the third Bluetooth slave device refers to the Bluetooth slave device that sends the connection request.
- the Bluetooth slave device with the highest generation connection priority such as the first Bluetooth slave device or the second Bluetooth slave device mentioned above, can both exist as the third Bluetooth slave device at the same time.
- the connection authority of each Bluetooth slave device paired with the current Bluetooth master device recorded in the paired device information may also include operation authority in addition to the connection priority.
- Operation authority refers to the authority of various operations that the Bluetooth slave device can perform through the Bluetooth master device after establishing a Bluetooth connection with the Bluetooth master device. Various operations can include: open/close the car door, call, play songs, set to blacklist, etc. wait.
- the Bluetooth master device updates the paired device information according to the identification information carried in the pairing request, it can set its connection authority as the default authority according to the identification information of each Bluetooth slave device.
- the on-board Bluetooth can add the connection authority of each Bluetooth slave device to the paired device information according to the default permission allocation table shown in FIG. 5 and the identification information carried in the pairing request sent by each Bluetooth slave device.
- the identification information may include identity information, that is, the identity information of the owner of the Bluetooth slave device, such as "driver", "family member", “friend” and so on.
- the default permission can be set according to the identity information of the Bluetooth slave device.
- Bluetooth slave devices with different identity information can have different default permissions.
- the driver's Bluetooth slave device has the highest default permission, and the connection priority is first and has Open/close the car door, talk, play songs, and prohibit setting as blacklist.
- the Bluetooth slave device connection priority of all family members of the driver is the second priority and has calls, play songs, and no settings.
- the Bluetooth slave device connection priority of all the driver's friends (that is, the identity information includes “friend) is the third and has operation rights such as calling, playing songs, and not set as blacklist, and other Bluetooth slave devices are connected It has the fourth priority and has operation rights such as playing songs and not being set as blacklist.
- the paired device information of the car Bluetooth can be set as shown in Figure 6.
- the paired devices can include the Bluetooth slave devices of the driver, the first family member, the second family member and other users, and the identification of the Bluetooth slave device
- the information can include identity information, MAC address and device name, and the permission details can be the default permission as shown in Figure 5, of course, it can also be customized by the car Bluetooth or the driver's Bluetooth slave device.
- the Bluetooth master device can process the operation request of the Bluetooth slave device according to the connection authority in the paired device information.
- the identification information includes identity information
- the connection authority also includes operation authority.
- the method may further include the following steps:
- step S41 the identity information of the fourth Bluetooth slave device sending the operation request is determined according to the received operation request, wherein the fourth Bluetooth slave device is the Bluetooth slave device currently establishing a Bluetooth connection with the current Bluetooth master device.
- step S42 the operation authority of the fourth Bluetooth slave device is determined according to the identity information of the fourth Bluetooth slave device and the paired device information.
- step S43 the operation request is processed according to the operation authority of the fourth Bluetooth slave device.
- the Bluetooth slave device can send an operation request in the form of a BLE broadcast message to the Bluetooth master device through the BLE protocol.
- it can carry the identification information of the device in the operation request.
- the identification information includes identity information. Therefore,
- the Bluetooth master device can acquire the identity information of the fourth Bluetooth slave device therefrom.
- the Bluetooth master device sets a default or customized connection permission according to the identity information of the Bluetooth slave device, and Bluetooth slave devices with different identity information may have different connection permissions.
- the paired device information includes the corresponding relationship between the identity information of each Bluetooth slave device paired with the current Bluetooth master device and the connection authority.
- the Bluetooth master device can query the corresponding relationship according to the identity information of the fourth Bluetooth slave device to determine the fourth Bluetooth slave device. For the operation authority of the slave device, when it is determined that the fourth Bluetooth slave device has the authority for the operation requested by it, the operation request sent by it can be passed.
- the fourth Bluetooth slave device refers to the Bluetooth slave device that is currently connected to the Bluetooth master device and sends an operation request to the Bluetooth master device.
- the second Bluetooth slave device as described above may also be At the same time, it exists as the fourth Bluetooth slave device.
- the Bluetooth connection method configures connection permissions for each Bluetooth slave device that has been paired with the current Bluetooth master device in the paired device information.
- different operations can be performed through the Bluetooth master device, and a specific Bluetooth slave device can perform the most operations through the Bluetooth master device, improving the security of the Bluetooth connection and the Bluetooth user experience.
- the method may further include the following step: in response to receiving the Bluetooth search request, controlling the display panel of the current Bluetooth master device to display the vehicle Bluetooth icon.
- Bluetooth slave devices may also display different Bluetooth icons, so that the Bluetooth master device can distinguish them.
- the Bluetooth connection method provided by the embodiments of the present disclosure can be applied not only to a Bluetooth master device, but also to a Bluetooth slave device.
- a Bluetooth slave device when the Bluetooth connection method provided by the embodiment of the present disclosure is applied to a Bluetooth slave device, the following steps may be included:
- step S51 a connection request is sent to the Bluetooth master device for the Bluetooth master device to process the connection request according to the identification information carried in the connection request, the paired device information pre-stored by the Bluetooth master device, and the current connection status.
- the Bluetooth slave device can send a connection request in the form of a BLE broadcast message to the Bluetooth master device through the BLE (Bluetooth Low Energy, Bluetooth Low Energy) protocol.
- BLE Bluetooth Low Energy, Bluetooth Low Energy
- the Bluetooth slave device can determine the identification information of the Bluetooth slave device sending the connection request according to the received connection request, determine the connection authority of the Bluetooth slave device according to the identification information of the Bluetooth slave device and the pre-stored paired device information, and determine the connection authority of the Bluetooth slave device according to the current Bluetooth master
- the current connection state of the device and the connection authority of the Bluetooth slave device determine the target Bluetooth connection slave device.
- the owner of a specific bluetooth slave device is often also the owner of the bluetooth master device, or the one with the highest frequency of use of the bluetooth master device.
- the paired device information pre-stored by the Bluetooth master device records the connection authority of each Bluetooth slave device that has been paired with the current Bluetooth master device. After a specific Bluetooth slave device establishes a Bluetooth connection with the Bluetooth master device, it can modify other Bluetooth slave devices. The connection permission of the device to ensure the security of the Bluetooth connection and the experience of using the Bluetooth.
- the method may further include the following steps: in the case that the current Bluetooth slave device has established a Bluetooth connection with the Bluetooth master device, sending a permission update request to the Bluetooth master device to update the Bluetooth master device pre-stored paired device information.
- the current Bluetooth slave device When the current Bluetooth slave device has established a Bluetooth connection with the Bluetooth master device, it sends a permission update request to the Bluetooth master device to update the paired device information stored in the Bluetooth master device.
- the specific Bluetooth slave device establishes a Bluetooth connection with the Bluetooth master device. After connecting, you can modify the connection permissions of other Bluetooth slave devices to improve the security of Bluetooth connections and the experience of using Bluetooth.
- the first pairing between a Bluetooth slave device and a Bluetooth master device often needs to be verified by a PIN (Personal Identification Number, personal identification password).
- PIN Personal Identification Number
- the PIN is only composed of 4 to 6 digits.
- the PIN is encrypted by the Bluetooth slave device using the E2 or E3 encryption algorithm, and then transmitted to the Bluetooth master device for authentication.
- the data packet carrying the encrypted PIN is vulnerable to attack, resulting in the cracking of the PIN and the theft of the identification information of the Bluetooth slave device.
- the Bluetooth slave device can pre-agree with the Bluetooth master device on security verification information different from PIN, such as private password, fingerprint, face recognition information, etc.
- the Bluetooth slave device requests to pair with the Bluetooth master device, the Bluetooth slave device is required to provide security verification information to verify their identity.
- the method further includes the following steps:
- step S61 a pairing request is generated according to an externally input security instruction.
- step S62 send a pairing request to the Bluetooth master device, for the Bluetooth master device to verify the security verification information carried in the pairing request and update the paired device information according to the identification information carried in the pairing request when the verification is passed.
- the Bluetooth master device determines that the security verification information sent by the Bluetooth slave device is consistent with the security verification information corresponding to the Bluetooth slave device stored in the current Bluetooth master device, it can consider that the identity of the Bluetooth slave device is legal, and the security verification information has passed the verification. Therefore, the pairing request of the Bluetooth slave device is passed, and the configuration information of the Bluetooth slave device is added to the paired device information according to the identification information carried in the pairing request.
- the embodiment of the present disclosure also provides a Bluetooth master device.
- the Bluetooth master device may include:
- the receiving module 101 is configured to receive a connection request.
- the identification processing module 102 is configured to determine the identification information of the first Bluetooth slave device sending the connection request according to the connection request received by the receiving module.
- the authority processing module 103 is configured to determine the connection authority of the first Bluetooth slave device according to the identification information of the first Bluetooth slave device and the pre-stored paired device information.
- the connection processing module 104 is configured to determine the device that is Bluetooth connected to the current Bluetooth master device according to the current connection state of the current Bluetooth master device and the connection authority of the first Bluetooth slave device.
- the identification information includes at least identity information of the first Bluetooth slave device that sends the connection request.
- the connection authority includes a connection priority.
- the connection processing module 104 is set to:
- the first Bluetooth slave device is determined as the target Bluetooth connection slave device.
- connection processing module 104 is further configured to: disconnect the Bluetooth connection with the second Bluetooth slave device.
- the connection authority includes a connection priority.
- the connection processing module 104 is configured to: determine the first Bluetooth slave device with the highest connection priority among the first Bluetooth slave devices as the target Bluetooth connection slave device.
- the identification information includes a mandatory access control MAC address
- the paired device information includes the correspondence between the MAC addresses of the Bluetooth slave devices that have been paired with the current Bluetooth master device and the connection priority
- the authority processing module 103 is set to: query the corresponding relationship according to the determined MAC address of the first Bluetooth slave device, so as to determine the connection authority of the first Bluetooth slave device.
- the receiving module 101 is further configured to: receive a pairing request.
- the Bluetooth master device further includes a verification module 105 configured to: respond to the receiving module 101 receiving a pairing request, and verify the security verification information carried in the pairing request.
- the authority processing module 103 is further configured to: when the verification is passed, update the paired device information according to the identification information carried in the pairing request.
- the paired device information includes the correspondence between the identification information of each Bluetooth slave device paired with the current Bluetooth master device and the connection authority, and the connection authority includes the connection priority.
- the receiving module 101 is also configured to: receive A permission update request sent by the third Bluetooth slave device.
- the authority processing module 103 is also configured to: in response to receiving the authority update request sent by the third Bluetooth slave device, update the corresponding connection authority in the paired device information according to the authority update request; wherein, the third Bluetooth slave device is the same as the current The Bluetooth slave device with the highest connection priority among the Bluetooth slave devices paired by the Bluetooth master device.
- the identification information includes identity information
- the connection authority further includes operation authority
- the receiving module 101 is further configured to: receive an operation request.
- the identification processing module 102 is also configured to: determine the identity information of the fourth Bluetooth slave device sending the operation request according to the received operation request, wherein the fourth Bluetooth slave device is the Bluetooth slave device currently establishing a Bluetooth connection with the current Bluetooth master device equipment.
- the permission processing module 103 is further configured to: determine the operation permission of the fourth Bluetooth slave device according to the identity information of the fourth Bluetooth slave device and the paired device information.
- connection processing module 104 is further configured to: process the operation request according to the operation authority of the fourth Bluetooth slave device.
- the Bluetooth master device is a vehicle Bluetooth
- the receiving module 101 is further configured to: receive a Bluetooth search request.
- the in-vehicle Bluetooth further includes a control module 106, and the control module 106 is configured to: in response to receiving a Bluetooth search request, control the display panel of the current master device to display an in-vehicle Bluetooth icon.
- the control module of the vehicle Bluetooth can also control the display panel to display the pre-stored paired device information of the vehicle Bluetooth, including the identity information of the Bluetooth slave device, MAC address information, device name, permission details and so on.
- the Bluetooth connection method provided by the embodiment of the present disclosure can be applied to a vehicle-mounted Bluetooth system.
- the car side can include a vehicle-mounted Bluetooth terminal, that is, a Bluetooth master device, and the vehicle-mounted Bluetooth terminal can include a display module (may include the above-mentioned display panel), a management module (may include the above-mentioned identification processing module 102, connection processing module 104 and verification module 105) and A storage module (may include a receiving module 101 and a rights processing module 103).
- the mobile phone side may include multiple mobile phone terminals, that is, bluetooth slave devices, such as a first mobile phone terminal, a second mobile phone terminal and a third mobile phone terminal. Multiple mobile phones can send BLE broadcast messages to the vehicle Bluetooth terminal to request pairing with the vehicle Bluetooth terminal or establish a Bluetooth connection or perform other operations.
- the Bluetooth slave device may include:
- the sending module 201 is configured to send a connection request to the Bluetooth master device, so that the Bluetooth master device processes the connection request according to the identification information carried in the connection request, the paired device information pre-stored by the Bluetooth master device, and the current connection status.
- the sending module 201 is also configured to: when the current Bluetooth slave device has established a Bluetooth connection with the Bluetooth master device, send a permission update request to the Bluetooth master device to update the pre-stored paired status of the Bluetooth master device. Device Information.
- the Bluetooth slave device further includes a processing module 202, and the processing module 202 is configured to: generate a pairing request according to an externally input security instruction.
- the sending module 201 is also configured to: send a pairing request to the Bluetooth master device, so that the Bluetooth master device can verify the security verification information carried in the pairing request and update the paired device according to the identification information carried in the pairing request when the verification is passed. information.
- An embodiment of the present disclosure further provides a bluetooth system, wherein the bluetooth system includes the aforementioned bluetooth master device and at least one aforementioned bluetooth slave device.
- An embodiment of the present disclosure also provides an electronic device, including:
- processors one or more processors
- the one or more processors are made to implement the Bluetooth connection method provided by the foregoing embodiments.
- An embodiment of the present disclosure further provides a computer storage medium, on which a computer program is stored, wherein, when the program is executed, the Bluetooth connection method provided by the foregoing embodiments is implemented.
- the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute.
- Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit .
- Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
- computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media.
- Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
- communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本公开提供一种蓝牙连接方法,包括:根据接收到的连接请求确定发送所述连接请求的第一蓝牙从设备的标识信息;根据所述第一蓝牙从设备的标识信息和预存的已配对设备信息确定所述第一蓝牙从设备的连接权限;根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备。确保特定的蓝牙从设备能够优先连接到蓝牙主设备,提高蓝牙连接的安全性以及蓝牙使用体验。本公开还提供一种蓝牙设备、系统、电子设备及存储介质。
Description
相关申请的交叉引用
本公开基于2021年07月26日提交的发明名称为“蓝牙连接方法、蓝牙设备、系统、电子设备及存储介质”的中国专利申请CN202110842351.7,并且要求该专利申请的优先权,通过引用将其所公开的内容全部并入本公开。
本发明涉及蓝牙技术领域,具体涉及一种蓝牙连接方法、蓝牙主设备、蓝牙从设备、蓝牙系统、电子设备及计算机存储介质。
蓝牙技术是一种无线技术标准,可实现固定设备、移动设备和楼宇个人域网之间的短距离数据交换。蓝牙技术的实质内容是建立通用的无线电空中接口,以构建固定设备或移动设备之间的通信环境,将通信技术与计算机技术进一步结合起来,使各种3C设备(通讯产品Communication、电脑产品Computer、消费类电子产品Consumer)在没有电线或电缆相互连接的情况下,能在近距离范围内实现通信及操作。
在蓝牙系统中,多个蓝牙从设备对于蓝牙主设备来说没有区别,各蓝牙从设备均可以连接到主设备,并且在同一时间只能有一个蓝牙从设备连接到蓝牙主设备,但是,这种连接方式这将导致特定的蓝牙从设备无法优先连接到蓝牙主设备。例如在车载蓝牙系统中,若司机的蓝牙设备无法优先连接到车载蓝牙,则无法达到司机解放双手、降低交通肇事隐患的目的,无法保障行车安全性。
发明内容
本公开针对现有技术中存在的上述不足,提供一种蓝牙连接方法、蓝牙主设备、蓝牙从设备、蓝牙系统、电子设备及计算机存储介质。
第一方面,本公开实施例提供一种蓝牙连接方法,所述方法包括:
根据接收到的连接请求确定发送所述连接请求的第一蓝牙从设备的标识信息;
根据所述第一蓝牙从设备的标识信息和预存的已配对设备信息确定所述第一蓝牙从设备的连接权限;
根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备。
在一些实施例中,所述标识信息至少包括发送所述连接请求的第一蓝牙从设备的身份信息。
在一些实施例中,所述连接权限包括连接优先级,在所述当前蓝牙主设备的当前连接状态为当前蓝牙主设备已与第二蓝牙从设备建立蓝牙连接的情况下,所述根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备的步骤包括:
确定所述第二蓝牙从设备的连接优先级;
在所述第一蓝牙从设备的连接优先级高于所述第二蓝牙从设备的连接优先级的情况下,将所述第一蓝牙从设备确定为目标蓝牙连接从设备。
在一些实施例中,在所述将所述第一蓝牙从设备确定为目标蓝牙连接从设备的步骤之后,所述方法还包括:
断开与所述第二蓝牙从设备的蓝牙连接。
在一些实施例中,所述连接权限包括连接优先级,在所述第一蓝牙从设备为多个、且所述当前蓝牙主设备的当前连接状态为当前蓝牙主设备未与任意蓝牙从设备建立蓝牙连接的情况下,所述根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备的步骤包括:
将各所述第一蓝牙从设备中连接优先级最高的第一蓝牙从设备确定为目标蓝牙连接从设备。
在一些实施例中,所述标识信息包括强制访问控制MAC地址,所述已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的MAC地址与连接优先级之间的对应关系,所述根据确定的标识信息和预存的已配对设备信息确定所述第一蓝牙从设备的连接权限的步骤包括:
根据确定的第一蓝牙从设备的MAC地址查询所述对应关系,以确定所述第一蓝牙从设备的连接权限。
在一些实施例中,所述方法还包括:
响应于接收到配对请求,对所述配对请求中携带的安全验证信息进行验证;
当验证通过时,根据所述配对请求中携带的标识信息更新所述已配对设备信息。
在一些实施例中,所述已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的标识信息与连接权限的对应关系,所述连接权限包括连接优先级,所述方法还包括:
响应于接收到第三蓝牙从设备发送的权限更新请求,根据所述权限更新请求更新所述已配对设备信息中相应的连接权限;其中,所述第三蓝牙从设备为所述与当前蓝牙主设备配对过的各蓝牙从设备中连接优先级最高的蓝牙从设备。
在一些实施例中,所述标识信息包括身份信息,所述连接权限还包括操作权限,所述方法还包括:
根据接收到的操作请求确定发送所述操作请求的第四蓝牙从设备的身份信息,其中,所述第四蓝牙从设备为当前与当前蓝牙主设备建立蓝牙连接的蓝牙从设备;
根据所述第四蓝牙从设备的身份信息和所述已配对设备信息确定所述第四蓝牙从设备的操作权限;
根据所述第四蓝牙从设备的操作权限处理所述操作请求。
在一些实施例中,所述蓝牙主设备为车载蓝牙,所述方法还包括:
响应于接收到任一蓝牙从设备发送的蓝牙搜索请求,控制当前主设备的显示面板显示车载蓝牙图标。
又一方面,本公开实施例提供一种蓝牙连接方法,所述方法包括:
向所述蓝牙主设备发送连接请求,以供所述蓝牙主设备根据所述连接请求中携带的标识信息、所述蓝牙主设备预存的已配对设备信息和当前连接状态处理所述连接请求。
在一些实施例中,所述方法还包括:
在当前蓝牙从设备已与蓝牙主设备建立蓝牙连接的情况下,向所述蓝牙主设备发送权限 更新请求,以更新所述蓝牙主设备预存的已配对设备信息。
在一些实施例中,所述方法还包括:
根据外部输入的安全指令生成配对请求;
向所述蓝牙主设备发送所述配对请求,以供所述蓝牙主设备对所述配对请求中携带的安全验证信息进行验证并当验证通过时根据所述配对请求中携带的标识信息更新所述已配对设备信息。
又一方面,本公开实施例提供一种蓝牙主设备,所述蓝牙主设备包括:
接收模块,设置为接收连接请求;
标识处理模块,设置为根据所述接收模块接收到的连接请求确定发送所述连接请求的第一蓝牙从设备的标识信息;
权限处理模块,设置为根据所述第一蓝牙从设备的标识信息和预存的已配对设备信息确定所述第一蓝牙从设备的连接权限;
连接处理模块,设置为根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定与当前蓝牙主设备蓝牙连接的设备。
又一方面,本公开实施例提供一种蓝牙从设备,所述蓝牙从设备包括:
发送模块,设置为向蓝牙主设备发送连接请求,以供所述蓝牙主设备根据所述连接请求中携带的标识信息、所述蓝牙主设备预存的已配对设备信息和当前连接状态处理所述连接请求。
又一方面,本公开实施例提供一种蓝牙系统,其中,所述蓝牙系统包括如前所述的蓝牙主设备以及至少一个如前所述的蓝牙从设备。
又一方面,本公开实施例提供一种电子设备,包括:
一个或多个处理器;
存储装置,其上存储有一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如前所述的蓝牙连接方法。
又一方面,本公开实施例提供一种计算机存储介质,其上存储有计算机程序,其中,所述程序被执行时实现如前所述的蓝牙连接方法。
本公开实施例提供的蓝牙连接方法,根据接收到的连接请求确定发送连接请求的第一蓝牙从设备的标识信息,根据第一蓝牙从设备的标识信息和预存的已配对设备信息确定第一蓝牙从设备的连接权限,根据当前蓝牙主设备的当前连接状态与第一蓝牙从设备的连接权限确定目标蓝牙连接从设备,能够根据蓝牙从设备的标识信息、当前蓝牙主设备的预存的已配对设备信息以及当前连接状态确定出连接权限最高的蓝牙从设备作为目标蓝牙连接从设备,以便蓝牙主设备与目标蓝牙连接从设备建立蓝牙连接,确保特定的蓝牙从设备能够优先连接到蓝牙主设备,提高蓝牙连接的安全性以及蓝牙使用体验。例如可以确保司机的蓝牙从设备优先连接到车载蓝牙,从而达到司机解放双手、降低交通肇事隐患的目的,保障行车安全性,提高蓝牙连接的安全性、车载系统的安全性以及司机的蓝牙使用体验。
图1是本公开实施例提供的蓝牙主设备侧蓝牙连接方法的流程示意图;
图2是本公开实施例提供的蓝牙主设备确定目标蓝牙连接从设备的流程示意图;
图3是本公开实施例提供的蓝牙主设备更新已配对设备信息的流程示意图;
图4是本公开实施例提供的更新已配对设备信息中连接权限的流程示意图;
图5是本公开实施例提供的默认权限分配示意图;
图6是本公开实施例提供的车载蓝牙的已配对设备信息示意图;
图7是本公开实施例提供的蓝牙主设备处理蓝牙从设备的操作请求的流程示意图;
图8是本公开实施例提供的蓝牙从设备侧蓝牙连接方法的流程示意图;
图9是本公开实施例提供的蓝牙从设备请求与蓝牙朱设备配对的流程示意图;
图10是本公开实施例提供的蓝牙主设备的模块示意图一;
图11是本公开实施例提供的蓝牙主设备的模块示意图二;
图12是本公开实施例提供的蓝牙主设备的模块示意图三;
图13是本公开实施例提供的车载蓝牙系统的示意图;
图14是本公开实施例提供的蓝牙从设备的模块示意图一;
图15是本公开实施例提供的蓝牙从设备的模块示意图二。
在下文中将参考附图更充分地描述示例实施例,但是所述示例实施例可以以不同形式来体现且不应当被解释为限于本文阐述的实施例。反之,提供这些实施例的目的在于使本公开透彻和完整,并将使本领域技术人员充分理解本公开的范围。
如本文所使用的,术语“和/或”包括一个或多个相关列举条目的任何和所有组合。
本文所使用的术语仅用于描述特定实施例,且不意欲限制本公开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在所述特征、整体、步骤、操作、元件和/或组件,但不排除存在或添加一个或多个其他特征、整体、步骤、操作、元件、组件和/或其群组。
本文所述实施例可借助本公开的理想示意图而参考平面图和/或截面图进行描述。因此,可根据制造技术和/或容限来修改示例图示。因此,实施例不限于附图中所示的实施例,而是包括基于制造工艺而形成的配置的修改。因此,附图中例示的区具有示意性属性,并且图中所示区的形状例示了元件的区的具体形状,但并不旨在是限制性的。
除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。
本公开实施例提供一种蓝牙连接方法,可以应用于包括蓝牙主设备和至少一个蓝牙从设备的蓝牙系统。如图1所示,当该方法应用于蓝牙主设备时,可以包括如下步骤:
在步骤S11中,根据接收到的连接请求确定发送连接请求的第一蓝牙从设备的标识信息。
在步骤S12中,根据第一蓝牙从设备的标识信息和预存的已配对设备信息确定第一蓝牙从设备的连接权限。
在步骤S13中,根据当前蓝牙主设备的当前连接状态与第一蓝牙从设备的连接权限确定 目标蓝牙连接从设备。
在本公开实施例中,不同蓝牙从设备的标识信息应当不同,以便蓝牙主设备进行区分识别,可以将任何能够用以区分蓝牙从设备的信息作为蓝牙从设备的标识信息。蓝牙从设备可以通过BLE(Bluetooth Low Energy,蓝牙低功耗)协议向蓝牙主设备发送BLE广播消息形式的连接请求,在向蓝牙主设备发送连接请求时,可以在连接请求中携带本设备的标识信息,因此,当接收到第一蓝牙从设备发送的连接请求时,蓝牙主设备可以从中获取到第一蓝牙从设备的标识信息。
蓝牙主设备预存的已配对设备信息,其中记录了任一与当前蓝牙主设备配对过的蓝牙从设备的配置信息,仍根据蓝牙从设备的标识信息区分不同蓝牙从设备的配置信息。因此,蓝牙主设备可以根据第一蓝牙从设备的标识信息和预存的已配对设备信息确定为第一蓝牙从设备配置的连接权限。
蓝牙主设备的当前连接状态可以包括:蓝牙主设备当前是否已与蓝牙从设备建立蓝牙连接、当前已与蓝牙主设备建立蓝牙连接的具体的蓝牙从设备等等。蓝牙主设备可以根据当前连接状态与第一蓝牙从设备的连接权限,比较各请求连接的蓝牙从设备(或各请求连接的蓝牙从设备以及蓝牙主设备当前连接的蓝牙从设备)的连接权限,从中确定出连接权限最高的蓝牙从设备作为目标蓝牙连接从设备,目标蓝牙连接从设备即蓝牙主设备在接收到第一蓝牙从设备发送的连接请求之后、欲与之建立蓝牙连接的蓝牙从设备。在根据当前蓝牙主设备的当前连接状态与第一蓝牙从设备的连接权限确定目标蓝牙连接从设备之后,蓝牙主设备可以与目标蓝牙连接从设备建立蓝牙连接。
通过上述步骤S11-S13可以看出,本公开实施例提供的蓝牙连接方法,根据接收到的连接请求确定发送连接请求的第一蓝牙从设备的标识信息,根据第一蓝牙从设备的标识信息和预存的已配对设备信息确定第一蓝牙从设备的连接权限,根据当前蓝牙主设备的当前连接状态与第一蓝牙从设备的连接权限确定目标蓝牙连接从设备,能够根据蓝牙从设备的标识信息、当前蓝牙主设备的预存的已配对设备信息以及当前连接状态确定出连接权限最高的蓝牙从设备作为目标蓝牙连接从设备,以便蓝牙主设备与目标蓝牙连接从设备建立蓝牙连接,确保特定的蓝牙从设备能够优先连接到蓝牙主设备,提高蓝牙连接的安全性以及蓝牙使用体验。例如可以确保司机的蓝牙从设备优先连接到车载蓝牙,从而达到司机解放双手、降低交通肇事隐患的目的,保障行车安全性,提高蓝牙连接的安全性、车载系统的安全性以及司机的蓝牙使用体验。
发送连接请求的蓝牙从设备,其所有者往往与蓝牙主设备所有者具有一定的联系,例如,蓝牙从设备的所有者可以是蓝牙主设备所有者的家属、朋友等等,蓝牙从设备在向蓝牙主设备发送连接请求时,还可以发送自身的身份信息,如“司机”、“家属”、“朋友”等等,以便蓝牙主设备处理连接请求。相应的,在一些实施例中,所述标识信息至少包括发送所述连接请求的第一蓝牙从设备的身份信息。
除可以将蓝牙从设备的身份信息作为标识信息之外,还可以将地址信息和设备名称作为蓝牙从设备的标识信息,当然,也可以将除身份信息、地址信息、设备名称之外的其他任何能够用以区分蓝牙从设备的信息作为蓝牙从设备的标识信息。
由于在同一时间只能有一个蓝牙从设备连接到蓝牙主设备,目前,若蓝牙主设备当前已与一个蓝牙从设备建立蓝牙连接,其他蓝牙从设备要想与蓝牙主设备建立蓝牙连接,则必须 人为先将蓝牙主设备当前的蓝牙连接断开,再将蓝牙主设备与该其他蓝牙从设备连接。为此,本公开实施例提出,若蓝牙主设备已与蓝牙从设备建立蓝牙连接但又接收到了其他蓝牙从设备发送的连接请求,则蓝牙主设备可以自动比较请求连接的蓝牙从设备的连接权限和当前连接的蓝牙从设备的连接权限,确定出连接权限最高的蓝牙从设备,以便自动与连接权限最高的蓝牙从设备建立蓝牙连接。
相应的,在一些实施例中,所述连接权限包括连接优先级,在所述当前蓝牙主设备的当前连接状态为当前蓝牙主设备已与第二蓝牙从设备建立蓝牙连接的情况下,如图2所示,所述根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备的步骤(即步骤S13)可以包括如下步骤:
在步骤S131中,确定第二蓝牙从设备的连接优先级。
在步骤S132中,在第一蓝牙从设备的连接优先级高于第二蓝牙从设备的连接优先级的情况下,将第一蓝牙从设备确定为目标蓝牙连接从设备。
在当前蓝牙主设备已与蓝牙从设备建立蓝牙连接、且蓝牙主设备当前连接的具体的蓝牙从设备为第二蓝牙从设备的情况下,蓝牙主设备可以进一步确定第二蓝牙从设备的连接优先级,具体的,蓝牙主设备可以根据第二蓝牙从设备的标识信息查询预存的已配对设备信息,确定为第二蓝牙从设备配置的连接优先级。
确定出第一蓝牙从设备的连接优先级以及第二蓝牙从设备的连接优先级之后,蓝牙主设备可以将第一蓝牙从设备的连接优先级与第二蓝牙从设备的连接优先级进行比较,在第一蓝牙从设备的连接优先级高于第二蓝牙从设备的连接优先级的情况下,可以将第一蓝牙从设备确定为目标蓝牙连接从设备。
应当理解,若发送连接请求的蓝牙从设备为多个,当其中任一蓝牙从设备的连接优先级高于第二蓝牙从设备的连接优先级时,可以将该“任一蓝牙从设备”确定为目标蓝牙连接从设备;若连接优先级高于第二蓝牙从设备的连接优先级的第一蓝牙从设备为多个,可以将连接优先级高于第二蓝牙从设备的连接优先级的多个第一蓝牙从设备中最早发送连接请求的第一蓝牙从设备确定为目标蓝牙连接从设备。
通过上述步骤S131-S132可以看出,本公开实施例提供的蓝牙连接方法,若当前蓝牙主设备已与第二蓝牙从设备建立蓝牙连接,则确定第二蓝牙从设备的连接优先级,在第一蓝牙从设备的连接优先级高于第二蓝牙从设备的连接优先级的情况下,将第一蓝牙从设备确定为目标蓝牙连接从设备。蓝牙主设备自动比较请求连接的蓝牙从设备的连接优先级和已连接的蓝牙从设备的连接优先级,确定出连接优先级最高的蓝牙从设备作为目标蓝牙连接从设备,无论特定的蓝牙从设备是作为已与蓝牙主设备建立蓝牙连接的第二蓝牙从设备,还是作为请求与蓝牙主设备建立蓝牙连接的第一蓝牙从设备,均能够自动且快速被蓝牙主设备确定为目标蓝牙连接从设备,进而优先与蓝牙主设备建立蓝牙连接,无需手动在多个蓝牙从设备之间切换连接,提高蓝牙连接的安全性以及蓝牙使用体验。
若蓝牙主设备已与第二蓝牙从设备建立蓝牙连接且又接收到第一蓝牙从设备发送的连接请求,则在将第一蓝牙从设备确定为目标蓝牙连接从设备之后,为与目标蓝牙连接从设备建立蓝牙连接,蓝牙主设备可以首先自动断开与第二蓝牙从设备的蓝牙连接,再与第一蓝牙从设备建立蓝牙连接。相应的,在一些实施例中,在将第一蓝牙从设备确定为目标蓝牙连接从设备的步骤(即步骤S132)之后,所述方法还可以包括如下步骤:断开与第二蓝牙从设备的 蓝牙连接。相应的,在断开与第二蓝牙从设备的蓝牙连接之后,蓝牙主设备可以与目标蓝牙连接从设备建立蓝牙连接。
由于在同一时间只能有一个蓝牙从设备连接到蓝牙主设备,目前,若蓝牙主设备当前未与任意蓝牙从设备建立蓝牙连接,且接收到多个蓝牙从设备发送的连接请求,则蓝牙主设备将响应最早发送的连接请求,与最早发送连接请求的蓝牙从设备建立蓝牙连接。这将导致特定的蓝牙从设备无法优先连接到蓝牙主设备。为此,本公开实施例提出,若蓝牙主设备未与任意蓝牙从设备建立蓝牙连接但又接收到了多个蓝牙从设备发送的连接请求,则蓝牙主设备可以自动比较各个请求连接的蓝牙从设备的连接权限,确定出连接权限最高的蓝牙从设备,以便自动与连接权限最高的蓝牙从设备建立蓝牙连接。
相应的,在一些实施例中,所述连接权限包括连接优先级,在所述第一蓝牙从设备为多个、且所述当前蓝牙主设备的当前连接状态为当前蓝牙主设备未与任意蓝牙从设备建立蓝牙连接的情况下,所述根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备的步骤(即步骤S13)可以包括如下步骤:将各第一蓝牙从设备中连接优先级最高的第一蓝牙从设备确定为目标蓝牙连接从设备。相应的,在将各第一蓝牙从设备中连接优先级最高的第一蓝牙从设备确定为目标蓝牙连接从设备之后,蓝牙主设备可以与目标蓝牙连接从设备建立蓝牙连接。
若发送连接请求的第一蓝牙从设备为多个且当前蓝牙主设备未与任意蓝牙从设备建立蓝牙连接,则将各第一蓝牙从设备中连接优先级最高的第一蓝牙从设备确定为目标蓝牙连接从设备,以便蓝牙主设备与目标蓝牙连接从设备建立蓝牙连接,确保特定的蓝牙从设备能够优先连接到蓝牙主设备,提高蓝牙连接的安全性以及蓝牙使用体验。例如可以确保司机的蓝牙从设备优先连接到车载蓝牙,从而达到司机解放双手、降低交通肇事隐患的目的,保障行车安全性,提高蓝牙连接的安全性、车载系统的安全性以及司机的蓝牙使用体验。
各蓝牙从设备均具有唯一的MAC(Mandatory Access Control,强制访问控制)地址,且不同的蓝牙从设备MAC地址也不同,因此可以将蓝牙从设备的MAC地址作为蓝牙从设备的标识信息,并在预存的已配对设备信息中根据蓝牙从设备的MAC地址区分不同蓝牙从设备的配置信息。相应的,在一些实施例中,所述标识信息包括MAC地址,所述已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的MAC地址与连接优先级之间的对应关系,所述根据确定的标识信息和预存的已配对设备信息确定所述第一蓝牙从设备的连接权限的步骤(即步骤S12)可以包括如下步骤:根据确定的第一蓝牙从设备的MAC地址查询对应关系,以确定第一蓝牙从设备的连接权限。
蓝牙主设备预存有已配对设备信息,其中记录了任一与当前蓝牙主设备配对过的蓝牙从设备的配置信息,仍根据蓝牙从设备的标识信息区分不同蓝牙从设备的配置信息。因此每当有蓝牙从设备与蓝牙主设备配对成功后,蓝牙主设备均可以更新已配对设备信息。相应的,在一些实施例中,如图3所示,所述方法还可以包括如下步骤:
在步骤S21中,响应于接收到配对请求,对配对请求中携带的安全验证信息进行验证。
在步骤S22中,当验证通过时,根据配对请求中携带的标识信息更新已配对设备信息。
其中,蓝牙从设备发送的配对请求是基于用户输入的安全指令生成的。在本公开实施例中,蓝牙从设备可以与蓝牙主设备预先约定与PIN不同的安全验证信息,蓝牙从设备在请求与蓝牙主设备配对时,也可以提供安全验证信息。在安全验证信息与当前蓝牙主设备预存的 与该蓝牙从设备对应的安全验证信息一致的情况下,可以认为该蓝牙从设备的身份合法,安全验证信息通过验证。此时蓝牙主设备可以通过该配对请求,并且根据配对请求中携带的标识信息在已配对设备信息中添加发送该配对请求的蓝牙从设备的配置信息。
特定的蓝牙从设备的所有者,往往也是蓝牙主设备的所有者,或者往往也是蓝牙主设备的使用频率最高者。蓝牙主设备预存的已配对设备信息中记录了为与当前蓝牙主设备配对过的各蓝牙从设备的连接权限,特定的蓝牙从设备在与蓝牙主设备建立蓝牙连接之后,可以修改其他蓝牙从设备的连接权限,以保证蓝牙连接的安全性以及蓝牙使用体验。
相应的,在一些实施例中,所述已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的标识信息与连接权限的对应关系,所述连接权限包括连接优先级,如图4所示,所述方法还可以包括如下步骤:
在步骤S31中,响应于接收到第三蓝牙从设备发送的权限更新请求,根据权限更新请求更新已配对设备信息中相应的连接权限;其中,第三蓝牙从设备为与当前蓝牙主设备配对过的各蓝牙从设备中连接优先级最高的蓝牙从设备。
需要说明的是,本公开实施例以第一蓝牙从设备指代发送连接请求的蓝牙从设备,以第二蓝牙从设备指代蓝牙主设备当前连接的蓝牙从设备,以第三蓝牙从设备指代连接优先级最高的蓝牙从设备,如前所述的第一蓝牙从设备或第二蓝牙从设备,均可以同时作为第三蓝牙从设备的角色而存在。
在本公开实施例中,已配对设备信息中记录的为与当前蓝牙主设备配对过的各蓝牙从设备的连接权限,除包括连接优先级之外,还可以包括操作权限。操作权限即蓝牙从设备在与蓝牙主设备建立蓝牙连接之后所能通过蓝牙主设备执行的各项操作的权限,各项操作可以包括:打开/关闭车门、通话、播放歌曲、设置为黑名单等等。蓝牙主设备在根据配对请求中携带的标识信息更新已配对设备信息时,可以根据各蓝牙从设备的标识信息将其连接权限设置为默认权限。
例如,车载蓝牙可以根据如图5所示的默认权限分配表以及各蓝牙从设备发送的配对请求中携带的标识信息,在已配对设备信息中添加各蓝牙从设备的连接权限。标识信息可以包括身份信息,即蓝牙从设备所有者的身份信息,例如“司机”、“家属”、“朋友”等等。如图5所示,可以根据蓝牙从设备的身份信息设置默认权限,身份信息不同的蓝牙从设备可以有不同的默认权限,司机的蓝牙从设备具有最高的默认权限,连接优先级第一且具有打开/关闭车门、通话、播放歌曲和禁止设置为黑名单等操作权限,司机所有家属的(即身份信息包括“家属”的)蓝牙从设备连接优先级第二且具有通话、播放歌曲和未设置为黑名单等操作权限,司机所有朋友的(即身份信息包括“朋友”的)蓝牙从设备连接优先级第三且具有通话、播放歌曲和未设置为黑名单等操作权限,其他蓝牙从设备连接优先级第四且具有播放歌曲和未设置为黑名单等操作权限。车载蓝牙的已配对设备信息可以做如图6所示的设置,如图6所示,已配对设备可以包括司机、第一家属、第二家属和其他用户的蓝牙从设备,蓝牙从设备的标识信息可以包括身份信息、MAC地址和设备名称,权限详情可以是如图5所示的默认权限,当然,也可以由车载蓝牙或司机的蓝牙从设备自定义设置。
当蓝牙从设备请求通过蓝牙主设备执行操作时,蓝牙主设备可以根据已配对设备信息中的连接权限处理蓝牙从设备的操作请求。相应的,在一些实施例中,所述标识信息包括身份信息,所述连接权限还包括操作权限,如图7所示,所述方法还可以包括如下步骤:
在步骤S41中,根据接收到的操作请求确定发送操作请求的第四蓝牙从设备的身份信息,其中,第四蓝牙从设备为当前与当前蓝牙主设备建立蓝牙连接的蓝牙从设备。
在步骤S42中,根据第四蓝牙从设备的身份信息和已配对设备信息确定第四蓝牙从设备的操作权限。
在步骤S43中,根据第四蓝牙从设备的操作权限处理操作请求。
蓝牙从设备可以通过BLE协议向蓝牙主设备发送BLE广播消息形式的操作请求,在向蓝牙主设备发送操作请求时,可以在操作请求中携带本设备的标识信息,标识信息包括身份信息,因此,当接收到第四蓝牙从设备发送的操作请求时,蓝牙主设备可以从中获取到第四蓝牙从设备的身份信息。在已配对设备信息中,蓝牙主设备根据蓝牙从设备的身份信息设置了默认的或自定义的连接权限,身份信息不同的蓝牙从设备可以有不同的连接权限。已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的身份信息与连接权限的对应关系,蓝牙主设备可以根据第四蓝牙从设备的身份信息查询该对应关系,以确定第四蓝牙从设备的操作权限,当确定出第四蓝牙从设备具有其所请求执行的操作的权限时,对其发送的操作请求可予以通过。
需要说明的是,本公开实施例以第四蓝牙从设备指代当前与蓝牙主设备蓝牙连接且向蓝牙主设备发送操作请求的蓝牙从设备,如前所述的第二蓝牙从设备,也可以同时作为第四蓝牙从设备的角色而存在。
通过上述步骤S41-S43可以看出,本公开实施例提供的蓝牙连接方法,通过在已配对设备信息中为与当前蓝牙主设备配对过的各蓝牙从设备配置连接权限,当接收到蓝牙从设备发送的操作请求时,根据蓝牙从设备的标识信息和已配对设备信息确定蓝牙从设备的操作权限,根据蓝牙从设备的操作权限处理操作请求,则不同的蓝牙从设备在与蓝牙主设备建立蓝牙连接之后能通过蓝牙主设备执行不同的操作,并且能够实现特定的蓝牙从设备可以通过蓝牙主设备执行最多的操作,提高蓝牙连接的安全性以及蓝牙使用体验。
若蓝牙主设备为车载蓝牙,当蓝牙从设备搜索车载蓝牙以便与车载蓝牙建立蓝牙连接时,由于现有的蓝牙设备所显示的蓝牙图标通常情况下是一致的,车载蓝牙显示的蓝牙图标与其他蓝牙主设备显示的蓝牙图标没有区别,用户无法非常准确快速地分辨出车载蓝牙,因此车载蓝牙可以显示与现有蓝牙图标不同的车载蓝牙图标,便于蓝牙从设备准确快速地与车载蓝牙建立蓝牙连接。相应的,在一些实施例中,所述方法还可以包括如下步骤:响应于接收到蓝牙搜索请求,控制当前蓝牙主设备的显示面板显示车载蓝牙图标。
应当理解,不同的蓝牙从设备也可以显示不同的蓝牙图标,以便蓝牙主设备进行区分。
本公开实施例提供的蓝牙连接方法,不仅能够应用于蓝牙主设备,而且能够应用于蓝牙从设备。相应的,如图8所示,当本公开实施例提供的蓝牙连接方法应用于蓝牙从设备时,可以包括如下步骤:
在步骤S51中,向蓝牙主设备发送连接请求,以供蓝牙主设备根据连接请求中携带的标识信息、蓝牙主设备预存的已配对设备信息和当前连接状态处理连接请求。
蓝牙从设备可以通过BLE(Bluetooth Low Energy,蓝牙低功耗)协议向蓝牙主设备发送BLE广播消息形式的连接请求,在向蓝牙主设备发送连接请求时,可以在连接请求中携带本设备的标识信息,蓝牙从设备可以根据接收到的连接请求确定发送连接请求的蓝牙从设备的标识信息,根据蓝牙从设备的标识信息和预存的已配对设备信息确定蓝牙从设备的连接权 限,根据当前蓝牙主设备的当前连接状态与蓝牙从设备的连接权限确定目标蓝牙连接从设备。
特定的蓝牙从设备的所有者,往往也是蓝牙主设备的所有者,或者往往也是蓝牙主设备的使用频率最高者。蓝牙主设备预存的已配对设备信息中记录了为各与当前蓝牙主设备配对过的各蓝牙从设备的连接权限,特定的蓝牙从设备在与蓝牙主设备建立蓝牙连接之后,可以修改其他蓝牙从设备的连接权限,以保证蓝牙连接的安全性以及蓝牙使用体验。相应的,在一些实施例中,所述方法还可以包括如下步骤:在当前蓝牙从设备已与蓝牙主设备建立蓝牙连接的情况下,向蓝牙主设备发送权限更新请求,以更新蓝牙主设备预存的已配对设备信息。
在当前蓝牙从设备已与蓝牙主设备建立蓝牙连接的情况下,向蓝牙主设备发送权限更新请求,以更新蓝牙主设备预存的已配对设备信息,特定的蓝牙从设备在与蓝牙主设备建立蓝牙连接之后,可以修改其他蓝牙从设备的连接权限,提高蓝牙连接的安全性以及蓝牙使用体验。
蓝牙从设备与蓝牙主设备的首次配对往往需要通过PIN(Personal Identification Number,个人识别密码)进行验证。PIN仅由4到6位数字构成,在生成之后由蓝牙从设备使用E2或E3加密算法进行加密,然后传输给蓝牙主设备进行认证。携带加密后的PIN的数据包容易被攻击从而导致PIN被破解以及蓝牙从设备的标识信息被窃取。蓝牙从设备可以与蓝牙主设备预先约定与PIN不同的安全验证信息,如私人密码、指纹、人脸识别信息等等,在蓝牙从设备请求与蓝牙主设备配对时,要求蓝牙从设备提供安全验证信息以验证其身份。相应的,在一些实施例中,如图9所示,所述方法还包括如下步骤:
在步骤S61中,根据外部输入的安全指令生成配对请求。
在步骤S62中,向蓝牙主设备发送配对请求,以供蓝牙主设备对配对请求中携带的安全验证信息进行验证并当验证通过时根据配对请求中携带的标识信息更新已配对设备信息。
蓝牙主设备在确定出蓝牙从设备发送的安全验证信息和当前蓝牙主设备预存的与该蓝牙从设备对应的安全验证信息一致时,可以认为蓝牙从设备的身份合法,安全验证信息通过验证。从而通过蓝牙从设备的配对请求,并且根据配对请求中携带的标识信息在已配对设备信息中添加蓝牙从设备的配置信息。
基于相同的技术构思,本公开实施例还提供一种蓝牙主设备,如图10所示,所述蓝牙主设备可以包括:
接收模块101,设置为接收连接请求。
标识处理模块102,设置为根据接收模块接收到的连接请求确定发送连接请求的第一蓝牙从设备的标识信息。
权限处理模块103,设置为根据第一蓝牙从设备的标识信息和预存的已配对设备信息确定第一蓝牙从设备的连接权限。
连接处理模块104,设置为根据当前蓝牙主设备的当前连接状态与第一蓝牙从设备的连接权限确定与当前蓝牙主设备蓝牙连接的设备。
在一些实施例中,所述标识信息至少包括发送所述连接请求的第一蓝牙从设备的身份信息。
在一些实施例中,连接权限包括连接优先级,在当前蓝牙主设备的当前连接状态为当前蓝牙主设备已与第二蓝牙从设备建立蓝牙连接的情况下,所述连接处理模块104设置为:
确定第二蓝牙从设备的连接优先级;
在第一蓝牙从设备的连接优先级高于第二蓝牙从设备的连接优先级的情况下,将第一蓝牙从设备确定为目标蓝牙连接从设备。
在一些实施例中,所述连接处理模块104还设置为:断开与第二蓝牙从设备的蓝牙连接。
在一些实施例中,连接权限包括连接优先级,在第一蓝牙从设备为多个且当前蓝牙主设备的当前连接状态为当前蓝牙主设备未与任意蓝牙从设备建立蓝牙连接的情况下,所述连接处理模块104设置为:将各第一蓝牙从设备中连接优先级最高的第一蓝牙从设备确定为目标蓝牙连接从设备。
在一些实施例中,标识信息包括强制访问控制MAC地址,已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的MAC地址与连接优先级之间的对应关系,所述权限处理模块103设置为:根据确定的第一蓝牙从设备的MAC地址查询对应关系,以确定第一蓝牙从设备的连接权限。
在一些实施例中,所述接收模块101还设置为:接收配对请求。
如图11所示,所述蓝牙主设备还包括验证模块105,所述验证模块105设置为:响应于所述接收模块101接收到配对请求,对配对请求中携带的安全验证信息进行验证。
所述权限处理模块103还设置为:当验证通过时,根据配对请求中携带的标识信息更新已配对设备信息。
在一些实施例中,已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的标识信息与连接权限的对应关系,连接权限包括连接优先级,所述接收模块101还设置为:接收第三蓝牙从设备发送的权限更新请求。
所述权限处理模块103还设置为:响应于接收到第三蓝牙从设备发送的权限更新请求,根据权限更新请求更新已配对设备信息中相应的连接权限;其中,第三蓝牙从设备为与当前蓝牙主设备配对过的各蓝牙从设备中连接优先级最高的蓝牙从设备。
在一些实施例中,标识信息包括身份信息,连接权限还包括操作权限,所述接收模块101还设置为:接收操作请求。
所述标识处理模块102还设置为:根据接收到的操作请求确定发送操作请求的第四蓝牙从设备的身份信息,其中,第四蓝牙从设备为当前与当前蓝牙主设备建立蓝牙连接的蓝牙从设备。
所述权限处理模块103还设置为:根据第四蓝牙从设备的身份信息和已配对设备信息确定第四蓝牙从设备的操作权限。
所述连接处理模块104还设置为:根据第四蓝牙从设备的操作权限处理操作请求。
在一些实施例中,所述蓝牙主设备为车载蓝牙,所述接收模块101还设置为:接收蓝牙搜索请求。
如图12所示,所述车载蓝牙还包括控制模块106,所述控制模块106设置为:响应于接收到蓝牙搜索请求,控制当前主设备的显示面板显示车载蓝牙图标。
车载蓝牙的控制模块还可以控制显示面板显示车载蓝牙预存的已配对设备信息,包括蓝牙从设备的身份信息、MAC地址信息、设备名称、权限详情等等。
如图13所示,本公开实施例提供的蓝牙连接方法,可以应用于车载蓝牙系统。其中,汽车侧可以包括车载蓝牙端即蓝牙主设备,车载蓝牙端可以包括显示模块(可以包括上述显示面板)、管理模块(可以包括上述标识处理模块102、连接处理模块104和验证模块105)和 存储模块(可以包括接收模块101和权限处理模块103)。手机侧可以包括多个手机端即蓝牙从设备,如第一手机端、第二手机端和第三手机端。多个手机端均可以向车载蓝牙端发送BLE广播消息以请求与车载蓝牙端配对或建立蓝牙连接或执行其他操作。
基于相同的技术构思,本公开实施例还提供一种蓝牙从设备,如图14所示,所述蓝牙从设备可以包括:
发送模块201,设置为向蓝牙主设备发送连接请求,以供蓝牙主设备根据连接请求中携带的标识信息、蓝牙主设备预存的已配对设备信息和当前连接状态处理连接请求。
在一些实施例中,所述发送模块201还设置为:在当前蓝牙从设备已与蓝牙主设备建立蓝牙连接的情况下,向蓝牙主设备发送权限更新请求,以更新蓝牙主设备预存的已配对设备信息。
在一些实施例中,如图15所示,所述蓝牙从设备还包括处理模块202,所述处理模块202设置为:根据外部输入的安全指令生成配对请求。
所述发送模块201还设置为:向蓝牙主设备发送配对请求,以供蓝牙主设备对配对请求中携带的安全验证信息进行验证并当验证通过时根据配对请求中携带的标识信息更新已配对设备信息。
本公开实施例还提供一种蓝牙系统,其中,蓝牙系统包括如前所述的蓝牙主设备以及至少一个如前所述的蓝牙从设备。
本公开实施例还提供一种电子设备,包括:
一个或多个处理器;
存储装置,其上存储有一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如前所述各实施例提供的蓝牙连接方法。
本公开实施例还提供一种计算机存储介质,其上存储有计算机程序,其中,所述程序被执行时实现如前所述各实施例提供的蓝牙连接方法。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其他实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。
Claims (18)
- 一种蓝牙连接方法,所述方法包括:根据接收到的连接请求确定发送所述连接请求的第一蓝牙从设备的标识信息;根据所述第一蓝牙从设备的标识信息和预存的已配对设备信息确定所述第一蓝牙从设备的连接权限;根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备。
- 根据权利要求1所述的蓝牙连接方法,其中,所述标识信息至少包括发送所述连接请求的第一蓝牙从设备的身份信息。
- 根据权利要求1所述的蓝牙连接方法,其中,所述连接权限包括连接优先级,在所述当前蓝牙主设备的当前连接状态为当前蓝牙主设备已与第二蓝牙从设备建立蓝牙连接的情况下,所述根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备的步骤包括:确定所述第二蓝牙从设备的连接优先级;在所述第一蓝牙从设备的连接优先级高于所述第二蓝牙从设备的连接优先级的情况下,将所述第一蓝牙从设备确定为目标蓝牙连接从设备。
- 根据权利要求3所述的蓝牙连接方法,其中,在所述将所述第一蓝牙从设备确定为目标蓝牙连接从设备的步骤之后,所述方法还包括:断开与所述第二蓝牙从设备的蓝牙连接。
- 根据权利要求1所述的蓝牙连接方法,其中,所述连接权限包括连接优先级,在所述第一蓝牙从设备为多个、且所述当前蓝牙主设备的当前连接状态为当前蓝牙主设备未与任意蓝牙从设备建立蓝牙连接的情况下,所述根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定目标蓝牙连接从设备的步骤包括:将各所述第一蓝牙从设备中连接优先级最高的第一蓝牙从设备确定为目标蓝牙连接从设备。
- 根据权利要求1所述的方法,其中,所述标识信息包括强制访问控制MAC地址,所述已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的MAC地址与连接优先级之间的对应关系,所述根据确定的标识信息和预存的已配对设备信息确定所述第一蓝牙从设备的连接权限的步骤包括:根据确定的第一蓝牙从设备的MAC地址查询所述对应关系,以确定所述第一蓝牙从设备的连接权限。
- 根据权利要求1至6中任意一项所述的方法,其中,所述方法还包括:响应于接收到配对请求,对所述配对请求中携带的安全验证信息进行验证;当验证通过时,根据所述配对请求中携带的标识信息更新所述已配对设备信息。
- 根据权利要求1至6中任意一项所述的方法,其中,所述已配对设备信息包括与当前蓝牙主设备配对过的各蓝牙从设备的标识信息与连接权限的对应关系,所述连接权限包括连接优先级,所述方法还包括:响应于接收到第三蓝牙从设备发送的权限更新请求,根据所述权限更新请求更新所述已配对设备信息中相应的连接权限;其中,所述第三蓝牙从设备为所述与当前蓝牙主设备配对过的各蓝牙从设备中连接优先级最高的蓝牙从设备。
- 根据权利要求8所述的方法,其中,所述标识信息包括身份信息,所述连接权限还包括操作权限,所述方法还包括:根据接收到的操作请求确定发送所述操作请求的第四蓝牙从设备的身份信息,其中,所述第四蓝牙从设备为当前与当前蓝牙主设备建立蓝牙连接的蓝牙从设备;根据所述第四蓝牙从设备的身份信息和所述已配对设备信息确定所述第四蓝牙从设备的操作权限;根据所述第四蓝牙从设备的操作权限处理所述操作请求。
- 根据权利要求1至6中任意一项所述的方法,其中,所述蓝牙主设备为车载蓝牙,所述方法还包括:响应于接收到蓝牙搜索请求,控制当前主设备的显示面板显示车载蓝牙图标。
- 一种蓝牙连接方法,所述方法包括:向所述蓝牙主设备发送连接请求,以供所述蓝牙主设备根据所述连接请求中携带的标识信息、所述蓝牙主设备预存的已配对设备信息和当前连接状态处理所述连接请求。
- 根据权利要求11所述的方法,其中,所述方法还包括:在当前蓝牙从设备已与蓝牙主设备建立蓝牙连接的情况下,向所述蓝牙主设备发送权限更新请求,以更新所述蓝牙主设备预存的已配对设备信息。
- 根据权利要求11所述的方法,其中,所述方法还包括:根据外部输入的安全指令生成配对请求;向所述蓝牙主设备发送所述配对请求,以供所述蓝牙主设备对所述配对请求中携带的安全验证信息进行验证并当验证通过时根据所述配对请求中携带的标识信息更新所述已配对设备信息。
- 一种蓝牙主设备,所述蓝牙主设备包括:接收模块,设置为接收连接请求;标识处理模块,设置为根据所述接收模块接收到的连接请求确定发送所述连接请求的第 一蓝牙从设备的标识信息;权限处理模块,设置为根据所述第一蓝牙从设备的标识信息和预存的已配对设备信息确定所述第一蓝牙从设备的连接权限;连接处理模块,设置为根据当前蓝牙主设备的当前连接状态与所述第一蓝牙从设备的连接权限确定与当前蓝牙主设备蓝牙连接的设备。
- 一种蓝牙从设备,所述蓝牙从设备包括:发送模块,设置为向蓝牙主设备发送连接请求,以供所述蓝牙主设备根据所述连接请求中携带的标识信息、所述蓝牙主设备预存的已配对设备信息和当前连接状态处理所述连接请求。
- 一种蓝牙系统,其中,所述蓝牙系统包括如权利要求14所述的蓝牙主设备以及至少一个如权利要求15所述的蓝牙从设备。
- 一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1-13任一项所述的蓝牙连接方法。
- 一种计算机存储介质,其上存储有计算机程序,其中,所述程序被执行时实现如权利要求1-13任一项所述的蓝牙连接方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110842351.7A CN115696281A (zh) | 2021-07-26 | 2021-07-26 | 蓝牙连接方法、蓝牙设备、系统、电子设备及存储介质 |
| CN202110842351.7 | 2021-07-26 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023005274A1 true WO2023005274A1 (zh) | 2023-02-02 |
Family
ID=85043866
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/087734 Ceased WO2023005274A1 (zh) | 2021-07-26 | 2022-04-19 | 蓝牙连接方法、蓝牙设备、系统、电子设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN115696281A (zh) |
| WO (1) | WO2023005274A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117255332A (zh) * | 2023-11-17 | 2023-12-19 | Tcl通讯科技(成都)有限公司 | 蓝牙连接控制方法、装置、存储介质及电子设备 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2024125667A (ja) * | 2023-03-06 | 2024-09-19 | 株式会社東海理化電機製作所 | 通信制御装置、通信制御方法、及びデジタルキーシステム |
| CN116208963A (zh) * | 2023-03-27 | 2023-06-02 | 深圳市锐明技术股份有限公司 | 一种登录控制方法、装置、设备及介质 |
| CN116709579A (zh) * | 2023-06-06 | 2023-09-05 | 展讯半导体(南京)有限公司 | 蓝牙连接方法、装置、设备、存储介质及程序产品 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105491684A (zh) * | 2015-11-17 | 2016-04-13 | 广东好帮手电子科技股份有限公司 | 一种车载主机与蓝牙设备自动连接的方法和系统 |
| CN106131971A (zh) * | 2016-06-20 | 2016-11-16 | 乐视控股(北京)有限公司 | 蓝牙设备的连接方法及装置 |
| CN108650667A (zh) * | 2018-05-15 | 2018-10-12 | 北京字节跳动网络技术有限公司 | 终端调度方法和装置 |
| WO2020200127A1 (zh) * | 2019-04-02 | 2020-10-08 | 华为技术有限公司 | 业务连接建立方法、蓝牙主设备、芯片及蓝牙系统 |
| CN112218385A (zh) * | 2019-07-11 | 2021-01-12 | 上海博泰悦臻网络技术服务有限公司 | 一种蓝牙管理方法及移动终端 |
-
2021
- 2021-07-26 CN CN202110842351.7A patent/CN115696281A/zh active Pending
-
2022
- 2022-04-19 WO PCT/CN2022/087734 patent/WO2023005274A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105491684A (zh) * | 2015-11-17 | 2016-04-13 | 广东好帮手电子科技股份有限公司 | 一种车载主机与蓝牙设备自动连接的方法和系统 |
| CN106131971A (zh) * | 2016-06-20 | 2016-11-16 | 乐视控股(北京)有限公司 | 蓝牙设备的连接方法及装置 |
| CN108650667A (zh) * | 2018-05-15 | 2018-10-12 | 北京字节跳动网络技术有限公司 | 终端调度方法和装置 |
| WO2020200127A1 (zh) * | 2019-04-02 | 2020-10-08 | 华为技术有限公司 | 业务连接建立方法、蓝牙主设备、芯片及蓝牙系统 |
| CN112218385A (zh) * | 2019-07-11 | 2021-01-12 | 上海博泰悦臻网络技术服务有限公司 | 一种蓝牙管理方法及移动终端 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117255332A (zh) * | 2023-11-17 | 2023-12-19 | Tcl通讯科技(成都)有限公司 | 蓝牙连接控制方法、装置、存储介质及电子设备 |
| CN117255332B (zh) * | 2023-11-17 | 2024-03-19 | Tcl通讯科技(成都)有限公司 | 蓝牙连接控制方法、装置、存储介质及电子设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115696281A (zh) | 2023-02-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023005274A1 (zh) | 蓝牙连接方法、蓝牙设备、系统、电子设备及存储介质 | |
| US9763094B2 (en) | Methods, devices and systems for dynamic network access administration | |
| US9688247B1 (en) | Method and apparatus for digital temporary vehicle key utilization | |
| US11681828B2 (en) | Passthrough mobile application policy | |
| CN103765855B (zh) | 无线网络设备的处理方法、无线网络设备及其处理器 | |
| EP1855440B1 (en) | Personal domain controller | |
| US10097993B2 (en) | Method and apparatus for remote authentication | |
| CN113572718B (zh) | 登录方法、装置、电子设备和存储介质 | |
| US20190166635A1 (en) | Establishing a secure short-range wireless communications connection at a vehicle | |
| US20070208948A1 (en) | System and method for configuring security in a plug-and-play architecture | |
| CN106846563A (zh) | 车辆控制方法和系统、车辆钥匙、车辆及车辆系统 | |
| CN102882921B (zh) | 车辆通信系统、移动通信终端和车辆装置 | |
| US20060075222A1 (en) | System for personal group management based on subscriber certificates | |
| CN107094169B (zh) | 用于通过辅助信道增强远程信息处理安全性的设备和方法 | |
| US20130029599A1 (en) | Method and Apparatus for Communication Between a Vehicle Based Computing System and a Remote Application | |
| US12500775B2 (en) | Managing communications between a vehicle and a user device | |
| WO2023137757A1 (zh) | 数字车钥匙的分享方法、装置、设备及存储介质 | |
| CN115868188B (zh) | 传输凭证的方法、装置、通信设备及存储介质 | |
| CN107031529A (zh) | 用于管理与车辆通信的移动装置的方法和系统 | |
| US9703987B2 (en) | Identity based connected services | |
| KR102366869B1 (ko) | 디지털 키 서비스 확장 및 제공 시스템 및 방법 | |
| EP4120793B1 (en) | Bluetooth networking methods and related devices | |
| CN105292020B (zh) | 车辆控制方法、车辆控制装置和终端 | |
| CN116233188A (zh) | 车联网数据传输方法、装置、系统和计算机设备 | |
| WO2021039676A1 (ja) | 無線通信システム、無線通信方法および無線通信プログラムを格納した非一時的なコンピュータ可読媒体 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22847893 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22847893 Country of ref document: EP Kind code of ref document: A1 |