Summary of the invention
The invention provides a kind of key at the Zigbee network that can overcome the above problems sign indicating number is gone into network control method.
In first aspect, the invention provides an a kind of key at the Zigbee network to the sign indicating number control method, this method comprises: coordinator node the sign indicating number key is pressed, this coordinator node application layer sends to this coordinator node network layer and allows to add networking command, and then allows the Zigbee network that the peripheral hardware node adds this coordinator node place.
Peripheral hardware node the sign indicating number key is pressed, this peripheral hardware node application layer sends the NetFind order to this peripheral hardware meshed network layer, and then searches the Zigbee network.Find under the Zigbee network condition at this peripheral hardware node, this peripheral hardware node application layer of this peripheral hardware meshed network course sends NetFind and confirms response.
Peripheral hardware node application layer sends to this peripheral hardware meshed network layer and adds networking command, and then request adds this Zigbee network.Peripheral hardware node and coordinator node one key are to the sign indicating number success, and this coordinator node application layer receives the adding network indication response of this coordinator node network layer, and this peripheral hardware node application layer receives the adding network validation response of this peripheral hardware meshed network layer.
In second aspect, the invention provides an a kind of key at the Zigbee network to the sign indicating number control method, this method comprises: routing node the sign indicating number key is pressed, this routing node application layer sends to this routing node network layer and allows to add networking command, and then allows the Zigbee network that terminal node adds this routing node place.
Terminal node the sign indicating number key is pressed, this terminal node application layer sends the NetFind order to this terminal node network layer, and then searches the Zigbee network.Find under the Zigbee network condition at this terminal node, this terminal node network layer sends NetFind to this terminal node application layer and confirms response.
The terminal node application layer sends to this terminal node network layer and adds networking command, and then request adds this Zigbee network.Terminal node and routing node one key are to the sign indicating number success, and this routing node application layer receives the adding network indication response of this routing node network layer, and this terminal node application layer receives the adding network validation response of this terminal node network layer.This coordinator node application layer receives the adding network indication response from this routing node application layer.
In one embodiment of the invention, the peripheral hardware node is terminal node or routing node.
In another embodiment of the present invention, allowing to add networking command is the NLME-PERMIT-JOIN.request order, the NetFind order is the NLME-NETWORK-DISCOVERY.request order, NetFind confirms that response is the NLME-NETWORK-DISCOVERY.confirm response, adding networking command is NLME-JOIN.request order or NLME-ASSOCIATE.request order, add the network validation response and be NLME-JOIN.confirm response or NLME-ASSOCIATE.confirm response, add network indication response and be NLME-JOIN.indication response or NLME-ASSOCIATE.indication response.
The present invention has solved the low-security of full disclosure method of network entry and the cipher key configuration challenge of safe mode method of network entry by a key to code method, Zigbee of the present invention goes into network control method not only to have had than strong security simultaneously but also handled easily, had significant application value.
Embodiment
Fig. 1 is a Zigbee network system schematic diagram.This system comprises a Zigbee coordinator node (coordinator), one or more routing node (router), a plurality of terminal node (enddevice).Wherein, coordinator node is the control centre of Zigbee network; Routing node and terminal node are the peripheral hardware nodes of Zigbee network.On hardware, this coordinator node, routing node, terminal node all comprise be used to control himself network to the sign indicating number key.
The Zigbee network go into the networking control flow that network control method comprises terminal node and coordinator node, the networking control flow of terminal node and routing node, and the networking control flow of routing node and coordinator node.Below will be set forth these three kinds of networking control flows respectively.
Fig. 2 is the networking control schematic diagram of terminal node and coordinator node.
In step 210, coordinator node the sign indicating number key is pressed.
In step 220, the coordinator node application layer sends to this coordinator node network layer and allows to add networking command, and then allows have terminal node to add this coordinator node place Zigbee network in a period of time.
The concrete time of described a period of time is by default, as 30 seconds.In the example, it is the NLME-PERMIT-JOIN.request order that described permission adds the Zigbee networking command.
In step 230, terminal node the sign indicating number key is pressed.
In step 240, the terminal node application layer sends the NetFind order to this terminal node network layer, carries out web search on a plurality of channels of appointment, and carries out the scan for networks operation, to seek the Zigbee network that allows this terminal node to add.
Have under the same channel situation at terminal node and coordinator node, carry out the step of scan for networks operation described in the skips steps 240, and carry out the Network Search operating procedure.
In the example, described NetFind order is the NLME-NETWORK-DISCOVERY.request order.
In step 250, the terminal node network layer is found to require to obtain this Zigbee network parameter to coordinator node behind the Zigbee network of the required adding of this terminal node, and then the coordinator node network layer sends network parameter to this terminal node network layer; This terminal node network layer sends NetFind affirmation response to this terminal node application layer then.
Described network parameter is PAN ID, channel, key etc.Have under the same channel situation at terminal node and coordinator node, only send PAN ID network parameter in the step 250.
In the example, described NetFind confirms that response is the NLME-NETWORK-DISCOVERY.confirm response.
In step 260, the terminal node application layer sends to this terminal node network layer and adds networking command, and the request of terminal node network layer adds the Zigbee network at this coordinator node place then.
In the example, described adding networking command is NLME-JOIN.request order or NLME-ASSOCIATE.request order.
In step 270, the coordinator node network layer allows this terminal node network layer to add the Zigbee network, then the coordinator node network layer sends to this coordinator node application layer and adds network indication response, the terminal node relevant information is write the non-volatile memory district of this coordinator node; And the coordinator node network layer sends to the terminal node network layer and allows to add internet message, adds the network validation response so that this terminal node network layer sends to this terminal node application layer, and then network parameter is write the non-volatile memory district of this terminal node.
Have under the same channel situation at terminal node and coordinator node, only PAN ID network parameter is write the non-volatile memory district of this terminal node in the step 270, and skip the step that the terminal node relevant information is write this coordinator node non-volatile memory district.
Described non-volatile memory district such as hard disk, FLASH, storage card etc.Described terminal node relevant information is a terminal node device id etc.In the example, described adding network validation response is NLME-JOIN.confirm response or NLME-ASSOCIATE.confirm response.In another example, described adding network indication response is NLME-JOIN.indication response or NLME-ASSOCIATE.indication response.
Need to prove, terminal node and coordinator node go into the sequencing that network control method is not limited to the above step 210, step 220, step 230, step 240, also can be first execution in step 230, then be step 240, again execution in step 210, then be step 220.
Fig. 3 is the networking control schematic diagram of terminal node and routing node.
In step 310, routing node the sign indicating number key is pressed.
In step 320, the routing node application layer sends to this routing node network layer and allows to add networking command, and then allows have terminal node to add this routing node place Zigbee network in a period of time.
The concrete time of described a period of time is by default, as 30 seconds.In the example, it is the NLME-PERMIT-JOIN.request order that described permission adds the Zigbee networking command.
In step 330, terminal node the sign indicating number key is pressed.
In step 340, the terminal node application layer sends the NetFind order to this terminal node network layer, carries out web search on a plurality of channels of appointment, and carries out the scan for networks operation, to seek the Zigbee network that allows this terminal node to add.
Have under the same channel situation at terminal node and routing node, carry out the step of scan for networks operation described in the skips steps 340, and carry out the Network Search operating procedure.
In the example, described NetFind order is the NLME-NETWORK-DISCOVERY.request order.
In step 350, the terminal node network layer is found to require to obtain this Zigbee network parameter to routing node behind the Zigbee network of the required adding of this terminal node, and then the routing node network layer sends network parameter to this terminal node network layer; This terminal node network layer sends NetFind affirmation response to this terminal node application layer then.
Described network parameter is PAN ID, channel, key etc.Have under the same channel situation at terminal node and routing node, only send PAN ID network parameter in the step 350.
In the example, described NetFind confirms that response is the NLME-NETWORK-DISCOVERY.confirm response.
In step 360, the terminal node application layer sends the adding networking command to the network layer of this terminal node, and the request of terminal node network layer adds the Zigbee network at this routing node place then.
In the example, described adding networking command is NLME-JOIN.request order or NLME-ASSOCIATE.request order.
In step 370, the routing node network layer allows this terminal node network layer to add the Zigbee network, and then the routing node network layer sends to this routing node application layer and adds network indication response; And the routing node network layer sends to the terminal node network layer and allows to add internet message, adds the network validation response so that this terminal node network layer sends to this terminal node application layer, and then network parameter is write the non-volatile memory district of this terminal node.
Have under the same channel situation at terminal node and routing node, only PAN ID network parameter is write the non-volatile memory district of this terminal node in the step 370.Described non-volatile memory district such as hard disk, FLASH, storage card etc.
In the example, described adding network validation response is NLME-JOIN.confirm response or NLME-ASSOCIATE.confirm response.In another example, described adding network indication response is NLME-JOIN.indication response or NLME-ASSOCIATE.indication response.
In step 380, the coordinator node application layer receives the adding network indication response of routing node application layer, the terminal node relevant information is write the non-volatile memory district of this coordinator node.
Have under the same channel situation at terminal node and routing node, step 380 is skipped the step that the terminal node relevant information is write coordinator node non-volatile memory district.The device id that described terminal node relevant information is a terminal node etc.
In the example, described adding network indication response is NLME-JOIN.indication response or NLME-ASSOCIATE.indication response.
Need to prove, terminal node and routing node go into the sequencing that network control method is not limited to the above step 310, step 320, step 330, step 340, also can be first execution in step 330, then be step 340, again execution in step 310, then be step 320.
Fig. 4 is the networking control schematic diagram of routing node and coordinator node.
In step 410, coordinator node the sign indicating number key is pressed.
In step 420, the coordinator node application layer sends to this coordinator node network layer and allows to add networking command, and then allows have routing node to add this coordinator node place Zigbee network in a period of time.
The concrete time of described a period of time is by default, as 30 seconds.In the example, it is the NLME-PERMIT-JOIN.request order that described permission adds the Zigbee networking command.
In step 430, routing node the sign indicating number key is pressed.
In step 440, the routing node application layer sends the NetFind order to this routing node network layer, carries out web search on a plurality of channels of appointment, and carries out the scan for networks operation, to seek the Zigbee network that allows this routing node to add.
Have under the same channel situation at routing node and coordinator node, carry out the step of scan for networks operation described in the skips steps 440, and carry out the Network Search operating procedure.
In the example, described NetFind order is the NLME-NETWORK-DISCOVERY.request order.
In step 450, the routing node network layer is found to require to obtain this Zigbee network parameter to coordinator node behind the Zigbee network of the required adding of this routing node, and then the coordinator node network layer sends network parameter to this routing node network layer; This routing node network layer sends NetFind affirmation response to this routing node application layer then.
Described network parameter is PAN ID, channel, key etc.Have under the same channel situation at routing node and coordinator node, only send PAN ID network parameter in the step 350.
In the example, described NetFind confirms that response is the NLME-NETWORK-DISCOVERY.confirm response.
In step 460, the routing node application layer sends to this routing node network layer and adds networking command, and the request of routing node network layer adds the Zigbee network at this coordinator node place then.
In the example, described adding networking command is NLME-JOIN.request order or NLME-ASSOCIATE.request order.
In step 470, the coordinator node network layer allows this routing node network layer to add the Zigbee network, then the coordinator node network layer sends to this coordinator node application layer and adds network indication response, the routing node relevant information is write the non-volatile memory district of this coordinator node; And the coordinator node network layer sends to the routing node network layer and allows to add internet message, adds the network validation response so that this routing node network layer sends to this routing node application layer, and then network parameter is write the non-volatile memory district of this routing node.
Have under the same channel situation at routing node and coordinator node, only PAN ID network parameter is write the non-volatile memory district of this routing node in the step 470, and skip the step that the routing node relevant information is write this coordinator node non-volatile memory district.
Described non-volatile memory district such as hard disk, FLASH, storage card etc.The device id that described routing node relevant information is a routing node etc.In the example, described adding network validation response is NLME-JOIN.confirm response or NLME-ASSOCIATE.confirm response.In another example, described adding network indication response is NLME-JOIN.indication response or NLME-ASSOCIATE.indication response.
Need to prove, routing node and coordinator node go into the sequencing that network control method is not limited to the above step 410, step 420, step 430, step 440, also can be first execution in step 430, then be step 440, again execution in step 410, then be step 420.
Obviously, under the prerequisite that does not depart from true spirit of the present invention and scope, the present invention described here can have many variations.Therefore, the change that all it will be apparent to those skilled in the art that all should be included within the scope that these claims contain.The present invention's scope required for protection is only limited by described claims.