{'fraction_non_alphanumeric': 0.021462105969148222, 'fraction_numerical': 0.0013413816230717639, 'mean_word_length': 4.944223107569721, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
LoRa vs. WiFi Ad Hoc: A Performance Analysis and Comparison

With increasing demand for wireless networks, the number of technologies that allow us to connect remote devices has increased as well. One of the more common technologies that allows us to connect two remote devices with each other is WiFi, which provides high power, short-range connection between devices. In order to transfer data using WiFi over a longer distance, it is common to use Mobile Ad Hoc Networks (MANETs), which provides an infrastructureless network that can be used for long range communication in the cases where infrastructure-based networks are unavailable. Another, more recent and less common way to connect remote devices without relying on pre-existing infrastructure is by using LoRa, which provides low power, long-range wireless connection. In this paper, we analyze the performance of WiFi Ad Hoc and LoRa networks using Network Simulator 3 (ns-3) in terms of delay and energy consumption required to send a file of a given size as we vary the distance from the source to the destination. In addition, we develop mathematical models for the delay and energy consumption, and compare these models with the results obtained through simulation. Our results show which network protocol, WiFi Ad Hoc or LoRa, provides the lowest delay or the least energy consumption for a given file size and distance, which can be used to adaptively select the communication protocol to optimize the network performance.