## 4 Results and Discussion
### Evaluation of Communication Range and Channel Attenuation Modeling
Therefore, Figure 4 was updated from scratch and presented in this form after the retouching process to obtain a complete view of the values. According to the collected results about the unsuccessful transmissions, it can be concluded that for SNR[dB] \(<\) 0, for the purpose of a reliable data transmission, confirmations, i.e., acknowledgments, are also necessary. The results of the conducted research in this paper are first collected for all measurements in all scenarios to obtain Figure 5 presenting the limits of reliable data transmission. Based on it, it is possible to check whether the measurement results obtained in real time fit into the areas where an acknowledgment of packet delivery is required or not. If the measurement data is within the framed area (i.e., if values of RSSI are between \(-120\) dBm and \(-110\) dBm), there is a higher probability that a packet delivery confirmation is required and it can be sent. For RSSI values lower than \(-120\) dBm (i.e., if values are between \(-130\) dBm and \(-120\) dBm) the loss of packets occurs and confirmation of its delivery is necessary. The values of SNR at which transmission errors, i.e., BER, occur within the communication process depend on the value of the SF parameter and, to some extent, on the CR values as well [76; 85; 86]. To quantify this, it is assumed that all losses are caused by channel gain variability [86]. To reduce data transmission losses in LoRa communication, it is possible to use the Adaptive Data Rate (ADR) mechanism for optimizing data rates, air time, and energy consumption in the network. The ADR mechanism controls a sensor node's spreading factor, bandwidth, and transmission power to optimize device power consumption while ensuring that messages are still received at the gateways. Generally, the sensor nodes close to gateways should use a lower spreading factor and a higher data rate, while sensor nodes further away should use a high spreading factor because they need a higher link budget. When ADR is in use, the network server is capable of increasing the data rate and can indicate to the sensor node that it should reduce its transmission power, while the node can use an automatic data rate reduction when it  
Figure 4: Limits of reliable data transmission. (**a**) Original picture after conducted measurements; (**b**) Retouched version of original picture with the displayed rectangle within which confirmations of packet delivery are required, and black line on the left of which packets have not been delivered. detects that it is not receiving any response from the network. It is important to note that ADR should be enabled only if a sensor node has stable RF conditions. The network server takes the 20 most recent uplinks as the input for the optimal data rate, starting when the ADR bit is set. These measurements contain the frame counter, SNR, and the number of gateways that received each uplink. The maximum SNR of the last 20 received uplink messages is used to determine the quality of the link between the node and gateway. If the SNR is lower than required (e.g., if BW = 125 kHz is considered, for SF = 6: SNR = \(-\)5 dB, for SF = 7 (DR5): SNR = \(-\)7.5 dB, for SF = 8 (DR4): SNR = \(-\)10 dB, for SF = 9 (DR3): SNR = \(-\)12.5 dB, for SF = 10 (DR2): SNR = \(-\)15.5 dB, for SF = 11 (DR1): SNR = \(-\)17.5 dB, and for SF = 12 (DR0): SNR = \(-\)20 dB), the network server tries to decrease the data rate or increase the transmit power [4]. According to the obtained results of the conducted measurements shown in Figure 4, it can be seen that the area where increased packet losses occur due to signal weakening is located precisely in the area of SNR values specified as marginal for the application of ADR. The most significant losses occur at SNR values lower than \(-\)5 dB if the RSSI values are lower than \(-\)110 dBm.