Network formation is part of the network layer functionalities. An example run of the various steps involved for a network formation is presented:
Star-Topology
Ø Assume a full function device is switched ON for the first time.
Ø It starts scanning its operating channels for possible beacon transmissions, from other PANs.
Ø If it finds a beacon, it can try to associate with the PAN or it can choose to form its own PAN.
Ø assuming it chooses to form a new PAN, It chooses a PAN ID unique within its operating space.
Ø Now it allows other devices to be associated to it. This ends the Star network formation phase, as initiated by the PAN-Coordinator.
Peer-to-Peer Topology
Ø Assume a full function device is switched ON for the first time.
Ø It starts scanning its operating channels for possible beacon transmissions, from other PANs.
Ø If it finds a beacon, it can try to associate with the PAN or it can choose to form its own PAN.
Ø Assuming it chooses to form a new PAN, It assumes the role of a PAN Coordinator and assigns a Cluster ID (CID) of 0 to itself.
Ø Now it allows other devices to be associated to it.
Ø Other devices which intend to join a PAN, look for the beacon transmissions and upon receiving the beacon transmissions from the coordinator, would request association to the network.
Ø The coordinator shall decide if it would like to add the device into the network.
Ø If it wants to add the device, it will assign a CID value to it. The new device shall add the coordinator as its neighbor, while the coordinator will add it as its child.
Ø And this new device can now act as a cluster head and transmit beacons.
Ø Other devices can now join the network at this node.
