Developer

Android as airborne IP router

 

 

One of the simplest ways to get IP in the air has got to be using a smartphone.

 

I want to work on Android for a couple of reasons, but mostly because you can get an Android phone, unlocked and cheap (used) anywhere in the world.

 

So... how to get the Android OS to talk to a peripheral via USB? There's a few different approaches, seen in the chart below

 

Android OSADKADBBTUSB HOST
OS < 2.2 (pre Froyo)
2.3.3 ≥ OS ≥ 2.2
OS ≥ 2.3.4 (phones)
OS ≥ 3.1 (tablets)

The PhoneDrone platform was developed primarily as an ADK (Accessory), rather than using ADB (Android Debug Bridge). The problem is that ADK is only supported in phones running Android v2.3.4 and above, with a linux kernel of 2.6.35 and above. 

There are not many Android phones, yet, that support ADK. 

However, the PhoneDrone can also be used to run ADB. There are quite a few advantages to ADB communication with the phone, including:

- It runs on pretty much any Android phone

- It does not need a rooted or jail-broken phone

- It is already implemented as an Arduino library

To summarize: There are many ways to get an Android phone connected to a peripheral over USB. I am currently working with the PhoneDrone, but using ADB instead of ADK, so that it is supported by more phones. 

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

Join diydrones

Email me when people reply –

Replies

  • Greetings Andreas,

    I don't know if this is the right place for the comment, but I've seen quite a bit of discussion of using things like DynamicDNS and other means of establishing links, etc, challenges with reconnection, etc.

    Perhaps this is already being discussed somewhere, but OpenVPN on rooted Android works very well, will auto reconnect, and has very flexible routing. Obviously the huge advantage to any VPN is eliminating NAT. I would not want to rely on a connection through NAT for this application under any circumstances.

    While any VPN offerings will work, I've found OpenVPN to be the best all around solution. It runs on DD-WRT/Tomato, and is very (relatively) easy to configure. I maintain connections between several sites in a star configuration with an OpenVPN host running at Amazon EC2. My sites stay connected with very high reliability, and I would recommend considering a similar topology to avoid issues with consumer internet connections at home, not to mention the potential to scale to hundreds of vehicles :-)

    MavLINK services could run on the Amazon host as well.

    Routing from my home here on Martha's Vineyard to the one in Vermont (via Amazon) is showing ~50ms latency in this configuration and 140-170ms via 3G measured by ping. Probably it's a bit better in practice. Granted, I have robust consumer internet connections at my homes.

    I see that many people are price sensitive, but an adequate EC2 instance for this purpose can be had for free for an entire year, and after that, is really very cheap, particularly if you only fire it up when you're using it. Presuming we're all on the same page about not trying to fly stick with this much latency, it is certainly viable for telemetry and commands.

    Feel free to get in touch if you'd like to experiment via my server.

    Hope this finds everyone well!

  • Developer

    I've been planning on adding a feature like this to Andropilot for a while.  If you'd like to use andropilot code for this, please let me know and I'll happily answer any questions if you want to hack on it...

  • Make any progress on this? I'd like to write a router app for android that would do the basic routing of the UDP or TCP/IP and perhaps a basic DynamicDNS. I'm just not sure what the pin out to the APM would be via the Androids USB.
  • Developer

    Dan,

    Sorry, I disagree. I can get an Android phone, refurbished from a store for less than $100 in the US.

    A lot of people may have an older android (like a first generation Droid) that they don't use.

    The DroneCell is a good "embedded" solution, but it is $120 + S&H and it can only be used for this purpose.

    I will continue working on both DroneCell and Android solutions, though.

  • Android phones, even used, are far more expensive then drone cell, at least on Ontario they are.

     

    Unless you want to purchase a "used" phone, which in the previous owner had no intention of placing it on the market...... aka Hot :)

     

     

     

     

This reply was deleted.