Sending customers pre-compiled sketch updates

I've created an Arduino-based product. When I improve the sketch it runs, I'd like to be able to send customers a link to the update they can download and install into the product they purchased.

To do this, two things would be required: (1) A way to capture the compiled output from my Arduino software, into a file they can download.

An executable program they can use to send this compiled update from their computer to the Arduino-based product.

Is there a way to do this?

The compiler outputs a HEX file to the build directory. You can use the avrdude application and a batch file to do the upload. Just turn on verbose mode, do a build and upload, and you'll see the command line the IDE uses t run avrdude. It's also not difficult to wrote a stand-alone application to do the upload.

Regards,
Ray L.

There is a Windows program that will load hex files to an Arduino.
http://www.hobbytronics.co.uk/arduino-xloader

At first, I was really excited by the two comments above. But now I'm a bit spooked and am ready to forget this whole idea. One page says:

Without using the Arduino IDE, there has been no easy way without knowing the ins and outs of AVRDude or other command line programmers.

Most of my customers don't know a thing about programmng, and I fear they could mess up the programming inside the AVR with AVRDude, and have to send it back, perhaps demanding a refund.

And while Xloader sounded like the perfect fool-proof solution anyone could use successfully, I am using the Atmega1284p, it being the ONLY AVR with both large memory AND through-hole design for easy breadboarding and mounting.

But when I looked at Xloader's comments, I found:

QUESTION: We are working with the 1284p. Can you make the adjustment to Xloader?

ANSWER: Sorry this is only to upload through the Arduino’s bootloader.

So it seams I'm pretty much out of luck. (Better safe than sorry.)

The user doesn't need to know anything about programming, or avrdude. You provide them with the avrdude executable, the HEX file, and a batch file. They run the batch file, and it does all the work. I do it all the time.

Regards,
Ray L.

Crossroads offers a programming board that takes a sd card.
Send the customer the file, they transfer it to the sd card, they use the programming board to upload the code.

You can also make one Arduino program another, with a copy of its own firmware. Effectively "cloning" itself. Google "Arduino Virus". I use that for "updating" ProMinis with a pre-programmed ProMini.

Regards,
Ray L.

RayLivingston:
The user doesn't need to know anything about programming, or avrdude. You provide them with the avrdude executable, the HEX file, and a batch file. They run the batch file, and it does all the work. I do it all the time.
Regards,
Ray L.

Also the configuration file 'avrdude.conf' is needed.
The batch file, 'avrdude.exe' and 'avrdude.conf' can be placed in a folder with the *.hex file, but the end user must also be aware that they have to modify the batch file and set the correct COM port for the board.
Aside from that, it's an easy 1-click process.

Edit: I meant to add, 'XLoader' doesn't support the Atmega1284p anyway, but even if it did, it's just a wrapper for avrdude, and still requires 'avrdude.exe' and 'avrdude.conf' to work. It's only advantage is that the COM port can be set from the GUI.

OldSteve:
Also the configuration file 'avrdude.conf' is needed.
The batch file, 'avrdude.exe' and 'avrdude.conf' can be placed in a folder with the *.hex file, but the end user must also be aware that they have to modify the batch file and set the correct COM port for the board.
Aside from that, it's an easy 1-click process.

Edit: I meant to add, 'XLoader' doesn't support the Atmega1284p anyway, but even if it did, it's just a wrapper for avrdude, and still requires 'avrdude.exe' and 'avrdude.conf' to work. It's only advantage is that the COM port can be set from the GUI.

The COM port can be a command line argument to the batch file.

Regards,
Ray L.

RayLivingston:
The COM port can be a command line argument to the batch file.
Regards,
Ray L.

True, if it's executed from the a command-line rather than clicking on it.

How the customers are going to know that which com port to select ?

RayLivingston:
You can also make one Arduino program another, with a copy of its own firmware. Effectively "cloning" itself. Google "Arduino Virus". I use that for "updating" ProMinis with a pre-programmed ProMini.

Regards,
Ray L.

Can you provide more information ?? I did a bing search. Wasn't able to find much.

MalharD:
How the customers are going to know that which com port to select ?

It'll be the one with an Arduino connected to it. :slight_smile:

OldSteve:
It'll be the one with an Arduino connected to it. :slight_smile:

I don't get it. Can you explain,please ?
Whenever I needed to see that to which virtual com port my arduino is connected, I've opened arduino IDE and got the list of avaliable com ports. Is there any tool-ish something to see that ?

At this moment, I am using a MAX232 as I recently fried 16U2 on my UNO and mega. Hence, COM port is fixed, the board changes, and a usbtiny sits as a backup

MalharD:
I don’t get it. Can you explain,please ?
Whenever I needed to see that to which virtual com port my arduino is connected, I’ve opened arduino IDE and got the list of avaliable com ports. Is there any tool-ish something to see that ?

At this moment, I am using a MAX232 as I recently fried 16U2 on my UNO and mega. Hence, COM port is fixed, the board changes, and a usbtiny sits as a backup

I can’t speak for Macs, because I’ve never owned one, but in Windows you can look in “Device Manager”, under “Ports”. My UNO clone, (a 16U2 version), is listed as “Arduino Uno”, and this one’s on COM9. I’m still using XP, so it would look a little different in later versions of the OS, but here’s a screen shot:-
UNO in Device Manager.JPG

For non-16U2 USB to TTL converters, if it’s not known exactly what to look for, it might be a matter of opening the Device Manager, noting what ports exist, then plugging in the Arduino and checking again to see the number of the new port that’s created.

Dumb me! I’ve used Device manager a thousand times and I didn’t thought about this.
Thanks OldSteve. I sthat your desktop ? Good old WinXP. I’m using the same.

MalharD:
Dumb me! I've used Device manager a thousand times and I didn't thought about this.
Thanks OldSteve. Is that your desktop ? Good old WinXP. I'm using the same.

That was my half-typed last reply in the background of the screen shot. The Desktop itself wasn't visible.

Yeah, I like XP, but will have to upgrade soon, I think. I'm putting it off as long as possible, because a lot of my software won't run on the later versions according to the Windows Compatibility Check. And after all, why fix it if it ain't broke?
I did have to stop using IE8 and migrate to FireFox though, but that's no great loss. :slight_smile:

MalharD:
Can you provide more information ?? I did a bing search. Wasn't able to find much.

Regards,
Ray L.

RayLivingston:
GitHub - spake/Arduino-Copier: An Arduino sketch that can upload sketches to other boards.

Regards,
Ray L.

Thank you,
-Malhar