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).

Excursus:
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....
or http://www.tec-it.com/en/download/data-acquisition/getblue/Download...

Connection Terminal:
https://play.google.com/store/apps/details?id=app.bluetooth&fea...

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.

Connection Terminal:
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:
https://play.google.com/store/apps/details?id=org.l6n.dyndns&fe.....


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/)

eg.: mydrone.dyndns.com

I also use Dynamic DNS Client:
https://play.google.com/store/apps/details?id=org.l6n.dyndns&fe.....


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):
https://play.google.com/store/apps/details?id=com.pas.webcam&hl=de

IPCam Pro (1,49$):
https://play.google.com/store/apps/details?id=christoph.nikolay.and...

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 !!!)


6) Future:

Using UDP and/or Client setup.


… that is it. Hopefully we will see more androids in the sky. best .cj.



christian joachim gruber
[meta]contemporary art/s


Views: 16164

Reply to This

Replies to This Discussion

cjg please PM me, i get the module and i think that some configuration is required before.please!

the test shows that it works fine! very fast and full functionality! excellent project!

Sorry, didn't read your post.

But i am happy, you have been sucessful. Today i tested my telemetry over 3G setup with andropilot and/or droidplanner with a TCP-Link on a xoom (android 4.0.2) as GCS. Onboard i usesd a BT modul, a sony xperia (android 2.3.7) and spp mirror (thanks to jeff).

Best C.

Attachments:

update: sony xperia (android 2.3.4)

the same setup but with xperia mini x10! i shared photos in my album profile page. i use also a vnc server-client to handle remotely the android phone. there is also a feature with which you can set the ip webcam of android phone as a native device of your pc and then you can integrated into the planner HUD.

anyway is excelent job...one last feature for improvement is a way to see in hud the signal quality of the android phone in order to justify that you are in a 3g area network. thanks!

wow, to add vnc is neat. Thanks for the hint of the native device. I don't know which BT app you use, but if you have time, could you test the free "spp mirror" as well? It should be more safe, because of the BT auto-reconnect feature ...

i use spp mirror too with great yield. an other question...with your openvpn you use encryption, i ask beacause with traditional connection with allowing incoming calls (network settings) i faced some times with messages like busy server or similar, after disable encryption worked fine. you have any idea?

an other tip in auto reconnect is the VPNROOT app( vpn client ) which offer auto reconnect.

an other useful topic is to find the way to connect an external webcam HD like logitech pro 900 or c920 to your android device and use it as the primary cam. do you know anything for that?

@vpn ... my problem is the spp part, because my smartphones, which i used for testing are either 2.3.4 or 4.0.4 and the official vpn stack is implemented in 4.x ... only my lovely xoom could handle both (but it's a tablet) ... maybe the JB update of my xperia solve this problem ... we will see in the near future... didn't root my lovely active either ;)

@webcam ... funny my indention of this setup was to reduce parts and use the build in camera ... so to add an webcam, grrrh ... but with an USB OTG cable, you should/could use UVC cams (http://www.ideasonboard.org/uvc/) ... you could test it with this app (http://www.sendspace.com/file/hl9a6u), but be careful, because it is not a google play app

best c.

the features of c920 or other hd webcameras are similar with these of gopro but in the one third of the price. think about that!

for the vpn i have already root the phone and flash a miui version with built-in vpn support!

i like this project! if you have any new feature to assist with android phone the Ardupilot please post it!

i want to add an interest but warning point. if someone try to setup a vpn network with two devices must take into consideration that through your windows home pc you can't handle two parallel connection. the fisrt time my laptop had internet connection through a the wifi of my house but when i tryed outside to connect to my vpn "server" there was no way to connect simultaneously. Now i will try with a vpn router extra( because i already have one) but i think that openvpn could solve this warning with no issue and need for extra equipment. CJG is it right?

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service