# A Visitor Assistance System Based on LoRa for Nature Forest Parks
## 2 Contribution  
This work is based on the CenWits [7] project, a system for locating and rescuing people in wilderness areas. In CenWits, each hiker wears a MICA2 sensor more equipped with a GPS receiver and an RF transmitter, operating in the 900 MHz range. Each sensor is assigned a unique ID and maintains its current location based on the signal received by its GPS receiver. It also emits beacons periodically. When any two sensors are in the range of one another, they record the presence of each other (witness information) and also exchange the witness information they recorded earlier. The key idea here is that if two sensors come within range of each other at any time, they become each other's witnesses. Later on, if the hiker wearing one of these sensors is lost, the other sensor can convey the last known (witnessed) location of the lost hiker. Furthermore, by exchanging the witness information that each sensor recorded earlier, the witness information is propagated beyond a direct contact between two sensors. To convey witness information to a processing center or a rescue team, access points are established. Whenever a sensor node is in the vicinity of an access point, all witness information stored in that sensor is automatically dumped to the access point. From this system, our work adds a communication protocol, in which the sighting record is one of the messages. This protocol uses an initial handshake to optimize communication. Seven types of messages are created additionally to the sighting record to allow medium access control; filtering the data to be sent, reducing energy and time spent on transmission; active help request; and dynamic and transparent organization of groups. After propagation tests were carried out in the forest environment, briefly described in Section 4, LoRa technology was chosen for the physical layer. This technology, besides presenting the best performance in the forest among all those tested, also has a very interesting feature: the possibility of communication using different spreading factors (SF) without interfering with each other. Thus, taking advantage of these characteristics, we developed a medium access control mechanism that uses a common signaling channel with SF12, and other channels for data exchange using the other SF. Each terminal announces its presence on the common channel by sending a beacon. Once two terminals enter each other's coverage area, the handshake is initiated. One of the parameters agreed in the handshake is the SF of the channel to be used for data exchange. The choice is based on the quality of the received signal. However, before transmitting, the terminal listens to the chosen channel, in a mechanism similar to Clear Channel Assessment (CCA) to avoid collisions. In CenWits, memory management is made using two parameters, the time of creating a record and the number of hops the record has already passed. However, these parameters are used only locally. In our project, these same parameters are used as metadata together with a new parameter that limits the maximum quantity of records, informed in the handshake, to describe the type of data that the terminal wishes to receive. So before sending records, the data is filtered, reducing time and energy spent on transmission. As communication is opportunistic, using the limited contact time efficiently is essential so that the data load offered to the network can be actually drained. Transmitting only the data that is requested also contributes to intelligent energy management, reducing battery consumption. Finally, a shorter transmission time also reduces channel occupation and, consequently, the probability of collisions. The help request is an active signaling option on the part of the user who needs help. Thus, it is possible to attend to emergencies in which the visitor with problems, despite being in the coverage area of another node, is not visible or is not identified as being at risk, when in reality he is. So, he is more quickly rescued.