Shop OBEX P1 Docs P2 Docs Learn Events
Programming propeller with android — Parallax Forums

Programming propeller with android

JDatJDat Posts: 103
edited 2014-10-25 09:43 in General Discussion
Is there any solution to program propeller with android? USB otg and ftdi aren't problems. The only thing what is missing: compiler+uploader.

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-10-21 18:46
    I just purchased an Android device with Wifi and Bluetooth.... an ASUS ZenPhone5...so I am looking into this via wifi, not USB OTG.

    This past summer, Heater provided binaries that can be loaded into a hacked mini-router with Wifi. I have a TP-Link MR-3020 that is hacked via an OpenWrt firmware and works nicely with loading the Propeller over Wifi and will also compile SPIN/PASM binaries that are transferred as .spin files and it will retain a directory of binaries and source code to choose from.

    You can easily use either a WR-703 or an MR-3020 from TP-Link as your Wifi reciever and wire directly to a Propeller via either USB (a bit wasteful, but easy) or direct TTL Asychronous Serial (including the Reset for the Propeller binary loading).

    So far, this all works nicely with my ASUS EEEpc notebook. So it is merely a matter of getting the SCP file transfer and remote terminal established in an Android device.

    Coincidentally, I was researching this last night and it appears that all the software is available and the Android device doesn't need to 'unlocked' or seriously hacked in anyway.

    Searches for 'Android Remote Terminal' and 'Android SSH' will provide useful leads.

    +++++++++
    If you desire to go Bluetooth rather than Wifi, there are cheap Bluetooth devices that provide Asychronous Serial. I am NOT sure about the Reset being included, but the Rx and Tx are there. The problem with this approach is that you don't get an intermediate file server, loader software, and a binary compiler that the Wifi mini-router provides in Linux.

    The TP-Link mini-routers have a Linux OS binary provided by OpenWRT which I am using on several of them.

    http://www.ebay.com/sch/i.html?_nkw=tl-mr3020

    http://wiki.openwrt.org/toh/tp-link/tl-mr3020

    The TP-Link MR3020 is available retail in North America and Europe. The MR703 seems to have been produced only for the Chinese market, but can be gotten cheaply on Ebay. Prices range from $20-35USD. So the devices are similar in cost to a PropellerPlug and sit in as a full-time replacement for them if you don't desire to use Propellers with USB. Size is less than 3"x 3"x 1" and extremely low power operation anywhere from 3.3VDC to 5.0VDC.

    ========
    Does this appeal to you? Does it make any sense?

    Essentially, this approach avoids a direct wire connect with the Android, and avoids needing to create a compiler and loader binary that are Android-able. (This may never come to be due to Android's security and licenses.)

    The compiler and loader are in the open-source Linux in the Mini-router, and have been tested and proven good. You gain the added feature of a very secure wireless wifi link for anything you can come up with - home automation, robotic control, etc.

    It is all best done in Wifi. The Bluetooth alternative might only work for a remote terminal link to provide control and data transfer for an application previously loaded into the Propeller.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-10-21 19:40
    JDat wrote: »
    Is there any solution to program propeller with android? USB otg and ftdi aren't problems. The only thing what is missing: compiler+uploader.

    I do this all the time both with USB ftdi, bluetooth, or telnet but the compiler is on the prop so all I need is an editor or Google docs. So Tachyon is a very powerful environment for interacting, programming, developing, debugging, and issueing shell like commands.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-10-21 20:37
    Peter J is referring to using Forth on the Propeller instead of compiling and loading Spin/PASM binaries. It certainly seems that with USB OTG (on the go), you only need to locate a Remote Terminal application in Android.. and there are some.

    My concern is that many other Android devices may only have a USB Slave port intended for hookup to your desktop or notebook computer, which always have USB Master or Host ports. (You mention that you have USB OTG, so you have both Host and Slave available)

    The Propeller boards have only a USB Slave port as well. That means it won't connect a USB to USB cable direct to another USB Slave. The mini-routers mentioned have a USB Master/Host port and can support FTDI drivers. It just seems easiest to use the Android's wifi to jump to a mini-router. This works with Forth on the Propeller just as well (In fact, I prefer doing this.)

    There may be another effort to provide a compiler 'in the cloud' and just have Android download. Someone needs to jump in if that is availble.


    If you are looking for a complete IDE to program in C or C++, such as Simple IDE for Android - I fear that is not available as of yet. We have a lot of smart people that have created both Catalina C and Simple IDE for a variety of platforms. Since Simple IDE is open-source; someone may get it up and running in Android... eventually.



    But I doubt at this moment that an Android Parallax IDE has been achieved via direct USB link and there is a need to cross-compile code for a variety of Android hardware platforms. There seems to be an ArduinoIDE for Android, but I am unsure how well it works around the USB port issues or the architectural diversity of binaries -- maybe restricted to some Android devices that provide both a Master and Slave USB behavior on one port via OTG and a specific CPU archtecture..

    I just avoid the USB port issues, the architecture issues, and the IDE issues all together. I also avoid hacking to 'unlock' an Android device.

    The Android device just has to work as a Remote Terminal to manage downloads or an SCP client for file downloads. Code can be written or edited in any Text Editor on the Android device or can be written or edited remotely on the MR-3020 via wifi. On the mini-router, I edit it VIM.
  • John A. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2014-10-25 08:14
    There are roadblocks, but it can be overcome with effort:

    1.) USB-to-Serial drivers for Android. Basically you would need a cheap tablet (Allwinner ones) and most of them have USB-OTG inside.
    2.) Port the Propeller IDE to Android.

    I'm struggling with (1). I have a handful of those PL2303 USB-Serial adapters and they won't work with two of my Allwinner tablets due to the lack of drivers. Plus, you will have to recompile the drivers (*.ko) so that it works with that tablet.

    I'll continue finding more information on that - if these adapters work with those tablets, it would mean controlling external stuff with these adapters.
  • JDatJDat Posts: 103
    edited 2014-10-25 08:46
    Thank you for answers. Let's assume connection between android device and propeller isn't problem (usb otg, Bluetooth, ethernet, etc). Is there any spin/pasm compiler for android?
  • Heater.Heater. Posts: 21,230
    edited 2014-10-25 09:14
    JDat,
    The only thing what is missing: compiler+uploader.
    Nothing much then:)

    I don't know what the answer is here.

    If you can run the Chrome browser on your Android then you we almost have a web based IDE for Spin. Complete with syntax highlighting editor and Spin compiler. http://forums.parallax.com/showthread.php/152711-A-Propeller-WebTool-Framework-for-Compiled-Languages?p=1254463&viewfull=1#post1254463

    It's not pretty and not generally usable but it does work. Needs some love and attention.

    That leaves the issue of getting the code into the Propeller.

    Well surely someone could take the loader from propgcc or PropellerID and create a Java version of it for Android.

    Are you the volunteer we need to get this done?
  • JDatJDat Posts: 103
    edited 2014-10-25 09:28
    Heater. wrote: »
    JDat,
    Are you the volunteer we need to get this done?

    Sorry, no, I am electronic engineer, not software developer. Sorry. :-(
  • Heater.Heater. Posts: 21,230
    edited 2014-10-25 09:34
    JDat,
    Sorry, no, I am electronic engineer, not software developer. Sorry.
    Bah, what? It's all just zeros and ones. In a schematic, in HDL, in software. If you can do one you can do the other.

    Unless you are into analogue electronics, especially RF "magic". In which case my hat is off to you.
  • jazzedjazzed Posts: 11,803
    edited 2014-10-25 09:43
    JDat wrote: »
    Thank you for answers. Let's assume connection between android device and propeller isn't problem (usb otg, Bluetooth, ethernet, etc). Is there any spin/pasm compiler for android?

    This has a compiler that works on android: https://code.google.com/p/annoide/

    I'm no longer developing it though, and would prefer to see a browser based solution be completed.
Sign In or Register to comment.