# <center><i class="fa fa-edit"></i> Installing parallel mobile wireless modem in UBUNTU 20.04 </center>
###### tags: `Drone Communication`
:::success
**Goal:**
- [x] Introduction
- [x] Tools
- [x] Checking the connection capabilities of the 4G providers
- [x] How to install parallel modems
- [x] How to use it
- [x] How to test modem's speed
- [x] How to create logging data for modem speed test
:::
---

## Introduction
Communication has a vital role in the Unmanned Aero Vehicle (UAV) system. It will impact on transmitting and receiving UAV's data to the storage. In the worst case, Poor communication may affects to the flight failure system of UAV. Hence, Using reliable communication system is mainly needed to establish a proper system for drones.
In order to provide strength internet connection during the UAV's flight mode, dual-celluler mobile wireless can be one of solutions to establish proper connectivity. Two modem will switch the connections automatically if one provider does not support the good signal condition.
## Tools
- Raspberry Pi
- Two 4G modem Huawei
- USB extender
```
Raspberry Pi OS is Ubuntu Mate 20.04
```
## Checking the connection capabilities of the 4G providers in a specified area
The signal strength of 4G providers in Indonesia has different potentials in providing the internet connections.Therefore, you can check the availability of signal strength in a certain area from this website called CellMapper.
```
https://www.cellmapper.net/map?MCC=510&MNC=10&type=LTE&latitude=-7.807502799999995&longitude=110.3428084&zoom=11&showTowers=true&showTowerLabels=true&clusterEnabled=true&tilesEnabled=true&showOrphans=false&showNoFrequencyOnly=false&showFrequencyOnly=false&showBandwidthOnly=false&DateFilterType=None&showHex=false&showVerifiedOnly=false&showUnverifiedOnly=false&showLTECAOnly=false&showENDCOnly=false&showBand=0&showSectorColours=true&mapType=roadmap
```
## How to Install parallel modems in UBUNTU 20.04
- Firstly, provide a raspberry pi which has been installed with UBUNTU Mate 20.04 operating system
- Install the modem manager via Ubuntu terminal, please copy and paste this command below
```
apt update
apt upgrade
apt install network-manager modemmanager libmbim-utils libmbim-proxy libqmi-utils libqmi-proxy
```
```
*if you want to uninstall the modem manager *
sudo apt-get remove modemmanager
```
- Plug your both modems into the raspi's USB peripheral. You need to wait a few seconds for modems to initialize the network. Also, you can extend your modem using a cable extender to avoid signal interferences
- Open your modem setting connection via terminal
```
nm-connection-editor
```
- Then, this window will appear

```
- Click an add button in the left corner
- Set to the mobile broadband connection
- Choose "APN is not listed" and type "internet" in the provided column
- Click the complete button
```
- Set to the automatically login when the Raspberry Pi is running. Follow this setting below

- Reboot your raspberry pi and wait the modem to initialize automatically
```
sudo reboot
```
## How to use it
- Plug both modems into Raspberri pi's USB peripherals
- Wait for a few seconds for modem initializing mode
- Observe the LED color to understand the modem condition
```
notes:
Blinking blue: Connecting with good signal
Blinking Cyan: Connecting with excellent signal
Solid blue : Connected to the network with good signal
Solid cyan : Connected to the network with excellent signal
```
## How to test modem's speed
Testing a modem speed aims to understand the capability of the modem when it is connected to the internet. There are various tools to measure the internet signal strength in certain area. In this case, I use a speed-test program installed on Ubuntu terminal to measure the internet connection in UAV.
- Install the speed-test program with this command below
```
sudo apt install speedtest-cli
```
- How to measure the internet connection speed
```
speedtest-cli
```

```
speedtest-cli --simple
```

## How to create data logger for modem speed test
I use shell language to create a logging system for modem speed test.If you intend to find the code, please open this github [link](https://github.com/viaoktaviani/logmodem/blob/main/modem.sh)
- Run the logging data program
```
./modem.sh
```