## 2 Proposed WSN Routing Scheme
### Protocol Operations  
#### 2.2.1 Disseminating Data  
Several nodes become sources having information about an event which takes place nearby. This information is disseminated towards to the base node by the help of neighbor nodes behaving as repeaters. Associated data from each source is split to \(N\) pieces called data parts. An integer value \(N\) also represents the number of ant agents involving in each routing task.  
The data about an event, provided by the source node, is named raw data. Raw data contains information such as source node identification, event identification, time and data about the event. Raw data is split by the source node into \(N\) parts as shown in Figure 1. The size of each data part is chosen according to buffer size of the WSN communication chip.  
After splitting the raw data into parts, each part is associated with routing parameters to build a data package ready to transfer. These parameters are code identification (describing the code following as data, error or acknowledge) \(C\_ID\), next node identification (to which the package is transferred) \(N\_ID\), package number (also represents the ant agent) \(k\), \(S\_N\) is the sequence number, \(J_{w}^{k}\) which contains the number of visited nodes so far, and the \(k\)th data part as given in Figure 2. In this figure, the group of the first four fields is named the data header. When delivery of all data packages is accomplished, the base combines them into raw data.  
Figure 1: Raw data splits.  
In Figure 3, a node participation in a routing for the 10 th packet is given as an example. In the figure, Node A has just received a data package (whose agent number is given as ten) and makes a decision about the next destination for that package.  
The next node (the next address of package tarasfer) is chosen by using equation (1) providing the highest \(P^{k}_{\mathit{ij}}\). In this example, Node B (identified by 6A) more likely to be chosen as arc(_A_, _B_) has a higher pheromone value ( \(\tau_{\mathit{AB}}\)=0.8 ). Energy levels of the neighbor nodes B, C, and D have also importance on this decision rule. If Node B is then chosen, _N_ID_ field is updated as \"6 AHex\" and the package is broadcasted. Nodes C and D also hear this broadcast. They check _N_ID_ field and understand that this ID doesn't correspond to them, so they discard the package immediately after only listening to the _N_ID_ field. Node B also checks _N_ID_ field of the package. With the approval of ID by node B, and ensuring _S_N_ isn't in the list of tabus of node B, then \(J^{k}_{\mathit{w}}\) is updated by incrementing by one. Then, the next node is determined to update the _N_ID_ field by performing the same operations as the previous node (Node A) had done. Defining the size of data package is essential, because the number of ants is equivalent to the number of packages. So, package size must be defined by the initial system settings according to the average size of event data and hardware specifics. Minimum size of data in a data package consisting of MAC frames should be as long as the size of a frame in lower level MAC. If the 802.11 MAC layer protocol is in use, it should be considered that data payload in a frame contains up to 2,312 bytes. In the simulation settings in Section 3, this size is set to 1 Mb.