Dump and save Avrdude dialogue.

Hi everybody,

I am working in a mini project, I am trying to dump the calls between AVRdude and Arduino bootloader, I need to save each "block" sent, to simulate avrdude and load the same sketch into another Arduino board (the same sketch and the same board) without AVRDUDE.

For example, I am working to load a sketch for a remote server. This server has not a AVRDUDE, and it is impossible to install. Another way, to create a communication between my PC (Avrdude and my local application) and the remote server (with my server application), but the problem is how to create a virtual serial port to send the Avrdude calls and receive the server calls.

I will try explain better: AVRDUDE -> SAY "HELLO" -> VIRTUAL SERIAL PORT -> MY APPLICATION DUMP "HELLO" FROM VIRTUAL SERIAL PORT -> SEND TO SERVER "HELLO" -> MY APPLICATION SEND TO ARDUINO "HELLO". and reversal.

Sorry for my English, I hope your help. Andres

Turn on "Show verbose output during uploading" in Preferences.

Also see this: http://www.gammon.com.au/uploader

Thanks very much for you reply.

I am thinking use this reference, but I have another question, there is a storage alternative to sd with 1gByte such as dataflash or nand memory (chip package) with same sd comunication interface (I think SPI, dont?). I would want to storage the sketches and 24 hours sensor values.

Andres

Yes you can get other chips, but for the sake of a $15 adapter you can connect up a SD card which can hold 64 Gb, and then just unplug it and plug it into your PC to get the readings.

Thanks very much Nick,

I was thinking to update some part of this mini proyect, and one of them is change the sd to another storage with chip package, but I dont know what is better?

If i use this reference, is the best moment to update this branch.

Andres.

If i use this reference, is the best moment to update this branch.

I don't understand, sorry.

Note that programming an AVR, or writing to an SD card or other flash memory, is more than just sending the DATA via SPI or serial. Typically there are a bunch of commands, and they're not the same when you're writing an AVR or writing an SPI flash chip.

The protocol used between avrdude and optiboot is described in the optiboot documentation (!) https://github.com/Optiboot/optiboot/wiki/HowOptibootWorks and some Atmel app notes. It may be easier to create an alternative to avrdude from that documentation than by reverse-engineering the communications.

Hello, thanks for all replies,

westfw: The protocol used between avrdude and optiboot is described in the optiboot documentation (!) https://github.com/Optiboot/optiboot/wiki/HowOptibootWorks and some Atmel app notes. It may be easier to create an alternative to avrdude from that documentation than by reverse-engineering the communications.

I want to communicate with the bootloader to load a sketch without AVRdude, I have seen the STK500 instructions, but I have not a single example, Do you know some example? How can I test those command? with Serial interface Arduino? Or with another software?

Thanks very much.

Something?

Testing them out will be problematic because of the timeout in the bootloader. (You could probably test them while talking to the Arduino as ISP sketch. It runs the same protocol (not QUITE as limited in the accepted commands, but ... close.)

https://github.com/robokoding/STK500 Python and java examples. https://github.com/spake/Arduino-Copier Arduino sketch (that writes itself to other Arduinos) example.

Thanks very much,

I have worked this week about it, I have gotten communication with a non-official Bootloader, but I have not gotten a flow communication with Optiboot. I think I need to reset (with reset pin) to start the Bootloader execution. I have tried to autoreset itself with a sketch, it read via serial port, and when it receive "0xFE" for example, it power down the pin N connected to reset (and reset the Arduino board and it should run the bootloader, should not it?), but I have been able to got any answer. Some idea?

Thanks for your answer, westfw.

Something?