# Cross-Layer MAC/Routing Protocol for Reliability Improvement of the Internet of Things
## 3 Topological Structure Mesh Routing
### Address Assignment  
This section describes the proposed address allocation mechanism. It is to find the best path to send the most important data frames in the network layer to the destination in a multi-hop network. In this paper, we propose efficient routing using (x, y, z) coordinate values. The TSMR can improve the energy efficiency used in each node by reducing the waste of address space compared to the standard method.  
The network frame format established by the ZigBee Alliance uses a total of 16 bits of address space for FFD devices and can allocate a total of 65,536 nodes. However, in a wireless communication environment, the components for space must be fully considered, and if 65,536 allocated nodes are not met, it results in a waste of address space. To solve this problem, a 16-bit address block range can be allocated as much as necessary under the administrator's authority, such as (8, 4, 4) or (4, 4, 4), to each of the (x, y, z) coordinate values. In the case of routing in a wireless communication environment, routing costs are required according to how many hops it passes. Therefore, it can be said that the smaller the number of hops within the limit of communication, the more efficient the routing technique.  
Figure 4 illustrates the proposed address-allocation scheme. In Figure 4, the address of each device in the TSMR consists of a row ID, column ID, and leaf ID. The row and column IDs indicate the hop counts in the row and column directions from the base station [0.0.0], respectively. For example, the device with address [1.1.0] is the router located at a distance 1 hop in the row and column directions from the base station. In other words, the proposed address refers to the relative location of the base station. In the TSMR, the leaf IDs of both the base station and router are set to 0, and the leaf ID of the leaf node is arbitrarily allocated by each router. Using the proposed addressing scheme, the source device can transmit a data frame to its destination without the help of a routing table. The detailed address-allocation scheme is as follows:  
* For the first time, the base station that receives the association-request frames from the FFDs selects two devices with the best RSSI and allocates two addresses -- that is,  
Figure 3: Drawbacks of the cluster-tree protocol.  
[1.0.0] and [0.1.0]. The two routers that receive the association-response frame, [1.0.0] and [0.1.0], from the base station join the base station PAN.
* The device that receives the beacon frame from the two routers with addresses [1.0.0] and [0.1.0] transmits the association-request frame -- including the RSSI value of each received beacon frame -- to the two routers. The device receives the beacon frame from only one router -- that is, the association-request frame -- including the RSSI value of the received beacon frame to the router. The two routers [1.0.0] and [0.1.0] transmit the association-relay frame, including the information of the received association-request frames, to the base station. The base station that receives the association-relay frames from the two routers allocates a new address [1.1.0] to the device with the best RSSI value. Additionally, it selects the device with the best RSSI among the devices that transmit the association-request frame to the router [1.0.0] and allocates a new address [2.0.0] to the selected router. In the same manner, the base station allocates a new address [0.2.0] to the router.
* 1).0] and allocates a new address [(x + 1).y.0] for the selected devices.  
As mentioned above, each router allocates a leaf ID with a non-zero value to the leaf nodes, the leaf ID being determined by the order in which the router adds them. In the TSMR, the address to which the leaf node is assigned is determined by the address of the parent router, and the base station is not involved. Accordingly, the TSMR may reduce the burden of the base station due to address  
Figure 4: Proposed network address-allocation scheme.