D
D
Dmitry2013-11-18 11:26:23
Android
Dmitry, 2013-11-18 11:26:23

Uploading Firmware to Arduino from Android

I am developing an Android + Arduino hybrid device. Brains in Android, executor - Arduino - as usual. Connecting via USB using the ready-made usb-serial-for-android library . In general, there are no problems with data transfer back and forth.
How would I use this bundle to upload sketches to Arduino? This is necessary to update the firmware of ready-made devices without any action from the user.
I know that there is a project like Arduino IDE for Android . This means that it is possible in practice to upload sketches from Android to Arduino via USB.
Question - how do I make my bike and implement this in my android app?
Where to read, what to see?
As I understand it, I must first send a reset signal to the Arduino via USB, and then try to send the sketch. Here is how exactly it should be done, what protocol for the data, how does, for example, avrdude itself do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2013-11-18
@dimanjy

Here, I myself found something similar to the answer:
Avrdude flashes the Arduino through a bootloader (wired into the microcontroller), using the STK500 protocol to transfer new sketches. Here is the documentation .
Apparently, using this protocol, you can upload a sketch to Arduino from Android...
And here is the STK500 in Java ...

S
svd71_1, 2013-11-18
@svd71_1

Read the info on bootloader for AVR. There are thousands of implementations of it.
>As I understand it, I must first send a reset signal to the Arduino via USB, and then try to >send the sketch. Here's how exactly to do it, what is the protocol for the data, how does it do, > for example, avrdude itself?
Maybe I don’t know something about Arduino, because there can also be thousands of modifications, but avrdude cannot directly reprogram the microcontroller. Although if FT3232 crystals are used for USB (it seems that FT232 was in the old versions of Arduino), then programming using the SPI interface is possible. If you know a way to get avrdude to flash Arduino, then this document may be useful to you: http://www.atmel.com/Images/doc0943.pdf
Although read also this one toohttp://www.atmel.com/Images/doc1644.pdf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question