Summary of the invention
It is an object of the invention to overcome the deficiencies of the prior art and provide it is a kind of can be realized quick distribution based on bluetooth
The Intelligent illumination device of MESH matches network method.
In order to achieve the above objects and other related objects, the technical solution of the present invention is as follows:
A kind of Intelligent illumination device based on bluetooth MESH matches network method, comprising:
Distribution initiating equipment receives distribution instruction, the shape to be broadcast the message in default bluetooth mesh network using bluetooth mesh
Formula issues the first message packet including the second network parameter;The default bluetooth mesh network configuration has first network parameter;
The first message packet, the first network based on default bluetooth mesh network configuration are received to networking Intelligent illumination device
Parameter parses the first message packet, obtains second network parameter, and carry out condition prompting;
It is executed to networking Intelligent illumination device and updates network configuration operations, so as to first network parameter failure and make the
Two network parameters come into force.
It is preferably, described that the trigger condition for updating network configuration operations is executed to networking Intelligent illumination device, comprising:
It is executed after networking Intelligent illumination device obtains second network parameter and restarts, connect to networking Intelligent illumination device
Distribution is received to complete to execute after message to restart or execute after distribution smart machine receiving device instruction of restarting and restart.
Preferably, described execute after networking Intelligent illumination device receives distribution completion message is restarted, comprising:
The form sending that the distribution initiating equipment is broadcast the message in default bluetooth mesh network using bluetooth mesh is matched
Net the second message packet completed;
The second message packet is received to networking Intelligent illumination device, based on the first network parameter to the second message
Packet is parsed, and judges it is after message is completed in distribution, execution is restarted.
Preferably, the form that the distribution initiating equipment is broadcast the message in default bluetooth mesh network using bluetooth mesh
Issuing the trigger condition for the second message packet that distribution is completed, comprising: the distribution initiating equipment receives distribution and completes instruction, or
Person, after preset time.
Preferably, the condition prompting includes: that Intelligent illumination device changes brightness of illumination, Intelligent illumination device changes illumination
Color or Intelligent illumination device change illumination frequencies.
Preferably, described to match network method further include: the distribution initiating equipment receives message retransmission instruction, in default bluetooth
The third message package including the second network parameter is issued using the form that bluetooth mesh broadcasts the message in mesh network.
Preferably, described to match network method further include: described to disappear to networking Intelligent illumination device to receive described first
Breath packet is forwarded.
Preferably, the method for newly-increased Intelligent illumination device includes: in the bluetooth MESH network for including the second network parameter
Distribution initiating equipment receives newly-increased Intelligent illumination device instruction, and bluetooth mesh is used in default bluetooth mesh network
The form of broadcast message issues the 4th message package including the second network parameter;
Newly-increased Intelligent illumination device receives the first message packet, based on the first network parameter to the 4th message
Packet is parsed, and second network parameter is obtained, and carries out condition prompting;
Newly-increased Intelligent illumination device, which executes, updates network configuration operations, so as to first network parameter failure and make second
Network parameter comes into force.
Preferably, for be provided with grouping toggle switch to networking Intelligent illumination device, pass through selection publication and receive
Device packets are realized in address.
Preferably, the distribution initiating equipment is communicated with other terminal devices by bluetooth connection, to realize bluetooth
The network parameter of MESH network is shared.
Beneficial effects of the present invention are as follows:
(1) Intelligent illumination device of the invention based on bluetooth MESH matches network method, passes through preset bluetooth Mesh network
The second network parameter of (distribution initiating equipment and be preset with identical first network parameter to networking Intelligent illumination device) transmission is simultaneously
The network parameter being localized updates, and realization configures hundreds and thousands of a Intelligent illumination devices in a short time, and distribution is high-efficient,
It is highly reliable;
(2) Intelligent illumination device of the invention based on bluetooth MESH matches network method, each to networking Intelligent illumination device
After receiving the second network parameter, prompted by the change of lamp state itself to facilitate distribution person to observe, thus fastly
Speed judges which Intelligent illumination device has been received by the second network parameter, which Intelligent illumination device not yet receives the second network ginseng
Number, and then judge whether need to broadcast the second network parameter again;
(3) Intelligent illumination device of the invention based on bluetooth MESH matches network method, for being provided with grouping toggle switch
Intelligent illumination device, can choose equipment publication receive address, install bluetooth Mesh network mechanism, connect with same issue
The equipment for receiving address can be communicated mutually, and the equipment that difference publication receives address only carries out the forwarding of data packet, without many and diverse
It selects lamp to operate with lamp, simple and fast grouping control can be realized;
(4) Intelligent illumination device of the invention based on bluetooth MESH match network method, the distribution initiating equipment and other
Terminal device is communicated by bluetooth connection, and the network parameter to realize bluetooth MESH network is shared.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended
The example of device and method being described in detail in claims, some aspects of the invention are consistent.
In the present embodiment, the distribution initiating equipment be can be including key, display interactive interface, MCU processor etc.
Remote controler is also possible to the terminals such as mobile phone, IPAD, the APP with interactive function is provided in the terminal.
The distribution initiating equipment has preset certain first network parameter (including netkey Netkey, using key
Appket, network security parameters IV index etc.), same network parameter has been preset when leaving the factory to networking Intelligent illumination device.
When distribution person's networking is constructed, distribution initiating equipment and can be organized automatically after networking Intelligent illumination device powers on one it is default
Bluetooth Mesh network.After the completion of distribution person's installation, the distribution initiating equipment passes through preset bluetooth Mesh network
The broadcast message including the second network parameter is sent, message can be transmitted in this preset bluetooth Mesh, needed networking intelligence
Energy lighting apparatus updates network parameter after receiving the message, a new bluetooth Mesh network is organized, to reach quick
The purpose of distribution.Hundreds and thousands of a network nodes can be quickly added in this way, solve conventional Bluetooth Mesh at all
Cumbersome, time-consuming, the complicated disadvantage of distribution.
Shown in Figure 1, a kind of Intelligent illumination device based on bluetooth MESH of the present invention matches network method, comprising:
S101, distribution initiating equipment receive distribution instruction, are disappeared in default bluetooth mesh network using bluetooth mesh broadcast
The form of breath issues the first message packet including the second network parameter;The default bluetooth mesh network configuration has first network ginseng
Number.
Specifically, distribution person operates distribution initiating equipment and generates one group of second new network parameter when equipment installs
(or control distribution initiating equipment shares one group of second new network parameter from other terminal devices or cloud platform), this group second
Netkey Netkey in network parameter, using key A ppket, what network security parameters IV index etc. was randomly generated, tool
There is uniqueness, and is stored in distribution initiating equipment.Subsequent distribution initiating equipment can be by preset bluetooth Mesh network
Specific field broadcast encryption sends first message packet, and the first message packet includes the second network parameter, the second network ginseng
Number includes netkey Netkey, using key A ppket, network security parameters IV index etc..
It should be noted that the first message packet can repeat to send preset time, as far as possible shine all intelligence in net
Bright equipment receives the message.
Certainly, if after preset time, it need if networking Intelligent illumination device do not receive first data packet,
Key can be retransmitted by the hardware on distribution initiating equipment or software is retransmitted key and retransmitted.Likewise, if when default
In, it, can be by distribution initiating equipment if needed networking Intelligent illumination device has been received by first data packet
Hardware cancels key or software cancels key and cancels repeating transmission.
S102 receives the first message packet to networking Intelligent illumination device, and the based on default bluetooth mesh network configuration
One network parameter parses the first message packet, obtains second network parameter, and carry out condition prompting.
Specifically, second network parameter has biggish life cycle, to networking Intelligent illumination device from default indigo plant
After receiving the second network parameter in tooth mesh network, the first message packet can be turned according to the mechanism of Mesh network
Hair, that is, realize the function of relaying, it can be ensured that the first message packet is transferred to each and waits on networking Intelligent illumination device.
Be successfully received the first message packet, and parse the second network parameter will to networking Intelligent illumination device
Give condition prompting.The condition prompting includes: that Intelligent illumination device changes brightness of illumination, Intelligent illumination device changes illumination face
Color or Intelligent illumination device change illumination frequencies.Such as lamps and lanterns can be convenient by brightness by 100% brightness adjustment that dispatches from the factory to 10%
Distribution person confirms key updating state.
S103 is executed to networking Intelligent illumination device and is updated network configuration operations, so that the first network parameter fails
And the second network parameter is made to come into force.
It is described that the trigger condition for updating network configuration operations is executed to networking Intelligent illumination device, comprising:
It is executed after networking Intelligent illumination device obtains second network parameter and restarts, connect to networking Intelligent illumination device
Distribution is received to complete to execute after message to restart or execute after distribution smart machine receiving device instruction of restarting and restart.
In the present embodiment, the execution is restarted to be re-powered including equipment, alternatively, software execution is restarted.Software executes
Intelligent illumination device is provided with MCU if restarting, then can be restarted by resetting MCU realization.
In the present embodiment, described execute after networking Intelligent illumination device receives distribution completion message is restarted, comprising:
The form sending that the distribution initiating equipment is broadcast the message in default bluetooth mesh network using bluetooth mesh is matched
Net the second message packet completed;
The second message packet is received to networking Intelligent illumination device, based on the first network parameter to the second message
Packet is parsed, and judges it is after message is completed in distribution, execution is restarted.
The form sending that the distribution initiating equipment is broadcast the message in default bluetooth mesh network using bluetooth mesh is matched
Net the trigger condition for the second message packet completed, comprising: the distribution initiating equipment receives distribution and completes instruction, alternatively, default
After time.
The distribution initiating equipment receives distribution completion instruction and specifically includes: distribution person passes through hard on distribution initiating equipment
Part key or software keys send distribution to distribution initiating equipment and complete instruction, and the distribution initiating equipment receives described instruction
The second message packet that distribution is completed is issued using the form that bluetooth mesh broadcasts the message in default bluetooth mesh network afterwards.
Specifically include after the preset time: after preset time, the distribution initiating equipment is in default bluetooth mesh
The second message packet that distribution is completed is issued using the form that bluetooth mesh broadcasts the message in network.
Specifically, it is described after networking Intelligent illumination device receives first message packet, by the network data in data packet
Decryption is stored the second network parameter into device databases, but wouldn't update current net with obtaining the second network parameter
Network configuration, i.e. the bluetooth Mesh network of current preset still can be used, and each Intelligent illumination device can be forwarded.Until connecing
It is complete to receive the form sending distribution that the distribution initiating equipment is broadcast the message in default bluetooth mesh network using bluetooth mesh
At second message packet after, needed networking Intelligent illumination device re-powers (or MCU is restarted), execute localization update network
Configuration operation, preset bluetooth Mesh network (first network parameter) failure, the second network parameter comes into force, all to networking intelligence
Lighting apparatus is communicated using new, uniqueness network.
Described execute after networking Intelligent illumination device obtains second network parameter is restarted, and is specifically included:
It is described that data packet is decrypted after networking Intelligent illumination device receives first message packet, to obtain second
Then network parameter directly executes equipment and restarts, updates network configuration, preset bluetooth Mesh network (first network parameter) is lost
Effect, the second network parameter come into force.
Execute and restart after networking Intelligent illumination device obtains second network parameter, it is understood that there may be the shortcomings that be,
It is likely to occur the slack-off problem of forwarding, such as part is after networking Intelligent illumination device receives the second network parameter, after restarting equipment
Second network parameter enters into force, this part Intelligent illumination device can not just carry out message forwarding again.
Described execute after distribution smart machine receiving device instruction of restarting is restarted, and is specifically included:
It is described after networking Intelligent illumination device receives first message packet, by the network data decryption in data packet to obtain
The second network parameter is obtained, and by the storage of the second network parameter into device databases, but current network configuration wouldn't be updated, i.e.,
Preset bluetooth Mesh network still can be used.Instruction of restarting (such as distribution person's touching until receiving Intelligent illumination device itself
Hair Intelligent illumination device on restart key) after re-power, update network configuration, preset bluetooth Mesh network (the first net
Network parameter) it fails, the second network parameter comes into force.
Described execute after distribution Intelligent illumination device receiving device instruction of restarting is restarted, it is understood that there may be the shortcomings that be,
When first distribution, due to that may have several hundred to distribution smart machine, executing reboot operation one by one causes distribution to slow,
And it is many and diverse.If certainly for configured network, when needing to increase a small amount of lighting apparatus newly, directly operate it is corresponding to
It is feasible that distribution Intelligent illumination device, which restart,.
Further, the method for newly-increased Intelligent illumination device includes: in distribution network
Distribution initiating equipment receives newly-increased Intelligent illumination device instruction, and bluetooth mesh is used in default bluetooth mesh network
The form of broadcast message issues the 4th message package including the second network parameter;
Newly-increased Intelligent illumination device receives the first message packet, based on the first network parameter to the 4th message
Packet is parsed, and second network parameter is obtained, and carries out condition prompting;
Newly-increased Intelligent illumination device, which executes, updates network configuration operations, so as to first network parameter failure and make second
Network parameter comes into force.
As being when it is recognised that the process of subsequent newly-increased Intelligent illumination device is with distribution for the first time from statement as above
, new network parameter will not be generated/use by differing only in distribution initiating equipment, but send the second network parameter.It is newly-increased
Intelligent illumination device is preset with first network parameter when dispatching from the factory, and increases Intelligent illumination device newly when adding using distribution initiating equipment
When, distribution initiating equipment is sent using the first network parameter of factory and protects the second currently used network parameter, increases intelligence newly
Lighting apparatus is prompted after receiving the second network parameter, updates use after restart.Due in new bluetooth MESH network
Other Intelligent illumination devices are using the second network parameter newly configured, therefore distribution initiating equipment is in default bluetooth mesh net
The 4th message package that the form that is broadcast the message in network using bluetooth mesh is issued, which is merely able to be increased newly Intelligent illumination device, to be parsed.
The trigger condition that newly-increased Intelligent illumination device executes update network configuration operations is same as previously described, the present embodiment
It is not repeated to state.
In the present embodiment, it may further include sensor in network to be configured, have on sensor and part Intelligent illumination device
There is grouping toggle switch, the publication that can choose equipment receives address, installs Mesh network mechanism, and there is same issue to receive ground
The equipment of location can be communicated mutually, and the equipment that difference publication receives address only carries out the forwarding of data packet, to realize equipment
Block functions facilitate the use of sensor and Intelligent illumination device.
Such as a pyroelectric human body infrared sensor and one group of lamp, their dial-up is toggled it to the same position
People is realized to turn on light, people walks the effect turned off the light.A group address is corresponded to particularly as each position for being dial-up, when dial-up is stirred
When to a position, the corresponding address of this dial-up can be set as the publication address of message and subscribe to address by equipment, for
Sensor will send data packet when sense people when to this address, and lamp can monitor this and subscribe to the message on address, when
Lamp will respond at once when singly having data packet, realize corresponding function.There is no the equipment of dial-up then to be broadcast the message (message addresses
For publication/reception of 0xffff).
Further, the distribution initiating equipment is communicated with other terminal devices by bluetooth connection, to realize indigo plant
The network parameter of tooth MESH network is shared.As the distribution initiating equipment (such as is tested after distribution person's authorization using password
Card), network parameter can be transmitted in mobile phone A pp or cloud platform, realize remote control function.
It should be noted that having physical resets button (if sending device makes on sending device or Intelligent illumination device
It is software operation, then includes software reset's button), when distribution person needs to be moved into other network, operate this
A reset button completes the reset of equipment, and equipment replacement is factory state.
Above-described embodiment is intended merely to illustrate the present invention, and is not used as limitation of the invention, as long as according to this hair
Bright technical spirit is changed above-described embodiment, modification etc. will all be fallen in the scope of the claims of the invention.