Testing method for automatic networking of products based on Bluetooth MESH

By using models to generate unique keys in Bluetooth MESH environment, automatic product networking and testing is realized, solving the cumbersome problems of manual setting and scanning code to obtain device information in the existing technology, improving detection efficiency and reducing staff workload.

CN115914025BActive Publication Date: 2025-02-14ZHUHAI LTECH TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211651928.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-02-14
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

In the Bluetooth MESH communication environment, the prior art requires manual setup and scanning code to obtain device information, resulting in an increase in detection time and an increase in workload for staff, and it is easy to interfere with other products.

Method used

Through the target product and detection equipment, a unique network identification code, network key and application key are generated according to the model, and the network is automatically created and the relay function is blocked to realize automatic product networking and testing.

Benefits of technology

It reduces the operating steps and time of staff, improves testing efficiency, avoids interference between equipment, and reduces the workload of staff.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914025B_ABST
    Figure CN115914025B_ABST
Patent Text Reader

Abstract

The present invention provides a test method for automatic networking of products based on Bluetooth MESH, including: the target product detects whether it is the first operation, and if so, initializes the Bluetooth protocol stack; obtains its own model, creates a network identification code according to its own model, generates a network key and an application key, creates a network according to the network key and the application key, and shields the relay function of the target product; the detection device obtains the model of the target product, obtains the network identification code according to the model of the product, and generates a network key and an application key, enters the network created by the target product according to the network key and the application key, and shields the relay function of the detection device; after the detection device establishes a connection with the target product, the target product is tested; wherein, a model of the product corresponds to a unique network identification code, a network key and an application key. The product of the present invention can automatically access the network, which can reduce the operation time of the staff during the test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a method for automatically networking products based on Bluetooth MESH. Background Art

[0002] Bluetooth MESH communication is widely used in current smart homes. Bluetooth MESH has the characteristics of many-to-many communication and long communication distance.

[0003] Products with Bluetooth modules often need to undergo performance tests before leaving the factory. When factories perform performance tests on products with Bluetooth modules, the testing equipment and products usually communicate via Bluetooth MESH, and the testing equipment sends commands to test the products. However, Bluetooth MESH often requires adding devices to the network through a mobile phone, which requires manual settings, takes up testing time, and increases the workload of testers. Secondly, Bluetooth MESH has relay capabilities. If the target product uses the same network as other products, the target product can transmit the received signal to other products, which can easily affect other products.

[0004] An existing method for device access based on Bluetooth MESH network is to obtain the Bluetooth scanning result obtained by the Bluetooth scanning on the target terminal on the target terminal, the Bluetooth scanning result includes the Bluetooth information of the scanned Bluetooth device, and the Bluetooth information of the Bluetooth device includes the device identification of the Bluetooth device; when the device identification of the first device matches the device identification of the target device, the Bluetooth information of the first device is determined on the target terminal as the Bluetooth information of the target device, and the target device is connected to the target Bluetooth Mesh network according to the Bluetooth information of the first device. This method requires the user to scan the code to obtain the information of the Bluetooth device, which will still increase the workload of the staff when applied to the factory. Summary of the invention

[0005] The first object of the present invention is to provide a method for testing automatic networking of products based on Bluetooth MESH, which reduces the workload of staff.

[0006] In order to achieve the above-mentioned first purpose, the present invention provides a testing method for automatic networking of products based on Bluetooth MESH, including: the target product detects whether it is running for the first time, and if so, initializes the Bluetooth protocol stack; obtains its own model, creates a network identification code according to its own model, generates a network key and an application key, creates a network according to the network key and the application key, and shields the relay function of the target product; the detection device obtains the model of the target product, obtains the network identification code according to the model of the product, and generates a network key and an application key, enters the network created by the target product according to the network key and the application key, and shields the relay function of the detection device; after the detection device establishes a connection with the target product, the target product is tested; wherein, a product of one model corresponds to a unique network identification code, a network key and an application key.

[0007] It can be seen from the above scheme that a product model corresponds to a unique network identification code, a network key and an application key. When the product creates a network, it generates the corresponding network identification code, network key and application key through its own model, and creates the network through the network identification code, network key and application key. The staff can check the model of the target product and click the model of the target product on the screen of the detection device. The detection device can obtain the model information of the target product and obtain the network identification code, network key and application key through the model of the target product. The detection device can enter the network created by the target product through the same network identification code, network key and application key generated by the target product. The staff only needs to check the model of the target product and click the model of the target product on the screen of the detection device. There are not many steps to operate, which saves the staff's operation time and reduces the workload.

[0008] In a further solution, a product model also corresponds to a unique group address; after the target product creates a network based on the network key and application key, it also executes: using the MAC address of the target product to generate a target product identifier, writing the target product identifier into the memory of the target product, and subscribing to a group address based on the model of the target product.

[0009] It can be seen that the target product can receive information from the detection device through the group address.

[0010] In a further solution, after the detection device enters the network according to the network key and the application key, it also executes: generating a detection device identifier using the MAC address of the detection device, writing the detection device identifier into the detection device, and subscribing to a group address according to the model of the target product.

[0011] It can be seen that the detection device can send messages to the group address, and the product can receive the message sent by the detection device on the group address.

[0012] In a further scheme, after the detection device subscribes to a group address according to the model of the target product, it also executes: the detection device receives the test signal from the staff and sends information about preparation for detection to the group address; after the target product receives the information about preparation for detection, it sends the MAC address and target product identification of the target product to the detection device; the detection device saves the MAC address and target product identification of the target product, and records the detection of the target product.

[0013] It can be seen that the detection device can send the information of preparing for detection to the group address, and the target product can receive the information of preparing for detection sent by the detection device through the group address.

[0014] In a further scheme, after the detection device records the detection of the target product, it also executes: continue to receive the MAC addresses and product identifications of the remaining products, and record the detection of the remaining products, and determine whether the recorded number of products reaches a preset value. If so, the detection device starts testing the recorded products.

[0015] It can be seen that the detection device can send the information of preparing for detection to the group address, and the remaining products of the same model as the target product can also receive the information of preparing for detection. After receiving the information of preparing for detection, the remaining products will also send the MAC address and product identification of the remaining products to the detection device. If the number of products received by the detection device has reached the preset value, it will start testing the recorded products.

[0016] In a further scheme, after the detection device tests the recorded products, it also executes: the detection device sends a network exit command to the recorded products, starts the broadcast packet search function, obtains the MAC address in the broadcast packet sent by the recorded products, and determines whether the MAC address in the broadcast packet contains the MAC addresses corresponding to all recorded products. If they are the same, it is confirmed that all products have been successfully exited from the network.

[0017] It can be seen that after the test is completed, the detection device sends a network exit command to the recorded product, and the recorded product performs the network exit operation after receiving the network exit command. The detection device starts the broadcast packet search function and compares the MAC address of the searched broadcast packet with the MAC address of the recorded product. If the MAC address of the searched broadcast packet contains the MAC address of the recorded product, it proves that all products have been successfully exited from the network.

[0018] In a further solution, after the target product subscribes to a group address according to the model of the target product, the following is further performed: initializing the universal unique identifier according to the model of the product, and updating the universal unique identifier into the broadcast packet.

[0019] It can be seen that the universal unique identifier is related to time. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a flow chart of a method for testing automatic networking of products based on Bluetooth MESH of the present invention.

[0021] Figure 2 It is a flow chart of recording multiple products by a detection device of a test method for automatic networking of products based on Bluetooth MESH of the present invention.

[0022] Figure 3 It is a product network disconnection flow chart of the test method for automatic networking of products based on Bluetooth MESH of the present invention.

[0023] The present invention is further described below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION

[0024] When devices with Bluetooth modules leave the factory, the staff needs to test the Bluetooth devices. The staff holds a test device with a touch screen. When the product is powered on, the staff selects the product model in the test device and clicks to start the test. The test device can then automatically test the product.

[0025] See also Figure 1 , Figure 1 This is a flow chart of the test method for automatic networking of products based on Bluetooth MESH of the present invention. First, step S11 is executed, the target product detects whether it is the first time to run itself. Only when the product is running for the first time does it need to be tested. If the judgment result is no, the whole test process ends.

[0026] If the target product detects that it is running for the first time, step S12 is executed, and the target product initializes the Bluetooth protocol stack. The initialization of the Bluetooth protocol stack is mainly to prepare for the subsequent establishment of a network.

[0027] After the target product initializes the Bluetooth protocol stack, step S13 is executed, and the target product obtains its own model, creates a network identification code according to its own model, and generates a network key and an application key. In the present invention, a product of one model corresponds to a unique network identification code, a network key and an application key. Each product stores the network identification code, network key and application key of each model, and each product can obtain the network identification code, network key and application key corresponding to its own model according to its own model.

[0028] After the target product executes step 13, it executes step S14, and the target product creates a network based on the network key and application key. Products with the same model obtain the same network identification code, network key and application key corresponding to their own model, so products with the same model enter the same network. After the target product creates the network, it sets TTL=1 to shield its own relay function. When TTL=1, when the target product sends information to other devices, other devices cannot send the information to other devices.

[0029] After the target product creates a network based on the network key and the application key, step S15 is executed, and the detection device obtains the model of the target product, obtains the network identification code based on the product model, and generates a network key and an application key. After the staff sees the model of the target product, they select the product model through the touch screen buttons on the detection device, and the detection device can obtain the model of the target product. The detection device stores the network identification code, network key and application key of each model. The network identification code, network key and application key obtained according to the model of the target product are the same as the network identification code, network key and application key obtained by the target product.

[0030] After executing step S15, execute step S16, and the detection device enters the network created by the target product according to the network key and application key. Since the network identification code, network key and application key corresponding to the model of the target product obtained by the detection device are the same as the network identification code, network key and application key obtained by the target product, the detection device enters the network created by the target product. After the detection device enters the network, set TTL=1 to shield its own relay function. When TTL=1, when the detection device sends information to the target product, the target product cannot send the information to other products.

[0031] After the detection device enters the network created by the target product according to the network key and the application key, step S17 is executed. After the detection device establishes a connection with the target product, the target product is tested.

[0032] See also Figure 2 , Figure 2 The present invention is a flow chart of the detection device recording multiple products of the test method of the automatic networking of products based on Bluetooth MESH. After the target product creates a network, the target product identification is generated using the MAC address of the target product, the target product identification is written into the memory of the target product, and step S21 is executed, and the target product subscribes to a group address according to the model of the target product. Among them, a model of product corresponds to a unique group address, and the same products enter the same group address. After the target product subscribes to the group address, the universal unique identification code is initialized and updated to the broadcast packet.

[0033] After the detection device enters the network, the detection device identification is generated using the MAC address of the detection device, the detection device identification is written into the detection device, and step S22 is executed, the detection device subscribes to a group address according to the model of the target product. A model corresponds to a unique group address, so the detection product and the target product subscribe to the same group address.

[0034] When the target product and the testing device subscribe to the same group address, step S23 is executed, the testing device receives the test signal from the staff and sends the information of preparing for testing to the group address. The target product can receive the information of preparing for testing from the testing device in the group address.

[0035] After the target product receives the information to be tested, step S24 is executed, and the target product sends the MAC address and target product identification of the target product to the testing device. The target product identification is the NDID (Device Unique Identifier) ​​address, and the MAC address of the target product is the address information of the target product.

[0036] After the detection device receives the MAC address and the target product identifier of the target product, step S25 is executed, where the detection device saves the MAC address and the target product identifier of the target product and records that the target product has been detected.

[0037] After executing step S25, step S26 is executed, and the detection device continues to receive the MAC addresses and product identifications of the remaining products, and records the detection of the remaining products. The detection device can test multiple products of the same model at one time.

[0038] The staff can set a preset value through the touch screen on the detection device, and the preset value is the number of products tested by the detection device at one time. After the detection device records the remaining products detected, step S27 is executed, and the detection device determines whether the recorded number of products reaches the preset value.

[0039] If the number of products currently recorded by the testing device has reached a preset value, step S28 is executed to start testing the recorded products.

[0040] If the number of products currently recorded by the detection device does not reach the preset value, the process returns to step S26, where the detection device continues to receive the MAC addresses and product identifiers of the remaining products, and records the detection of the remaining products until the number of products recorded reaches the preset value.

[0041] The detection device can perform parameter tests, function tests, signal tests, etc. on the product. In one embodiment, the detection device detects the signal strength of the product. If the signal strength of the product is less than 50% at this time, a pop-up window will be displayed on the touch screen of the detection device to inform the staff that the signal strength of the product does not meet the standard. In another embodiment, if the product is a smart lamp, the detection device sends the dimming gradient time to the smart lamp, and the smart lamp dims according to the received dimming gradient time and feeds back the actual dimming gradient time to the detection device.

[0042] See also Figure 3 , Figure 3 This is a product network disconnection flow chart of the test method for automatic networking of products based on Bluetooth MESH of the present invention. When the recorded product test is completed, step S31 is executed, and the detection device sends a network disconnection command to the recorded product.

[0043] When the recorded product receives the network exit command, it performs the network exit operation. At this time, the detection device executes step S32, and the detection device starts the broadcast packet search function to obtain the MAC address in the broadcast packet sent by the recorded product. After the recorded product exits the network, the recorded product is still powered on, and the recorded product sends a broadcast packet through the broadcast mode of the Bluetooth module. The detection device can obtain the broadcast packet by searching the broadcast packet function.

[0044] After obtaining the MAC address in the broadcast packet sent by the recorded product, step S33 is also executed, and the detection device determines whether the MAC address in the broadcast packet contains the MAC addresses corresponding to all the recorded products. If the MAC address in the broadcast packet searched by the detection device contains the MAC addresses corresponding to all the recorded products, step S34 is executed, and the detection device confirms that the product has been successfully delisted. Then the next batch of products can be tested. If the MAC address in the broadcast packet searched by the detection device does not contain the MAC addresses corresponding to all the recorded products, it proves that there are recorded products that have not been delisted, and step S35 needs to be executed, and the detection device continues to obtain the MAC address in the broadcast packet sent by the recorded product.

[0045] The Bluetooth MESH-based product automatic networking test method of the present invention only requires the staff to click the product model on the screen, and the entire test process is automatically completed by the detection equipment, which reduces the operation time and workload of the operator and greatly improves the test efficiency. In addition, since different models of products are tested in different networks, they will not interfere with each other.

[0046] The above are only preferred embodiments of the present invention, but the design concept of the invention is not limited thereto. Without departing from the concept of the present invention, more other equivalent embodiments may be included. It is obvious to those skilled in the art that various changes, readjustments and substitutions can be made without departing from the protection scope of the present invention.

Claims

1. A method for testing automatic networking of products based on Bluetooth MESH, characterized by: The target product detects whether it is the first time to run, and if so, initializes the Bluetooth protocol stack, obtains its own model, creates a network identification code according to its own model, generates a network key and an application key, creates a network according to the network key and the application key, and shields the relay function of the target product; The detection device obtains the model of the target product, obtains the network identification code according to the model of the product, generates a network key and an application key, enters the network created by the target product according to the network key and the application key, and shields the relay function of the detection device; After the detection device is connected to the target product, the target product is tested; Among them, one model of product corresponds to a unique network identification code, a network key and an application key.

2. The method for testing automatic networking of products based on Bluetooth MESH according to claim 1, characterized in that: A product model also corresponds to a unique group address; After the target product creates a network according to the network key and the application key, it also executes: generating a target product identifier using the MAC address of the target product, writing the target product identifier into the memory of the target product, and subscribing to a group address according to the model of the target product.

3. The method for testing automatic networking of products based on Bluetooth MESH according to claim 2, characterized in that: After the detection device enters the network according to the network key and the application key, it further executes: generating a detection device identification using the MAC address of the detection device, writing the detection device identification into the detection device, and subscribing to the group address according to the model of the target product.

4. The method for testing automatic networking of products based on Bluetooth MESH according to claim 3, characterized in that: After the detection device subscribes to a group address according to the model of the target product, it further executes: The detection device receives a test signal sent by a staff member and sends a message of preparing for detection to the group address; After receiving the information about preparing to be tested, the target product sends the MAC address of the target product and the target product identification to the testing device; The detection device stores the MAC address of the target product and the target product identification, and records the detection of the target product.

5. The method for testing automatic networking of products based on Bluetooth MESH according to claim 4, characterized in that: After the detection device records the detection of the target product, it also executes: continuing to receive the MAC addresses and product identifications of the remaining products, and recording the detection of the remaining products, and determining whether the recorded product quantity reaches a preset value. If so, the detection device starts testing the recorded products.

6. The method for testing automatic networking of products based on Bluetooth MESH according to claim 5, characterized in that: After testing the recorded products, the detection device also executes: the detection device sends a network exit command to the recorded products, starts a broadcast packet search function, obtains the MAC address in the broadcast packet sent by the recorded products, and determines whether the MAC address in the broadcast packet contains the MAC addresses corresponding to all the recorded products. If so, it confirms that all the products have been successfully exited from the network.

7. The method for testing automatic networking of products based on Bluetooth MESH according to claim 6, characterized in that: After the target product subscribes to a group address according to the model of the target product, the following steps are further performed: initializing a universal unique identification code according to the model of the product, and updating the universal unique identification code into the broadcast packet.

Citation Information

Patent Citations

  • Network connection method and device

    CN105933904A

  • Network communication detection device and detection method for IoV (Internet of Vehicles)

    CN107241716A