Low-cost wireless mesh communications based on openWRT and voice over internet protocol

Technology makes it easier for us to communicate over a distance. However, there are still many remote areas that find it difficult to communicate. This is due to the fact that communication infrastructure in some areas is expensive to build while the profit will be low. This paper proposes to combine voice over internet protocol (VoIP) over mesh network implemented on openWRT router. The routers are performing mesh functions. We set up a VoIP server on a router and enabled session initiation protocol (SIP) clients on other routers. Therefore, we only need routers as a means of communication. The experiment showed very good results, in the line-of-sight (LOS) condition, they are limited to reception distances up to 145 meters while in the non-line-of-sight (NLOS) condition, they are limited to reception distances up to 55 meters.

networks. This step leads to the growing importance of VoIP. VoIP in MANET needs session initiation protocol (SIP) for signaling [9]- [12]. B.A.T.M.A.N. stands for better approach to mobile ad hoc networking, is a routing protocol for MANET. B.A.T.M.A.N. can be installed on a router that has openWRT installed so that it can use mesh networking. B.A.T.M.A.N has a better performance than optimized link state routing protocol (OLSR) regarding packet loss metrics. Packet buffering is used by B.A.T.M.A.N unstable routes. However, delay is still increasing [13]- [17].
Therefore, in this research we try to facilitate both short and long-distance communication in remote areas using VoIP combined with a mesh network. The mesh network function is to establish networks between routers independently. This research tries to create a VoIP server and SIP client on a router, so we only need a router as a means of communication. The use of a router for communication is inexpensive, a router used in this research cost only 18 United States dollar (USD).

RESEARCH METHOD
The research begins with designing an operating system that can be used on a TP-LINK MR3020 router. The design of the operating system consists of selecting the packages needed and eliminating unnecessary packages. The required packages, namely B.A.T.M.A.N, Asterisk, batctl, baresip, and ASIAN Law Students' Association (ALSA) to create a stable operating system and minimum storage usage. Next step is to install operating system. OpenWRT is used as the operating system. OpenWRT is a LINUX-based operating system (OS) that can replace the default OS of a router. The function of OpenWRT is to facilitate users in order to maximize the router utilization. The unique feature of OpenWRT is that it is a writeable root file system, users can change the root of the router system, modify any file, and easily install software [18], [19]. OpenWRT has used in communication projects in remote areas, namely Village Telco project [20], Wray project in England [21], AirJaldi network in India [22], Pebbles valley mesh network in South Africa [23], and Tegola mesh [24], [25].
There are two router systems used in this research, the first one is the router system that is used as a server, the router will be installed with an asterisk as a telephone control center, here we can register the phone number we want so that it can be used by the SIP clients later. The second router system is an SIP client, this router is used to call one router using another router. This router will have a universal serial bus (USB) soundcard that is used for sound input and sound output. All installed routers will be integrated with mesh network. The relationship between the server and all stateful packet inspection (SPI) clients can be seen in an overview in Figure 1. The first step to use a router as a server is compiling openWRT firmware which will be installed on a router. Compiling the OpenWRT firmware must be done on a computer with a Linux operating system installed. In this research, the authors use Ubuntu 18.04.3 long term service (LTS). To design OpenWRT, we must determine what packages are needed in this research. For the server router we used asterisk15, batmanadv, batctl, asterisk15-chan-sip, asterisk15-res-rtp-asterisk and luci. Asterisk15 is the main package of the VoIP server that we want to build, while asterisk15-chan-sip and asterisk15-res-rtp-asterisk are the modules that must be installed for the VoIP server to work. Batman-adv is the main package for building a mesh network, while batctl is a package that can configure batman-adv. Basically, compiling the OpenWRT firmware for SIP clients is the same as compiling the openWRT firmware for the server, the difference is the packages that are filled in the firmware, the required packages are batman-adv, batctl, luci, baresip, baresip baresip-mod-alsa, baresip-mod-cons, baresip-mod-evdev, baresip-mod-g711, baresip-mod-stdio, baresip-mod-uuid, alsa-utils, alsa-libs, kmod-sound-core, kmod-usbaudio, kmod-usb-hid, kmod-hid, kmod-hid-generic. Baresip is a modular SIP client, baresip itself requires several modules such as mod alsa so that baresip can work with alsa, mod g711, so that audio codec can be used and so on. Alsa-utils is a package from ALSA to run voice commands, while alsa-lib is a library of ALSA itself. Kmod-sound-core and kmod-usb-audio are the kernel modules used so that router can accept input from the USB Soundcard. Kmod-usb-hid, kmod-hid and kmod-hid-generic are the kernel modules used so that router can use a USB keypad.
After openWRT has successfully installed, the next step is to configure router so that it can recognize other routers and the router can be used as a server or SIP clients. The configuration carried out on server, namely phone number registration, password, and what the server does when it gets an incoming call in the form of an invite. Meanwhile, the configuration carried out on the SIP client, namely phone number registration that will be used by the SIP client and sound driver configuration. In this research the authors use the ALSA driver. A flowchart representing all process can be seen in Figure 2.

RESULTS AND DISCUSSION
The prototype of the router can is shown in Figure 3. Server router controls incoming calls and outgoing calls, this router decides whether the incoming calls are in the network system or not. The problem with the MR3020 router is its small capacity so that additional memory is needed in the form of a flash disk. The flash disk that has been formatted into ext4 and linux swap format functions as additional random access memory (RAM) so the routers can do optimal work. The SIP client prototype is the same as the router server, it only has a few additions. The first is the additional memory in the form of a flash disk. Second, SIP client requires a USB soundcard to support audio input and output. The USB soundcard connects to a microphone as audio input, and a speaker or headset as audio output. The third is the USB keypad, this keypad functions as an input command for router such as picking up a phone call, inputting the number, and hanging up a phone call.
Tests are carried out to determine the effect of a hop on the mesh network performance. The test conducted by placing nodes with a certain distance in condition of no obstacles such as walls, trees, this condition is called line of sight (LOS). LOS testing is carried out in II street, Institut Teknologi Bandung. This can be seen from Figure 4(a). Then the next condition is to put nodes with a certain distance across a path that is partially obstructed by obstacles, this condition is called non line of sight (NLOS). NLOS testing is carried out in physics building, Institut Teknologi Bandung. This can be seen from Figure 4(b). Both tests are carried out in the morning from nine to eleven.  The parameters tested are throughput, download rate, ping time and packet loss. Throughput is the number of bytes that can be sent at certain interval, in this study the authors set ten seconds interval, from the throughput data we will get the download rate data in unit kilobits per second (Kbps). Throughput and download rate tests were carried out five times and the average value was calculated. Ping time is router response times. When a router wants to calculate the ping time from router A to router B, router A will send a packet and router B will respond by sending a packet back, ping time shows how fast this process happened. While packet loss is the packets that fail to arrive at their destination.
In this study, the authors measured throughput and download rate using stationary router with multi-hop scheme for maximum four hops. Throughput and download rate data showed router performance regarding their ability to send data from one node to another. Figures 5 and 6 shows that an increase in hops caused a decrease in the value of the throughput, this means that the number of hops affects the router performance in sending information. In the first hop, for LOS, the throughput value is 8.648.474, while the download rate is 6666 Kbps. In the second hop the value decreases to 2.038.356, while the download rate is 1584 Kbps. The value of throughput will affect the amount of traffic that can pass through the router, in VoIP server, it determines how many calls can occur. The first and second hop consider capable of making 10 calls simultaneously, but third and fourth hop only able to make 3 calls simultaneously. NLOS data can be seen in Figure 5, in the first hop, the throughput value is 18.212.659, while in the third hop the throughput value decreases to 2.081.750. The graph shows decreasing throughput and download rate value in line with the number of hops. From the data above, the NLOS conditions are better than the LOS conditions. But the data is taken at the different distance between routers. The maximum distance between routers that could be tolerated in NLOS conditions was only 55 m while the maximum distance between routers that could be tolerated in LOS conditions was 145 m. This was a good result when compared to a similar reference data, where the maximum horizontal distance between routers that could be tolerated in NLOS conditions was 40 m while the maximum horizontal distance between routers that could be tolerated in LOS conditions was 52 m [26]. All graphs obtained have similar shape to the reference [26]. Improving the throughput data, can be done by adding an external antenna to the router. Antenna will help router to send and receive signals better, or simply replace the router used with a router that has a better antenna reception. Ping time is time needed to send and receive a response from one router to another router. In this study, the authors sent 120 packets data from the server router to client. It can be seen from Figure 7 that in the first hop, the ping time value is 7 ms, then in the third hop the ping time value rises to 16 ms and reachest 31 ms in the fourth hop. The more hops, the longer time needed for the packet to be received. A high ping time value produced a pause voice during a call. The NLOS ping time data is no more than 7 ms, which can be seen in Figure 7. This is due to the close distance between each router in NLOS conditions.

Figure 7. Ping time data
Packet loss is the packets that fail to arrive at their destination. There are 120 packets sent. It can be seen from Figure 8 that more hops generate more packets fail to reach their destination. In the first hop, the LOS packets failed no more than 1%, but in the fourth hop there are 20 packets or 16% of the total packages failed to arrive at their destination. This generated an intermittent issue during calls. The packet loss data in NLOS conditions is no more than 2%, this is due to the close distance between each router in NLOS conditions.

CONCLUSION
In this research, short and long-distance communication in remote areas using (VoIP) combined with a mesh network is implemented. In this research, we set up a VoIP server along with an SIP client on a router, therefore only needed a router as a means of communication. Several parameters measured to test its performance, namely throughput, download rate, ping time and packet loss. The highest throughput value is Wall affects the performance of the router, it can be seen that in the LOS condition, the total distance between each router is 145 meters while in the NLOS condition, the total distance between each router is only 55 meters. Router can be used as a VoIP server and SIP client. The SIP client prototype is the same as the router server, it only has a few additions, namely a flash disk, a USB Soundcard connected to a microphone a speaker or headset, and a USB keypad.