Server Deployment Instructions
- Package Installation:
- Create a catkin workspacemkdir -p ~/catkin_ws/srccd ~/catkin_ws/src/
- Clone the repo into
catkin_ws/srcgit clone https://github.com/whomihirpatel/4G-Networked_Robots.gitcd 4G-Networked_Robotsgit submodule update --init
- Build the workspace and activate itcd ~/catkin_ws/catkin_makesource ~/catkin_ws/devel/setup.zsh
- Web Hosting:
- Installation instructions for NGINX web server can be hound
- folder configuration files which can be used as a tempelate.
- Detailed Instructions on front-end hosting, database listing and routing VPN traffic are given in the folder.
- VPN Hosting:
- Installation instructions for VPN Server can be hound and
- Make sure to generate a unique client certificate for each robot and assign a static tun0 IP for each client.
- update the
server.confto allow inter-client communication and allow static IP assignment by adding following lines:ifconfig-pool-persist ipp.txtclient-to-clientpush "route 192.168.4.0 255.255.255.0"
- A front-end minimal website is developed. It can be used to connect robots to server, visualize data, check log and see server_database.
- Further instructions on front-end is given in folder.
- Some html snippets are taken from
Connecting Robots to the server
If you are using robots connected to wifi and can allow incoming web-socket traffic to your robot, you may skip to next step
If you are using robots conencted to cellular network or have incoming traffic blocked on your wifi, you may to connect to the server via VPN tunnel and route the traffic on the server.
- Generate a unique CA certificate for your robot. Detailed instructions
- edit the ipp.txt file in openvpn directory and add name of your CA authority (i.e. name you used in unique CA certificate), followed by desired/available static ip.sample,10.8.0.4,fddd:1194:1194:1194::1001
- Route the VPN traffic from server port to VPN device port using commandsudo iptables -t nat -A PREROUTING -p tcp --dport 10101 -j DNAT --to-destination 10.8.0.4:9090
- Though it is advised to block external ports using
sudo ufw enableand use NGINX to reverse-proxy all traffic through port 80.
Now both, your server and robots are ready!