## 6 Conclusions  
We have proposed a solution to two important problems in wireless networks of battery-powered devices: a method of establishing a connection with a device that has been disconnected from the system for a long time and developed unknown skew, and also two approaches to follow-up clock synchronization using the confidence interval method. The algorithms were evaluated using extensive simulations and we discussed the selection of parameters balancing between minimizing the energy utilization and maximizing the probability of reception of the message. We showed that the selection of a time window of growing size requires 10 to 30% less energy to receive a packet than using the same size of time window repeated multiple times. The shifting of reception windows can further decrease the energy cost if lower packet reception probability is acceptable. We also proposed and evaluated an algorithm scaling the reception window size to the interval between the packet transmission. The selection of the scaling parameter allows the energy cost to be balanced with the maximization of the number of packets received. Overall, the uniform linear increase in the time window scenario has the lowest energy cost for typical working conditions. For the expected probabilities of packet loss of 5 or 10%, assuming the value of the \(a=1\) parameter allows the best balance of the energy cost with the maximization of the number of packets received.  
We also discussed how to adjust the size of the reception window for continuous communication with a device. Our simulations show that using an average of six or eight last reception intervals provides a good estimation of both clock skew and drift and the proposed averaging method to scale the reception window size to the interval between packet transmission. We showed that such scaling allows achieving similar packet reception probability with a few times shorter listening times than a constant size reception window.  
The recent popularity of LP WAN deployments raises new challenges for clock synchronization. Communication standards such as LoRa and MIoTy allow the low-cost battery-operated devices to operate for years, maintaining occasional communication with the network. As the bandwidth is very limited, the clock synchronization techniques based on a periodic exchange of packets are not effective. Some recent work has proposed flooding based synchronization [29], but the appropriate management of the listening window size and estimation of the clock skew, as proposed in [30] or this work, has strong potential to be applied in practice. In future, we plan to further extend the use of clock synchronization in communication between battery-powered LoRa devices and investigate the interoperability of this with the LoRaWAN standard, e.g., to minimize the size of the device's listening window in LoRa classes A and B. Another area of future research is the application of more sophisticated prediction models, e.g., ARIMA for clock skew estimation.  
Individual contributions are as follows: formal analysis, software, validation, writing--review & editing: M.G.; conceptualization, funding acquisition, methodology, supervision: K.G.; investigation, software, visualization, writing--original draft: R.M.; data curation, resources: A.F. All authors have read and agreed to the published version of the manuscript.  
This research was partially funded by the Polish National Center for Research and Development, grant number POIR.04.01.04-00-0005/17.  
Not applicable.  
Data Availability Statement: The data presented in this study are available on request from the corresponding author. The data are not publicly available due to consortium rules connected with project funding. Conflicts of Interest: The authors declare no conflict of interest.