Android Debug Bridge on a prop

First draft done!

http://obex.parallax.com/objects/724/

EDIT now http://obex.parallax.com/objects/731/

Gives you a shell into the phone. The idea is to use the fact that a smartphone has a lot of goodies on it (gps, long range radio) for drones.

Also, a bit of a blast from the past (2007) but I uploaded the full NAVCOM AI on the object exchange. It has been used in production for autonomous planes and bats for three years.
Tagged:
«1345

Comments

  • 144 Comments sorted by Votes Date Added
  • edited March 2011 Posts: 0Vote Up0Vote Down
    You may have created to the answer to the question I posed on my "Android android" thread last year. I have to check this out. Any instructions?
  • edited March 2011 Posts: 278Vote Up0Vote Down
    Just as per usb-fs-host (usb is on pins 0 and 1, prop must run at 96Mhz). I have been using the audio jack to output serial commands to robots for about a year now, but nobody wants to buy them :(
  • edited March 2011 Posts: 278Vote Up0Vote Down
    http://obex.parallax.com/objects/724/ Updated! General cleanliness fixes, and most importantly works with logcat. Multiple connections next!
  • edited March 2011 Posts: 278Vote Up0Vote Down
    Sorry for the pseudo-vanity bump, but there are new developments -- this gives you a virtual serial port of sorts between the phone and the prop. It should pretty much take care of things :)
  • edited March 2011 Posts: 278Vote Up0Vote Down
    Last time I spam on this, promise.

    http://obex.parallax.com/objects/724/ Updated again with some error detection and Android-side virtual serial port code :)

    I think there is no demand for this stuff... :(
  • edited March 2011 Posts: 0Vote Up0Vote Down
    I've been wanting to play with this just haven't had a chance yet
  • edited March 2011 Posts: 0Vote Up0Vote Down
    It sounds a cool idea. But, I have one question will this work with all Andriod phone platforms?
    William Stefan
    The Basic Stamp Nut with some Spin
  • edited March 2011 Posts: 278Vote Up0Vote Down
    Yes because the ADB interface is common to all android phones -- I've been doing andoid-based robots since late 2009 (sadly there is little market for them, I've sold about two dozens total) but using the serial port which only some phones have (and it needs turned on by a special kernel module). ADB is part of the Android specification and therefore will work on every android device for the foreseeable future, on top of that it requires no rooting. I would like to kindly ask to please not use my code to bid on the NASA contract on april 4th on smartphone based sensors and loggers as I will place a bid with this :)
  • edited March 2011 Posts: 0Vote Up0Vote Down
    Hi,

    Sounds interesting - but can you please explain what a NAVCOM license is? I can't see a description of it in the object itself.

    I guess I should also point out that by placing your software in the OBEX you are agreeing to it being released under the MIT licence anyway.

    Ross.
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • edited March 2011 Posts: 0Vote Up0Vote Down
    Count me in as being very interested. You are not talking to yourself here:-). That's why I put up the "Android android" thread last year.

    Problem is, like many others here, I have to many Prop projects up in the air already.

    Perhaps if there were one working gadget using the Prop and the phone then more people would get curious. Even if it eas just ligting LEDS via SMS.
  • edited March 2011 Posts: 278Vote Up0Vote Down
    I have a few fully built up robots actually (they use either the serial port or the headphone jack though) , just search spiritplumber on youtube :) most of what I do is prop powered. For other micros, there's also this thing I did. http://hackaday.com/2010/11/10/android-talks-pulsewave/
  • edited March 2011 Posts: 278Vote Up0Vote Down
    The NAVCOM license is on my website (god do I ever need to clean house) and is the same as the MIT license with these two clauses:

    1- If you use this, please send me an email telling me what you're doing with it, it's interesting to me.
    2- You are not allowed to put my work in a weapon or munition system.

    I had (2) happen once in 2007 and I am not interested in repeating the experience.
  • edited March 2011 Posts: 0Vote Up0Vote Down
    So it's not the same as the MIT license.
  • edited March 2011 Posts: 278Vote Up0Vote Down
    No, but having been in a situation where I , a foreigner living in Texas in the early 2000s after having spent time working in the Middle east, ended up in direct competition with Raytheon on a project... well I have found it very important to have some sort of CYA in case of being accused of aiding and abetting crime or terrorism. Incidentally that's why I posted a whole bunch in 2006-2007 then pretty much disappeared. I'd rather not talk about it.

    The problem is that the only thing this bridge does that my earlier work doesn't is "you no longer have to root the phone" and "you can use all Android phones rather than just some", so a video wouldn't be very impressive :)
  • edited March 2011 Posts: 0Vote Up0Vote Down
    M.K.,

    You need to read the front page of the OBEX in more detail. It says:
    All objects on the Propeller Object Exchange are provided under the MIT License. By downloading and/or submitting objects, you are agreeing to this license.
    If you don't want your stuff MIT licensed, you need to remove it from the OBEX.

    Ross.
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • edited March 2011 Posts: 0Vote Up0Vote Down
    A few times I have seen people wanting such "non-weapon" restriction clauses into their licenses. Normally there is some religious or ethical motivation for this. Whilst I do have some sympathy for such views I think it is somewhat mis-guided. I would rather have those charged with defending me be able to use the best software for the job. The bad guys are going to use whatever software they want regardless of any licence you put on it.

    But here is a new angle. The CYA problem. Having to put such clauses into a license so as to avoid unneccesary persecution by paranoid terrorist witch hunters. I have to say that I find the need for that very disturbing. Yet another reason I'm finding I would have to think hard about ever visiting the USA.

    I have no idea about how to square this with the OBEX. Either the object has to be pulled or the clauses need removing.

    Which, by the way, is another reason why ethical motivations for such clause don't sit well with me. Whilst they try to keep your creations out of the hands of the "merchants of death", which is a good thing, they can also result in denying the rest of us the benefits of your creations which rather defeats the point of the exercise.
  • edited March 2011 Posts: 278Vote Up0Vote Down
    If someone wants to build a drone to drop a bowling ball on their former principal's lawn I doubt a license will stop them, they've already decided that their goal is worth more than the law. This is just to prevent me from being harassed about it in case someone DOES do that using my code. It can mean the difference between getting one visit from the police or FBI and getting several or having to defend yourself in court. I'd rather spend my time making robots than that :)
  • edited March 2011 Posts: 0Vote Up0Vote Down
    M.K.

    Much as some may sympathize with your avowed intent, you have posted your code to a repository that stipulates the code will be available under the MIT license. One possible interepretation of your actions is that your objection to weaponization of your work is in fact a pretence designed specifically to alert the appropriate "ne'r do wells" to its eminent suitability for just such a purpose - all the while giving yourself "plausible deniability" that this was why you posted it!

    If I were you, I'd expect the FBI (or worse!) to come knocking on your door any minute now! (:cool: <--- note: CIA agents look like that, whereas FBI agents look like this :nerd: and "ne'r do wells" may look like this :snooty: or this :zombie:)

    Ross.

    P.S. Or, as Heater suggests, you could ask Parallax to remove that particular clause on the OBEX.
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • edited March 2011 Posts: 0Vote Up0Vote Down
    I do understand the reasons for your wanting to include such restrictions in your licence. As I say, I find it very disturbing that you, and no doubt many others, find yourself in a situation where you have the need to do that.

    It's this kind of thing that makes me think the terrorists of the world have achieved something of what they wanted.
  • edited March 2011 Posts: 278Vote Up0Vote Down
    Actually I talked to a lawyer and he said that I should put something like that in my license. I'll be the first to admit it's silly to worry about that in the first place, but again, I had to deal with this in the past and it's not fun, it's smewhat scary and it's a huge waste of time.
  • edited March 2011 Posts: 278Vote Up0Vote Down
    ok i took it off now please let me be :(
  • edited March 2011 Posts: 0Vote Up0Vote Down
    Sorry M K, I was only joking. This has come up before, and I was serious about you seeing if you could get Parallax to drop the requirement for an MIT license. This is the reason Catalina is not in the OBEX - I just don't care enough about it (the licensing of the OBEX, I mean) to object.

    Ross.
    Catalina - a FREE ANSI C compiler for the Propeller.
    Download it from http://catalina-c.sourceforge.net/
  • edited March 2011 Posts: 0Vote Up0Vote Down
    Actually, Ross, I was rather sugesting that M.K. Borri remove the clauses from his code not that the OBEX terms be changed. I guess the latter is unlikely.

    I do agree. Putting a notice on something effectively saying "these are not bomb parts" might make those paranoid three letter acronym guys even more curious about it.

    So what happened? Can I now use this code for my DIY cruise missile project or not:)

    Can we now move on from thinking about licencing issues and get on with some interesting applications of Borri's efforts?
  • edited March 2011 Posts: 278Vote Up0Vote Down
    please let's :) again, this was a bunch of stuff that happened with my drone projectile drop project that I'd rather not go over.

    what I'm doing right now is modularizing the spin code so that it behaves like a serial terminal to other objects -- ADB supports multiple connections on multiple ports, but I'd rather get one to work consistently first. I also updated the object on obex with a bit of .java code that goes Android phone side; should I build a full example app and post that on android market?
  • edited March 2011 Posts: 0Vote Up0Vote Down
    Fantastic.

    A working Android app on the market would be great. I'm just wondering what it would do.

    To reach the widest audience it should be something simple but generic.

    For example some of:
    Providing a means for the Prop to be able to get all the sensor data out of the Android.
    Making GPS data available.
    Using the phones display as a console.
    Being able to get commands to the Prop via SMS and/or originating SMS from the Prop.
    Perhaps even allowing for connection through the internet back to server P.C.

    The possibilities are endless ofcourse:)
  • edited March 2011 Posts: 0Vote Up0Vote Down
    Damn, I now have to get myself another cheap Android Pad or phone to dedicate to this:)
  • edited March 2011 Posts: 278Vote Up0Vote Down
    Yep... I think other than some sort of sensor/servo demo (right now I'm porting the robot code from serial to ADB) what I will do is make the adb bridge object work like FullDuplexSerial as far as the prop is concerned :) maximum flexibility that way.
  • edited March 2011 Posts: 0Vote Up0Vote Down
    You know I was on craigslist and saw some cheap android phones.
  • edited March 2011 Posts: 0Vote Up0Vote Down
    Cole Logan,

    Yep, and there is an ocean of very cheap Android tablets out there. They might not have the latest Android version or the latest fastest CPUs but would make excellent user interfaces for Prop projects. Not mention all the other goodies on board.
  • edited March 2011 Posts: 0Vote Up0Vote Down
    How are you getting data out of an Android?

    More specifically, I have a cheap apad and it works really well but it does not have bluetooth. Bluetooth seems to be the only way to get a serial port but it doubles the price.

    I do have some code running in Basic4Android that takes a data packet, builds a 1200 baud data packet on the fly, saves it as a .wav and plays it. I can decode this using opamps etc, but the problem is that each time the .wav file is saved it wears out the sd card or the internal memory. I have not managed to find any way of 'playing' a .wav file directly from ram (ie from within a program).

    I was intrigued by your comments earlier about hacking into the OS, but not to the point of rooting the device.

    I think there are some very interesting propeller/android hybrid solutions if it is possible to get bidirectional data comms working.
    Answers: 1) A quadcopter. 2) Very high. 3) The internet. 4) A lot. 5) No.
Sign In or Register to comment.