Hi Ramon,
The idea is to allow the copter to roam much further than is possible with a local wifi or even 2.4GHz range but I think that you appreciate that.
The way this is achieved is for the copter to "connect" to your ground station as follows:
Pi -> 4G modem -> Service provider network -> internet -> your GCS.
Your GCS can be on your home wifi network or it can be be behind another 4G modem. Most of the configuration provided by Bernt is to manage the modem on the copter. Apart from the managing of the modem connected to the Pi the other challenge is to know what the IP address is of the GCS.
I think that Bernt assumes that users will know enough about DynDNS as he does not delve to deeply into this aspect.
I am using a Huawei 8372H-608 which is rebranded (and sim locked) by Telstra here in Australia. I think that your's is a similar device but I could only find a E8278.
This is mine: https://www.telstra.com.au/online-shop/mobile-broadband-product.cfm?flow=prepaid&device=mbb-usb-wi-fi-plus
My device is recognised as Eth1 on the Pi after being plugged into a usb port. All that is required to get it connected to the internet (assuming that it is already activated and can connect from a standard PC) is to configure the Pi to use it by adding the following lines to the /etc/network/interfaces file
auto eth1
allow-hotplug eth1
iface eth1 inet dhcp
I haven't got to the point of working out what, if anything, is required for managing the re-connection as I believe that this is handled by the device itself. I will post my findings on this later.
If your setup is the same as mine once you make the changes to the /etc/network/interfaces file your Pi should be connected to the internet.
Now all you need to do is make the connection between the Pi and your GCS. If you were trying to achieve this on your local network then all you need to do is follow the original instructions by EMLID, but because the address of your copter is not known and changes very regularly we need to employ:
- The UDP redirect program and associated configuration.
- DynDNS
DynDNS
DynDNS is a mechanism that service providers offer whereby you can have a "fixed address" in the form of an internet format name even though the actual IP address of your device changes. The way this works varies slightly between service providers but some software on your device contacts the DynDNS service/system regularly and identifies itself. The DynDNS service reads the IP address and then links the IP address to your fixed address. So your copter will try to make a connection with your DynDNS provided name - see this line in the udp-send.sh script file:
ip = `dig +short YOUR_GCS_DNS`
You need to set up a DynDNS account and replace "YOUR_GCS_DNS " text with the address that you have been give/chosen when setting up DynDNS. The command returns the IP address of the GCS and the copter knows how to connect.
But ... while doing your homework on DynDNS you should also understand "Port forwarding" and "Network Address Translation (NAT)" as it is likely that you are going to have to configure your router on the network which is running your GCS.
My suggestion is that you use a standard Windows PC connected to your Huawei being on the "outside" of your home network and using DynDNS make sure that you can connect to a PC on the inside of your home network. Once you have that working then revisit Bernts posting. Ultimately I think that we require a modified "checkifonline.sh " script as we won't be using uqmi.
Hope this helps ...