OK, there is a lot of discussion about this topic. There are also some solutions (dronecell, phonedrone: http://store.diydrones.com/PhoneDrone_Board_p/br-phonedrone.htm ) but for me these solutions did not satisfy my expectations. So I started to develop a more simple set up. But there are still some points for improvement.
1) The philosophic question, should the drone act as server or client?
Thinking a lot, I believe the drone should act as server, so the login procedure is done on the ground. There are other arguments as well.
2) The Protocols TCP or UDP:
In theory the best way is to use UDP. For now, I decided to go with TCP since the components are ready.
3) The Parts:
APM, Bluetooth Modul, Android mobile/handset (xperia / nexus) and a Notebook with Mission Planner and a Browser. That’s all.
4) The Telemetry over 3G Setup:
4.1. Connection between APM and Android:
These problems drove me nuts (the phonedrone board is cool, but for me too expensive). So I decided to use a serial connection with the help of one of these 7$ HC-06 (S) Bluetooth moduls (https://www.google.at/search?q=HC-06+bluetooth).
HC-06 comes in two styles: master or slave. I think the client one fits better. There is a HC-05 as well that could act as Client and as Server (http://cxem.net/arduino/download/HC%20Serial%20Bluetooth%20Products...)
Hooking up HC-06 with the APM I is similar to the xbee connection (http://code.google.com/p/ardupilot-mega/wiki/APM2Wireless). The HC-06 needs a 3,3V input so you have to ad a 1K resistor here (RX, TX, Grnd works without). There is also a mysterious HC-06 v1.04 which should accept the 5V input-power of the APM without resistor as well.
4.2. Android Mobile/Handset:
For my testing I used a sony xperia. A nexus would be better. In the long run it is easier to change the kernel (settings and so on). For Video transmission the camera of the handset is important as well.
4.3. Data Plan:
If the Drone is acting as the Server, a data SIM with open ports is needed (else you has to set up your drone as client). This is difficult to find. In my country 3G internet is common. It is a standard option (big thanks to drei.at). For video you should also use a flat rate SIM.
4.4. Connection APM – Xperia – Internet – Mission Planner:
At first I wanted to write the code myself … but you know:
4.4.1 Bluetooth SSP – android – tcp/ip connection:
I found two APPs in the Android Google Playstore:
GetBlue Demo: https://play.google.com/store/apps/details?id=com.tecit.datareader....
The setup of GetBlue was easier but it is a Demo version and you just can use it for free for 90 days but it should work longer … great piece of software, btw.
a) Configuration/Bluetooth (Pair devices, Connect Automatically)
b) Configuration/Network/TCP server (Port, Integrate with Bluetooth)
Then start server and you are all set. Now you have to figure out the IP address of your handset. You could see it as Local IP on the Dynamic DNS Client.
Dynamic DNS Client:
4.4.2 Optional: Use Dynamic DNS Client to give your handset/drone a Domain Name:
Use one of the common DNS services (http://en.wikipedia.org/wiki/DynDNS eg. http://dyn.com/dns/)
I also use Dynamic DNS Client:
OK, NOW YOUR BIG MOMENT:
… Start your APM
… Start Dynamic DNS Client
… Get your IP address
… Start GetBlue or Connection Terminal
4.4.3 Mission Planner:
a) So your PC/Notebook should be connected with the internet.
b) Then you should check if the TCP Port (which you use in GetBlue or Connection Terminal) of your PC/Notebook is open. If not, you have to check your firewall and/or router.
c) Ping your Mobile/Drone IP or Domain Name.
d) Start Mission Planner, connect over TCP (add the IP and the PORT of your Mobile/Drone) and …
… you should see your MAVLINK over IP data coming in.
5) The Video over 3G Setup:
For Video I also use the Cam-Modul of my Android Handset and an APP of the playstore.
IP Webcam (free):
IPCam Pro (1,49$):
a) Start IP Webcam
b) Start Browser on your PC/Notebook
c) Add your IP and Video Port: e.g. http://xxx.xxx.xxx.xxx:8080 or http://xxx.xxx.xxx.xxx:8000, and …
… you should see the VIDEO of your android mobile/handset coming in.
(Using IPCom on 3g/HSDPA with VLC I have a delay of 1-2 sec but with Browser and building Videocodec only 0.2 - 1.0 sec !!!)
Using UDP and/or Client setup.
… that is it. Hopefully we will see more androids in the sky. best .cj.
christian joachim gruber
up and running now? Is it a limitation of "Windows 7 Home"? I run my VPN server on my router (but is more a full featured linux machine, excito). In my case, i have to use openvpn 2.x because 1.x was also couldn't handle parallel connections. I can hardly wait for arducopter 2.9.2 ...
i use Windows 7 Enterprise with no limitation in network infrastructure but this is still a problem. You use router with custom firmwire like DD WRT or similar? i see that the DD WRT support in some devices PPTP Server feature. Now i am trying an old Linkys VPN router wich support PPTP Server and parallel connections. We will see.
You have ever use external Vpn server, (a cloud service) to connect the two parts with an outside(out of your home network) host server?
i justify that the routers with DD WRT firmware offer VPN server feature with which you can set multiple clients to connect on router simultaneously. It works perfect!
I have been very interested in doing something much like this with a dronecell on a hexcopter, im glad to hear you have managed to acheive this. Do you think i would have to alter the arducopter code for the link between the dronecell and apm for it to work properly?
@ Max. This is a setup, where no code changes need to be done. If you want to use dronecell, there is an excellent group/team which is working on that.
@Thalis, Glad to hear that you could setup VPN with the help of DD WRT. Did you change your phone, or do you still use the mini? I am a little bit angry about sony, because the didn't solve the BT bug in 4.0.x and in 4.1.x either ... grrhhh, so my VPN setup is still on wait! Also waiting for arducopter 3.0.0 ... then i will reactivate my video/telemetry setup again.
Oh okay excellent, would you mind linking me or giving me some information on the group?
@cjg. no i still use the mini xperia but i will upgrade the system with an lg O2X. i don't care for bugs because i flashed on them custom ROM with many fixes from the stock rom! The DD WRT pptp server offers parallel vpn connections without issues, i recommend it! In test mode i understood that using better mobile phones with good hardware the whole consumption is much lower! (consider that i want to use vpn conn, web camera server and vnc server for handling the device....too much load).
@Max. try the project that is demonstrated here and then check this group in this link.
... good point. i ve to admit, i never looked at cpu-power. My love for the POS sony is, they are small, lightweight and waterproof. I am thinking to switch to a beaglebone black, but there i has to use an extra camera ... but maybe i will add an asus xtion pro (but don't know the weight) ... but maybe, the time has come to load a custom firmware ...
... best .c
Please correct me if i am wrong,
is it possible to build this kind of setup:
APM telemetry port (GND,tx,rx,vcc) >>>> FTDI >>>OTG >>> android phone (usb host) >>> andorid app that till relay from serial to tcp or udp(help me to find one except getblue)
i think it is much better solution than use of bluetooth inside of aircraft.
i will try today or tomorrow to setup this , but please correct me if this is even possible, i am IT guy weak in electronics.
Hey I just did this except without FTDI, I used the APM 2.5's onboard usb interface connected directly to my phone via usb otg. The app I used was TCP_Serport which seemed to have trouble picking up the usb initially but once it did was rock solid. I put a vid of it working up on youtube here.
Wow I sound like a nerd when I fit that many acronyms into a single post :).
HI, i can ping my local ip, but I can't get a mavlink connection, don't know why, I set port at 5000
Nice. Did you have/see "potential" issues between the two powersources
b) Android Mobile?
I don't know anything about (a backloop), i always was concerned about this. If you know something about this, please contribute, thanks.