Created
May 6, 2020 14:13
-
-
Save s0ftice/491ad5cc99a69cba15bb884384670d43 to your computer and use it in GitHub Desktop.
How-to setup a zerotier moon for the Parrot Disco/Bebop 2 UAVPAL 4G/LTE softmod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### SERVER SETUP @ Home/Cloud Linux Server (here Debian 9) | |
echo "deb http://download.zerotier.com/debian/stretch stretch main" | sudo tee /etc/apt/sources.list.d/zerotier.list | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1657198823E52A61 | |
sudo apt-get update | |
sudo apt-get install zerotier-one | |
sudo zerotier-idtool initmoon /var/lib/zerotier-one/identity.public >moon.json | |
nano -w moon.json | |
# change the line | |
"stableEndpoints": [] | |
# to your public and static IP and port 9993, e.g. | |
"stableEndpoints": [ "1.2.3.4/9993" ] | |
sudo zerotier-idtool genmoon moon.json | |
# expected output: "wrote 0000000123456789.moon (signed world with timestamp 1572791609983)" | |
sudo mkdir /var/lib/zerotier-one/moons.d | |
# change 0123456789 in the command below to the output of the earlier "zerotier-idtool genmoon" command | |
sudo cp 0000000123456789.moon /var/lib/zerotier-one/moons.d | |
sudo chown -R zerotier-one:zerotier-one /var/lib/zerotier-one/moons.d | |
# Add port-forwarding/open firewall on 9993/udp | |
sudo service zerotier-one restart | |
### NOTES: ### | |
### 1. If adding additional servers to a moon "cluster", the /var/lib/zerotier-one/moons.d/*.moon file has to be copied to all | |
### other moons manually. | |
### Clients will automatically get updated! | |
### | |
### 2. If a client is using a moon(-cluster) and none of the moons are available, no relayed connections will work! | |
### CLIENT SETUP @ Parrot Disco/Parrot Bebop 2 with UAVPAL 4G softmod installed (inside telnet session, with active 4G connection) | |
# change 0123456789 in the command below twice to the output of the earlier "zerotier-idtool genmoon" command | |
/data/ftp/uavpal/bin/zerotier-one -q orbit 0123456789 0123456789 | |
# expected output: "200 orbit OK" | |
/data/ftp/uavpal/bin/zerotier-one -q listmoons | |
# wait some time if the command above only lists "[]", and try running it again. You should see several lines of output before you continue | |
# make sure SC2 is connected in Wi-Fi mode (green) | |
/data/ftp/uavpal/bin/uavpal_sc2adb.sh | |
mkdir /data/lib/zerotier-one/moons.d | |
exit | |
/data/ftp/uavpal/bin/adb push /data/lib/zerotier-one/moons.d/*.moon /data/lib/zerotier-one/moons.d | |
# expected output: "36 KB/s (259 bytes in 0.006s)" (numbers can vary) | |
# restart Disco/Bebop 2 and SC2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment