APM Telemetry using an Android Smartphone

3689609712?profile=original

A big enabler for UAVs going forward, especially with respect to commercialization, will be improving telemetry range. On that note, I've released my MAV Downlink Android application and associated tools today.

MAV Downlink opens up a new communication pathway for you to talk to your UAV while it is on a mission. This pathway uses an on-board Android smartphone to push MAVLink communications onto the Internet, then adds an intermediate server that hosts these communications and binds them to interested Mission Planner applications.

3689609641?profile=original

Pictured above is the general gist of the application.

I have been using it for the last few months to be able to communicate with my Sky Hunter in flight at essentially any range as long as I am at a field with good cellular service.

I know this idea isn't totally unique as there are several guides on how to enable UAV telemetry using cellular modems. To my knowledge, though, this is the first application that enables you to accomplish this easily using an old Android smartphone you probably have laying around. The big gotcha is that the smartphone must have an OTG compatible USB port. Fortunately, there are many cheap phones with these, notably the Galaxy Nexus:
http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2050601.m570.l1313.TR0.TRC0.H0.Xgalaxy+nexu&_nkw=galaxy+nexus&_sacat=0

Right now, this application requires you to run your own dedicated server to host communication between the onboard smartphone and your MAV mission planning application. It also sends MAV commands in the clear with no authentication or encryption over public wireless airwaves. As such it is only really useful for hobbyists with good knowledge of networking.

It has also been brought to my attention that the Pixhawk cannot be connected to a standard Android phone via OTG. You may be able to put together a custom powered hub that connects to the Android phone but I cannot make any gaurantees. This has been tested on APM 2.6 and 2.5 boards.

I would like to develop this application further by adding dedicated servers so that virtually no set-up is required on the end-user's side. This would also enable me to add authentication and encryption to the communications channel so people using this do not risk their UAV being hacked.. no matter how unlikely that might be.

However, it works fine for me right now. Before I put any effort or money into improving it, I wanted to gauge public interest in it. Please let me know if something like this interests you by dropping a comment below.

You can try the application now. Here is a link to the Android application:
https://play.google.com/store/apps/details?id=com.appliedanalog.uav.mavdownlink
And the users manual:
http://www.applieduas.com/mav_downlink_advanced_manual.pdf

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Yeah that shouldn't be too hard. If you are familiar with Java, you can just pull the code and make a new Endpoint; perhaps called "UdpSocketEndpoint" that would look similar to this:

    https://github.com/neonbjb/MAVDownlinkServer/blob/master/IOEndpoint...

    But use Multicast sockets instead of regular sockets. Then you can just use that new endpoint in the MAV Downlink Server application that you run on Windows. If you wanted to modify the app running on the drone to use UDP you would just need to make a similar modification to that code (the Endpoints library used is identical):

    (replace IOEndpointSocket in this code)

    https://github.com/neonbjb/MAV-Downlink/blob/master/src/com/applied...

    Not sure if that helps..

    neonbjb/MAVDownlinkServer
    Provides a server interface for the MAV Downlink Android Application - neonbjb/MAVDownlinkServer
  • James,

    Any thoughts on how to switch this solution from TCP to UDP?

    APM Planner seems to panic when it loses TCP briefly, and won't reconnect. I figure UDP would accept the occasional glitch in the connection happily, and just keep displaying whatever data makes it.

    Nick

  • James, have there been any updates to your codebase here?  Are other commenters still using this for MAVLink over 4G/LTE?

    I'm extremely interested in telemetry/control via LTE to DroidPlanner on my Nexus 7.  I have one quadcopter with a Pixhawk and one APM 2.6 soon to be on a flying wing.  Hoping I can set up both with MAV Downlink!

    Best,

    Brennan

  • I'm using it with apm 2.6 however sometimes it loses the connection. But I really appreciate your work and am waiting for udp connection which is faster and more reliable.

    For video streaming, why not use just skype and onboard camera? It works pretty good..

  • I flew 2km from launch on Saturday with a solid telemetry link. Nice to not be tied to the range of the radio.

    MAV Downlink is working quite well - it's the reliable half of the connection. APM Planner isn't great with TCP if its network connection is flaky, and DroidPlanner is even worse, but your client and server seem pretty solid.

  • Glad it worked out for you! Cheers.

  • Hi James, this is great - I had been messing around with dronecell for a few weeks (and was still a few weeks away from completing it). I got your solution working over a mobile connection within about an hour - I've got a nexus phone in my Sky Eye and the server software running on my home PC. I've tested it using Mission Planner on my PC and also droid planner running on an android tablet. The only tricky bit was getting the port-forwarding and firewall settings right.

    Cheers, 

    Lester

  • UPDATE: I got it working with mobile internet! The problem is when, once the connection is established, the mobile app changes its connectivity. I tried shutting off wifi (or turning on) and the connection is lost and not recovered.

    I started the app with my wifi off, and connected without problems. Even when the app crashed and restarted it resumed the connection.

  • @Nick, I use only one PC, with the mapper and mission planner.

    I guess the problems is with the connection between the mapper and mission planner. Sometimes it works sometimes it doesn't.

    The MAV downlink connects always with the mapper, and the messages are getting there (I see the counter working).

    I use 9999 for downlink and 9998 for planner and mapper.

  • @ivan So you're running MP and MAV Mapper on the same machine on your home network, and can't connect one to the other? Or are they on different machines? If they're on different machines, are those machines on the same network?

    I have tested with 2 configs:

    At home:

    • APM Planner running on a laptop connected to home network via Wi-Fi
    • MAV Mapper running on a server on the internet that I control
    • MAV Downlink running on Android phone connected to home network via Wi-Fi, plugged into APM

    In the field:

    • APM Planner running on a laptop tethered to my main smartphone, accessing the mapper over cellular network
    • MAV Mapper running on a server on the internet that I control
    • MAV Downlink running on Android phone connected to cellular network via 3G, plugged into APM

    Are you using port 9998 from MP and port 9999 from MAV Downlink?

This reply was deleted.