WO2021063059A1 - Networking method and apparatus, bluetooth device, and computer-readable medium - Google Patents

Networking method and apparatus, bluetooth device, and computer-readable medium Download PDF

Info

Publication number
WO2021063059A1
WO2021063059A1 PCT/CN2020/100325 CN2020100325W WO2021063059A1 WO 2021063059 A1 WO2021063059 A1 WO 2021063059A1 CN 2020100325 W CN2020100325 W CN 2020100325W WO 2021063059 A1 WO2021063059 A1 WO 2021063059A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
bluetooth device
mesh network
devices
networking
Prior art date
Application number
PCT/CN2020/100325
Other languages
French (fr)
Chinese (zh)
Inventor
徐洪伟
Original Assignee
珠海格力电器股份有限公司
珠海联云科技有限公司
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 珠海格力电器股份有限公司, 珠海联云科技有限公司 filed Critical 珠海格力电器股份有限公司
Publication of WO2021063059A1 publication Critical patent/WO2021063059A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/069Authentication using certificates or pre-shared keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Definitions

  • the present disclosure relates to the field of communications, and in particular to a networking method, device, Bluetooth device and computer readable medium.
  • the existing Bluetooth technology can only perform point-to-point communication between Bluetooth devices. For example, after a smart phone turns on the Bluetooth function, it can only connect to one Bluetooth device (such as a household appliance with Bluetooth function). With Bluetooth technology, it can only control and operate Bluetooth devices in a point-to-point connection state, and can only control and operate a single Bluetooth device (household appliances).
  • the present disclosure provides a networking Method, device, Bluetooth device and computer readable medium.
  • the present disclosure provides a networking method applied to a first Bluetooth device, including:
  • If there is a second Bluetooth device determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device;
  • the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, join the Bluetooth mesh network.
  • the method further includes:
  • the second Bluetooth device does not establish a Bluetooth mesh network with the third Bluetooth device, establish a Bluetooth mesh network with the second Bluetooth device.
  • establishing a Bluetooth mesh network with the second Bluetooth device includes:
  • the method further includes:
  • the authentication success message for the first Bluetooth device sent by the fourth Bluetooth device is received, the name and key of the established Bluetooth mesh network sent by the fourth Bluetooth device are received.
  • the Bluetooth mesh network includes: a Bluetooth device connected to a wireless router, and other Bluetooth devices are not connected to the wireless router, and the Bluetooth device connected to the wireless router is connected to the other Bluetooth devices. Communicate via Bluetooth.
  • the other Bluetooth devices are in a dormant state.
  • the wireless module of any Bluetooth device if the wireless module of any Bluetooth device is in a dormant state, the wireless module is awakened when the Bluetooth module of the Bluetooth device receives a control command or transmits data.
  • the Bluetooth device connected to the wireless router fails, one of the remaining Bluetooth devices is selected to connect to the wireless router.
  • the present disclosure provides a networking device, including:
  • the scanning module is set to scan whether there is a second Bluetooth device around;
  • the determining module is configured to determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device if there is a second Bluetooth device;
  • the joining module is configured to join the Bluetooth mesh network if the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device.
  • the present disclosure provides a Bluetooth device, including: a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory stores A computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method according to any one of the above-mentioned first aspects are implemented.
  • the present disclosure provides a computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to execute the method described in any one of the first aspects.
  • the method provided by the embodiment of the present disclosure scans whether there is a second Bluetooth device around, and if there is a second Bluetooth device, it is determined whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device.
  • the Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, and can join the Bluetooth mesh network.
  • the first Bluetooth device of the embodiment of the present disclosure can automatically join the Bluetooth mesh network when there is a Bluetooth mesh network around, and realize automatic networking of smart devices based on Bluetooth communication technology. After networking, any Bluetooth device in the Bluetooth mesh network The received control commands will be synchronized to other Bluetooth devices. After the realization of networking, Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, which saves user operation time and improves the control of multiple Bluetooth devices. Efficient and easy for users to use.
  • FIG. 1 is a schematic flowchart of a networking method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of another flow chart of a networking method provided by an embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of another flow chart of a networking method provided by another embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of a Bluetooth mesh network provided by another embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram when a Bluetooth module with only one Bluetooth device in a Bluetooth mesh network is connected to a wireless router according to another embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a networking device provided by an embodiment of the present disclosure.
  • Fig. 7 is a structural diagram of a Bluetooth device provided by another embodiment of the present disclosure.
  • the first Bluetooth device Refers to a household appliance with a built-in Bluetooth module and a wireless module.
  • the Bluetooth module may refer to a Bluetooth Low Energy (BLE) module, and the first Bluetooth device has an encryption certificate built in, as shown in FIG. 1.
  • the networking method may include the following steps:
  • Step S101 scanning whether there is a second Bluetooth device around
  • the second Bluetooth device refers to a household appliance with a built-in Bluetooth module and a wireless module, where the Bluetooth module may refer to a Bluetooth Low Energy (BLE) module, and the second Bluetooth device is built in There is an encryption certificate.
  • BLE Bluetooth Low Energy
  • the first Bluetooth device and the second Bluetooth device After the first Bluetooth device and the second Bluetooth device are powered on, they can automatically turn on the ad hoc network mode, and use the built-in Bluetooth module to automatically scan the surroundings.
  • the Bluetooth function of the device can search for nearby devices that also have the Bluetooth function turned on when it is turned on, in this step, after the first Bluetooth device is powered on, it can automatically turn on the ad hoc network mode, using the first Bluetooth device
  • the Bluetooth module of the Bluetooth module automatically scans whether there is a second Bluetooth device with the same Bluetooth function in the surrounding area, and if the second Bluetooth device is scanned, the device identification of the second Bluetooth device is displayed in the Bluetooth device list.
  • Step S102 if there is a second Bluetooth device, determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device;
  • the second Bluetooth device includes the second Bluetooth device, it can be determined that there is a second Bluetooth device that also turns on the Bluetooth function around the first Bluetooth device.
  • the third Bluetooth device refers to a household appliance with a built-in Bluetooth module and a wireless module.
  • the Bluetooth module may refer to a Bluetooth Low Energy (BLE) module, and the third Bluetooth device has an encryption certificate built in.
  • BLE Bluetooth Low Energy
  • the second Bluetooth device Based on the preset protocol, when the second Bluetooth device receives the inquiry request of whether it is networked, it will follow its own ad hoc network status.
  • the inquiry response is returned to the first Bluetooth device. If the first Bluetooth device receives the inquiry response sent by the second Bluetooth device to confirm that the network has been established, it is determined that the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device.
  • Step S103 If the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, join the Bluetooth mesh network.
  • the first Bluetooth device can join the Bluetooth mesh network in the following manner: the first Bluetooth device initiates a connection request to the second Bluetooth device, and receives the encrypted data sent by the second Bluetooth device and encrypted using a preset encryption method.
  • a certificate acquisition request using the preset encryption method to send a first encryption certificate to the second Bluetooth device; if a successful authentication message for the first Bluetooth device sent by the second Bluetooth device is received, to the The second Bluetooth device sends a certificate acquisition request encrypted using a preset encryption method; receives a second encryption certificate that uses the preset encryption method sent by the second Bluetooth device; if the verification of the second encryption certificate is passed, Send an authentication success message for the second Bluetooth device to the second Bluetooth device; send the name and key of the established Bluetooth mesh network to the second Bluetooth device.
  • the embodiments of the present disclosure scan whether there is a second Bluetooth device around, if there is a second Bluetooth device, determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, and if the second Bluetooth device has already established a Bluetooth mesh network with the third Bluetooth device, 3.
  • the Bluetooth device establishes a Bluetooth mesh network and can join the Bluetooth mesh network.
  • the first Bluetooth device of the embodiment of the present disclosure can automatically join the Bluetooth mesh network when there is a Bluetooth mesh network around, and realize automatic networking of smart devices based on Bluetooth communication technology. After networking, any Bluetooth device in the Bluetooth mesh network The received control commands will be synchronized to other Bluetooth devices. After the realization of networking, Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, which saves user operation time and improves the control of multiple Bluetooth devices. Efficient and easy for users to use.
  • the method further includes the following steps:
  • Step S104 If the second Bluetooth device does not establish a Bluetooth mesh network with the third Bluetooth device, establish a Bluetooth mesh network with the second Bluetooth device.
  • establishing a Bluetooth mesh network with the second Bluetooth device may include the following steps:
  • Step S201 Send a connection request to the second Bluetooth device
  • Step S202 Receive a certificate acquisition request encrypted using a preset encryption method sent by the second Bluetooth device, and use the preset encryption method to send a first encryption certificate to the second Bluetooth device;
  • Step S203 If a successful authentication message for the first Bluetooth device sent by the second Bluetooth device is received, send a certificate acquisition request encrypted using a preset encryption method to the second Bluetooth device;
  • Step S204 Receive a second encryption certificate that uses the preset encryption method sent by the second Bluetooth device;
  • Step S205 if the verification of the second encryption certificate is passed, send an authentication success message for the second Bluetooth device to the second Bluetooth device;
  • Step S206 Send the name and key of the established Bluetooth mesh network to the second Bluetooth device.
  • the embodiments of the present disclosure can automatically establish a Bluetooth mesh network with a second Bluetooth device when there is no Bluetooth mesh network around, and realize automatic networking of smart devices based on Bluetooth communication technology. After networking, any Bluetooth device in the Bluetooth mesh network The received control commands will be synchronized to other Bluetooth devices. After the realization of networking, Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, which saves user operation time and improves the control of multiple Bluetooth devices. Efficient and easy for users to use.
  • the method may further include the following steps:
  • Step S301 If there is no second Bluetooth device around, receive a connection request sent by the fourth Bluetooth device;
  • Step S302 sending a certificate acquisition request encrypted using a preset encryption method to the fourth Bluetooth device, and receiving a third encryption certificate encrypted using a preset encryption method sent by the fourth Bluetooth device;
  • Step S303 if the verification of the third encryption certificate is passed, send an authentication success message for the fourth Bluetooth device to the fourth Bluetooth device;
  • Step S304 Receive a certificate acquisition request encrypted using a preset encryption method sent by the fourth Bluetooth device;
  • Step S305 Send a fourth encryption certificate encrypted using a preset encryption method to the fourth Bluetooth device;
  • Step S306 If the authentication success message for the first Bluetooth device sent by the fourth Bluetooth device is received, receive the name and key of the established Bluetooth mesh network sent by the fourth Bluetooth device.
  • the embodiment of the present disclosure realizes the establishment of a Bluetooth mesh network with the fourth Bluetooth device by receiving the connection request of the fourth Bluetooth device and mutual authentication with the encryption certificate of the fourth Bluetooth device, and realizes the automatic networking of smart devices based on Bluetooth communication technology. After networking, the control commands received by any Bluetooth device in the Bluetooth mesh network will be synchronized to other Bluetooth devices. After networking, the Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, saving User operation time improves the control efficiency of multiple Bluetooth devices and is convenient for users to use.
  • a Bluetooth mesh network formed by at least two Bluetooth devices can be as shown in FIG.
  • a Bluetooth mesh network formed by two Bluetooth devices as shown in Figure 5, it includes: a Bluetooth device connected to a wireless router, the other Bluetooth devices are not connected to the wireless router, and the Bluetooth device connected to the wireless router is connected to the other Bluetooth devices. Bluetooth devices communicate via Bluetooth.
  • the Bluetooth mesh network of the Bluetooth module between at least two Bluetooth devices is always in working state, and the wireless module in each Bluetooth device can be turned on or off according to actual communication requirements.
  • a wireless module of a Bluetooth device will be randomly selected to maintain the connection with the wireless router (for remote communication), and the remaining Bluetooth devices will be disconnected from the router and connected to the Bluetooth device of the wireless router It communicates with the rest of the Bluetooth devices through Bluetooth. In this way, because there is only one Bluetooth device connected to the wireless router, none of the other Bluetooth devices are connected to the wireless router, which saves power and makes the Bluetooth mesh network enter a low power consumption state.
  • Bluetooth devices in the Bluetooth mesh network can maintain communication with the server through the wireless router, realizing the low power consumption technology that the Bluetooth device is not offline.
  • the Bluetooth mesh network except for the Bluetooth device connected to the wireless router in the working state, the other Bluetooth devices are in the dormant state.
  • the other Bluetooth devices are in the dormant state. Since the power consumption of the Bluetooth device in the dormant state will be lower than that of the Bluetooth device in the working state, further savings can be achieved Electric energy makes the Bluetooth mesh network enter a low power consumption state.
  • Bluetooth devices in the Bluetooth mesh network can maintain communication with the server through the wireless router, realizing the low power consumption technology that the Bluetooth device is not offline.
  • the Bluetooth mesh network if the wireless module of any Bluetooth device is in a sleep state, when the Bluetooth module of the Bluetooth device receives a control command or transmits data, Wake up the wireless module.
  • a Bluetooth device with a wireless module in a dormant state can automatically wake up the wireless module stored in the dormant state when the Bluetooth module receives a control command or transmits data.
  • the wireless module can only wake up the wireless module stored in the dormant state when the Bluetooth module receives a control command or transmits data. It is awakened only when data is received, which saves power and makes the Bluetooth mesh network enter a low power consumption state.
  • the Bluetooth device connected to the wireless router fails, one of the remaining Bluetooth devices is selected to connect to the wireless router.
  • the Bluetooth mesh network of the Bluetooth module component is used. Establish a connection with the Bluetooth module of any other Bluetooth device that is normally connected to the wireless router, and the wireless module can normally connect the wireless path to the Bluetooth module in the Bluetooth device to forward and transmit data, and at the same time inform the server of network abnormal information, so that it can be displayed on the APP Directly remind users of network abnormalities.
  • the Bluetooth mesh network of the Bluetooth module component establishes a connection with the Bluetooth module of any other Bluetooth device normally connected to the wireless router.
  • devices A, B, and C are all Bluetooth devices, and devices A, B, and B are all Bluetooth devices.
  • the Bluetooth modules of C are all in the same Bluetooth mesh network.
  • the wireless module of device A cannot connect to the wireless router, the two nodes of device B and C in the Bluetooth mesh network connected to each other through the Bluetooth module can maintain communication with the cloud server. Smart communication between at least two Bluetooth devices.
  • Bluetooth devices in the Bluetooth mesh network can maintain communication with the server through the wireless router, realizing the low power consumption technology that the Bluetooth device is not offline.
  • a networking device is also provided, as shown in FIG. 6, including:
  • the scanning module 11 is set to scan whether there is a second Bluetooth device around;
  • the determining module 12 is configured to determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device if there is a second Bluetooth device;
  • the joining module 13 is configured to join the Bluetooth mesh network if the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device.
  • the device provided by the embodiment of the present disclosure scans whether there is a second Bluetooth device around through the scanning module, and if there is a second Bluetooth device, determines whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device through the determination module, If the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, it can join the Bluetooth mesh network through a joining module.
  • the first Bluetooth device of the embodiment of the present disclosure can automatically join the Bluetooth mesh network when there is a Bluetooth mesh network around, and realize automatic networking of smart devices based on Bluetooth communication technology. After networking, any Bluetooth device in the Bluetooth mesh network The received control commands will be synchronized to other Bluetooth devices. After the realization of networking, Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, which saves user operation time and improves the control of multiple Bluetooth devices. Efficient and easy for users to use.
  • a Bluetooth device including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus;
  • the memory stores a computer program that can run on the processor, and the processor implements the steps of the method described in the above method embodiment when the processor executes the computer program.
  • the processor scans whether there is a second Bluetooth device around by executing a program stored on the memory; if there is a second Bluetooth device, it is determined whether the second Bluetooth device has been connected to the third Bluetooth device.
  • the device establishes a Bluetooth mesh network; if the second Bluetooth device has established a Bluetooth mesh network with a third Bluetooth device, join the Bluetooth mesh network, so that when there is a Bluetooth mesh network around, it automatically joins the Bluetooth mesh network, based on Bluetooth Communication technology realizes the automatic networking of smart devices.
  • the control commands received by any Bluetooth device in the Bluetooth mesh network will be synchronized to other Bluetooth devices.
  • the Bluetooth devices can realize interconnection and intercommunication. Sending control instructions to multiple Bluetooth devices one by one saves user operation time, improves the control efficiency of multiple Bluetooth devices, and is convenient for users.
  • the communication bus 1140 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus 1140 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
  • the communication interface 1120 is configured for communication between the above-mentioned electronic device and other devices.
  • the memory 1130 may include a random access memory (Random Access Memory, RAM for short), or may include a non-volatile memory (non-volatile memory), such as at least one disk memory. In some embodiments, the memory may also be at least one storage device located far away from the aforementioned processor.
  • RAM Random Access Memory
  • non-volatile memory such as at least one disk memory.
  • the memory may also be at least one storage device located far away from the aforementioned processor.
  • the aforementioned processor 1110 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; it may also be a digital signal processor (Digital Signal Processing, DSP for short), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), Field-Programmable Gate Array (FPGA for short) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a computer-readable medium having non-volatile program code executable by a processor, and the program code causes the processor to execute the method described in the method embodiment. method.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present disclosure are generated in whole or in part.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to transmit to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk Solid State Disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present disclosure relates to a networking method and apparatus, a Bluetooth device, and a computer-readable medium. The method comprises: scanning for whether a second Bluetooth device is present in the surroundings; if a second Bluetooth device is present, determining whether the second Bluetooth device has established a Bluetooth mesh network with a third Bluetooth device; and if the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, then joining the Bluetooth mesh network. In the present disclosure, when a Bluetooth mesh network exists in the surroundings of a first Bluetooth device, the Bluetooth mesh network can be joined automatically, and the automatic networking of intelligent devices is achieved on the basis of Bluetooth communication technology. After networking, a control instruction received by any Bluetooth device in the Bluetooth mesh network will synchronize to other Bluetooth devices, and interconnection and intercommunication can be achieved between networked Bluetooth devices without needing to send a control instruction to a plurality of Bluetooth devices one by one, therefore user operation time is reduced, the control efficiency for a plurality of Bluetooth devices is improved, and usage by users is facilitated.

Description

一种组网方法、装置、蓝牙设备及计算机可读介质Networking method, device, bluetooth equipment and computer readable medium
本公开要求于2019年9月30日提交中国专利局、申请号为201910945829.1、发明名称为“一种组网方法、装置、蓝牙设备及计算机可读介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This disclosure requires the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201910945829.1, and the invention title is "a networking method, device, Bluetooth device and computer readable medium" on September 30, 2019, all of which The content is incorporated into this disclosure by reference.
技术领域Technical field
本公开涉及通信领域,尤其涉及一种组网方法、装置、蓝牙设备及计算机可读介质。The present disclosure relates to the field of communications, and in particular to a networking method, device, Bluetooth device and computer readable medium.
背景技术Background technique
目前,现有蓝牙技术只能够进行蓝牙设备间的点对点的通讯,例如:一部智能手机开启蓝牙功能后,只能够连接到一个蓝牙设备(如某带有蓝牙功能的家用电器),所以,现有蓝牙技术只能是点对点连接状态下控制和操作蓝牙设备,并且只能控制和操作单一的蓝牙设备(家用电器)。At present, the existing Bluetooth technology can only perform point-to-point communication between Bluetooth devices. For example, after a smart phone turns on the Bluetooth function, it can only connect to one Bluetooth device (such as a household appliance with Bluetooth function). With Bluetooth technology, it can only control and operate Bluetooth devices in a point-to-point connection state, and can only control and operate a single Bluetooth device (household appliances).
然而,在用户需要控制多个蓝牙设备时,如果逐一连接并控制每个蓝牙设备,将会操作非常不方便,浪费大量用户时间。However, when the user needs to control multiple Bluetooth devices, if each Bluetooth device is connected and controlled one by one, it will be very inconvenient to operate and waste a lot of user time.
发明内容Summary of the invention
为了解决相关技术中存在的在用户需要控制多个蓝牙设备时,如果逐一连接并控制每个蓝牙设备,将会操作非常不方便,浪费大量用户时间的技术问题,本公开提供了一种组网方法、装置、蓝牙设备及计算机可读介质。In order to solve the technical problem in the related art that when the user needs to control multiple Bluetooth devices, if you connect and control each Bluetooth device one by one, it will be very inconvenient to operate and waste a lot of user time. The present disclosure provides a networking Method, device, Bluetooth device and computer readable medium.
第一方面,本公开提供了一种组网方法,应用于第一蓝牙设备,包括:In the first aspect, the present disclosure provides a networking method applied to a first Bluetooth device, including:
扫描周围是否存在第二蓝牙设备;Scan whether there is a second Bluetooth device around;
若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络;If there is a second Bluetooth device, determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device;
若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,加入所述蓝牙mesh网络。If the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, join the Bluetooth mesh network.
在一些实施方式中,所述方法还包括:In some embodiments, the method further includes:
若所述第二蓝牙设备未与第三蓝牙设备建立蓝牙mesh网络,与所述第二蓝牙设备建立蓝牙mesh网络。If the second Bluetooth device does not establish a Bluetooth mesh network with the third Bluetooth device, establish a Bluetooth mesh network with the second Bluetooth device.
在一些实施方式中,与所述第二蓝牙设备建立蓝牙mesh网络,包括:In some embodiments, establishing a Bluetooth mesh network with the second Bluetooth device includes:
向所述第二蓝牙设备发送连接请求;Sending a connection request to the second Bluetooth device;
接收所述第二蓝牙设备发送的、使用预设加密方式加密的证书获取请求,使用所述预设加密方式向所述第二蓝牙设备发送第一加密证书;Receiving a certificate acquisition request encrypted using a preset encryption method sent by the second Bluetooth device, and sending a first encryption certificate to the second Bluetooth device using the preset encryption method;
若接收到所述第二蓝牙设备发送的对所述第一蓝牙设备的认证成功消息,向所述第二蓝牙设备发送使用预设加密方式加密的证书获取请求;If an authentication success message for the first Bluetooth device sent by the second Bluetooth device is received, sending a certificate acquisition request encrypted using a preset encryption method to the second Bluetooth device;
接收所述第二蓝牙设备发送的、使用所述预设加密方式的第二加密证书;Receiving a second encryption certificate sent by the second Bluetooth device and using the preset encryption method;
若对所述第二加密证书验证通过,向所述第二蓝牙设备发送对所述第二蓝牙设备的认证成功消息;If the verification of the second encryption certificate is passed, sending an authentication success message for the second Bluetooth device to the second Bluetooth device;
向所述第二蓝牙设备发送建立的蓝牙mesh网络的名称和密钥。Send the name and key of the established Bluetooth mesh network to the second Bluetooth device.
在一些实施方式中,所述方法还包括:In some embodiments, the method further includes:
若周围不存在第二蓝牙设备,接收第四蓝牙设备发送的连接请求;If there is no second Bluetooth device around, receive the connection request sent by the fourth Bluetooth device;
向所述第四蓝牙设备发送使用预设加密方式加密的证书获取请求,接收所述第四蓝牙设备发送的、使用预设加密方式加密的第三加密证书;Sending a certificate acquisition request encrypted using a preset encryption method to the fourth Bluetooth device, and receiving a third encryption certificate encrypted using a preset encryption method sent by the fourth Bluetooth device;
若对所述第三加密证书验证通过,向所述第四蓝牙设备发送对所述第四蓝牙设备的认证成功消息;If the verification of the third encryption certificate is passed, sending an authentication success message for the fourth Bluetooth device to the fourth Bluetooth device;
接收第四蓝牙设备发送的、使用预设加密方式加密的证书获取请求;Receiving a certificate acquisition request encrypted using a preset encryption method sent by the fourth Bluetooth device;
向所述第四蓝牙设备发送使用预设加密方式加密的第四加密证书;Sending a fourth encryption certificate encrypted using a preset encryption method to the fourth Bluetooth device;
若接收到所述第四蓝牙设备发送的对所述第一蓝牙设备的认证成功消息,接收所述第四蓝牙设备发送的建立的蓝牙mesh网络的名称和密钥。If the authentication success message for the first Bluetooth device sent by the fourth Bluetooth device is received, the name and key of the established Bluetooth mesh network sent by the fourth Bluetooth device are received.
在一些实施方式中,所述蓝牙mesh网络中,包括:一个连接无线路由器的蓝牙设备,其余的蓝牙设备不与所述无线路由器连接,所述连接无线路由器的蓝牙设备与其余的蓝牙设备之间通过蓝牙方式通信。In some embodiments, the Bluetooth mesh network includes: a Bluetooth device connected to a wireless router, and other Bluetooth devices are not connected to the wireless router, and the Bluetooth device connected to the wireless router is connected to the other Bluetooth devices. Communicate via Bluetooth.
在一些实施方式中,所述蓝牙mesh网络中:除连接无线路由器的蓝牙设备处于工作状态外,其余的蓝牙设备处于休眠状态。In some embodiments, in the Bluetooth mesh network, except for the Bluetooth device connected to the wireless router, which is in a working state, the other Bluetooth devices are in a dormant state.
在一些实施方式中,所述蓝牙mesh网络中:若任一蓝牙设备的无线模块处于休眠状态,在该蓝牙设备的蓝牙模块接收到控制命令或者传输数据时,唤醒所述无线模块。In some embodiments, in the Bluetooth mesh network: if the wireless module of any Bluetooth device is in a dormant state, the wireless module is awakened when the Bluetooth module of the Bluetooth device receives a control command or transmits data.
在一些实施方式中,在所述蓝牙mesh网络中,连接无线路由器的蓝牙设备故障时,在其余的蓝牙设备中选择一个蓝牙设备连接无线路由器。In some embodiments, in the Bluetooth mesh network, when the Bluetooth device connected to the wireless router fails, one of the remaining Bluetooth devices is selected to connect to the wireless router.
第二方面,本公开提供了一种组网装置,包括:In a second aspect, the present disclosure provides a networking device, including:
扫描模块,被设置为扫描周围是否存在第二蓝牙设备;The scanning module is set to scan whether there is a second Bluetooth device around;
确定模块,被设置为若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络;The determining module is configured to determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device if there is a second Bluetooth device;
加入模块,被设置为若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,加入所述蓝牙mesh网络。The joining module is configured to join the Bluetooth mesh network if the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device.
第三方面,本公开提供了一种蓝牙设备,包括:处理器、通信接口、存储器和通信总线,其中,处理器、通信接口和存储器通过通信总线完成相互间的通信;所述存储器中存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面任一项所述的方法的步骤。In a third aspect, the present disclosure provides a Bluetooth device, including: a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus; the memory stores A computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method according to any one of the above-mentioned first aspects are implemented.
第四方面,本公开提供了一种具有处理器可执行的非易失的程序代码的计算机可读介质,所述程序代码使所述处理器执行所述第一方面任一所述的方法。In a fourth aspect, the present disclosure provides a computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to execute the method described in any one of the first aspects.
本公开实施例提供的上述技术方案与相关技术相比具有如下优点:Compared with related technologies, the above-mentioned technical solutions provided by the embodiments of the present disclosure have the following advantages:
本公开实施例提供的该方法,通过扫描周围是否存在第二蓝牙设备,若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络,若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,可以加入所述蓝牙mesh网络。The method provided by the embodiment of the present disclosure scans whether there is a second Bluetooth device around, and if there is a second Bluetooth device, it is determined whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device. The Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, and can join the Bluetooth mesh network.
本公开实施例的第一蓝牙设备能够在周围存在蓝牙mesh网络时,自动加入该蓝牙mesh网络,基于蓝牙通讯技术实现智能设备的自动组网,在组网后,蓝牙mesh网络中任一个蓝牙设备接收到的控制指令都会同步到其它的蓝牙设备,实现组网后的蓝牙设备间可以实现互联互通,无需逐一向多个蓝牙设备发送控制指令,节省用户操作时间,提 高对多个蓝牙设备的控制效率,便于用户使用。The first Bluetooth device of the embodiment of the present disclosure can automatically join the Bluetooth mesh network when there is a Bluetooth mesh network around, and realize automatic networking of smart devices based on Bluetooth communication technology. After networking, any Bluetooth device in the Bluetooth mesh network The received control commands will be synchronized to other Bluetooth devices. After the realization of networking, Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, which saves user operation time and improves the control of multiple Bluetooth devices. Efficient and easy for users to use.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The drawings herein are incorporated into the specification and constitute a part of the specification, show embodiments in accordance with the disclosure, and together with the specification are used to explain the principle of the disclosure.
为了更清楚地说明本公开实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present disclosure or related technologies, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or related technologies. Obviously, for those of ordinary skill in the art, Other drawings can be obtained based on these drawings without creative labor.
图1为本公开一个实施例提供的一种组网方法的一种流程示意图;FIG. 1 is a schematic flowchart of a networking method provided by an embodiment of the present disclosure;
图2为本公开一个实施例提供的一种组网方法的另一种流程示意图;2 is a schematic diagram of another flow chart of a networking method provided by an embodiment of the present disclosure;
图3为本公开又一实施例提供的一种组网方法的另一种流程示意图;3 is a schematic diagram of another flow chart of a networking method provided by another embodiment of the present disclosure;
图4为本公开又一实施例提供的一种蓝牙mesh网络的结构示意图;4 is a schematic structural diagram of a Bluetooth mesh network provided by another embodiment of the present disclosure;
图5为本公开又一实施例提供的一种蓝牙mesh网络中只有一个蓝牙设备的蓝牙模块连接无线路由器时的结构示意图;FIG. 5 is a schematic structural diagram when a Bluetooth module with only one Bluetooth device in a Bluetooth mesh network is connected to a wireless router according to another embodiment of the present disclosure;
图6为本公开一个实施例提供的一种组网装置的结构示意图;FIG. 6 is a schematic structural diagram of a networking device provided by an embodiment of the present disclosure;
图7为本公开又一实施例提供的一种蓝牙设备的结构图。Fig. 7 is a structural diagram of a Bluetooth device provided by another embodiment of the present disclosure.
具体实施方式Detailed ways
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments They are part of the embodiments of the present disclosure, but not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present disclosure.
由于在用户需要控制多个蓝牙设备时,如果逐一连接并控制每个蓝牙设备,将会操作非常不方便,浪费大量用户时间。为此,本公开实施例提供的一种组网方法、装置、蓝牙设备及计算机可读介质,所述方法可以应用于第一蓝牙设备内,在本公开实施例中,所述第一蓝牙设备指内置有蓝牙模块和无线模块的家用电器,其中,蓝牙模块可以指蓝牙低能耗(Bluetooth Low Energy,BLE)模块,所述第一蓝牙设备中内置有加密证书,如图1所示,所述组网方法可以包括以下步骤:Because when the user needs to control multiple Bluetooth devices, if each Bluetooth device is connected and controlled one by one, it will be very inconvenient to operate and waste a lot of user time. To this end, a networking method, device, Bluetooth device, and computer readable medium provided by the embodiments of the present disclosure can be applied to a first Bluetooth device. In the embodiments of the present disclosure, the first Bluetooth device Refers to a household appliance with a built-in Bluetooth module and a wireless module. The Bluetooth module may refer to a Bluetooth Low Energy (BLE) module, and the first Bluetooth device has an encryption certificate built in, as shown in FIG. 1. The networking method may include the following steps:
步骤S101,扫描周围是否存在第二蓝牙设备;Step S101, scanning whether there is a second Bluetooth device around;
在本公开实施例中,第二蓝牙设备是指内置有蓝牙模块和无线模块的家用电器,其中,蓝牙模块可以指蓝牙低能耗(Bluetooth Low Energy,BLE)模块,所述第二蓝牙设备中内置有加密证书。In the embodiments of the present disclosure, the second Bluetooth device refers to a household appliance with a built-in Bluetooth module and a wireless module, where the Bluetooth module may refer to a Bluetooth Low Energy (BLE) module, and the second Bluetooth device is built in There is an encryption certificate.
第一蓝牙设备和第二蓝牙设备在上电后,均可以自动开启自组网模式,利用内置的蓝牙模块自动扫描周围。After the first Bluetooth device and the second Bluetooth device are powered on, they can automatically turn on the ad hoc network mode, and use the built-in Bluetooth module to automatically scan the surroundings.
由于设备的蓝牙功能在开启的时候能够搜索到附近同样开启蓝牙功能的设备,所以,在该步骤中,第一蓝牙设备在上电后,可以自动开启自组网模式,利用第一蓝牙设备中的蓝牙模块自动扫描周围是否具有同样开启蓝牙功能的第二蓝牙设备,若扫描到第二蓝牙设备,则将第二蓝牙设备的设备标识显示在蓝牙设备列表中。Since the Bluetooth function of the device can search for nearby devices that also have the Bluetooth function turned on when it is turned on, in this step, after the first Bluetooth device is powered on, it can automatically turn on the ad hoc network mode, using the first Bluetooth device The Bluetooth module of the Bluetooth module automatically scans whether there is a second Bluetooth device with the same Bluetooth function in the surrounding area, and if the second Bluetooth device is scanned, the device identification of the second Bluetooth device is displayed in the Bluetooth device list.
步骤S102,若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络;Step S102, if there is a second Bluetooth device, determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device;
在本公开实施例中,若第二蓝牙设备中包括第二蓝牙设备,则可以确定第一蓝牙设备的周围存在同样开启蓝牙功能的第二蓝牙设备。In the embodiment of the present disclosure, if the second Bluetooth device includes the second Bluetooth device, it can be determined that there is a second Bluetooth device that also turns on the Bluetooth function around the first Bluetooth device.
第三蓝牙设备是指内置有蓝牙模块和无线模块的家用电器,其中,蓝牙模块可以指蓝牙低能耗(Bluetooth Low Energy,BLE)模块,所 述第三蓝牙设备中内置有加密证书。The third Bluetooth device refers to a household appliance with a built-in Bluetooth module and a wireless module. The Bluetooth module may refer to a Bluetooth Low Energy (BLE) module, and the third Bluetooth device has an encryption certificate built in.
在该步骤中,可以向第二蓝牙设备发送是否已组网的询问请求,基于预设的协议,第二蓝牙设备在接收到是否已组网的询问请求时,会根据自身的自组网状态向第一蓝牙设备返回询问应答,若第一蓝牙设备接收到第二蓝牙设备发送的确认已组网的询问应答,则确定第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络。In this step, you can send an inquiry request to the second Bluetooth device whether it is networked. Based on the preset protocol, when the second Bluetooth device receives the inquiry request of whether it is networked, it will follow its own ad hoc network status. The inquiry response is returned to the first Bluetooth device. If the first Bluetooth device receives the inquiry response sent by the second Bluetooth device to confirm that the network has been established, it is determined that the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device.
步骤S103,若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,加入所述蓝牙mesh网络。Step S103: If the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, join the Bluetooth mesh network.
在本公开实施例中,第一蓝牙设备可以通过以下方式加入蓝牙mesh网络:第一蓝牙设备向第二蓝牙设备发起连接请求,接收所述第二蓝牙设备发送的、使用预设加密方式加密的证书获取请求,使用所述预设加密方式向所述第二蓝牙设备发送第一加密证书;若接收到所述第二蓝牙设备发送的对所述第一蓝牙设备的认证成功消息,向所述第二蓝牙设备发送使用预设加密方式加密的证书获取请求;接收所述第二蓝牙设备发送的、使用所述预设加密方式的第二加密证书;若对所述第二加密证书验证通过,向所述第二蓝牙设备发送对所述第二蓝牙设备的认证成功消息;向所述第二蓝牙设备发送建立的蓝牙mesh网络的名称和密钥。In the embodiment of the present disclosure, the first Bluetooth device can join the Bluetooth mesh network in the following manner: the first Bluetooth device initiates a connection request to the second Bluetooth device, and receives the encrypted data sent by the second Bluetooth device and encrypted using a preset encryption method. A certificate acquisition request, using the preset encryption method to send a first encryption certificate to the second Bluetooth device; if a successful authentication message for the first Bluetooth device sent by the second Bluetooth device is received, to the The second Bluetooth device sends a certificate acquisition request encrypted using a preset encryption method; receives a second encryption certificate that uses the preset encryption method sent by the second Bluetooth device; if the verification of the second encryption certificate is passed, Send an authentication success message for the second Bluetooth device to the second Bluetooth device; send the name and key of the established Bluetooth mesh network to the second Bluetooth device.
本公开实施例通过扫描周围是否存在第二蓝牙设备,若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络,若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,可以加入所述蓝牙mesh网络。The embodiments of the present disclosure scan whether there is a second Bluetooth device around, if there is a second Bluetooth device, determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, and if the second Bluetooth device has already established a Bluetooth mesh network with the third Bluetooth device, 3. The Bluetooth device establishes a Bluetooth mesh network and can join the Bluetooth mesh network.
本公开实施例的第一蓝牙设备能够在周围存在蓝牙mesh网络时,自动加入该蓝牙mesh网络,基于蓝牙通讯技术实现智能设备的自动组网,在组网后,蓝牙mesh网络中任一个蓝牙设备接收到的控制指令都会同步到其它的蓝牙设备,实现组网后的蓝牙设备间可以实现互联互 通,无需逐一向多个蓝牙设备发送控制指令,节省用户操作时间,提高对多个蓝牙设备的控制效率,便于用户使用。The first Bluetooth device of the embodiment of the present disclosure can automatically join the Bluetooth mesh network when there is a Bluetooth mesh network around, and realize automatic networking of smart devices based on Bluetooth communication technology. After networking, any Bluetooth device in the Bluetooth mesh network The received control commands will be synchronized to other Bluetooth devices. After the realization of networking, Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, which saves user operation time and improves the control of multiple Bluetooth devices. Efficient and easy for users to use.
在本公开的又一实施例中,如图1所示,所述方法还包括以下步骤:In another embodiment of the present disclosure, as shown in FIG. 1, the method further includes the following steps:
步骤S104,若所述第二蓝牙设备未与第三蓝牙设备建立蓝牙mesh网络,与所述第二蓝牙设备建立蓝牙mesh网络。Step S104: If the second Bluetooth device does not establish a Bluetooth mesh network with the third Bluetooth device, establish a Bluetooth mesh network with the second Bluetooth device.
在该步骤中,与所述第二蓝牙设备建立蓝牙mesh网络,如图2所示,可以包括以下步骤:In this step, establishing a Bluetooth mesh network with the second Bluetooth device, as shown in Figure 2, may include the following steps:
步骤S201,向所述第二蓝牙设备发送连接请求;Step S201: Send a connection request to the second Bluetooth device;
步骤S202,接收所述第二蓝牙设备发送的、使用预设加密方式加密的证书获取请求,使用所述预设加密方式向所述第二蓝牙设备发送第一加密证书;Step S202: Receive a certificate acquisition request encrypted using a preset encryption method sent by the second Bluetooth device, and use the preset encryption method to send a first encryption certificate to the second Bluetooth device;
步骤S203,若接收到所述第二蓝牙设备发送的对所述第一蓝牙设备的认证成功消息,向所述第二蓝牙设备发送使用预设加密方式加密的证书获取请求;Step S203: If a successful authentication message for the first Bluetooth device sent by the second Bluetooth device is received, send a certificate acquisition request encrypted using a preset encryption method to the second Bluetooth device;
步骤S204,接收所述第二蓝牙设备发送的、使用所述预设加密方式的第二加密证书;Step S204: Receive a second encryption certificate that uses the preset encryption method sent by the second Bluetooth device;
步骤S205,若对所述第二加密证书验证通过,向所述第二蓝牙设备发送对所述第二蓝牙设备的认证成功消息;Step S205, if the verification of the second encryption certificate is passed, send an authentication success message for the second Bluetooth device to the second Bluetooth device;
步骤S206,向所述第二蓝牙设备发送建立的蓝牙mesh网络的名称和密钥。Step S206: Send the name and key of the established Bluetooth mesh network to the second Bluetooth device.
本公开实施例能够在周围不存在蓝牙mesh网络时,自动与第二蓝牙设备建立蓝牙mesh网络,基于蓝牙通讯技术实现智能设备的自动组 网,在组网后,蓝牙mesh网络中任一个蓝牙设备接收到的控制指令都会同步到其它的蓝牙设备,实现组网后的蓝牙设备间可以实现互联互通,无需逐一向多个蓝牙设备发送控制指令,节省用户操作时间,提高对多个蓝牙设备的控制效率,便于用户使用。The embodiments of the present disclosure can automatically establish a Bluetooth mesh network with a second Bluetooth device when there is no Bluetooth mesh network around, and realize automatic networking of smart devices based on Bluetooth communication technology. After networking, any Bluetooth device in the Bluetooth mesh network The received control commands will be synchronized to other Bluetooth devices. After the realization of networking, Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, which saves user operation time and improves the control of multiple Bluetooth devices. Efficient and easy for users to use.
由于在实际应用中,某一个蓝牙设备在主动发现周围其它蓝牙的同时,其它的蓝牙设备也可能在发现该蓝牙设备,在第一蓝牙设备未发现周围存在第二蓝牙设备时,将保持蓝牙模块的功能开启,直至周围出现第四蓝牙设备发现该第二蓝牙设备,在本公开的又一实施例中,如图3所示,所述方法还可以包括以下步骤:In practical applications, while a certain Bluetooth device is actively discovering other Bluetooth devices around it, other Bluetooth devices may also discover the Bluetooth device. When the first Bluetooth device does not find a second Bluetooth device around, it will maintain the Bluetooth module. The function of is turned on until a fourth Bluetooth device discovers the second Bluetooth device. In another embodiment of the present disclosure, as shown in FIG. 3, the method may further include the following steps:
步骤S301,若周围不存在第二蓝牙设备,接收第四蓝牙设备发送的连接请求;Step S301: If there is no second Bluetooth device around, receive a connection request sent by the fourth Bluetooth device;
步骤S302,向所述第四蓝牙设备发送使用预设加密方式加密的证书获取请求,接收所述第四蓝牙设备发送的、使用预设加密方式加密的第三加密证书;Step S302, sending a certificate acquisition request encrypted using a preset encryption method to the fourth Bluetooth device, and receiving a third encryption certificate encrypted using a preset encryption method sent by the fourth Bluetooth device;
步骤S303,若对所述第三加密证书验证通过,向所述第四蓝牙设备发送对所述第四蓝牙设备的认证成功消息;Step S303, if the verification of the third encryption certificate is passed, send an authentication success message for the fourth Bluetooth device to the fourth Bluetooth device;
步骤S304,接收第四蓝牙设备发送的、使用预设加密方式加密的证书获取请求;Step S304: Receive a certificate acquisition request encrypted using a preset encryption method sent by the fourth Bluetooth device;
步骤S305,向所述第四蓝牙设备发送使用预设加密方式加密的第四加密证书;Step S305: Send a fourth encryption certificate encrypted using a preset encryption method to the fourth Bluetooth device;
步骤S306,若接收到所述第四蓝牙设备发送的对所述第一蓝牙设备的认证成功消息,接收所述第四蓝牙设备发送的建立的蓝牙mesh网络的名称和密钥。Step S306: If the authentication success message for the first Bluetooth device sent by the fourth Bluetooth device is received, receive the name and key of the established Bluetooth mesh network sent by the fourth Bluetooth device.
本公开实施例通过接收第四蓝牙设备的连接请求,并与第四蓝牙 设备的加密证书互相认证,实现与第四蓝牙设备建立蓝牙mesh网络,基于蓝牙通讯技术实现智能设备的自动组网,在组网后,蓝牙mesh网络中任一个蓝牙设备接收到的控制指令都会同步到其它的蓝牙设备,实现组网后的蓝牙设备间可以实现互联互通,无需逐一向多个蓝牙设备发送控制指令,节省用户操作时间,提高对多个蓝牙设备的控制效率,便于用户使用。The embodiment of the present disclosure realizes the establishment of a Bluetooth mesh network with the fourth Bluetooth device by receiving the connection request of the fourth Bluetooth device and mutual authentication with the encryption certificate of the fourth Bluetooth device, and realizes the automatic networking of smart devices based on Bluetooth communication technology. After networking, the control commands received by any Bluetooth device in the Bluetooth mesh network will be synchronized to other Bluetooth devices. After networking, the Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, saving User operation time improves the control efficiency of multiple Bluetooth devices and is convenient for users to use.
基于前述实施例,在本公开的又一实施例中,至少两个蓝牙设备所组建的蓝牙mesh网络(以蓝牙mesh网络中包含3个蓝牙设备为例)可以如图4所示,在至少两个蓝牙设备所组建的蓝牙mesh网络中,如图5所示,包括:一个连接无线路由器的蓝牙设备,其余的蓝牙设备不与所述无线路由器连接,所述连接无线路由器的蓝牙设备与其余的蓝牙设备之间通过蓝牙方式通信。Based on the foregoing embodiment, in another embodiment of the present disclosure, a Bluetooth mesh network formed by at least two Bluetooth devices (take 3 Bluetooth devices in the Bluetooth mesh network as an example) can be as shown in FIG. In a Bluetooth mesh network formed by two Bluetooth devices, as shown in Figure 5, it includes: a Bluetooth device connected to a wireless router, the other Bluetooth devices are not connected to the wireless router, and the Bluetooth device connected to the wireless router is connected to the other Bluetooth devices. Bluetooth devices communicate via Bluetooth.
在本公开实施例中,蓝牙mesh网络组网完成后,至少两个蓝牙设备间关于蓝牙模块的蓝牙mesh网络一直处于工作状态,各个蓝牙设备中的无线模块可以根据实际通讯需求开启或者关闭。In the embodiments of the present disclosure, after the Bluetooth mesh network is completed, the Bluetooth mesh network of the Bluetooth module between at least two Bluetooth devices is always in working state, and the wireless module in each Bluetooth device can be turned on or off according to actual communication requirements.
本公开实施例,在完成自动组网后,会随机选择一个蓝牙设备的无线模块保持与无线路由器连接(用于远程通讯),其余的蓝牙设备断开与路由器端连接,连接无线路由器的蓝牙设备与其余的蓝牙设备之间通过蓝牙方式通信,这样由于仅存在一个蓝牙设备连接无线路由器,其余蓝牙设备均未与无线路由器,节省了电能,使蓝牙mesh网络进入低功耗状态。In the embodiments of the present disclosure, after the automatic networking is completed, a wireless module of a Bluetooth device will be randomly selected to maintain the connection with the wireless router (for remote communication), and the remaining Bluetooth devices will be disconnected from the router and connected to the Bluetooth device of the wireless router It communicates with the rest of the Bluetooth devices through Bluetooth. In this way, because there is only one Bluetooth device connected to the wireless router, none of the other Bluetooth devices are connected to the wireless router, which saves power and makes the Bluetooth mesh network enter a low power consumption state.
而且,蓝牙mesh网络中的只要有一个蓝牙设备的无线模块连接无线路由器,蓝牙mesh网络中其它的蓝牙设备均可以通过无线路由器与服务器保持通讯,实现蓝牙设备不离线的低功耗技术。Moreover, as long as there is a wireless module of a Bluetooth device connected to the wireless router in the Bluetooth mesh network, other Bluetooth devices in the Bluetooth mesh network can maintain communication with the server through the wireless router, realizing the low power consumption technology that the Bluetooth device is not offline.
基于前述实施例,在本公开的又一实施例中,所述蓝牙mesh网络 中:除连接无线路由器的蓝牙设备处于工作状态外,其余的蓝牙设备处于休眠状态。Based on the foregoing embodiment, in another embodiment of the present disclosure, in the Bluetooth mesh network: except for the Bluetooth device connected to the wireless router in the working state, the other Bluetooth devices are in the dormant state.
本公开实施例,除连接无线路由器的蓝牙设备处于工作状态外,其余的蓝牙设备处于休眠状态,由于在休眠状态的蓝牙设备所消耗的电能会低于工作状态的蓝牙设备,所以可以进一步的节省电能,使蓝牙mesh网络进入低功耗状态。In the embodiments of the present disclosure, except for the Bluetooth device connected to the wireless router, which is in the working state, the other Bluetooth devices are in the dormant state. Since the power consumption of the Bluetooth device in the dormant state will be lower than that of the Bluetooth device in the working state, further savings can be achieved Electric energy makes the Bluetooth mesh network enter a low power consumption state.
而且,蓝牙mesh网络中的只要有一个蓝牙设备的无线模块连接无线路由器,蓝牙mesh网络中其它的蓝牙设备均可以通过无线路由器与服务器保持通讯,实现蓝牙设备不离线的低功耗技术。Moreover, as long as there is a wireless module of a Bluetooth device connected to the wireless router in the Bluetooth mesh network, other Bluetooth devices in the Bluetooth mesh network can maintain communication with the server through the wireless router, realizing the low power consumption technology that the Bluetooth device is not offline.
基于前述实施例,在本公开的又一实施例中,所述蓝牙mesh网络中:若任一蓝牙设备的无线模块处于休眠状态,在该蓝牙设备的蓝牙模块接收到控制命令或者传输数据时,唤醒所述无线模块。Based on the foregoing embodiment, in another embodiment of the present disclosure, in the Bluetooth mesh network: if the wireless module of any Bluetooth device is in a sleep state, when the Bluetooth module of the Bluetooth device receives a control command or transmits data, Wake up the wireless module.
本公开实施例中,无线模块处于休眠状态的蓝牙设备,可以在蓝牙模块接收到控制命令或者传输数据时,自动唤醒储于休眠状态的无线模块,无线模块只有在蓝牙模块接收到控制命令或者传输数据时才被唤醒,实现节省电能,使蓝牙mesh网络进入低功耗状态。In the embodiments of the present disclosure, a Bluetooth device with a wireless module in a dormant state can automatically wake up the wireless module stored in the dormant state when the Bluetooth module receives a control command or transmits data. The wireless module can only wake up the wireless module stored in the dormant state when the Bluetooth module receives a control command or transmits data. It is awakened only when data is received, which saves power and makes the Bluetooth mesh network enter a low power consumption state.
在本公开的又一实施例中,在所述蓝牙mesh网络中,连接无线路由器的蓝牙设备故障时,在其余的蓝牙设备中选择一个蓝牙设备连接无线路由器。In another embodiment of the present disclosure, in the Bluetooth mesh network, when the Bluetooth device connected to the wireless router fails, one of the remaining Bluetooth devices is selected to connect to the wireless router.
本公开实施例中,蓝牙mesh网络组网完成后,当某一个蓝牙设备中的无线模块,因为故障连接不上无线路由器或者由于网络问题连接不上云服务器时,通过蓝牙模块组件的蓝牙mesh网络与任一其他正常连接无线路由器的蓝牙设备的蓝牙模块建立联系,并该无线模块能够正常连接无线路与其的蓝牙设备中的蓝牙模块转发传输数据,同时告知服务器网络异常的信息,以便在APP上直接提醒用户网络异常。In the embodiment of the present disclosure, after the Bluetooth mesh network networking is completed, when the wireless module in a certain Bluetooth device cannot connect to the wireless router due to a fault or cannot connect to the cloud server due to a network problem, the Bluetooth mesh network of the Bluetooth module component is used. Establish a connection with the Bluetooth module of any other Bluetooth device that is normally connected to the wireless router, and the wireless module can normally connect the wireless path to the Bluetooth module in the Bluetooth device to forward and transmit data, and at the same time inform the server of network abnormal information, so that it can be displayed on the APP Directly remind users of network abnormalities.
本公开实施例,通过蓝牙模块组件的蓝牙mesh网络与任一其他正常连接无线路由器的蓝牙设备的蓝牙模块建立联系,示例性的,设备A、B和C都是蓝牙设备,设备A、B和C的蓝牙模块都在同一蓝牙mesh网络内,当设备A的无线模块连接不上无线路由器时,可以通过蓝牙模块相互连接的蓝牙mesh网络中设备B和C两个节点与云服务器保持通讯,实现至少两个蓝牙设备间的智能通讯。In the embodiment of the present disclosure, the Bluetooth mesh network of the Bluetooth module component establishes a connection with the Bluetooth module of any other Bluetooth device normally connected to the wireless router. Illustratively, devices A, B, and C are all Bluetooth devices, and devices A, B, and B are all Bluetooth devices. The Bluetooth modules of C are all in the same Bluetooth mesh network. When the wireless module of device A cannot connect to the wireless router, the two nodes of device B and C in the Bluetooth mesh network connected to each other through the Bluetooth module can maintain communication with the cloud server. Smart communication between at least two Bluetooth devices.
而且,蓝牙mesh网络中的只要有一个蓝牙设备的无线模块连接无线路由器,蓝牙mesh网络中其它的蓝牙设备均可以通过无线路由器与服务器保持通讯,实现蓝牙设备不离线的低功耗技术。Moreover, as long as there is a wireless module of a Bluetooth device connected to the wireless router in the Bluetooth mesh network, other Bluetooth devices in the Bluetooth mesh network can maintain communication with the server through the wireless router, realizing the low power consumption technology that the Bluetooth device is not offline.
在本公开的又一实施例中,还提供一种组网装置,如图6所示,包括:In another embodiment of the present disclosure, a networking device is also provided, as shown in FIG. 6, including:
扫描模块11,被设置为扫描周围是否存在第二蓝牙设备;The scanning module 11 is set to scan whether there is a second Bluetooth device around;
确定模块12,被设置为若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络;The determining module 12 is configured to determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device if there is a second Bluetooth device;
加入模块13,被设置为若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,加入所述蓝牙mesh网络。The joining module 13 is configured to join the Bluetooth mesh network if the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device.
本公开实施例提供的该装置,通过扫描模块扫描周围是否存在第二蓝牙设备,若存在第二蓝牙设备,通过确定模块确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络,若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,可以通过加入模块加入所述蓝牙mesh网络。The device provided by the embodiment of the present disclosure scans whether there is a second Bluetooth device around through the scanning module, and if there is a second Bluetooth device, determines whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device through the determination module, If the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, it can join the Bluetooth mesh network through a joining module.
本公开实施例的第一蓝牙设备能够在周围存在蓝牙mesh网络时,自动加入该蓝牙mesh网络,基于蓝牙通讯技术实现智能设备的自动组网,在组网后,蓝牙mesh网络中任一个蓝牙设备接收到的控制指令都 会同步到其它的蓝牙设备,实现组网后的蓝牙设备间可以实现互联互通,无需逐一向多个蓝牙设备发送控制指令,节省用户操作时间,提高对多个蓝牙设备的控制效率,便于用户使用。The first Bluetooth device of the embodiment of the present disclosure can automatically join the Bluetooth mesh network when there is a Bluetooth mesh network around, and realize automatic networking of smart devices based on Bluetooth communication technology. After networking, any Bluetooth device in the Bluetooth mesh network The received control commands will be synchronized to other Bluetooth devices. After the realization of networking, Bluetooth devices can realize interconnection and intercommunication. There is no need to send control commands to multiple Bluetooth devices one by one, which saves user operation time and improves the control of multiple Bluetooth devices. Efficient and easy for users to use.
在本公开的又一实施例中,还提供一种蓝牙设备,包括:处理器、通信接口、存储器和通信总线,其中,处理器、通信接口和存储器通过通信总线完成相互间的通信;所述存储器中存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述方法实施例所述的方法的步骤。In yet another embodiment of the present disclosure, there is also provided a Bluetooth device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory stores a computer program that can run on the processor, and the processor implements the steps of the method described in the above method embodiment when the processor executes the computer program.
本公开实施例提供的蓝牙设备,处理器通过执行存储器上所存放的程序实现了扫描周围是否存在第二蓝牙设备;若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络;若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,加入所述蓝牙mesh网络,实现能够在周围存在蓝牙mesh网络时,自动加入该蓝牙mesh网络,基于蓝牙通讯技术实现智能设备的自动组网,在组网后,蓝牙mesh网络中任一个蓝牙设备接收到的控制指令都会同步到其它的蓝牙设备,实现组网后的蓝牙设备间可以实现互联互通,无需逐一向多个蓝牙设备发送控制指令,节省用户操作时间,提高对多个蓝牙设备的控制效率,便于用户使用。In the Bluetooth device provided by the embodiment of the present disclosure, the processor scans whether there is a second Bluetooth device around by executing a program stored on the memory; if there is a second Bluetooth device, it is determined whether the second Bluetooth device has been connected to the third Bluetooth device. The device establishes a Bluetooth mesh network; if the second Bluetooth device has established a Bluetooth mesh network with a third Bluetooth device, join the Bluetooth mesh network, so that when there is a Bluetooth mesh network around, it automatically joins the Bluetooth mesh network, based on Bluetooth Communication technology realizes the automatic networking of smart devices. After networking, the control commands received by any Bluetooth device in the Bluetooth mesh network will be synchronized to other Bluetooth devices. After the networking, the Bluetooth devices can realize interconnection and intercommunication. Sending control instructions to multiple Bluetooth devices one by one saves user operation time, improves the control efficiency of multiple Bluetooth devices, and is convenient for users.
上述电子设备提到的通信总线1140可以是外设部件互连标准(PeripheralComponentInterconnect,简称PCI)总线或扩展工业标准结构(ExtendedIndustryStandardArchitecture,简称EISA)总线等。该通信总线1140可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus 1140 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
通信接口1120被设置为上述电子设备与其他设备之间的通信。The communication interface 1120 is configured for communication between the above-mentioned electronic device and other devices.
存储器1130可以包括随机存取存储器(RandomAccessMemory,简称RAM),也可以包括非易失性存储器(non-volatilememory),例如至少一个磁盘存储器。在一些实施方式中,存储器还可以是至少一个位于 远离前述处理器的存储装置。The memory 1130 may include a random access memory (Random Access Memory, RAM for short), or may include a non-volatile memory (non-volatile memory), such as at least one disk memory. In some embodiments, the memory may also be at least one storage device located far away from the aforementioned processor.
上述的处理器1110可以是通用处理器,包括中央处理器(CentralProcessingUnit,简称CPU)、网络处理器(NetworkProcessor,简称NP)等;还可以是数字信号处理器(DigitalSignalProcessing,简称DSP)、专用集成电路(ApplicationSpecificIntegratedCircuit,简称ASIC)、现场可编程门阵列(Field-ProgrammableGateArray,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The aforementioned processor 1110 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; it may also be a digital signal processor (Digital Signal Processing, DSP for short), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), Field-Programmable Gate Array (FPGA for short) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
在本公开的又一实施例中,还提供一种具有处理器可执行的非易失的程序代码的计算机可读介质,所述程序代码使所述处理器执行所述方法实施例所述的方法。In yet another embodiment of the present disclosure, there is also provided a computer-readable medium having non-volatile program code executable by a processor, and the program code causes the processor to execute the method described in the method embodiment. method.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本公开实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘SolidStateDisk(SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present disclosure are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to transmit to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk Solid State Disk (SSD)).
最后应说明的是:以上实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述实施例对本公开进行了详细的说明,本领 域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these There is any such actual relationship or sequence between entities or operations. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes those that are not explicitly listed Other elements of, or also include elements inherent to this process, method, article or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or equipment that includes the element.
以上所述仅是本公开的具体实施方式,使本领域技术人员能够理解或实现本公开。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本公开的精神或范围的情况下,在其它实施例中实现。因此,本公开将不会被限制于本文所示的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。The above are only specific implementations of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments shown in this document, but should conform to the widest scope consistent with the principles and novel features applied in this document.

Claims (11)

  1. 一种组网方法,应用于第一蓝牙设备,包括:A networking method, applied to a first Bluetooth device, includes:
    扫描周围是否存在第二蓝牙设备;Scan whether there is a second Bluetooth device around;
    若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络;If there is a second Bluetooth device, determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device;
    若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,加入所述蓝牙mesh网络。If the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device, join the Bluetooth mesh network.
  2. 根据权利要求1所述的组网方法,其中,所述方法还包括:The networking method according to claim 1, wherein the method further comprises:
    若所述第二蓝牙设备未与第三蓝牙设备建立蓝牙mesh网络,与所述第二蓝牙设备建立蓝牙mesh网络。If the second Bluetooth device does not establish a Bluetooth mesh network with the third Bluetooth device, establish a Bluetooth mesh network with the second Bluetooth device.
  3. 根据权利要求2所述的组网方法,其中,与所述第二蓝牙设备建立蓝牙mesh网络,包括:The networking method according to claim 2, wherein establishing a Bluetooth mesh network with the second Bluetooth device comprises:
    向所述第二蓝牙设备发送连接请求;Sending a connection request to the second Bluetooth device;
    接收所述第二蓝牙设备发送的、使用预设加密方式加密的证书获取请求,使用所述预设加密方式向所述第二蓝牙设备发送第一加密证书;Receiving a certificate acquisition request encrypted using a preset encryption method sent by the second Bluetooth device, and sending a first encryption certificate to the second Bluetooth device using the preset encryption method;
    若接收到所述第二蓝牙设备发送的对所述第一蓝牙设备的认证成功消息,向所述第二蓝牙设备发送使用预设加密方式加密的证书获取请求;If an authentication success message for the first Bluetooth device sent by the second Bluetooth device is received, sending a certificate acquisition request encrypted using a preset encryption method to the second Bluetooth device;
    接收所述第二蓝牙设备发送的、使用所述预设加密方式的第二加密证书;Receiving a second encryption certificate sent by the second Bluetooth device and using the preset encryption method;
    若对所述第二加密证书验证通过,向所述第二蓝牙设备发送对所述第二蓝牙设备的认证成功消息;If the verification of the second encryption certificate is passed, sending an authentication success message for the second Bluetooth device to the second Bluetooth device;
    向所述第二蓝牙设备发送建立的蓝牙mesh网络的名称和密钥。Send the name and key of the established Bluetooth mesh network to the second Bluetooth device.
  4. 根据权利要求1所述的组网方法,其中,所述方法还包括:The networking method according to claim 1, wherein the method further comprises:
    若周围不存在第二蓝牙设备,接收第四蓝牙设备发送的连接请求;If there is no second Bluetooth device around, receive the connection request sent by the fourth Bluetooth device;
    向所述第四蓝牙设备发送使用预设加密方式加密的证书获取请求,接收所述第四蓝牙设备发送的、使用预设加密方式加密的第三加密证书;Sending a certificate acquisition request encrypted using a preset encryption method to the fourth Bluetooth device, and receiving a third encryption certificate encrypted using a preset encryption method sent by the fourth Bluetooth device;
    若对所述第三加密证书验证通过,向所述第四蓝牙设备发送对所述第四蓝牙设备的认证成功消息;If the verification of the third encryption certificate is passed, sending an authentication success message for the fourth Bluetooth device to the fourth Bluetooth device;
    接收第四蓝牙设备发送的、使用预设加密方式加密的证书获取请求;Receiving a certificate acquisition request encrypted using a preset encryption method sent by the fourth Bluetooth device;
    向所述第四蓝牙设备发送使用预设加密方式加密的第四加密证书;Sending a fourth encryption certificate encrypted using a preset encryption method to the fourth Bluetooth device;
    若接收到所述第四蓝牙设备发送的对所述第一蓝牙设备的认证成功消息,接收所述第四蓝牙设备发送的建立的蓝牙mesh网络的名称和密钥。If the authentication success message for the first Bluetooth device sent by the fourth Bluetooth device is received, the name and key of the established Bluetooth mesh network sent by the fourth Bluetooth device are received.
  5. 根据权利要求1所述的组网方法,其中,所述蓝牙mesh网络中,包括:一个连接无线路由器的蓝牙设备,其余的蓝牙设备不与所述无线路由器连接,所述连接无线路由器的蓝牙设备与其余的蓝牙设备之间通过蓝牙方式通信。The networking method according to claim 1, wherein the Bluetooth mesh network includes: a Bluetooth device connected to a wireless router, other Bluetooth devices are not connected to the wireless router, and the Bluetooth device connected to the wireless router It communicates with other Bluetooth devices via Bluetooth.
  6. 根据权利要求5所述的组网方法,其中,所述蓝牙mesh网络中:除连接无线路由器的蓝牙设备处于工作状态外,其余的蓝牙设备处于休眠状态。The networking method according to claim 5, wherein, in the Bluetooth mesh network, except for the Bluetooth device connected to the wireless router, which is in a working state, the rest of the Bluetooth devices are in a dormant state.
  7. 根据权利要求5所述的组网方法,其中,所述蓝牙mesh网络中:若任一蓝牙设备的无线模块处于休眠状态,在该蓝牙设备的蓝牙 模块接收到控制命令或者传输数据时,唤醒所述无线模块。The networking method according to claim 5, wherein, in the Bluetooth mesh network: if the wireless module of any Bluetooth device is in a sleep state, when the Bluetooth module of the Bluetooth device receives a control command or transmits data, wake up all述 wireless module.
  8. 根据权利要求5所述的组网方法,其中,在所述蓝牙mesh网络中,连接无线路由器的蓝牙设备故障时,在其余的蓝牙设备中选择一个蓝牙设备连接无线路由器。The networking method according to claim 5, wherein in the Bluetooth mesh network, when the Bluetooth device connected to the wireless router fails, one of the remaining Bluetooth devices is selected to connect to the wireless router.
  9. 一种组网装置,包括:A networking device, including:
    扫描模块,被设置为扫描周围是否存在第二蓝牙设备;The scanning module is set to scan whether there is a second Bluetooth device around;
    确定模块,被设置为若存在第二蓝牙设备,确定所述第二蓝牙设备是否已与第三蓝牙设备建立蓝牙mesh网络;The determining module is configured to determine whether the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device if there is a second Bluetooth device;
    加入模块,被设置为若所述第二蓝牙设备已与第三蓝牙设备建立蓝牙mesh网络,加入所述蓝牙mesh网络。The joining module is configured to join the Bluetooth mesh network if the second Bluetooth device has established a Bluetooth mesh network with the third Bluetooth device.
  10. 一种蓝牙设备,包括:处理器、通信接口、存储器和通信总线,其中,处理器、通信接口和存储器通过通信总线完成相互间的通信;所述存储器中存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述权利要求1至8任一项所述的方法的步骤。A Bluetooth device includes: a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other through the communication bus; and the memory is stored that can run on the processor. When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are realized.
  11. 一种具有处理器可执行的非易失的程序代码的计算机可读介质,所述程序代码使所述处理器执行所述权利要求1-8任一所述方法。A computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to execute the method described in any one of claims 1-8.
PCT/CN2020/100325 2019-09-30 2020-07-06 Networking method and apparatus, bluetooth device, and computer-readable medium WO2021063059A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910945829.1 2019-09-30
CN201910945829.1A CN110830968A (en) 2019-09-30 2019-09-30 Networking method and device, Bluetooth equipment and computer readable medium

Publications (1)

Publication Number Publication Date
WO2021063059A1 true WO2021063059A1 (en) 2021-04-08

Family

ID=69548590

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/100325 WO2021063059A1 (en) 2019-09-30 2020-07-06 Networking method and apparatus, bluetooth device, and computer-readable medium

Country Status (2)

Country Link
CN (1) CN110830968A (en)
WO (1) WO2021063059A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113891354A (en) * 2021-09-15 2022-01-04 珠海格力电器股份有限公司 method, device, equipment and storage medium for updating mesh network
CN113890776A (en) * 2021-09-30 2022-01-04 珠海格力电器股份有限公司 Equipment ad hoc network method, device and equipment
CN113904889A (en) * 2021-09-30 2022-01-07 珠海格力电器股份有限公司 Method and device for sharing running data in ad hoc network and color screen equipment
CN113904891A (en) * 2021-09-30 2022-01-07 珠海格力电器股份有限公司 Method, device and equipment for sharing distribution network information in ad hoc network
CN113904888A (en) * 2021-09-30 2022-01-07 珠海格力电器股份有限公司 Linkage method of air detection equipment and door and window, air detection equipment and door and window
CN113923069A (en) * 2021-09-30 2022-01-11 珠海格力电器股份有限公司 Health management equipment and kitchen electricity linkage method, health management equipment and kitchen electricity
CN114125990A (en) * 2021-12-09 2022-03-01 思必驰科技股份有限公司 Networking method and system for equipment
CN114339625A (en) * 2021-12-28 2022-04-12 上海庆科信息技术有限公司 Equipment linkage control method and device, storage medium, processor and electronic device
CN115884145A (en) * 2022-11-24 2023-03-31 重庆长安汽车股份有限公司 Networking method of Bluetooth equipment and application of single/multiple Bluetooth equipment vehicle

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110830968A (en) * 2019-09-30 2020-02-21 珠海格力电器股份有限公司 Networking method and device, Bluetooth equipment and computer readable medium
CN111328058B (en) * 2020-02-25 2023-03-24 南通大学 Bluetooth Mesh low-power-consumption node dynamic awakening method
CN113132911A (en) * 2021-03-11 2021-07-16 西安电子科技大学 Ad hoc network method of mobile electronic equipment, electronic equipment node and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170134227A1 (en) * 2015-11-11 2017-05-11 Lg Electronics Inc. Method and apparatus for transmitting and receiving data in mesh network using bluetooth
CN108391238A (en) * 2018-02-01 2018-08-10 乐鑫信息科技(上海)有限公司 Wireless MESH network matches network method
CN108882228A (en) * 2018-05-31 2018-11-23 北京橙鑫数据科技有限公司 The wireless mesh network method for building up of electronic apparatus system, device and system
CN110830968A (en) * 2019-09-30 2020-02-21 珠海格力电器股份有限公司 Networking method and device, Bluetooth equipment and computer readable medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9445253B2 (en) * 2008-04-30 2016-09-13 Maarten Menzo Wentink Methods and apparatus for scanning for mesh nodes
CN101616431A (en) * 2009-07-30 2009-12-30 迈玺(北京)科技有限公司 The implementation method of network in wireless mesh network and node
GB2512733B (en) * 2014-02-25 2018-09-05 Qualcomm Technologies Int Ltd Broadcast retransmission
CN106792853B (en) * 2016-12-22 2020-05-12 青岛亿联客信息技术有限公司 New equipment adding method for Bluetooth mesh network
CN107635215A (en) * 2017-08-25 2018-01-26 西安电子科技大学 Mesh network-building methods based on low-power consumption bluetooth
CN107889119B (en) * 2017-11-16 2021-06-08 乐鑫信息科技(上海)股份有限公司 Mesh network auxiliary tool, Mesh network, distribution network and networking method
CN108111375A (en) * 2017-11-27 2018-06-01 海尔优家智能科技(北京)有限公司 Equipment method of network entry, device, are waited to network and log equipment intelligent terminal
CN108156644B (en) * 2017-12-29 2020-12-08 乐鑫信息科技(上海)股份有限公司 Method for selecting father node in mesh network
CN108738005A (en) * 2018-05-22 2018-11-02 西安航天寰星电子科技有限公司 A kind of Mesh network-building methods and its system based on low-power consumption bluetooth
CN109041022B (en) * 2018-08-13 2021-08-27 海尔优家智能科技(北京)有限公司 Network management method, Bluetooth module, medium and computer
CN109828544A (en) * 2019-02-15 2019-05-31 广州视声智能科技有限公司 A kind of intelligent home control system and its configuration method based on bluetooth mesh
CN109769238B (en) * 2019-03-06 2022-05-20 乐鑫信息科技(上海)股份有限公司 Method for starting and configuring multiple devices to be distributed in Bluetooth Mesh network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170134227A1 (en) * 2015-11-11 2017-05-11 Lg Electronics Inc. Method and apparatus for transmitting and receiving data in mesh network using bluetooth
CN108391238A (en) * 2018-02-01 2018-08-10 乐鑫信息科技(上海)有限公司 Wireless MESH network matches network method
CN108882228A (en) * 2018-05-31 2018-11-23 北京橙鑫数据科技有限公司 The wireless mesh network method for building up of electronic apparatus system, device and system
CN110830968A (en) * 2019-09-30 2020-02-21 珠海格力电器股份有限公司 Networking method and device, Bluetooth equipment and computer readable medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113891354A (en) * 2021-09-15 2022-01-04 珠海格力电器股份有限公司 method, device, equipment and storage medium for updating mesh network
CN113904889B (en) * 2021-09-30 2023-03-10 珠海格力电器股份有限公司 Method and device for sharing running data in ad hoc network and color screen equipment
CN113904888B (en) * 2021-09-30 2023-02-21 珠海格力电器股份有限公司 Linkage method of air detection equipment and door and window, air detection equipment and door and window
CN113904891A (en) * 2021-09-30 2022-01-07 珠海格力电器股份有限公司 Method, device and equipment for sharing distribution network information in ad hoc network
CN113904888A (en) * 2021-09-30 2022-01-07 珠海格力电器股份有限公司 Linkage method of air detection equipment and door and window, air detection equipment and door and window
CN113923069A (en) * 2021-09-30 2022-01-11 珠海格力电器股份有限公司 Health management equipment and kitchen electricity linkage method, health management equipment and kitchen electricity
CN113890776B (en) * 2021-09-30 2023-03-14 珠海格力电器股份有限公司 Equipment ad hoc network method, device and equipment
CN113904891B (en) * 2021-09-30 2023-03-10 珠海格力电器股份有限公司 Method, device and equipment for sharing distribution network information in ad hoc network
CN113904889A (en) * 2021-09-30 2022-01-07 珠海格力电器股份有限公司 Method and device for sharing running data in ad hoc network and color screen equipment
CN113890776A (en) * 2021-09-30 2022-01-04 珠海格力电器股份有限公司 Equipment ad hoc network method, device and equipment
CN114125990A (en) * 2021-12-09 2022-03-01 思必驰科技股份有限公司 Networking method and system for equipment
CN114125990B (en) * 2021-12-09 2023-12-22 思必驰科技股份有限公司 Networking method and system for equipment
CN114339625A (en) * 2021-12-28 2022-04-12 上海庆科信息技术有限公司 Equipment linkage control method and device, storage medium, processor and electronic device
CN114339625B (en) * 2021-12-28 2023-10-27 上海庆科信息技术有限公司 Equipment linkage control method and device, storage medium, processor and electronic device
CN115884145A (en) * 2022-11-24 2023-03-31 重庆长安汽车股份有限公司 Networking method of Bluetooth equipment and application of single/multiple Bluetooth equipment vehicle

Also Published As

Publication number Publication date
CN110830968A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
WO2021063059A1 (en) Networking method and apparatus, bluetooth device, and computer-readable medium
US11889453B2 (en) Method and apparatus for registering wireless device in wireless communication system
US9185641B2 (en) Using discoverable peer-to-peer services to allow remote onboarding of headless devices over a Wi-Fi network
US9596603B2 (en) Distributed bulk onboarding process
US10117206B2 (en) Method for synchronizing content among terminals and terminals
US9628691B2 (en) Method and apparatus for identifying a physical IoT device
US20150071052A1 (en) Reconfiguring a headless wireless device
WO2018090830A1 (en) Method and apparatus allowing smart terminal device to access internet
US20130311692A1 (en) Apparatus and method for direct pairing in a wireless docking system
WO2018077018A1 (en) Networking method and device, network connection method and device, router, and smart home appliance
WO2020056558A1 (en) Bluetooth cluster online upgrade method and apparatus
US20150071216A1 (en) Allowing mass re-onboarding of headless devices
US20150026779A1 (en) Performing remote wi-fi network configuration when a network security protocol is unknown
US20150026317A1 (en) Recovering from a failure to connect to a network that was remotely configured on a headless device
US20130336161A1 (en) Terminal and method for p2p connection in wifi network
US20150023336A1 (en) Communicating a headless onboardee device local wireless network scan to an onboarder device via a peer-to-peer protocol to assist an onboarding process
JP6254747B2 (en) Information providing method, apparatus, program, and recording medium
US20190342933A1 (en) Communication Establishment Method And Terminal
TWI489900B (en) Wireless network system and connecting method thereof
WO2019218951A1 (en) Method and terminal for transmitting file
CN103248543A (en) Code verification method, code verification control equipment and code verification equipment
WO2022222299A1 (en) Communication method for wifi device, and device and computer-readable storage medium
WO2024083235A1 (en) Network configuration method based on wi-fi sensing, embedded chip system, and medium
WO2023001082A1 (en) Network configuration method and apparatus
JP7498175B2 (en) Previous connection status report

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: 20872622

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: 20872622

Country of ref document: EP

Kind code of ref document: A1