CN109922465B - Network configuration method and device - Google Patents
Network configuration method and device Download PDFInfo
- Publication number
- CN109922465B CN109922465B CN201910081529.3A CN201910081529A CN109922465B CN 109922465 B CN109922465 B CN 109922465B CN 201910081529 A CN201910081529 A CN 201910081529A CN 109922465 B CN109922465 B CN 109922465B
- Authority
- CN
- China
- Prior art keywords
- broadcast packet
- network configuration
- broadcast
- mode
- packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 67
- 230000004044 response Effects 0.000 claims abstract description 105
- 230000000977 initiatory effect Effects 0.000 claims abstract description 50
- 238000004590 computer program Methods 0.000 claims description 10
- 238000004458 analytical method Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 abstract description 13
- 239000003999 initiator Substances 0.000 description 22
- 238000010586 diagram Methods 0.000 description 20
- 238000004891 communication Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 11
- 230000005540 biological transmission Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 230000005236 sound signal Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The disclosure relates to a network configuration method and a device, wherein the method comprises the following steps: analyzing the received network configuration response broadcast packet to obtain broadcast data; sending a mode switching broadcast packet to the Bluetooth equipment initiating the network configuration request according to the broadcast data, wherein the mode switching broadcast packet is used for switching the Bluetooth equipment from a broadcast mode to a forwarding mode; and under the condition that a new network configuration response broadcast packet is not received within preset time, transmitting a network configuration broadcast packet according to the broadcast data to perform network configuration on the Bluetooth equipment. Compared with the related technology, the initiating device disclosed by the invention can avoid broadcast storm, thereby improving the success rate of network configuration, saving the time of network configuration and obviously reducing the cost of network configuration.
Description
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a network configuration method and apparatus.
Background
The 19 th Bluetooth alliance (SIG for short) in 7 th month in 2017 announced that Bluetooth technology began to fully support Mesh networks. The brand-new Mesh technology can support multi-to-multi transmission of equipment, particularly improves communication efficiency for constructing large-range network coverage, and is more suitable for Internet of things solutions such as building automation, wireless sensor networks and the like, which need to enable tens of thousands of equipment to transmit and transmit information in a safe, reliable and stable environment.
In the related technology, when Mesh networking is carried out, when the initiating device uses Bluetooth Mesh broadcasting to carry out network configuration on a plurality of Bluetooth devices, if the number of the Bluetooth devices in the environment is too large, each Bluetooth device sends the broadcasting, a large amount of broadcasting data exists in the environment, and a broadcasting storm is formed; the initiating device uses the Bluetooth mesh broadcast to perform communication mainly through broadcast data in the process of performing network configuration on one of the Bluetooth devices, and the broadcast storm can greatly influence the Bluetooth mesh network configuration communication, thereby reducing the configuration success rate, improving the configuration time and causing the increase of power consumption in the configuration process.
Disclosure of Invention
According to an aspect of the present disclosure, a network configuration method is provided, which is applied in an initiating device, and the method includes:
analyzing the received network configuration response broadcast packet to obtain broadcast data;
sending a mode switching broadcast packet to the Bluetooth equipment initiating the network configuration request according to the broadcast data, wherein the mode switching broadcast packet is used for switching the Bluetooth equipment from a broadcast mode to a forwarding mode;
and under the condition that a new network configuration response broadcast packet is not received within preset time, transmitting a network configuration broadcast packet according to the broadcast data to perform network configuration on the Bluetooth equipment.
In a possible embodiment, the broadcast data includes at least one of a universally unique identifier UUID, a network address, a MAC address, a hop count, and a broadcast packet sequence number of the bluetooth device, and after obtaining the broadcast data, the method further includes:
and saving the broadcast data.
In one possible implementation, after obtaining the broadcast data, the method includes:
and generating the mode switching broadcast packet and/or the network configuration broadcast packet according to the broadcast data, wherein the mode switching broadcast packet and/or the network configuration broadcast packet comprise hop counts, a broadcast packet serial number and an equipment number allocated to the Bluetooth equipment, the hop counts in the mode switching broadcast packet and/or the network configuration broadcast packet are the same as the hop counts in the broadcast data, and the broadcast packet serial number is used for distinguishing the mode switching broadcast packet and/or the network configuration broadcast packet sent at different moments.
According to another aspect of the present disclosure, a network configuration method is provided, which is applied in a bluetooth device, and the method includes:
after receiving a network configuration request broadcast packet, sending a network configuration response broadcast packet, wherein the network configuration response broadcast packet comprises broadcast data;
receiving a mode switching broadcast packet, and switching a broadcast mode into a forwarding mode according to the mode switching broadcast packet;
and receiving a network configuration broadcast packet, and performing network configuration according to the network configuration broadcast packet.
In one possible embodiment, the method further comprises:
and when the network configuration response broadcast packet of other Bluetooth equipment is received for the first time and is in a forwarding mode, forwarding the network configuration response broadcast packet.
In one possible embodiment, the forwarding the network configuration response broadcast packet includes:
and adding a first preset value to the hop count in the network configuration response broadcast packet of the other Bluetooth equipment received for the first time.
In one possible implementation, the network configuration response broadcast packet includes a broadcast packet sequence number, and the sending the network configuration response broadcast packet after receiving the network configuration request broadcast packet includes:
and sending the network configuration response broadcast packet according to a preset time interval, and changing the sequence number of the broadcast packet according to a preset mode.
In one possible embodiment, the method further comprises:
and when receiving the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment and being in a forwarding mode, forwarding the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment, and subtracting a second preset value from the hop count in the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment.
In one possible embodiment, the broadcast data includes at least one of a universally unique identification number, a network address, a MAC address, a hop count, and a broadcast packet sequence number of the bluetooth device.
According to another aspect of the present disclosure, a network configuration apparatus is provided, which is applied in an initiating device, and the apparatus includes:
the analysis module is used for analyzing the received network configuration response broadcast packet to obtain broadcast data;
the first sending module is connected with the analysis module and used for sending a mode switching broadcast packet to the Bluetooth equipment initiating the network configuration request according to the broadcast data, wherein the mode switching broadcast packet is used for switching the Bluetooth equipment from a broadcast mode to a forwarding mode;
and the second sending module is connected with the first sending module and used for sending a network configuration broadcast packet according to the broadcast data to carry out network configuration on the Bluetooth equipment under the condition that a new network configuration response broadcast packet is not received within preset time.
In a possible implementation manner, the broadcast data includes at least one of a universally unique identifier UUID, a network address, a MAC address, a hop count, and a broadcast packet serial number of the bluetooth device, and after obtaining the broadcast data, the parsing module is further configured to store the broadcast data.
In a possible implementation manner, after the broadcast data is obtained, the parsing module is further configured to generate the mode switching broadcast packet and/or the network configuration broadcast packet according to the broadcast data, where the mode switching broadcast packet and/or the network configuration broadcast packet include a hop count, a broadcast packet sequence number, and a device number allocated to the bluetooth device, the hop count in the mode switching broadcast packet and/or the network configuration broadcast packet is the same as the hop count in the broadcast data, and the broadcast packet sequence number is used to distinguish the mode switching broadcast packet and/or the network configuration broadcast packet sent at different times.
According to another aspect of the present disclosure, a network configuration apparatus is provided, which is applied in a bluetooth device, and includes:
a third sending module, configured to send a network configuration response broadcast packet after receiving the network configuration request broadcast packet, where the network configuration response broadcast packet includes broadcast data;
the switching module is connected with the third sending module and used for receiving a mode switching broadcast packet and switching a broadcast mode into a forwarding mode according to the mode switching broadcast packet;
and the configuration module is connected with the switching module and used for receiving the network configuration broadcast packet and carrying out network configuration according to the network configuration broadcast packet.
In a possible embodiment, the apparatus further comprises:
and the first forwarding module is used for forwarding the network configuration response broadcast packet when the network configuration response broadcast packet of other Bluetooth equipment is received for the first time and is in a forwarding mode.
In one possible embodiment, the forwarding the network configuration response broadcast packet includes:
and adding a first preset value to the hop count in the first received network configuration response broadcast packet of other Bluetooth equipment.
In one possible implementation, the network configuration response broadcast packet includes a broadcast packet sequence number, and the sending the network configuration response broadcast packet after receiving the network configuration request broadcast packet includes:
and sending the network configuration response broadcast packet according to a preset time interval, and changing the sequence number of the broadcast packet according to a preset mode.
In a possible embodiment, the apparatus further comprises:
and the second forwarding module is used for forwarding the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment when receiving the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment and is in a forwarding mode, and subtracting a second preset value from the hop count in the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment.
In one possible embodiment, the broadcast data includes at least one of a universally unique identification number, a network address, a MAC address, a hop count, and a broadcast packet sequence number of the bluetooth device.
According to another aspect of the present disclosure, there is provided a network configuration apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
According to the method, the initiating device disclosed by the disclosure can analyze the network configuration request packet after receiving the network configuration request packet of the bluetooth device to obtain the broadcast data, send the mode switching broadcast packet to the bluetooth device according to the broadcast data to switch the bluetooth device from the broadcast mode to the forwarding mode, and send the network configuration broadcast packet according to the broadcast data of each bluetooth device to perform network configuration on the bluetooth device when the network configuration response broadcast packet sent by other bluetooth devices is not received within the preset time. Compared with the related technology, the initiating device disclosed by the invention can avoid broadcast storm, thereby improving the success rate of network configuration, saving the time of network configuration and obviously reducing the cost of network configuration.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flow chart of a network configuration method according to an embodiment of the present disclosure.
Fig. 2 shows a flow chart of a network configuration method according to an embodiment of the present disclosure.
Fig. 3 shows a flow chart of a network configuration method according to an embodiment of the present disclosure.
Fig. 4a-4d show schematic diagrams of network configurations according to an embodiment of the present disclosure.
Fig. 5 shows a block diagram of a network configuration device according to an embodiment of the present disclosure.
Fig. 6 shows a block diagram of a network configuration device according to an embodiment of the present disclosure.
Fig. 7 shows a block diagram of a network configuration device according to an embodiment of the present disclosure.
Fig. 8 shows a block diagram of a network configuration device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart illustrating a network configuration method according to an embodiment of the disclosure.
The method can be applied to initiating equipment which can be various user equipment with a Bluetooth function, including but not limited to internet of things equipment which can be networked through Bluetooth, such as a mobile phone, a tablet, a desk lamp and the like.
As shown in fig. 1, the method includes:
step S110, analyzing the received network configuration response broadcast packet to obtain broadcast data;
step S120, a mode switching broadcast packet is sent to the Bluetooth device initiating the network configuration request according to the broadcast data, and the mode switching broadcast packet is used for switching the Bluetooth device from a broadcast mode to a forwarding mode;
step S130, sending a network configuration broadcast packet according to the broadcast data to perform network configuration on the bluetooth device under the condition that a new network configuration response broadcast packet is not received within a preset time.
According to the method, the initiating device can analyze the network configuration request packet after receiving the network configuration request packet of the bluetooth device to obtain broadcast data, send the mode switching broadcast packet to the bluetooth device according to the broadcast data to switch the bluetooth device from the broadcast mode to the forwarding mode, and send the network configuration broadcast packet according to the broadcast data of each bluetooth device to perform network configuration on the bluetooth device when the network configuration response broadcast packet sent by other bluetooth devices is not received within the preset time. Compared with the related technology, the method and the device can avoid broadcast storm, thereby improving the success rate of network configuration, saving the time of network configuration and obviously reducing the cost of network configuration.
In one possible implementation, the bluetooth device may be various user devices with bluetooth function, including but not limited to a mobile phone, a tablet, a desk lamp, and other internet of things devices that can be networked through bluetooth.
In a possible implementation manner, the bluetooth device may operate in a broadcast mode, and when the bluetooth device operates in the broadcast mode, the bluetooth device may actively send a mesh broadcast packet and may reply the network configuration request of the initiator, and in the broadcast mode, the bluetooth device does not forward the mesh broadcast packet of another bluetooth device.
In a possible implementation manner, the bluetooth device may operate in a forwarding mode, and when the bluetooth device operates in the forwarding mode, the bluetooth device may reply to the network configuration request of the initiator device and may forward the mesh broadcast packet of another bluetooth device, but the bluetooth device unit actively sends the mesh broadcast packet.
In a possible implementation manner, before step S110, the method may further include:
sending a network configuration request broadcast packet;
and receiving the network configuration response broadcast packet.
In a possible implementation manner, the network configuration request broadcast packet may include at least one of a Universal Unique Identifier (UUID) of the initiator, a mac address, a network address, a hop count, and a broadcast packet serial number, and by setting the hop count in the network configuration request broadcast packet, it is possible to prevent the bluetooth device from broadcasting the network configuration request broadcast packet without limitation, and generating a data storm. For example, the hop count of the network configuration request broadcast packet may be set to 10, that is, the network configuration request broadcast can only be forwarded 10 times, when a bluetooth device receives the network configuration request broadcast packet, the hop count is decremented by 1, and then the network configuration request broadcast packet is forwarded out, if a bluetooth device finds that the hop count is 0 after receiving the network configuration request broadcast packet, the bluetooth device does not forward the broadcast packet, thereby achieving the purpose of preventing the network configuration request packet from being forwarded indefinitely.
In a possible implementation manner, the broadcast data may include at least one of a UUID, a network address, a MAC address, a hop count, and a broadcast packet sequence number of the bluetooth device, and after obtaining the broadcast data in step S110, the method may further include:
and saving the broadcast data.
In a possible implementation manner, after obtaining the broadcast data in step S110, the method may further include:
and generating the mode switching broadcast packet and/or the network configuration broadcast packet according to the broadcast data, wherein the hop count in the mode switching broadcast packet and/or the network configuration broadcast packet, the broadcast packet serial number and the equipment number allocated to the Bluetooth equipment are the same, and the hop count in the mode switching broadcast packet and/or the network configuration broadcast packet is the same as the hop count in the broadcast data.
In one possible embodiment, the network configuration broadcast packet may include a network address and a device number that are reassigned by the initiator device to the bluetooth device, and may also include other data, which is not limited by this disclosure.
In a possible implementation manner, the initiator device may determine whether the network configuration response broadcast packet has been processed according to the broadcast packet serial number and/or UUID in the network configuration response broadcast packet, and in the same way, after receiving the mode switching broadcast packet, the network configuration broadcast packet, or the network configuration response broadcast packet of another bluetooth device, the bluetooth device may also determine whether the network configuration response broadcast packet has been processed or forwarded according to the broadcast packet serial number therein.
In a possible embodiment, the preset time in step S130 may be set according to actual needs, which is not limited by the present disclosure.
When the initiating device does not receive the new network configuration response broadcast packet within the preset time, it can be determined that the bluetooth devices to be network configured have all been switched from the broadcast mode to the forwarding mode, and at this time, it can be determined that the bluetooth devices to be network configured have no longer actively send the mesh broadcast packet.
Referring to fig. 2, fig. 2 is a flowchart illustrating a network configuration method according to an embodiment of the disclosure.
The network configuration method may be applied to a bluetooth device to respond to a network configuration request of an initiating device, as shown in fig. 2, and includes:
step S600, after receiving a network configuration request broadcast packet, sending a network configuration response broadcast packet, wherein the network configuration response broadcast packet comprises broadcast data;
step S610, receiving a mode switching broadcast packet, and switching a broadcast mode into a forwarding mode according to the mode switching broadcast packet;
step S620, receiving a network configuration broadcast packet, and performing network configuration according to the network configuration broadcast packet.
By the method, the Bluetooth equipment sends the network configuration response broadcast packet after receiving the network configuration request broadcast packet sent by the initiating equipment, the network configuration response broadcast packet carries broadcast data, the Bluetooth equipment closes the broadcast mode according to the mode switching broadcast packet after receiving the mode switching broadcast packet sent by the initiating equipment, starts the forwarding mode to switch the broadcast mode into the forwarding mode, and the Bluetooth equipment utilizes the network configuration broadcast packet to carry out network configuration after receiving the network configuration broadcast packet sent by the initiating equipment.
In one possible embodiment, the bluetooth device may be in an unconfigured state, for example, the bluetooth device has not joined other mesh networks, or is in an idle state.
In a possible implementation manner, the network configuration response broadcast packet may further include a broadcast packet sequence number, and the step S600 sends the network configuration response broadcast packet after receiving the network configuration request broadcast packet, including:
and sending the network configuration response broadcast packet according to a preset time interval, and changing the sequence number of the broadcast packet according to a preset mode.
The bluetooth device may send the network configuration response broadcast packet in each period with a preset time interval as one period, where the preset manner may be that the sequence number of the broadcast packet gradually increases or decreases with the passage of the period, and the increasing or decreasing manner may be set according to an actual situation, which is not limited in this disclosure.
For step S610:
in a possible implementation, the mode switching broadcast packet may include identification information (UUID, mac address or others) of the bluetooth device, and may further include a device number allocated by the initiating device for the bluetooth device.
When the bluetooth device is in a broadcast mode, after receiving the mode switching broadcast packet, if the mode switching broadcast packet is sent to the bluetooth device (for example, through a UUID, a mac address, a device number, or the like), acquiring a mode switching instruction in the mode switching broadcast packet, executing the mode switching instruction, closing the broadcast mode, and switching to a forwarding mode. If the mode switch broadcast packet is found not addressed to itself (the device number or other identifying information is not the same as that of itself), it is ignored. The bluetooth device may determine a destination bluetooth device of the mode switching broadcast packet according to the identification information in the mode switching broadcast packet.
When the bluetooth device is in the forwarding mode, after receiving the mode switching broadcast packet, if the mode switching broadcast packet is sent to the bluetooth device (through the device number or other identification information), the bluetooth device does not perform any operation because the broadcast mode is already closed and the bluetooth device is currently in the forwarding mode. And if the mode switching broadcast packet is sent to other Bluetooth equipment and the Bluetooth equipment does not forward the mode switching broadcast packet (through the UUID and the broadcast packet serial number), subtracting 1 from the hop number in the mode switching broadcast packet, and then forwarding the mode switching broadcast packet.
When the Bluetooth device is in a broadcast mode or a forwarding mode, the Bluetooth device receives the network configuration broadcast packet
It should be understood that the above description is illustrative, and not restrictive, of the disclosure.
When some bluetooth devices are located far away from the initiating device, the initiating device cannot directly receive the mesh broadcast packet of the far bluetooth device, and the initiating device cannot directly send the mesh broadcast packet to the far bluetooth device, the bluetooth devices with the close distance can be used as relays to realize network configuration of the far bluetooth devices.
Referring to fig. 3, fig. 3 is a flowchart illustrating a network configuration method according to an embodiment of the disclosure.
As shown in fig. 3, in one possible embodiment, the method further comprises:
step S730, when the network configuration response broadcast packet of the other bluetooth device is received for the first time and is in the forwarding mode, forwarding the network configuration response broadcast packet.
In a possible implementation, the other bluetooth device may be a distant bluetooth device, and the distant bluetooth device cannot directly send the network configuration response broadcast packet to the initiator device, so that the network configuration response broadcast packet sent by the distant bluetooth device may be forwarded by the closer bluetooth device.
In one possible embodiment, the forwarding the network configuration response broadcast packet includes:
and adding a first preset value to the hop count in the network configuration response broadcast packet of the other Bluetooth equipment received for the first time.
In a possible embodiment, the first preset value may be 1, or other values, and those skilled in the art may set the first preset value as needed, which is not limited herein.
In one possible implementation, the UUID of the bluetooth device in the response broadcast packet and the sequence of the broadcast packet may be configured via the network to determine whether the bluetooth device has been forwarded, and if not, determine that the bluetooth device is forwarded for the first time.
In one possible embodiment, the method further comprises:
step S740, when receiving the mode switching broadcast packet or the network configuration broadcast packet of the other bluetooth device and being in the forwarding mode, forwarding the mode switching broadcast packet or the network configuration broadcast packet of the other bluetooth device, and subtracting a second preset value from the hop count in the mode switching broadcast packet or the network configuration broadcast packet of the other bluetooth device.
In a possible embodiment, the second preset value may be 1, or other values, and may be set by those skilled in the art as needed, which is not limited herein.
It should be noted that, in various embodiments of the present disclosure, when the bluetooth device sends the network configuration response broadcast packet, the initial hop count may be set to 0, or another value, which is not limited by the present disclosure.
The above network configuration method will be illustrated below, and it should be understood that the following exemplary description is for better understanding the present disclosure by those skilled in the art, and is not intended to limit the present disclosure.
Referring to fig. 4a-4d, fig. 4a-4d are schematic diagrams illustrating network configurations according to an embodiment of the present disclosure.
Suppose that the initiating device needs to perform network configuration on the bluetooth device a, the bluetooth device B, and the bluetooth device C (which may also include other bluetooth devices or reduce bluetooth devices therein), and suppose that the bluetooth device a and the bluetooth device B are within the direct configuration range of the initiating device, and the bluetooth device C is far away from the initiating device, the initiating device cannot directly perform network configuration on the bluetooth device C.
As shown in fig. 4a, after receiving a network configuration request broadcast packet sent by an initiator, a bluetooth device a sends a network configuration response broadcast packet of the bluetooth device a, writes information such as a UUID, a network address, a mac address, a hop count, and a broadcast packet sequence number when sending the broadcast packet into the network configuration response broadcast packet in a broadcast data manner, and sends the network configuration response broadcast packet to the initiator. The initiating device can store the broadcast data after receiving the network configuration response broadcast packet of the Bluetooth device A, and can send a mode switching broadcast packet of the Bluetooth device A to instruct the Bluetooth device A to switch the broadcast mode to a forwarding mode.
Similarly, after receiving the network configuration request broadcast packet sent by the initiating device, the bluetooth device B sends a network configuration response broadcast packet of the bluetooth device B, and writes information such as a UUID, a network address, a mac address, a hop count, and a broadcast packet sequence number when the broadcast packet is sent into the network configuration response broadcast packet in a broadcast data manner, and sends the network configuration response broadcast packet to the initiating device. The initiating device can store the broadcast data after receiving the network configuration response broadcast packet of the Bluetooth device B, and can send a mode switching broadcast packet of the Bluetooth device B to instruct the Bluetooth device B to switch the broadcast mode to a forwarding mode.
As shown in fig. 4B, after receiving the network configuration request broadcast packet forwarded by the bluetooth device B, the bluetooth device C may send a network configuration response broadcast packet of the bluetooth device C, and since the bluetooth device C is far away from the initiator, the bluetooth device C cannot directly send the network configuration response broadcast packet of the bluetooth device C to the initiator, and therefore the bluetooth device B is required to serve as a relay device to forward the network configuration response broadcast packet to the initiator. Because the bluetooth device B is in the forwarding mode, after receiving the network configuration response broadcast packet of the bluetooth device C, the bluetooth device B may forward the network configuration response broadcast packet of the bluetooth device C to the initiating device, wherein the bluetooth device B may add 1 to the hop count in the network configuration response broadcast packet of the bluetooth device C and then forward the hop count.
After the initiator device receives the network configuration response broadcast packet of the bluetooth device C forwarded by the bluetooth device B, the initiator device may store broadcast data (UUID, mac address, network address, hop count, etc., broadcast packet serial number when sending the broadcast packet) in the network configuration response broadcast packet of the bluetooth device C, and then generate a mode switching broadcast packet of the bluetooth device C. Because the bluetooth device C is far from the initiator, the initiator cannot directly send the mode switching broadcast packet of the bluetooth device C to the bluetooth device C, and therefore, the mode switching broadcast packet of the bluetooth device C can be forwarded to the bluetooth device C through the bluetooth device B, so as to instruct the bluetooth device C to close the broadcast mode and start the forwarding mode.
As shown in fig. 4c, if the initiator device does not receive a new network configuration response broadcast packet (the bluetooth devices to be configured are all in the forwarding mode) within a preset time, the initiator device sequentially performs network configuration on the bluetooth devices. The order of the broadcast data in the response broadcast packet may be configured according to the storage network of the initiating device, or may be the reverse order thereof, or may be other specified orders, which is not limited in this disclosure.
For example, the initiator may perform network configuration on the bluetooth device a first, generate a network configuration broadcast packet (which may include a configured device number, a broadcast packet sequence number when sending the broadcast packet, an instruction to close a broadcast mode, an instruction to start a forwarding mode, a hop count, and the like) according to stored broadcast data (UUID, mac address, UUID, device number, hop count, broadcast packet sequence number when sending the broadcast packet, and the like) of the bluetooth device a, and send the network configuration broadcast packet of the bluetooth device a, where the bluetooth device a may perform network configuration according to the network configuration broadcast packet after receiving the network configuration broadcast packet, and after the configuration is completed, the bluetooth device a may send a response broadcast packet to the initiator.
Secondly, the initiating device can perform network configuration on the bluetooth device B, the initiating device generates a network configuration broadcast packet according to the stored broadcast data (UUID, mac address, UUID, device number, hop count, broadcast packet serial number when sending the broadcast packet, etc.) of the bluetooth device B, and sends the network configuration broadcast packet (which may include the configured device number, the broadcast packet serial number when sending the broadcast packet, an instruction for closing the broadcast mode, an instruction for starting the forwarding mode, hop count, etc.) of the bluetooth device B, the bluetooth device B can perform network configuration according to the network configuration broadcast packet after receiving the network configuration broadcast packet, and after the configuration is completed, the bluetooth device a can send a response broadcast packet to the initiating device.
Then, as shown in fig. 4d, the initiating device can perform network configuration on the bluetooth device C, the initiating device generates a network configuration broadcast packet according to the stored broadcast data (UUID, mac address, UUID, device number, hop count, broadcast packet serial number when sending the broadcast packet, etc.) of the bluetooth device C, and broadcasts the network configuration broadcast packet of the bluetooth device C (which may include the configured device number, broadcast packet serial number when sending the broadcast packet, instruction to turn off the broadcast mode, instruction to start the forwarding mode, hop count, etc.), since the bluetooth device C is far away from the initiating device and cannot directly receive the network configuration broadcast packet of the bluetooth device C sent by the initiating device, the network configuration broadcast packet of the bluetooth device C can be forwarded by the bluetooth device B, and the bluetooth device C confirms that it is after receiving the network configuration broadcast packet forwarded by the bluetooth device B, then, the network configuration broadcast packet is used to perform network configuration. After configuration is complete, bluetooth device C may send an acknowledgement broadcast packet, which is forwarded by bluetooth device B and received by the initiating device.
It should be noted that, although the method described in the present disclosure is exemplified by the bluetooth device a, the bluetooth device B, and the bluetooth device C, the above description is not intended to limit the present disclosure, and in other examples or embodiments, the method may further include the bluetooth device D, the bluetooth device E, and the like, and other bluetooth devices may forward through a plurality of bluetooth devices, so that the mesh broadcast packet received by the initiator device will send the mesh broadcast packet to the initiator device, which is not limited in the present disclosure.
Referring to fig. 5, fig. 5 is a block diagram of a network configuration device according to an embodiment of the disclosure.
The apparatus may be applied to an initiating device, as shown in fig. 5, and the apparatus includes:
the analysis module 10 is configured to analyze the received network configuration response broadcast packet to obtain broadcast data;
a first sending module 20, connected to the parsing module 10, configured to send a mode switching broadcast packet to a bluetooth device initiating a network configuration request according to the broadcast data, where the mode switching broadcast packet is used to switch the bluetooth device from a broadcast mode to a forwarding mode;
and a second sending module 30, connected to the first sending module 20, configured to send a network configuration broadcast packet according to the broadcast data to perform network configuration on the bluetooth device when a new network configuration response broadcast packet is not received within a preset time.
According to the above apparatus, the initiator device according to the present disclosure may parse the network configuration request packet after receiving the network configuration request packet of the bluetooth device to obtain broadcast data, send a mode switching broadcast packet to the bluetooth device according to the broadcast data to switch the bluetooth device from the broadcast mode to a forwarding mode, and send the network configuration broadcast packet according to the broadcast data of each bluetooth device to perform network configuration on the bluetooth device when a network configuration response broadcast packet sent by another bluetooth device is not received within a preset time. Compared with the related technology, the initiating device disclosed by the invention can avoid broadcast storm, thereby improving the success rate of network configuration, saving the time of network configuration and obviously reducing the cost of network configuration.
In a possible implementation manner, the broadcast data includes at least one of a universally unique identifier UUID, a network address, a MAC address, a hop count, and a broadcast packet serial number of the bluetooth device, and after obtaining the broadcast data, the parsing module 10 is further configured to store the broadcast data. Of course, a saving module (not shown) may also be provided for saving the broadcast data, so as to strip the saving of the broadcast data from the parsing module 10, which is not limited in this disclosure.
In a possible implementation manner, after obtaining the broadcast data, the parsing module 10 may be further configured to generate the mode switching broadcast packet and/or the network configuration broadcast packet according to the broadcast data, where the mode switching broadcast packet and/or the network configuration broadcast packet include a hop count, a broadcast packet sequence number, and an equipment number allocated to the bluetooth device, the hop count in the mode switching broadcast packet and/or the network configuration broadcast packet is the same as the hop count in the broadcast data, and the broadcast packet sequence number is used to distinguish the mode switching broadcast packet and/or the network configuration broadcast packet sent at different times. Of course, in other embodiments, other modules (for example, a generating module, not shown) may be provided to generate each broadcast packet, so as to strip the function from the parsing module 10, which is not limited by the present disclosure.
It should be understood that the above network configuration apparatus corresponds to the network configuration method, and for a specific introduction, reference is made to the description of the network configuration method before, which is not described herein again.
Referring to fig. 6, fig. 6 is a block diagram of a network configuration device according to an embodiment of the disclosure.
The apparatus can be applied to a bluetooth device, and as shown in fig. 6, the apparatus includes:
a third sending module 70, configured to send a network configuration response broadcast packet after receiving the network configuration request broadcast packet, where the network configuration response broadcast packet includes broadcast data;
a switching module 80, connected to the third sending module 70, for receiving a mode switching broadcast packet, and switching a broadcast mode to a forwarding mode according to the mode switching broadcast packet;
a configuration module 90, connected to the switching module 80, for receiving the network configuration broadcast packet and performing network configuration according to the network configuration broadcast packet.
Through the device, the Bluetooth equipment can send a network configuration response broadcast packet after receiving a network configuration request broadcast packet sent by the initiating equipment, the network configuration response broadcast packet carries broadcast data, the Bluetooth equipment can close a broadcast mode according to a mode switching broadcast packet after receiving the mode switching broadcast packet sent by the initiating equipment, and starts a forwarding mode to switch the broadcast mode into the forwarding mode, and the Bluetooth equipment can utilize the network configuration broadcast packet to carry out network configuration after receiving the network configuration broadcast packet sent by the initiating equipment.
In a possible embodiment, the broadcast data may include at least one of a universal unique identifier, a network address, a MAC address, a hop count, and a broadcast packet sequence number of the bluetooth device, and in other embodiments, the broadcast data may further include other parameters and data.
It should be understood that the above network configuration apparatus corresponds to the network configuration method, and for a specific introduction, reference is made to the description of the network configuration method before, which is not described herein again.
Referring to fig. 7, fig. 7 is a block diagram of a network configuration device according to an embodiment of the disclosure.
In a possible embodiment, as shown in fig. 7, the apparatus may further include:
the first forwarding module 93 may be configured to forward the network configuration response broadcast packet when the network configuration response broadcast packet of the other bluetooth device is received for the first time and is in a forwarding mode.
In a possible implementation, the forwarding the network configuration response broadcast packet may include:
and adding a first preset value to the hop count in the network configuration response broadcast packet of the other Bluetooth equipment received for the first time.
In a possible implementation manner, the network configuration response broadcast packet includes a broadcast packet sequence number, and the sending the network configuration response broadcast packet after receiving the network configuration request broadcast packet may include:
and sending the network configuration response broadcast packet according to a preset time interval, and changing the sequence number of the broadcast packet according to a preset mode.
In a possible embodiment, the apparatus may further include:
the second forwarding module 95 may be connected to the first forwarding module 93, and configured to forward the mode switching broadcast packet or the network configuration broadcast packet of another bluetooth device when receiving the mode switching broadcast packet or the network configuration broadcast packet of another bluetooth device and when the bluetooth device is in a forwarding mode, and subtract a second preset value from the hop count in the mode switching broadcast packet or the network configuration broadcast packet of another bluetooth device.
It should be understood that the above network configuration apparatus corresponds to the network configuration method, and for a specific introduction, reference is made to the description of the network configuration method before, which is not described herein again.
It should be understood that the connection manner and the function of each module of the network configuration apparatus in the above-described embodiments are exemplary and are not intended to limit the disclosure.
Referring to fig. 8, fig. 8 is a block diagram of a network configuration device according to an embodiment of the disclosure.
For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 8, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the device 800 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (20)
1. A network configuration method is applied to an initiating device, and comprises the following steps:
analyzing the received network configuration response broadcast packet to obtain broadcast data;
sending a mode switching broadcast packet to the Bluetooth equipment initiating the network configuration request according to the broadcast data, wherein the mode switching broadcast packet is used for switching the Bluetooth equipment from a broadcast mode to a forwarding mode;
and under the condition that a new network configuration response broadcast packet is not received within preset time, transmitting a network configuration broadcast packet according to the broadcast data to perform network configuration on the Bluetooth equipment.
2. The method of claim 1, wherein the broadcast data comprises at least one of a Universally Unique Identifier (UUID), a network address, a MAC address, a hop count, and a broadcast packet sequence number of the Bluetooth device, and wherein after obtaining the broadcast data, the method further comprises:
and saving the broadcast data.
3. The method of claim 1, wherein after obtaining the broadcast data, the method comprises:
and generating the mode switching broadcast packet and/or the network configuration broadcast packet according to the broadcast data, wherein the mode switching broadcast packet and/or the network configuration broadcast packet comprise hop counts, a broadcast packet serial number and a device number allocated to the Bluetooth device, the hop counts in the mode switching broadcast packet and/or the network configuration broadcast packet are the same as the hop counts in the broadcast data, and the broadcast packet serial number is used for distinguishing the mode switching broadcast packet and/or the network configuration broadcast packet sent at different moments.
4. A network configuration method is applied to a Bluetooth device, and comprises the following steps:
after receiving a network configuration request broadcast packet, sending a network configuration response broadcast packet, wherein the network configuration response broadcast packet comprises broadcast data;
receiving a mode switching broadcast packet, and switching a broadcast mode into a forwarding mode according to the mode switching broadcast packet;
and receiving a network configuration broadcast packet, and performing network configuration according to the network configuration broadcast packet.
5. The method of claim 4, further comprising:
and when the network configuration response broadcast packet of other Bluetooth equipment is received for the first time and is in a forwarding mode, forwarding the network configuration response broadcast packet.
6. The method of claim 5, wherein forwarding the network configuration reply broadcast packet comprises:
and adding a first preset value to the hop count in the network configuration response broadcast packet of the other Bluetooth equipment received for the first time.
7. The method of claim 4, wherein the network configuration response broadcast packet includes a broadcast packet sequence number, and wherein sending the network configuration response broadcast packet after receiving the network configuration request broadcast packet comprises:
and sending the network configuration response broadcast packet according to a preset time interval, and changing the sequence number of the broadcast packet according to a preset mode.
8. The method of claim 4, further comprising:
and when receiving the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment and being in a forwarding mode, forwarding the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment, and subtracting a second preset value from the hop count in the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment.
9. The method of claim 4, wherein the broadcast data comprises at least one of a universally unique identification number, a network address, a MAC address, a hop count, and a broadcast packet sequence number of the Bluetooth device.
10. A network configuration apparatus, applied in an initiating device, the apparatus comprising:
the analysis module is used for analyzing the received network configuration response broadcast packet to obtain broadcast data;
the first sending module is connected with the analysis module and used for sending a mode switching broadcast packet to the Bluetooth equipment initiating the network configuration request according to the broadcast data, wherein the mode switching broadcast packet is used for switching the Bluetooth equipment from a broadcast mode to a forwarding mode;
and the second sending module is connected with the first sending module and used for sending a network configuration broadcast packet according to the broadcast data to carry out network configuration on the Bluetooth equipment under the condition that a new network configuration response broadcast packet is not received within preset time.
11. The apparatus of claim 10, wherein the broadcast data comprises at least one of a Universally Unique Identifier (UUID) of the Bluetooth device, a network address, a MAC address, a hop count, and a broadcast packet sequence number, and wherein the parsing module is further configured to store the broadcast data after obtaining the broadcast data.
12. The apparatus according to claim 10, wherein after the broadcast data is obtained, the parsing module is further configured to generate the mode switching broadcast packet and/or the network configuration broadcast packet according to the broadcast data, where the mode switching broadcast packet and/or the network configuration broadcast packet includes a hop count, a broadcast packet sequence number, and a device number allocated to the bluetooth device, the hop count in the mode switching broadcast packet and/or the network configuration broadcast packet is the same as the hop count in the broadcast data, and the broadcast packet sequence number is used to distinguish the mode switching broadcast packet and/or the network configuration broadcast packet sent at different times.
13. A network configuration device, applied to a Bluetooth device, the device comprising:
a third sending module, configured to send a network configuration response broadcast packet after receiving the network configuration request broadcast packet, where the network configuration response broadcast packet includes broadcast data;
the switching module is connected with the third sending module and used for receiving a mode switching broadcast packet and switching a broadcast mode into a forwarding mode according to the mode switching broadcast packet;
and the configuration module is connected with the switching module and used for receiving the network configuration broadcast packet and carrying out network configuration according to the network configuration broadcast packet.
14. The apparatus of claim 13, further comprising:
and the first forwarding module is used for forwarding the network configuration response broadcast packet when the network configuration response broadcast packet of other Bluetooth equipment is received for the first time and is in a forwarding mode.
15. The apparatus of claim 14, wherein forwarding the network configuration response broadcast packet comprises:
and adding a first preset value to the hop count in the network configuration response broadcast packet of the other Bluetooth equipment received for the first time.
16. The apparatus of claim 13, wherein the network configuration response broadcast packet includes a broadcast packet sequence number, and wherein sending the network configuration response broadcast packet after receiving the network configuration request broadcast packet comprises:
and sending the network configuration response broadcast packet according to a preset time interval, and changing the sequence number of the broadcast packet according to a preset mode.
17. The apparatus of claim 13, further comprising:
and the second forwarding module is used for forwarding the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment when receiving the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment and is in a forwarding mode, and subtracting a second preset value from the hop count in the mode switching broadcast packet or the network configuration broadcast packet of other Bluetooth equipment.
18. The apparatus of claim 13, wherein the broadcast data comprises at least one of a universally unique identification number, a network address, a MAC address, a hop count, and a broadcast packet sequence number of the bluetooth device.
19. A network configuration apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
performing the method of any one of claims 1-9.
20. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910081529.3A CN109922465B (en) | 2019-01-28 | 2019-01-28 | Network configuration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910081529.3A CN109922465B (en) | 2019-01-28 | 2019-01-28 | Network configuration method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109922465A CN109922465A (en) | 2019-06-21 |
CN109922465B true CN109922465B (en) | 2022-07-01 |
Family
ID=66961019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910081529.3A Active CN109922465B (en) | 2019-01-28 | 2019-01-28 | Network configuration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109922465B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI763581B (en) * | 2019-10-03 | 2022-05-01 | 瑞昱半導體股份有限公司 | Main bluetooth circuit of multi-member bluetooth device capable of dynamically switching operation mode |
CN111556588B (en) * | 2020-06-08 | 2022-01-14 | 北京智芯微电子科技有限公司 | Connection configuration method and system for Bluetooth MESH network, electronic equipment and storage medium |
CN112260778B (en) * | 2020-10-16 | 2023-02-14 | 展讯半导体(成都)有限公司 | Method for evaluating broadcast channel and related product |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827282A (en) * | 2016-05-24 | 2016-08-03 | 卧槽科技(深圳)有限公司 | Bluetooth equipment networking method and device and Bluetooth equipment |
CN106658368A (en) * | 2016-12-01 | 2017-05-10 | 九阳股份有限公司 | Bluetooth networking method and system |
CN107508714A (en) * | 2017-09-26 | 2017-12-22 | 深圳市微智电子有限公司 | The method and device of network configuration is carried out to bluetooth equipment based on bluetooth mesh |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106255169B (en) * | 2016-07-20 | 2020-09-01 | 南京矽力微电子技术有限公司 | Node equipment, data packet forwarding method and grid network system applying same |
-
2019
- 2019-01-28 CN CN201910081529.3A patent/CN109922465B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105827282A (en) * | 2016-05-24 | 2016-08-03 | 卧槽科技(深圳)有限公司 | Bluetooth equipment networking method and device and Bluetooth equipment |
CN106658368A (en) * | 2016-12-01 | 2017-05-10 | 九阳股份有限公司 | Bluetooth networking method and system |
CN107508714A (en) * | 2017-09-26 | 2017-12-22 | 深圳市微智电子有限公司 | The method and device of network configuration is carried out to bluetooth equipment based on bluetooth mesh |
Also Published As
Publication number | Publication date |
---|---|
CN109922465A (en) | 2019-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016192323A1 (en) | Video communication method and device | |
CN105094732A (en) | Screen display method and apparatus | |
EP3062487A1 (en) | Method and apparatus for detecting smart device | |
US11457479B2 (en) | Method and apparatus for configuring random access occasion, method and apparatus for random access | |
CN107071862B (en) | Account number binding method and device and intelligent equipment | |
EP3226432A1 (en) | Method and device for sharing media data between terminals | |
CN110622616A (en) | Control method and device of inactivity timer | |
CN111654354B (en) | Method and device for detecting maximum transmission unit MTU and storage medium | |
US20220256497A1 (en) | Methods and apparatuses for receiving paging signaling, and methods and apparatuses for transmitting paging signaling | |
CN109922465B (en) | Network configuration method and device | |
CN109792320B (en) | Data transmission method and device | |
CN111294850B (en) | Measurement reporting method and device, and terminal equipment information acquisition method and device | |
CN105978663B (en) | Data transmission method and device | |
CN110750226A (en) | Central control equipment management method and device, computer equipment and storage medium | |
CN111262941B (en) | Method for reconnecting cloud server and electronic equipment | |
CN107404521B (en) | Method, device and system for resetting equipment | |
CN108347718B (en) | Method, device and storage medium for monitoring communication packet | |
CN105227426B (en) | Application interface switching method and device and terminal equipment | |
CN111010721A (en) | Wireless network distribution method, wireless network distribution device and computer readable storage medium | |
CN105376318A (en) | File transmission method, device and system | |
CN110311692B (en) | User equipment, control method and storage medium | |
CN110224991B (en) | Video networking terminal communication method and device | |
CN111290843A (en) | Process management method and device | |
CN114430370B (en) | Method, device, equipment and storage medium for determining network slice | |
CN111083545B (en) | Remote operation control method, remote operation control device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |