6

I am attempting to build an Android app from which I can can upload a .hex file to my Arduino(Leonardo). I am aware of a few apps in the Google Play store that are capable of this functionality but I can't seem to find any actionable resources on how to go about doing this. I am aware that the desktop Arduino IDE uses AVRDude to perform the upload but I don't believe AVRDude is available on Android so I'm at a complete loss here. Does anyone know how I would go about accomplishing this?

After some more searching I now know that the Leonardo(ATMega32u4) uses the AVR109 Protocol to flash new programs onto the hardware but I'm still at a complete loss as to what that process is and how I'd reproduce it in Java.

5
  • If you need the result, use one of the existing apps or see if its author will license the key parts to you. If you want something of your own, then you may end up having to do most of the work of creating (or at least porting) it yourself. May 29, 2015 at 19:29
  • @ChrisStratton I need a solution which I have full insight/control over. I have no problem doing the work and would actually prefer it, but I have very little understanding of the work that needs to be done which is why I'm here. I've been in contact with one developer but the interaction hasn't been as helpful as I thought it might be. I am unfortunately fairly new to this side of things so I don't know the right things to look for, search for, etc.
    – Karoly S
    May 29, 2015 at 21:25
  • If I wanted to do this for a conventional Arduino I'd start by figuring out the operations against a serial API to talk to the bootloader, and perhaps test it against something exposing desktop serial ports to Java, as debugging Android host mode stuff is a pain given you have to use ADB-over-wifi. You might try to figure out how avrdude works, for example. Then I'd try to combine that with existing code that is out there for talking serial-over-USB to Arduino boards with the various device-side chipsets. For a leonardo type board the two pieces may be more tightly coupled. May 29, 2015 at 21:30
  • Solid tips. I'll start looking through all of that, thanks a bunch!
    – Karoly S
    May 29, 2015 at 21:36
  • Try the Physicaloid library for Android which seems to be a complete AVRdude implementation on Java. Feb 6, 2018 at 22:18

1 Answer 1

2

If I wanted to do this for a conventional Arduino I'd start by figuring out the operations against a serial API to talk to the bootloader, and perhaps test it against something exposing desktop serial ports to Java, as debugging Android host mode stuff is a pain given you have to use ADB-over-wifi. You might try to figure out how avrdude works, for example. Then I'd try to combine that with existing code that is out there for talking serial-over-USB to Arduino boards with the various device-side chipsets. For a leonardo type board the two pieces may be more tightly coupled.

Copy of Chris Stratton's comment which was acknowledged as an answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.