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.
You only have to open ports on the receiver side when using UDP protocoll.
So, if you try to stream from your Drone towards your Home router, then you need to open ports for telemtry and video in your Home router.
If you streaming towards an laptop with 4G dongle attached, then you need to open neccessary ports for telem and video in your laptop dongle web interface.
If your cell operator is blocking those ports, you need to ask your operator for a diffrent APN address. APN controls the network security layer.
Default APN usually never allow users to open ports.
google (operatorname and public APN)
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?
I never had any issues changing tower while in air, and i never heard this has been an issue, so i think you will be fine.
If you loose communication to your drone, it will return to launch if Failsafe is correcly set in Mission Planner.
UAVcast also has a re-connect feature which could be usefull in such cases.
Ill keep you posted with the build, I was going to use DroneKit however decided to go with UAV Cast
Cool, keep me posted
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.
The key thing is: Use correct APN address, use DNS to translate your IP(not neccessary if you get static ip)
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)... 188.8.131.52, 64:ff9b::b91f:1285
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|184.108.40.206|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26132 (26K) [text/plain] Saving to: ‘40-usb_modeswitch.rules’ 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 ? :D
Thanks for sharing.