## 4 Results and Discussion
### LoRaWAN or LoRaMESH Restricted Network Capacity  
In order to find out the capacity of nodes that a gateway or coordinator will be able to support was used a formulation proposed by [121] to calculate theoretically the capacity of the LoRaWAN protocol proposed by this work. It is worth noting that the LoRaMESH network has a factory limitation which is the ability to connect to 1023 nodes in a mesh network.  
\[DPQ=\frac{(time)}{ToA} \tag{1}\]  
In theory, a LoRaWAN network with class A configuration opens two communication windows, one downlink with a time of 1 second and the other of 2 s after the completion of the uplink [132]. Based on this, it is possible to calculate the capacity of the LoRaWAN network based on ToA between SMs and EPC. Considering the results obtained, for SF 7 to 9 the ToA was a maximum of 30 ms and for SF 10 to 12 a maximum of 260 ms round trip. With this, first the Daily Packet Quantity (DPQ) will be calculated based on the Equation (1), where the time is the period that a device will operate and ToA is the time that a packet sent by the device will take to reach the gateway, both in seconds. Therefore, considering that for smaller SFs the ToA obtained and the conversion from 1 h to seconds be presented for 60 m \(*\) 60 s, in 1 hour of operation we have the following Equation (2),  
\[DPQ=\frac{(60*60)}{0.03} \tag{2}\]  
Figure 35: Average RSSI and SNR per point and SF LoRaMESH. (**a**) SNR left side. (**b**) SNR left side. (**c**) SNR front side. (**d**) SNR front side. (**e**) SNR right side. (**f**) SNR right side.  
or 120,000 package opportunities for the smaller SFs and, the following Equation (3),  
\[DPQ=\frac{(60*60)}{0.260} \tag{3}\]  
or 13,840 package opportunities for larger SFs. This makes the daily capacity 2,880,000 packages for the smaller SFs and 332,160 packages for the larger SFs. Now to calculate the amount of nodes per gateway during a day considering that it is only one channel, the following calculation will be performed.  
\[NP=\frac{DPQ}{(NEPCPD+QSMPPD)*ToA} \tag{4}\]  
Based on the specifications of the Equation (4), the Table 6 presents a detail of each variable to be used. Considering that EPC will send on average up to 5 packets per day, and SMs will send up to 26 packets per day, being 24 packets with consumption data per hour and 2 booking packets for cases in which EPC will request some immediate return from the SM in question, in this case EPC will request up to two calls per SM per day which is mostly something specific and difficult to happen. Regarding the gateway used in this work, it has a hardware with 8 communication channels, being able to receive or send to up to 8 devices at the same time, thus multiplying the DPQ by 8. This way, we have the following equations.  
For SF 7 to 9:  
\[NP=\frac{2,880,000*8}{(5+26)*0.03} \tag{5}\]  
For SF 10 to 12:  
\[NP=\frac{332,160*8}{(5+26)*0.260} \tag{6}\]  
From the Equations (5) and (6) 5,907,692 SMs can be connected to the gateway with only smaller SFs configurations, and 329,687 SMs with only larger SFs. At this moment the NP is not yet being calculated considering smaller and larger SMs in the same network as well as the calculation for the hybrid network, however these formulations will be made for the final version of the dissertation. It is worth mentioning that these are just numbers to be considered as base, there are still different variations such as package size, bandwidth configurations and among other factors that vary depending on their geographical position. From the results above, it can be concluded that LoRaWAN network capacity depends on several parameters such as number of gateway channels, SF configuration, bandwidth, number of packages required per day and per destination (EPC and SM) and the package size.