1.
2, any one ZigBee module to join a network, must have a node in the network as a introducer, and this introducer can not be the end node. The Introducer node is the parent node of the Introducer node, and the node that is introduced is called the child node. The two are parent-child node relationships.
3, there are three modules: a module to download the Coordinator function code; b module download the router function code; c module download the terminal function code;
When a does not power on, and B, C power, will always go to find the network request to join the network; until the a module power up, first go to create a network to determine Panid, and set their own ID of 0x0000, and then add B, c to the network, join the network can be divided into two: 1), Download the terminal code of the C module to join the network first, then the parent node of the C module must be a module, C network, B began to network, because C can not be used as introducer, then the parent node of B can only be a module. The network topology structure is
2) If the B node is first in the network, then there are two kinds of topological structure:
4, when the join node has a number of introducer can choose to join, according to the signal strength of the added node and other parameters to select the best introducer node.
5. After the ZigBee network is formed, the nodes in the network can communicate with each other, and there are four kinds of communication modes: unicast, broadcast, multicast and binding.
6, before the network: routers have done something?
has been sending up this frame.
TYPE: for cmd command frame format. is the beacon request frame, beacon requests; its function is to let all the referrals in the vicinity of the node, all have to reply to the beacon frame, these returned beacon frame by this want to join the wireless module to get, through these beacon frame, select the best introducer node, request to join.
Before the network: What did the terminal do?
And the router did the same thing.
So what did the coordinator do after the power-up?
First also sent a frame beacon request frame, send this frame will also get around with introducer qualified node reply beacon frame, but the coordinator to get back the beacon frame is taken to determine the surrounding environment, to create a network to prepare.
When the coordinator is created successfully, a data frame is sent, which can see the Coordinator's address 0x0000, as well as the Panid, which can be called the network connection state frame.
From the network (because only routers and terminals will have) to stabilize the work
The premise is that the network exists, that is, the coordinator always exists:
Router:
First frame: The network connection status frame for the coordinator indicates that the coordinator is working stably and is independent of the router network.
Second frame: A beacon request frame for the router to discover the surrounding network and request to join.
The third frame: The Beacon request frame issued by the Coordinator module, after the router module gets this frame, can get the coordinator module relative to its own signal strength, judging is not the best introducer.
Frame four-frame fifth and frames sixth and seventh are repeated in the second and third frames. This is a must to repeat!
Add: In the ZigBee network if a module emits a radio frequency frame, very clearly specify the address of the receiving target node, then the target node receives this frame, the hardware will automatically reply to an ACK, indicating that it has been received.
Ti in the factory CC2530 chip, will be cured in flash a 8-byte address, this address is unique, called the MAC address or the IEEE address, as well as the physical address.
Frame eighth: Is the router module sent to the Coordinator module, the role of this frame is, in front of the router module received the Coordinator module Beacon frame, through the beacon frame to judge the coordinator is the current router module best introducer, router module sent this frame high-speed coordinator, you are my current best introducer, Please from when I enter the network introducer, introduced me into the network, and in this frame carried own Mac, this MAC address is the Introducer module (Coordinator module) to the Introducer module (Router module) to assign the network address of the basis.
Frame Nineth: The ACK that the Coordinator module replies to the router module, indicating that I have received the frame you sent over.
Frame Tenth: Is the router module sent to the Coordinator module frame, the role is the request coordinator, you according to my previous sent to your MAC address to my assigned network address sent me, is a data request frame
Frame 11th: The ACK that the coordinator replies to the router indicates that a frame was received from the router.
Frame 12th: The coordinator sends the network address assigned to the router to the router. This frame needs to be sent to the router module very clearly, but the router module does not know what the network address is, so when the target address is specified with the MAC address,
Frame 13th: After the Router module receives the coordinator sent to its own network address according to its MAC address, the hardware automatically replies to the ACK, indicating that it has been received.
Frame 14th: Access to the frame, through this frame to tell the current network of all nodes, I network, my internet address is 0xe9eb.
Frame 15th: Is the frame that the Coordinator module received after the router module sent the network declaration frame, forwarded.
Frames 16th and 17th: The network connection status frame that is emitted when the coordinator module and the router module are working stably. After the network coordinator and router in the net, the behavior of stable operation is that every once in a while to send an Internet connection status frame, the default time is 15s (adjustable in the code).
Terminal to stabilize work after access to the network
The terminal's access process and the router's access to the network process, all the behavior is the same.
When the network is stable, the terminal sends the data request frame to the parent node:
Frame 16th: The end node sends a data request frame (interval send) to his introducer node (parent node) Coordinator, in order to tell it the parent node, I am also online.
Frame 17th: When the coordinator receives the frame sent from the terminal, the hardware will automatically reply to the ACK.
In addition to Usbdongle can grab the bag, you can also use ZigBee module to grab the bag!
First, the emulator is inserted into the computer, a plug on the learning board, the packet software packet sniffer start, select
Channel Start:
can also catch wireless packets, the result:
This can grab the bag, but it will destroy the program inside the board, and the clutch is sometimes not very good.
Network feature grab Packet analysis