Signal Strength Logging Repository
Overview
Logs the LTE signal strength of the drone to a file.
Repository:
https://github.com/UWARG/signal-strength-logging
Software
Setup
Clone the repo to the user directory:
cd ~/
git clone https://github.com/UWARG/signal-strength-logging.git
cd signal-strength-logging
Setup the virtual environment:
[python 3.8] -m venv venv/
(seeAutonomy Workflow Software under Setup → Language Setup → Python and virtual environment for more information)
Install requirements: pip install -r requirements.txt
.
Usage
Prerequisites:
The username and home directory of the computer used is
warg
If it is not, change the username and home directory: https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-rename-linux-users-and-their-home-directory/
Copy the contents of rc.local.copyme
to /etc/rc.local
.
Modifying
/etc/rc.local
requires superuser access (e.g.sudo
)Line 3 may be edited to specify the path where the
venv
lies if it is not the same.Line 5 may be edited to specify the path where the script lies if it is not the same.
Set SERIAL_PORT
to the correct device path of the modem. (It is usually /dev/ttyUSBx
where x is a number)
Set BAUDRATE
to the modem’s serial baud rate. (It is normally 115200 by default, but it is good to double check)
Use an external drive (e.g. USB flash drive) as the output file path because the RPi is write-protected (nothing will save).
The code should now automatically begin running when the Raspberry Pi boots up.
Hardware
The Raspberry Pi on the drone has been configured to wait 20 seconds for things to connect before booting up. There is a 20 second delay for the RPi to connect to the LTE network and other such setup things, but
rc.local
will run before this 20 second delay has finished. Hence, there is a 20 second delay in the script at the beginning (mainly because the USB drive has not been mounted yet).
LTE hat/modem (SIM7600G-H). See LTE Documentation for more details.
The current method of sending Mavlink data is no longer through Zerotier as mentioned in the doc, but through another free online server running https://github.com/mavlink-router/mavlink-router, which relays the data.
Â