First of all thanks for all the info so far - My pixhawk is arriving very soon- i have everything else to get building.
I understand everything - i can see how i could get it working using WIFI on the LAN or even over a WAN with static IP's either end as p2p links are easy when IP's are local or static and you have control over firewall rules
My question is - If the 4G provider is using carrier grade NAT or blocking ports how do you connect the drone. Ideas i have is using a webserver or virtual private server (VPS) in the cloud, maybe using amazon AWS (they allow one server for free 24x7) to queue the commands. Maybe even a reverse SSH connection script on the Pi and then use a SSH tunnel to forward data.
I have a feeling when i get my 4G modem i wont get a static IP and if i do it will be NAT'd or ports blocked. Even if i do get a static IP and can connect what happens when you "change" to a different 4G network antenna during flight and the IP changes?
Ill keep you posted with the build, I was going to use DroneKit however decided to go with UAV Cast
My aim is to get it so i can boot the drone/pi, do NO work to it and it become available on the internet. Unsure how to best go about this to ENSURE the Pi is "available" on the internet regardless if NAT/FW are used by the 4G ISP.
Here is come commands that you may find useful:
Enable starting up on boot for the 3G dongle
root@kali:~# cat /etc/network/interfaces
iface lo inet loopback
iface eth1 inet dhcp
This will stop the 4G USB dongle from being mounted as a storage device instead of a modem:
root@kali:~# wget https://raw.githubusercontent.com/digidietze/usb-modeswitchdata/master/40- usb_modeswitch.rules
--2015-11-22 02:27:51-- https://raw.githubusercontent.com/digidietze/usbmodeswitch-data/master/40-usb_modeswitch.rules
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 22.214.171.124, 64:ff9b::b91f:1285
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|126.96.36.199|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26132 (26K) [text/plain] Saving to: ‘40-usb_modeswitch.rules’
100%[========================================>] 25.52K --.-KB/s in 0.04s
2015-11-22 02:27:52 (571 KB/s) - ‘40-usb_modeswitch.rules’ saved [26132/26132]
root@kali:~# mv 40-usb_modeswitch.rules /lib/udev/rules.d/
Can you buy 4G transmitters ? 😃