CN116321163B - Control method of Bluetooth communication system, bluetooth device and readable storage medium - Google Patents

Control method of Bluetooth communication system, bluetooth device and readable storage medium Download PDF

Info

Publication number
CN116321163B
CN116321163B CN202310552429.0A CN202310552429A CN116321163B CN 116321163 B CN116321163 B CN 116321163B CN 202310552429 A CN202310552429 A CN 202310552429A CN 116321163 B CN116321163 B CN 116321163B
Authority
CN
China
Prior art keywords
bluetooth device
bluetooth
white list
target slave
address information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310552429.0A
Other languages
Chinese (zh)
Other versions
CN116321163A (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.)
Shenzhen Kaihong Digital Industry Development Co Ltd
Original Assignee
Shenzhen Kaihong Digital Industry Development 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 Shenzhen Kaihong Digital Industry Development Co Ltd filed Critical Shenzhen Kaihong Digital Industry Development Co Ltd
Priority to CN202310552429.0A priority Critical patent/CN116321163B/en
Publication of CN116321163A publication Critical patent/CN116321163A/en
Application granted granted Critical
Publication of CN116321163B publication Critical patent/CN116321163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • H04W12/55Secure pairing of devices involving three or more devices, e.g. group pairing
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The present application relates to the field of bluetooth technologies, and in particular, to a control method of a bluetooth communication system, a bluetooth device, and a readable storage medium, where the method includes: after networking is carried out between the master Bluetooth device and the target slave Bluetooth device in the Bluetooth communication system, if the master Bluetooth device is a trusted device, the target slave Bluetooth device is added to a first white list; transmitting a first trust instruction to the target slave Bluetooth device, wherein the first trust instruction is used for instructing the target slave Bluetooth device to add the master Bluetooth device to a second white list; and sending a second trust instruction to the target slave Bluetooth device, wherein the second trust instruction is used for indicating the target slave Bluetooth device to enter a white list broadcasting mode. According to the method, the target slave Bluetooth device is added to the first white list, and the target slave Bluetooth device is instructed to add the master Bluetooth device to the second white list and enter the white list broadcasting mode, so that the networking connection process of other devices can be shielded when networking connection is performed next time, and the networking connection safety is effectively improved.

Description

Control method of Bluetooth communication system, bluetooth device and readable storage medium
Technical Field
The present application relates to the field of bluetooth technologies, and in particular, to a control method of a bluetooth communication system, a bluetooth device, and a readable storage medium.
Background
With the development of wireless communication technology, more networking modes are presented, and networking technologies such as NFC, wiFi and Bluetooth gradually mature. The Bluetooth Mesh networking is a networking technology and is used for constructing connection among multiple devices to form a communication network so as to complete data transmission among the multiple devices. When bluetooth Mesh networking is performed, a common networking connection mode is that a master bluetooth device is connected with a plurality of slave bluetooth devices. In the networking connection process, the slave Bluetooth equipment needs to broadcast, and information of the slave Bluetooth equipment is easily captured by illegal equipment, so that safety risks are caused to the slave Bluetooth equipment, and the networking connection safety is reduced.
Therefore, how to improve the security of the networking connection of bluetooth devices is a problem to be solved.
Disclosure of Invention
The application provides a control method of a Bluetooth communication system, bluetooth equipment and a readable storage medium, which solve the problem that the security of networking connection is lower because information from the Bluetooth equipment is easily captured by illegal equipment in the networking connection process in the related technology.
In a first aspect, the present application provides a control method of a bluetooth communication system, applied to a master bluetooth device in the bluetooth communication system, where the bluetooth communication system further includes at least one slave bluetooth device, the method including:
after the master Bluetooth device and a target slave Bluetooth device in the Bluetooth communication system are networked, if the master Bluetooth device is a trusted device, the target slave Bluetooth device is added to a first white list, and the first white list comprises Bluetooth devices allowing the master Bluetooth device to scan; sending a first trust instruction to the target slave Bluetooth device, wherein the first trust instruction is used for instructing the target slave Bluetooth device to add the master Bluetooth device to a second white list; and sending a second trust instruction to the target slave Bluetooth device, wherein the second trust instruction is used for instructing the target slave Bluetooth device to enter a white list broadcasting mode so that the target slave Bluetooth device shields Bluetooth devices which are not in the second white list when broadcasting.
According to the method, after the master Bluetooth device and the target slave Bluetooth device are connected in a networking mode, the target slave Bluetooth device is added to the first white list, the target slave Bluetooth device is instructed to add the master Bluetooth device to the second white list and enter the white list broadcasting mode, so that when the next networking connection is performed, the master Bluetooth device only scans Bluetooth devices in the first white list, and the target slave Bluetooth device only broadcasts messages to the Bluetooth devices in the second white list, the networking connection process of other devices is shielded, and the networking connection safety can be effectively improved.
In some embodiments, the method further comprises: outputting a trust confirmation prompt, wherein the trust confirmation prompt is used for prompting that the main Bluetooth device is set as a trust device; and if the confirmation operation is detected, setting the main Bluetooth device as a trusted device.
In some embodiments, the adding the target from the bluetooth device to the first whitelist comprises: acquiring address information of the target slave Bluetooth equipment; address information of the target slave bluetooth device is added to the first whitelist.
In some embodiments, the adding the address information of the target slave bluetooth device to the first whitelist further includes: determining whether the first white list contains address information of the target slave Bluetooth device; and if the first white list does not contain the address information of the target slave Bluetooth equipment, adding the address information of the target slave Bluetooth equipment to the first white list.
In some embodiments, after the adding the target to the first whitelist from the bluetooth device, the method further comprises: when detecting the deleting operation of the device, acquiring target address information of the to-be-deleted slave Bluetooth device; if the first white list contains the target address information, deleting the target address information from the first white list and outputting a deleting success prompt; and if the first white list does not contain the target address information, outputting the deleting success prompt.
In some embodiments, after the adding the target to the first whitelist from the bluetooth device, the method further comprises: and when the Bluetooth equipment in the preset range is monitored to broadcast, scanning the Bluetooth equipment corresponding to the address information in the first white list.
In some embodiments, after the adding the target to the first whitelist from the bluetooth device, the method further comprises: and if the broadcast mode switching operation is detected, setting the main Bluetooth equipment to be in a white list broadcast mode.
In some embodiments, after the setting the master bluetooth device to the whitelist broadcast mode, the method further comprises: and when the Bluetooth equipment in the preset range is monitored to scan, sending a broadcast message to the Bluetooth equipment corresponding to the address information in the second white list of the main Bluetooth equipment, and shielding the Bluetooth equipment not corresponding to the address information in the second white list of the main Bluetooth equipment.
In a second aspect, the present application also provides a bluetooth device, the bluetooth device including a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute the computer program and implement a control method of the bluetooth communication system corresponding to the bluetooth device when executing the computer program.
In a third aspect, the present application also provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to implement a control method of a bluetooth communication system as described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a bluetooth communication system according to an embodiment of the present application;
fig. 2 is a schematic block diagram of a bluetooth device according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a control method of a bluetooth communication system according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a sub-step of setting up a trusted device provided by an embodiment of the present application;
FIG. 5 is a schematic flow chart of a sub-step of adding a target from a Bluetooth device to a first whitelist provided by an embodiment of the application;
FIG. 6 is a schematic flow chart of another sub-step of adding a target from a Bluetooth device to a first whitelist provided by an embodiment of the application;
fig. 7 is a schematic flow chart of sub-steps for deleting a bluetooth device provided by an embodiment of the present application;
fig. 8 is a schematic flow chart of sub-steps of a scanning bluetooth device provided by an embodiment of the application;
fig. 9 is a schematic flow chart of sub-steps of a control method for switching a broadcast mode according to an embodiment of the present application;
fig. 10 is a schematic flow chart of a sub-step of sending a broadcast message provided by an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
It is to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
The embodiment of the application provides a control method of a Bluetooth communication system, bluetooth equipment, the Bluetooth communication system and a readable storage medium. The control method of the Bluetooth communication system is applied to the master Bluetooth device in the Bluetooth communication system, and the target slave Bluetooth device is added to the first white list and indicated to add the master Bluetooth device to the second white list and enter the white list broadcasting mode, so that the networking connection process of shielding other devices can be realized when the next networking connection is performed, and the safety of the networking connection can be effectively improved.
By way of example, the bluetooth device may be an electronic device having a bluetooth module, such as a bluetooth headset, a mobile handset, a tablet computer, a notebook computer, a wearable device, and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a bluetooth communication system 10 according to an embodiment of the application. As shown in fig. 1, the bluetooth communication system 10 comprises a master bluetooth device 11 and at least one slave bluetooth device 12. Wherein, during networking connection, the slave Bluetooth device 12 is a Bluetooth device for turning on broadcasting, and the master Bluetooth device 11 is a Bluetooth device for turning on scanning. After the master bluetooth device 11 scans for the slave bluetooth device 12, a networking connection is established.
It should be noted that, the master bluetooth device 11 may perform networking connection with a plurality of slave bluetooth devices 12, and each networking connection may establish a channel, and the master bluetooth device 11 may perform data interaction with the slave bluetooth devices 12 through the established channel. Wherein the master bluetooth device 11 cannot simultaneously issue data through multiple channels.
In some embodiments, after the master bluetooth device 11 is networked with the target slave bluetooth device 12 in the bluetooth communication system 10, if the master bluetooth device 11 is a trusted device, the target slave bluetooth device 12 is added to a first white list, where the first white list includes bluetooth devices that allow the master bluetooth device 11 to scan; transmitting a first trust instruction to the target slave bluetooth device 12, the first trust instruction being for instructing the target slave bluetooth device 12 to add the master bluetooth device 11 to the second whitelist; a second trust instruction is sent to the target slave bluetooth device 12 instructing the target slave bluetooth device 12 to enter a whitelist broadcast mode such that the target slave bluetooth device 12 masks bluetooth devices not in the second whitelist when broadcast.
In the above embodiment, after the master bluetooth device 11 is connected with the target slave bluetooth device 12 in a networking manner, the target slave bluetooth device 12 is added to the first whitelist, and the target slave bluetooth device 12 is instructed to add the master bluetooth device 11 to the second whitelist and enter the whitelist broadcasting mode, so that the master bluetooth device 11 only scans bluetooth devices in the first whitelist when the next networking connection is performed, and the target slave bluetooth device 12 only broadcasts messages to bluetooth devices in the second whitelist, thereby realizing shielding of networking connection processes for other devices, and effectively improving the security of networking connection.
It should be noted that, when networking is connected, the target enables bluetooth function from bluetooth device 12, creates a server instance, and starts broadcasting based on the server instance. The main Bluetooth device 11 enables Bluetooth function and starts scanning; when the target slave bluetooth device 12 is located within the scanning range of the master bluetooth device 11, the master bluetooth device 11 creates a client instance that matches the server instance of the target slave bluetooth device 12, and initiates a connection request to the target slave bluetooth device 12 based on the client instance, enabling the establishment of a pair of channels.
Referring to fig. 2, fig. 2 is a schematic block diagram of a bluetooth device 1000 according to an embodiment of the application. In fig. 2, the bluetooth device 1000 comprises a processor 1001 and a memory 1002, wherein the processor 1001 and the memory 1002 are connected by a bus, such as an I2C (Inter-integrated Circuit, integrated circuit) bus, a distributed soft bus.
The memory 1002 may include a storage medium and an internal memory, among others. The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any one of the control methods of the bluetooth communication system corresponding to the bluetooth device 1000.
The processor 1001 is used to provide computing and control capabilities to support the operation of the overall bluetooth device 1000.
The processor 1001 may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The processor 1001 is configured to execute a computer program stored in the memory 1002, and when executing the computer program, implement the following steps:
after networking is carried out between a master Bluetooth device and a target slave Bluetooth device in a Bluetooth communication system, if the master Bluetooth device is a trusted device, adding the target slave Bluetooth device to a first white list, wherein the first white list comprises Bluetooth devices allowing the master Bluetooth device to scan; transmitting a first trust instruction to the target slave Bluetooth device, wherein the first trust instruction is used for instructing the target slave Bluetooth device to add the master Bluetooth device to a second white list; and sending a second trust instruction to the target slave Bluetooth device, wherein the second trust instruction is used for instructing the target slave Bluetooth device to enter a white list broadcasting mode so that the target slave Bluetooth device shields Bluetooth devices which are not in a second white list when broadcasting.
In some embodiments, the processor 1001 is further configured to implement:
outputting a trust confirmation prompt, wherein the trust confirmation prompt is used for prompting that the master Bluetooth device is set as a trust device; if a confirmation operation is detected, the master Bluetooth device is set as a trusted device.
In some embodiments, the processor 1001, when implementing the addition of the target from the bluetooth device to the first whitelist, is to implement:
acquiring address information of a target slave Bluetooth device; address information of the target slave bluetooth device is added to the first whitelist.
In some embodiments, the processor 1001, when implementing adding the address information of the target slave bluetooth device to the first whitelist, is configured to implement:
determining whether the first white list contains address information of the target slave Bluetooth device; and if the first white list does not contain the address information of the target slave Bluetooth device, adding the address information of the target slave Bluetooth device to the first white list.
In some embodiments, the processor 1001 is further configured to, after implementing adding the target from the bluetooth device to the first whitelist:
when detecting the deleting operation of the device, acquiring target address information of the to-be-deleted slave Bluetooth device; if the first white list contains target address information, deleting the target address information from the first white list, and outputting a deleting success prompt; and if the first white list does not contain the target address information, outputting a deleting success prompt.
In some embodiments, the processor 1001 is further configured to, after implementing adding the target from the bluetooth device to the first whitelist:
and when the Bluetooth equipment in the preset range is monitored to broadcast, scanning the Bluetooth equipment corresponding to the address information in the first white list.
In some embodiments, the processor 1001 is further configured to, after implementing adding the target from the bluetooth device to the first whitelist:
if the broadcast mode switching operation is detected, the master Bluetooth device is set to a white list broadcast mode.
In some embodiments, the processor 1001 is further configured to, after implementing setting the master bluetooth device to the whitelist broadcast mode, implement:
and when the Bluetooth equipment in the preset range is monitored to scan, sending a broadcast message to the Bluetooth equipment corresponding to the address information in the second white list of the main Bluetooth equipment, and shielding the Bluetooth equipment not corresponding to the address information in the second white list of the main Bluetooth equipment.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict. Referring to fig. 3, fig. 3 is a schematic flowchart of a control method of a bluetooth communication system according to an embodiment of the application, and as shown in fig. 3, the control method of the bluetooth communication system includes steps S101 to S103.
Step S101, after a master Bluetooth device and a target slave Bluetooth device in a Bluetooth communication system are networked, if the master Bluetooth device is a trusted device, the target slave Bluetooth device is added to a first white list, and the first white list comprises Bluetooth devices allowing the master Bluetooth device to scan.
For example, after the master bluetooth device performs networking with a target slave bluetooth device in the bluetooth communication system, it may be determined whether the master bluetooth device is a trusted device. When the master bluetooth device is a trusted device, the target slave bluetooth device may be added to the first whitelist. Wherein the first whitelist may include bluetooth devices that allow the master bluetooth device to scan.
Illustratively, the target slave Bluetooth device is a slave Bluetooth device currently networked with the master Bluetooth device in the Bluetooth communication system.
In the embodiment of the present application, the specific process of networking connection may refer to related technology, and will not be described herein. The first whitelist is stored on a local disk or local database of the master bluetooth device, the first whitelist including bluetooth devices that allow the master bluetooth device to scan. It can be understood that when networking is connected, the main bluetooth device can only scan bluetooth devices in the first white list, and then only connect bluetooth devices in the first white list, so that networking connection is shielded for other devices, networking connection of the main bluetooth device cannot be perceived by other devices, and therefore safety of networking connection can be effectively improved.
Illustratively, trusted devices and untrusted devices may be distinguished by preset fields. For example, if the master bluetooth device carries a field trust, then the master bluetooth device may be determined to be a trusted device. If the master Bluetooth device does not carry the field trust or carries other fields, then the master Bluetooth device may be determined to be a non-trusted device.
It is understood that a trusted device refers to a device that is trusted from a bluetooth device. By judging whether the master Bluetooth device is a trusted device, the slave Bluetooth device can be indicated to add the master Bluetooth device to the second white list when the master Bluetooth device is the trusted device, so that the slave Bluetooth device can only send broadcast messages to the master Bluetooth device, and the Bluetooth devices which are not in the second white list are shielded, so that other devices cannot perceive the broadcast messages of the slave Bluetooth device, and the safety of networking connection can be effectively improved.
According to the embodiment, when the main Bluetooth device is the trust device, the target slave Bluetooth device is added to the first white list, so that the main Bluetooth device can only scan Bluetooth devices in the first white list when networking connection is performed next time, and then only connect the Bluetooth devices in the first white list, networking connection is shielded for other devices, networking connection of the main Bluetooth device cannot be perceived by the other devices, and therefore safety of networking connection can be effectively improved.
Step S102, a first trust instruction is sent to the target slave Bluetooth device, wherein the first trust instruction is used for instructing the target slave Bluetooth device to add the master Bluetooth device to the second white list.
For example, after determining that the master bluetooth device is a trusted device, a first trust instruction may be sent to the target slave bluetooth device. Wherein the first trust instruction is to instruct the target slave bluetooth device to add the master bluetooth device to the second whitelist.
It should be noted that, in the embodiment of the present application, the first trust instruction may include address information of the master bluetooth device. It is understood that adding the master bluetooth device to the second whitelist means adding address information of the master bluetooth device to the second whitelist. The address information may include, among other things, a MAC (Media Access Control, medium access control) address for identifying the uniqueness and communication connection of the bluetooth device.
For example, the master bluetooth device may send a first trust instruction to the target slave bluetooth device based on the GATT protocol. After receiving the first trust instruction, the target slave bluetooth device may add the master bluetooth device to the second whitelist according to the first trust instruction. The second whitelist is stored in the target slave bluetooth device.
It will be appreciated that the master bluetooth device also stores a second whitelist, and that when the master bluetooth device is acting as a slave bluetooth device, it may mask bluetooth devices that are not in the second whitelist during broadcast.
In the above embodiment, by sending the first trust instruction to the target slave bluetooth device, the target slave bluetooth device may be caused to add the address information of the master bluetooth device to the second whitelist.
Step S103, a second trust instruction is sent to the target slave Bluetooth device, wherein the second trust instruction is used for indicating the target slave Bluetooth device to enter a white list broadcasting mode, so that the target slave Bluetooth device shields Bluetooth devices which are not in a second white list during broadcasting.
For example, after sending the first trust instruction to the target slave bluetooth device, a second trust instruction may also be sent to the target slave bluetooth device. The second trust instruction is used for indicating the target slave Bluetooth device to enter a white list broadcasting mode, so that the target slave Bluetooth device shields Bluetooth devices which are not in the second white list when broadcasting.
It should be noted that, when the target slave bluetooth device performs networking with the master bluetooth device for the first time, the adopted broadcast mode is a full broadcast mode, that is, other devices with bluetooth scanning function can all receive the broadcast message sent by the target slave bluetooth device. After the target slave Bluetooth device and the master Bluetooth device are networked, the target slave Bluetooth device is instructed to enter the white list broadcasting mode, so that the target slave Bluetooth device can shield Bluetooth devices which are not in the second white list when broadcasting next time.
The target slave bluetooth device may switch from the full broadcast mode to the whitelist broadcast mode upon receiving a second trust instruction. By instructing the target slave bluetooth device to enter the whitelist broadcast mode, the target slave bluetooth device may be caused to mask bluetooth devices that are not in the second whitelist when broadcast.
According to the embodiment, after the master Bluetooth device and the target slave Bluetooth device are connected in a networking mode, the target slave Bluetooth device is added to the first white list, the target slave Bluetooth device is instructed to add the master Bluetooth device to the second white list and enter the white list broadcasting mode, so that when the next networking connection is performed, the master Bluetooth device only scans Bluetooth devices in the first white list, and the target slave Bluetooth device only broadcasts messages to the Bluetooth devices in the second white list, the networking connection process of shielding other devices is realized, and the networking connection safety can be effectively improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a sub-step of setting up a trust device according to an embodiment of the present application, which may include the following steps S201 and S202.
Step S201, outputting a trust confirmation prompt, wherein the trust confirmation prompt is used for prompting that the master Bluetooth device is set as the trust device.
It should be noted that, in the embodiment of the present application, the master bluetooth device may be set as a trusted device through manual operation.
For example, the trust confirmation prompt may be output before or after the master bluetooth device is networked with a target slave bluetooth device in the bluetooth communication system. Wherein the trust confirmation prompt is used to prompt setting the master bluetooth device as a trusted device.
For example, a trust confirmation prompt may be displayed on the display interface of the master bluetooth device to alert the user to set the master bluetooth device as a trusted device on the display interface.
Step S202, if the confirmation operation is detected, the main Bluetooth device is set as a trusted device.
Illustratively, upon detection of the validation operation, the master Bluetooth device is set as the trusted device. For example, a master bluetooth device field trust may be used, wherein the field trust is used to characterize the master bluetooth device as a trusted device.
In the above embodiment, the user may be prompted to set the master bluetooth device as the trusted device by outputting the trust confirmation prompt.
Referring to fig. 5, fig. 5 is a schematic flowchart of a sub-step of adding a target from a bluetooth device to a first white list provided in an embodiment of the present application, and adding the target from the bluetooth device to the first white list in step S101 may include the following steps S301 and S302.
Step S301, obtaining address information of a target slave bluetooth device.
For example, address information of a target slave bluetooth device may be acquired. For example, after the master bluetooth device is connected to the target slave bluetooth device in a networking manner, address information of the target slave bluetooth device may be read. The address information may be a MAC address, or may be an IP (Internet Protocol ) address.
Step S302, adding address information of the target slave bluetooth device to the first whitelist.
For example, after the address information of the target slave bluetooth device is acquired, the address information of the target slave bluetooth device may be added to the first whitelist.
It should be noted that the first whitelist may include bluetooth devices that allow the master bluetooth device to scan. In the embodiment of the application, after the master bluetooth device is networked with the slave bluetooth device each time, if the master bluetooth device is a trusted device, address information of the slave bluetooth device which is networked each time can be added to the first white list. Therefore, when networking connection is performed next time, the main Bluetooth device only scans the Bluetooth devices corresponding to the address information in the first white list, and does not scan the Bluetooth devices outside the first white list, so that the shielding networking connection process of the Bluetooth devices outside the first white list can be realized.
According to the embodiment, the address information of the target slave Bluetooth device is obtained, and the address information of the target slave Bluetooth device is added to the first white list, so that Bluetooth devices outside the first white list are not scanned when the target slave Bluetooth device is connected with the network next time, the process of shielding the network connection of the Bluetooth devices outside the first white list can be realized, and the security of the network connection is improved.
Referring to fig. 6, fig. 6 is a schematic flowchart of another sub-step of adding a target from a bluetooth device to a first whitelist according to an embodiment of the present application, which may include the following steps S401 to S403.
Step S401, address information of a target slave Bluetooth device is acquired.
It is understood that step S401 is the same as step S301 described above, and will not be described herein.
Step S402, determining whether the first whitelist contains address information of the target slave bluetooth device.
For example, after the address information of the target slave bluetooth device is acquired, it may be determined whether the first whitelist contains the address information of the target slave bluetooth device. For example, the address information of the target slave bluetooth device may be compared with the address information in the first whitelist to determine whether the first whitelist contains the address information of the target slave bluetooth device.
In step S403, if the first whitelist does not include the address information of the target slave bluetooth device, the address information of the target slave bluetooth device is added to the first whitelist.
For example, if the first whitelist does not contain address information of the target slave bluetooth device, the address information of the target slave bluetooth device may be added to the first whitelist. If the first white list contains the address information of the target slave Bluetooth device, the address information of the target slave Bluetooth device is not added to the first white list.
In some embodiments, after the address information of the target slave bluetooth device is acquired, it may also be determined whether the first whitelist is full. If the first whitelist is not full, address information of the target slave bluetooth device may be added to the first whitelist. If the first white list is full, address information of the target slave Bluetooth device is not added to the first white list.
It should be noted that, by determining whether the first white list is full, it is possible to avoid the situation that the address information is continuously added to cause data loss when the first white list is full.
In other embodiments, when the first whitelist is not full, it is determined whether the first whitelist contains address information of the target slave bluetooth device. If the first white list does not contain address information of the target slave bluetooth device, the address information of the target slave bluetooth device may be added to the first white list. If the first white list contains the address information of the target slave Bluetooth device, the address information of the target slave Bluetooth device is not added to the first white list.
In the above embodiment, by determining whether the first whitelist includes address information of the target slave bluetooth device and performing the adding operation when the first whitelist does not include address information of the target slave bluetooth device, it is possible to avoid adding duplicate address information.
Referring to fig. 7, fig. 7 is a schematic flowchart of a sub-step of deleting a bluetooth device according to an embodiment of the present application, which may include the following steps S501 to S504.
In step S501, after the master bluetooth device and the target slave bluetooth device in the bluetooth communication system are networked, if the master bluetooth device is a trusted device, the target slave bluetooth device is added to a first white list, where the first white list includes bluetooth devices that allow the master bluetooth device to scan.
It is understood that step S501 is the same as step S101 described above, and will not be described herein.
Step S502, when detecting the device deleting operation, acquiring target address information of the to-be-deleted slave Bluetooth device.
It should be noted that, in the embodiment of the present application, the user may delete a portion of bluetooth devices in the first whitelist of the master bluetooth device. For example, when the first whitelist is full, some historically added address information for bluetooth devices may be deleted from the first whitelist. For another example, when some bluetooth devices need not be scanned, address information of the bluetooth device may be deleted from the first whitelist.
For example, when a device deletion operation of a user is detected, target address information of a slave bluetooth device to be deleted may be acquired according to the device deletion operation.
In step S503, if the first white list includes the target address information, the target address information is deleted from the first white list, and a prompt for success of deletion is output.
For example, after the target address information of the slave bluetooth device to be deleted is acquired, if the first whitelist contains the target address information, the target address information is deleted from the first whitelist.
For example, after deleting the target address information from the first whitelist, a deletion success prompt may be output. For example, a delete success prompt may be displayed on the display screen of the master bluetooth device so that the user knows that the target address information has been deleted from the first whitelist.
Step S504, if the first white list does not contain the target address information, a deleting success prompt is output.
For example, if the first white list does not include the target address information, the deletion operation is not performed, and a prompt of success of deletion is directly output.
According to the embodiment, the target address information of the slave Bluetooth device to be deleted is deleted from the first white list according to the device deleting operation, so that the redundant slave Bluetooth device in the first white list can be deleted in time, and the redundant slave Bluetooth device is prevented from being scanned during networking connection.
Referring to fig. 8, fig. 8 is a schematic flowchart of the sub-steps of scanning a bluetooth device according to an embodiment of the present application, which may include the following steps S601 and S602.
In step S601, after the master bluetooth device and the target slave bluetooth device in the bluetooth communication system are networked, if the master bluetooth device is a trusted device, the target slave bluetooth device is added to a first white list, where the first white list includes bluetooth devices that allow the master bluetooth device to scan.
It is understood that step S601 is the same as step S101 described above, and will not be described herein.
Step S602, when it is monitored that bluetooth devices are in a preset range for broadcasting, scanning the bluetooth devices corresponding to the address information in the first whitelist.
For example, when it is monitored that a bluetooth device is broadcast in a preset range, a bluetooth device corresponding to address information in the first whitelist may be scanned. The preset range may be set according to actual situations, and specific numerical values are not limited herein.
For example, when it is monitored that a bluetooth device is in a preset range for broadcasting, if the first whitelist includes address information corresponding to the bluetooth device a and the bluetooth device B, the bluetooth device a and the bluetooth device B may be scanned. If the Bluetooth device A broadcasts within the preset range, the main Bluetooth device initiates a connection request to the Bluetooth device A to establish communication connection.
According to the embodiment, when the Bluetooth device is monitored to broadcast in the preset range, the Bluetooth device corresponding to the address information in the first white list is scanned, so that the networking connection process of other devices can be shielded, and the networking connection safety can be effectively improved.
Referring to fig. 9, fig. 9 is a schematic flowchart of sub-steps of a control method for switching a broadcast mode according to an embodiment of the present application, which may include the following steps S701 and S702.
In step S701, after the master bluetooth device and the target slave bluetooth device in the bluetooth communication system are networked, if the master bluetooth device is a trusted device, the target slave bluetooth device is added to a first white list, where the first white list includes bluetooth devices that allow the master bluetooth device to scan.
It is understood that step S701 is the same as step S101 described above, and will not be described herein.
Step S702, if a broadcast mode switching operation is detected, the master bluetooth device is set to a whitelist broadcast mode.
It should be noted that, in the embodiment of the present application, when the master bluetooth device performs broadcasting, the broadcasting mode of the master bluetooth device may also be set to the white list broadcasting mode. Wherein the broadcast mode of the master bluetooth device may be set by the user.
Illustratively, upon detecting a broadcast mode switching operation, the master bluetooth device is switched from the full broadcast mode to the whitelist broadcast mode.
In the above embodiment, by setting the master bluetooth device to the whitelist broadcasting mode according to the broadcasting mode switching operation, it is possible to shield bluetooth devices not in the second whitelist when the master bluetooth device broadcasts.
Referring to fig. 10, fig. 10 is a schematic flowchart of a sub-step of sending a broadcast message according to an embodiment of the present application, which may include the following steps S801 to S803.
Step S801, after a master bluetooth device and a target slave bluetooth device in a bluetooth communication system are networked, if the master bluetooth device is a trusted device, the target slave bluetooth device is added to a first white list, where the first white list includes bluetooth devices that allow the master bluetooth device to scan.
Step S802, if the broadcast mode switching operation is detected, the main Bluetooth device is set to be in a white list broadcast mode.
It is understood that the steps S801 to S802 are the same as the steps S701 to S702 described above, and are not described herein.
Step 803, when it is monitored that a bluetooth device is in the preset range to scan, a broadcast message is sent to a bluetooth device corresponding to the address information in the second whitelist of the master bluetooth device, and a bluetooth device corresponding to the address information not in the second whitelist of the master bluetooth device is shielded.
After the main bluetooth device is set to the white list broadcasting mode, if it is monitored that bluetooth devices in a preset range are scanned, a broadcasting message is sent to the bluetooth device corresponding to the address information in the second white list of the main bluetooth device, and the bluetooth device not corresponding to the address information in the second white list of the main bluetooth device is shielded. The preset range may be set according to actual situations, and specific numerical values are not limited herein.
For example, when it is monitored that a bluetooth device is in a preset range to scan, if the second whitelist of the master bluetooth device includes address information corresponding to the bluetooth device C and the bluetooth device D, a broadcast message may be sent to the bluetooth device C and the bluetooth device D. If the bluetooth device C scans within the preset range, a connection request initiated by the bluetooth device C may be received to establish a communication connection.
According to the embodiment, when the Bluetooth device is monitored to scan within the preset range, the broadcast message is sent to the Bluetooth device corresponding to the address information in the second white list of the main Bluetooth device, and the Bluetooth device not corresponding to the address information in the second white list of the main Bluetooth device is shielded, so that the networking connection process of shielding other devices can be realized, and the networking connection safety is effectively improved.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program comprises program instructions, and a processor executes the program instructions to realize the control method of any Bluetooth communication system provided by the embodiment of the application. For example, the computer program is loaded by a processor, the following steps may be performed:
after networking is carried out between a master Bluetooth device and a target slave Bluetooth device in a Bluetooth communication system, if the master Bluetooth device is a trusted device, adding the target slave Bluetooth device to a first white list, wherein the first white list comprises Bluetooth devices allowing the master Bluetooth device to scan; transmitting a first trust instruction to the target slave Bluetooth device, wherein the first trust instruction is used for instructing the target slave Bluetooth device to add the master Bluetooth device to a second white list; and sending a second trust instruction to the target slave Bluetooth device, wherein the second trust instruction is used for instructing the target slave Bluetooth device to enter a white list broadcasting mode so that the target slave Bluetooth device shields Bluetooth devices which are not in a second white list when broadcasting.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The computer readable storage medium may be an internal storage unit of the bluetooth device of the foregoing embodiment, for example, a hard disk or a memory of the bluetooth device. The computer readable storage medium may also be an external storage device of the bluetooth device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card) or the like, which are provided on the bluetooth device.
The present application is not limited to the above embodiments, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the present application, and these modifications and substitutions are intended to be included in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (9)

1. A control method of a bluetooth communication system, applied to a master bluetooth device in the bluetooth communication system, the bluetooth communication system further comprising at least one slave bluetooth device, comprising:
after the master Bluetooth device and a target slave Bluetooth device in the Bluetooth communication system are networked, if the master Bluetooth device is a trusted device, the target slave Bluetooth device is added to a first white list, and the first white list comprises Bluetooth devices allowing the master Bluetooth device to scan;
sending a first trust instruction to the target slave Bluetooth device, wherein the first trust instruction is used for instructing the target slave Bluetooth device to add the master Bluetooth device to a second white list;
sending a second trust instruction to the target slave Bluetooth device, wherein the second trust instruction is used for indicating the target slave Bluetooth device to enter a white list broadcasting mode so that the target slave Bluetooth device shields Bluetooth devices which are not in the second white list when broadcasting;
the method further comprises the steps of: outputting a trust confirmation prompt, wherein the trust confirmation prompt is used for prompting that the main Bluetooth device is set as a trust device; and if the confirmation operation is detected, setting the main Bluetooth device as a trusted device.
2. The control method of the bluetooth communication system according to claim 1, wherein the adding the target from the bluetooth device to the first whitelist includes:
acquiring address information of the target slave Bluetooth equipment;
address information of the target slave bluetooth device is added to the first whitelist.
3. The control method of the bluetooth communication system according to claim 2, wherein the adding the address information of the target slave bluetooth device to the first whitelist, further comprises:
determining whether the first white list contains address information of the target slave Bluetooth device;
and if the first white list does not contain the address information of the target slave Bluetooth equipment, adding the address information of the target slave Bluetooth equipment to the first white list.
4. The control method of a bluetooth communication system according to claim 1, wherein after the target is added from a bluetooth device to a first whitelist, the method further comprises:
when detecting the deleting operation of the device, acquiring target address information of the to-be-deleted slave Bluetooth device;
if the first white list contains the target address information, deleting the target address information from the first white list and outputting a deleting success prompt;
and if the first white list does not contain the target address information, outputting the deleting success prompt.
5. The control method of a bluetooth communication system according to claim 1, wherein after the target is added from a bluetooth device to a first whitelist, the method further comprises:
and when the Bluetooth equipment in the preset range is monitored to broadcast, scanning the Bluetooth equipment corresponding to the address information in the first white list.
6. The control method of a bluetooth communication system according to claim 1, wherein after the target is added from a bluetooth device to a first whitelist, the method further comprises:
and if the broadcast mode switching operation is detected, setting the main Bluetooth equipment to be in a white list broadcast mode.
7. The control method of a bluetooth communication system according to claim 6, wherein after the setting of the master bluetooth device to a whitelist broadcasting mode, the method further comprises:
and when the Bluetooth equipment in the preset range is monitored to scan, sending a broadcast message to the Bluetooth equipment corresponding to the address information in the second white list of the main Bluetooth equipment, and shielding the Bluetooth equipment not corresponding to the address information in the second white list of the main Bluetooth equipment.
8. A bluetooth device, wherein the bluetooth device comprises a memory and a processor;
the memory is used for storing a computer program;
the processor configured to execute the computer program and to implement the control method of the bluetooth communication system according to any one of claims 1 to 7 when the computer program is executed.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to implement the control method of the bluetooth communication system according to any one of claims 1 to 7.
CN202310552429.0A 2023-05-17 2023-05-17 Control method of Bluetooth communication system, bluetooth device and readable storage medium Active CN116321163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310552429.0A CN116321163B (en) 2023-05-17 2023-05-17 Control method of Bluetooth communication system, bluetooth device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310552429.0A CN116321163B (en) 2023-05-17 2023-05-17 Control method of Bluetooth communication system, bluetooth device and readable storage medium

Publications (2)

Publication Number Publication Date
CN116321163A CN116321163A (en) 2023-06-23
CN116321163B true CN116321163B (en) 2023-08-15

Family

ID=86794473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310552429.0A Active CN116321163B (en) 2023-05-17 2023-05-17 Control method of Bluetooth communication system, bluetooth device and readable storage medium

Country Status (1)

Country Link
CN (1) CN116321163B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104519493A (en) * 2014-12-04 2015-04-15 广东省自动化研究所 Method for networking multiple Bluetooth devices
CN111629369A (en) * 2020-05-27 2020-09-04 歌尔科技有限公司 Bluetooth headset, pairing connection method and device thereof, and TWS headset
CN113329348A (en) * 2021-06-17 2021-08-31 成都拟合未来科技有限公司 Low-power-consumption Bluetooth accessory communication method, system, device and medium
CN113395687A (en) * 2021-05-19 2021-09-14 深圳Tcl新技术有限公司 Reconnection method, reconnection device, electronic equipment and storage medium
CN113766482A (en) * 2021-09-15 2021-12-07 荣耀终端有限公司 Method for searching Bluetooth device, electronic device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI127389B (en) * 2014-05-05 2018-04-30 Silicon Laboratories Finland Oy Method and technical apparatus for short - distance communication

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104519493A (en) * 2014-12-04 2015-04-15 广东省自动化研究所 Method for networking multiple Bluetooth devices
CN111629369A (en) * 2020-05-27 2020-09-04 歌尔科技有限公司 Bluetooth headset, pairing connection method and device thereof, and TWS headset
CN113395687A (en) * 2021-05-19 2021-09-14 深圳Tcl新技术有限公司 Reconnection method, reconnection device, electronic equipment and storage medium
CN113329348A (en) * 2021-06-17 2021-08-31 成都拟合未来科技有限公司 Low-power-consumption Bluetooth accessory communication method, system, device and medium
CN113766482A (en) * 2021-09-15 2021-12-07 荣耀终端有限公司 Method for searching Bluetooth device, electronic device and storage medium

Also Published As

Publication number Publication date
CN116321163A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
US11310239B2 (en) Network connection method, hotspot terminal and management terminal
EP3668212B1 (en) Information transmission methods and apparatuses for paging
US20160174140A1 (en) Method and device for performing configuration
KR101779544B1 (en) Method, device, program and recording medium for establishing connection
CN113316131B (en) Connection establishment method, device, electronic equipment and storage medium
EP3503666B1 (en) Methods for discovering bluetooth device and bluetooth devices
US9723486B2 (en) Method and apparatus for accessing network
CN114629932B (en) Cooperative method between electronic devices, electronic device and storage medium
CN113099440A (en) Network configuration method, device, equipment and system
US20160286591A1 (en) Communication method, information processing apparatus, and non-transitory computer-readable recording medium
EP3429158A1 (en) Secure communication method and apparatus for vehicle, vehicle multimedia system, and vehicle
US20230073017A1 (en) Screen Locking Method and Apparatus
CN111371896B (en) Network acceleration method, terminal and storage medium
CN112261651B (en) Terminal control method, device, terminal and storage medium
CN111970676A (en) WiFi hotspot access method, device, equipment and storage medium
CN116321163B (en) Control method of Bluetooth communication system, bluetooth device and readable storage medium
EP4250088A1 (en) Screen projection method and electronic device
EP4027677A1 (en) Mobile network access system and method, and storage medium, and electronic device
CN110895456A (en) Data processing method, terminal, and computer-readable storage medium
KR20150129082A (en) Apparatus and method for link setting using electrolic-field
US11844116B2 (en) Random access method and apparatus
CN114025412B (en) Service access method, system, device and storage medium
WO2023231883A1 (en) Method for repairing wlan information, main configurator, and internet of things device and system
WO2022237616A1 (en) Resource pool configuration method and apparatus, and terminal and network side device
US20230262435A1 (en) Method and system for networking

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