Multi-hop Communication between LoRa End Devices

Gateway elimination in a LoRa network could highly reduce the network installation cost. However, LoRa end devices could not overcome many obstacles with only a point-to-point communication. Thus, this research implemented a multi-hop communication in a LoRa network. One or more LoRa end devices are placed between the source node and the destination node to act as relay nodes. A simple routing based on the packet length is configured to determine the packet transmission path. As the results, the designed multi-hop communication could improve packet success rate until 2,47 times in indoor environment. Whereas, the optimum delay time for multi-hop communication is 100 ms for each hop to produce high PRR and lowest RTT.

low range. This communication system consists of a source node (transmitter), a relay node, and a destination node (receiver).
There has also been a research concerned on implementing a Mesh network using Lora [2]. However, the network used many LoRa gateways that have expensive price. LoRa gateway costs until 3,5 million rupiahs, while LoRa end device only costs 150 thousand rupiahs [11]. A LoRa network that only consists of end devices would be very advantageous, because it could highly reduce the installation cost.
The objective of this research is to build a multi-hop communication using LoRa network that consists of several end devices without any gateway. One or two LoRa end devices are placed between the transmitter and receiver to act as repeaters. This research also studied the performance difference for various hop number, delay time, and packet length. Moreover, the experiments were conducted in indoor and outdoor environment.

METHODS
The block diagram of multi-hop communication used in this research is shown in Figure  1. The communication between the source node and destination node is relayed by one or two repeater nodes. After the packet is arrived at the destination node, a feedback packet is relayed again to the source node via repeater nodes. MHz that is suitable with LPWAN regulation in Indonesia [12]. This research used a default helical antenna which is available in the LoRa module.
Because the LoRa end device is a wireless transceiver module, every LoRa end device can receive other LoRa end devices' packets and transmit packets to other LoRa end devices within its coverage. In this research, the multi-hop communication between LoRa end devices is arranged by the packet format. Every LoRa end device should check its received packets to determine whether it should relay the packet or not.
The different packet format for every hop is defined in Table 1. First, packets are sent from the source node with header "T". Then the neighbor nodes will add a trailer at the end of the packet before send it to other nodes. The format of the trailer is one character that defines the node ID, which are T for the source node, R for the destination node, Y for the first relay, and X for the second relay. Finally, every hop that has been passed by a packet makes the packet length becomes longer one byte. The addition in the packet length could simplify the routing process in multi-hop communication. Packet type 1 with no identification character in the trailer that makes it the shortest packet in the network is received only by the first relay node. On the other hand, packet type 6 that is the longest packet should be received only by source node.
The flowchart of the source node is shown in Figure 2. First, the transmitter node should build a packet contains of character "T" and the recorded time. Then the node transmits the packet and counts a timer of 2000 ms or two seconds. While in the waiting process, the transmitter node should always check its buffer to receive a returned packet. If the transmitter receives a packet during the waiting time, then the node should check the packet length whether it is the correct returned packet or not. If the returned packet is the correct packet, then the source node back to the process of transmitting next packet again.

Figure 2. Source node flowchart
The flowchart of the relay nodes or the destination node is shown in Figure 3. Destination node uses the same process as in relay nodes, because all packets received by destination node should be transmitted back to the source node. This round-trip transmission could ensure the rate of the packet transmission has the same pace with the rate of the packet reception. The process in the repeater nodes and destination node begin with checking the LoRa's buffer to receive packets. When the node receives a packet, it checks the packet length based on the correct packet format. If the packet length is the correct expected length, then the node adds one character behind the packet string that defines its node identification character.
After adding the node ID, the relay node should wait in a certain time to avoid packet collision. Wireless communication using LoRa end devices is susceptible to packet collision because every node has ability to transmit at any time and no special device to control the transmission. Therefore, this research implemented a delay time to avoid any concurrent transmission. After the delay time runs out, the node should transmit the modified packet directly and then wait for the next received packet.
The performance of the multi-hop communication is calculated from the Packet Reception Ratio (PRR). The PRR value is the ratio between the number of received packet in source node (NR) and the number of sent packet from the source node (NS), as shown in (1). The received packet that is calculated in the PRR measurement should be pre-concerted that the packet has the same content with the transmitted packet.

= × 100%
(1) Other metric used to analyze the communication performance is the Round-Trip Time (RTT). The RTT value is calculated from the average of the recorded time each packet is received in the source node (TR) diminished by the recorded time that packet is transmitted by the source node (TS), as shown in (2). The received packet that is included in this time calculation is also should be pre-concerted that the packet has no error from the transmitted packet.
= − The sketch for indoor test environment is shown in Figure 4. The first experiment tested the multi-hop communication between LoRa end devices that are placed in different rooms in the same floor. The source node was placed in Room 1 and destination node was placed in Room 4. The elevators, stairs, rest rooms, and other rooms between the source and destination node portrayed considerable obstacles for the wireless communication. The distance between Room 1 and Room 4 is 60 meters. The first experiment was conducted in several hop numbers. When there is no relay node between source and destination node, the transmission is considered as a one hop communication. Two hop communications were tested by adding one relay node in Room 2 with several payload lengths and different delay configuration. Last, in the first experiment one relay node was added again and placed in Room 3 that makes it a threehop communication.

RESULT AND DISCUSSION
The results of the first experiment that tested the indoor performance in the same floor are shown in Table 2. The payload lengths were varied between 5, 20 and 40 bytes. Besides, the delay time was also varied from 50 ms to 300 ms. The highest PRR is obtained from the transmission of 5-byte packet in two hop communication using delay time of 200 ms and 300 ms. However, the transmission yielded a high RTT. The comparison of different delay time configuration is shown in Figure 5. The experiment used payload length of 5 bytes and two-hop communication. Longer delay produces higher PRR and RTT. From the comparison, the optimum delay time is 100 ms which produces the same high PRR with other delay time but results the lowest RTT. The comparison of different hop number in multi-hop communication is shown in Figure 6. The experiment used payload length of 5 bytes and delay time of 50 ms. From the comparison, three hop PRR is lower than two-hop. This indicates that more hops could not ensure good PRR because more hop means more nodes and more traffic. The arrangement of adequate hop should be considered based on the node coverage. Then in next experiment, this research only used two hops.

Figure 6. Hop count comparison
The effect of different packet length in two hop communication is shown in Figure 7.
The experiment also analyzed two delay variations, which are 50 ms and 100 ms. Longer packet resulted in lower PRR and higher RTT. This 1% PRR decrement happened in two delay configurations. However, 50 ms delay has lower PRR than 100 ms delay, because 50 ms delay is too short for multi nodes to avoid packet collision in a wireless network. The second experiment was conducted in the same indoor environment but in different floors that makes the obstacles more impenetrable. The source node was placed in Room 1 of the fifth floor, while the destination node was placed in Room 4 of the third floor. Two-hop communication was tested by added one relay node in Room 3 of the fifth floor. The results of the second experiment are shown in Table 3. Other test was also conducted in outdoor environment, which is in housing. The sketch for outdoor test environment is shown in Figure 8. The source node and the destination node are separated by seven houses that can be considered as significant obstacles. In order to test the two-hop communication, one relay node is placed in the middle of the source and destination node. The result of the outdoor test is shown in Table 4. Significant performance of two hop communication could increase the PRR value from 8.11% to 96.63% or around 12 times for a 5-byte packet transmission with 50 ms delay. This good performance of two hop communication could cover far node with the help of a relay node. Although the RTT is also increased, the low RTT increment of only 173 ms could be compensated by the less packet errors. Good achievement in these multi-hop experiments between LoRa end devices could reduce the gateway installation in other experiment, such as [2].