Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

firmware update via wireless

firmware update via wireless

2006-08-31 by magzky02

i wonder if firmware can be updated via wireless connection..i have a
project that is connected to a rf module..it continously waits query
and give its status..since these units are placed remotely...i want to
send firmware updates via wireless too...the mega32 will update its
firmware after receiving firmware updates...has anyone has idea on how
to implement this?

thanks in advance

mago

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by Ralph Hilton

On Thu, 31 Aug 2006 07:25:44 -0000 you wrote:

>
>i wonder if firmware can be updated via wireless connection..i have a
>project that is connected to a rf module..it continously waits query
>and give its status..since these units are placed remotely...i want to
>send firmware updates via wireless too...the mega32 will update its
>firmware after receiving firmware updates...has anyone has idea on how
>to implement this?
>
>thanks in advance
>
>mago

It should be possible to use a bootloader. There is CVAVR code on
http://www.cmeter.org/CVmegaload/index.html
and ICCAVR code on
http://www.microsyl.com/megaload/megaload.html
The main Atmel site also has application notes with examples.
--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by Reza Naima

I've written a simple bootloader as well :

http://reza.net/avr/

There are a lot of options.  Easiest is to use a tiny MCU to handle the 
RF IO and to relay the data to the main MCU via the tx/rx pins and some 
other IO to force the bootloader to come up (so you can recover from a 
failed flash).

reza

Ralph Hilton wrote:
Show quoted textHide quoted text
>
> On Thu, 31 Aug 2006 07:25:44 -0000 you wrote:
>
> >
> >i wonder if firmware can be updated via wireless connection..i have a
> >project that is connected to a rf module..it continously waits query
> >and give its status..since these units are placed remotely...i want to
> >send firmware updates via wireless too...the mega32 will update its
> >firmware after receiving firmware updates...has anyone has idea on how
> >to implement this?
> >
> >thanks in advance
> >
> >mago
>
> It should be possible to use a bootloader. There is CVAVR code on
> http://www.cmeter.org/CVmegaload/index.html 
> <http://www.cmeter.org/CVmegaload/index.html>
> and ICCAVR code on
> http://www.microsyl.com/megaload/megaload.html 
> <http://www.microsyl.com/megaload/megaload.html>
> The main Atmel site also has application notes with examples.
> --
> Ralph Hilton
> http://www.ralphhilton.org <http://www.ralphhilton.org>
> C-Meter: http://www.cmeter.org <http://www.cmeter.org>
> FZAOINT http://www.fzaoint.net <http://www.fzaoint.net>
>
>

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by mago Umandam

thats great ralf..

may i ask the nature of the firmware update.. can i just send my new code placing the char '<' to indicate the end of data?

Ralph Hilton <ralph@ralphhilton.org> wrote:                                  On Thu, 31 Aug 2006 07:25:44 -0000 you wrote:
 
 >
 >i wonder if firmware can be updated via wireless connection..i have a
 >project that is connected to a rf module..it continously waits query
 >and give its status..since these units are placed remotely...i want to
 >send firmware updates via wireless too...the mega32 will update its
 >firmware after receiving firmware updates...has anyone has idea on how
 >to implement this?
 >
 >thanks in advance
 >
 >mago
 
 It should be possible to use a bootloader. There is CVAVR code on
 http://www.cmeter.org/CVmegaload/index.html
 and ICCAVR code on
 http://www.microsyl.com/megaload/megaload.html
 The main Atmel site also has application notes with examples.
 --
 Ralph Hilton
 http://www.ralphhilton.org
 C-Meter: http://www.cmeter.org
 FZAOINT http://www.fzaoint.net
 
     
                       

 		
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1¢/min.

[Non-text portions of this message have been removed]

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by Ralph Hilton

On Thu, 31 Aug 2006 03:07:07 -0700 (PDT) you wrote:

>thats great ralf..
>
>may i ask the nature of the firmware update.. can i just send my new code placing the char '<' to indicate the end of data?

No, the data is sent page by page with a checksum. There are windows programs on the 2
sites for sending the data.

>Ralph Hilton <ralph@ralphhilton.org> wrote:                                  On Thu, 31 Aug 2006 07:25:44 -0000 you wrote:
> 
> >
> >i wonder if firmware can be updated via wireless connection..i have a
> >project that is connected to a rf module..it continously waits query
> >and give its status..since these units are placed remotely...i want to
> >send firmware updates via wireless too...the mega32 will update its
> >firmware after receiving firmware updates...has anyone has idea on how
> >to implement this?
> >
> >thanks in advance
> >
> >mago
> 
> It should be possible to use a bootloader. There is CVAVR code on
> http://www.cmeter.org/CVmegaload/index.html
> and ICCAVR code on
> http://www.microsyl.com/megaload/megaload.html
> The main Atmel site also has application notes with examples.
> --
> Ralph Hilton
> http://www.ralphhilton.org
> C-Meter: http://www.cmeter.org
> FZAOINT http://www.fzaoint.net
> 
>     
>                       
>
> 		
>---------------------------------
>Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1¢/min.
>
>[Non-text portions of this message have been removed]
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 

--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by mago Umandam

dear ralph

yeah i've seen that program...i will play around with this and integrate with my project.. this is really a great help..it did the challenging part of the project..:)
thank you

mago

Ralph Hilton <ralph@ralphhilton.org> wrote:                                  On Thu, 31 Aug 2006 03:07:07 -0700 (PDT) you wrote:
 
 >thats great ralf..
 >
 >may i ask the nature of the firmware update.. can i just send my new code placing the char '<' to indicate the end of data?
 
 No, the data is sent page by page with a checksum. There are windows programs on the 2
 sites for sending the data.
 
 >Ralph Hilton <ralph@ralphhilton.org> wrote:                                  On Thu, 31 Aug 2006 07:25:44 -0000 you wrote:
 > 
 > >
 > >i wonder if firmware can be updated via wireless connection..i have a
 > >project that is connected to a rf module..it continously waits query
 > >and give its status..since these units are placed remotely...i want to
 > >send firmware updates via wireless too...the mega32 will update its
 > >firmware after receiving firmware updates...has anyone has idea on how
 > >to implement this?
 > >
 > >thanks in advance
 > >
 > >mago
 > 
 > It should be possible to use a bootloader. There is CVAVR code on
 > http://www.cmeter.org/CVmegaload/index.html
 > and ICCAVR code on
 > http://www.microsyl.com/megaload/megaload.html
 > The main Atmel site also has application notes with examples.
 > --
 > Ralph Hilton
 > http://www.ralphhilton.org
 > C-Meter: http://www.cmeter.org
 > FZAOINT http://www.fzaoint.net
 > 
 >     
 >                       
 >
 >   
 >---------------------------------
 >Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1¢/min.
 >
 >[Non-text portions of this message have been removed]
 >
 >
 >
 > 
 >Yahoo! Groups Links
 >
 >
 >
 > 
 
 --
 Ralph Hilton
 http://www.ralphhilton.org
 C-Meter: http://www.cmeter.org
 FZAOINT http://www.fzaoint.net
 
     
                       

 		
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 

[Non-text portions of this message have been removed]

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by David VanHorn

On 8/31/06, Dennis Clark <dlc@frii.com> wrote:
>
> You'd better use a very robust error detection/correction packet scheme.
> Wireless is inherently unreliable.  Also, you'll need to be sure that
> your device can deal with a corrupted download and still be able to be
> put into "update" mode.  There is no reason it can't be done, but I
> recommend a very paranoid protocol to handle it!


I was about to suggest this, but you beat me to it.

In general, the part that does the firmware update should be in the
bootloader section, and protected so that it can't be erased.  The general
philosophy is that no matter what, the part that does the firmware load (and
radio management in your case) can't be vulnerable.


[Non-text portions of this message have been removed]

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by Zack Widup

I figure if we could completely reprogram the Galileo spacecraft as it 
left our solar system, then we could reprogram anything from a distance.  
:-)

Zack
Show quoted textHide quoted text
On Thu, 31 Aug 2006, Dennis Clark wrote:

> You'd better use a very robust error detection/correction packet scheme. 
>   Wireless is inherently unreliable.  Also, you'll need to be sure that 
> your device can deal with a corrupted download and still be able to be 
> put into "update" mode.  There is no reason it can't be done, but I 
> recommend a very paranoid protocol to handle it!
> 
> DLC
>

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by mago Umandam

awww... you guys scared me huh
im thinking it may cause problem in the future...
i'll need a senior engineer beside me to study this...
thanks you guys for comments and suggestions

mago


David VanHorn <microbrix@gmail.com> wrote:                                  On 8/31/06, Dennis Clark <dlc@frii.com> wrote:
 >
 > You'd better use a very robust error detection/correction packet scheme.
 > Wireless is inherently unreliable.  Also, you'll need to be sure that
 > your device can deal with a corrupted download and still be able to be
 > put into "update" mode.  There is no reason it can't be done, but I
 > recommend a very paranoid protocol to handle it!
 
 I was about to suggest this, but you beat me to it.
 
 In general, the part that does the firmware update should be in the
 bootloader section, and protected so that it can't be erased.  The general
 philosophy is that no matter what, the part that does the firmware load (and
 radio management in your case) can't be vulnerable.
 
 [Non-text portions of this message have been removed]
 
 
     
                       

 		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

[Non-text portions of this message have been removed]

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by Dennis Clark

You'd better use a very robust error detection/correction packet scheme. 
  Wireless is inherently unreliable.  Also, you'll need to be sure that 
your device can deal with a corrupted download and still be able to be 
put into "update" mode.  There is no reason it can't be done, but I 
recommend a very paranoid protocol to handle it!

DLC

magzky02 wrote:
> i wonder if firmware can be updated via wireless connection..i have a
> project that is connected to a rf module..it continously waits query
> and give its status..since these units are placed remotely...i want to
> send firmware updates via wireless too...the mega32 will update its
> firmware after receiving firmware updates...has anyone has idea on how
> to implement this?
> 
> thanks in advance
> 
> mago
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 

-- 
---------------------------------------
Dennis Clark    TTT Enterprises
---------------------------------------

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by Dennis Clark

Oh yeah,

   And you want to talk about _paranoid_ download protocols? :)

DLC

Zack Widup wrote:
> I figure if we could completely reprogram the Galileo spacecraft as it 
> left our solar system, then we could reprogram anything from a distance.  
> :-)
> 
> Zack
> 
> On Thu, 31 Aug 2006, Dennis Clark wrote:
> 
> 
>>You'd better use a very robust error detection/correction packet scheme. 
>>  Wireless is inherently unreliable.  Also, you'll need to be sure that 
>>your device can deal with a corrupted download and still be able to be 
>>put into "update" mode.  There is no reason it can't be done, but I 
>>recommend a very paranoid protocol to handle it!
>>
>>DLC
>>
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 

-- 
---------------------------------------
Dennis Clark    TTT Enterprises
---------------------------------------

Re: [AVR-Chat] firmware update via wireless

2006-08-31 by Dennis Clark

Let me give you some pointers.  Having done this before on PICs.
1) Your bootloader and basic network control need to be in write 
protected memory and need to be the first thing that is touched upon 
reset.

2) Set a flag in non-volatile memory denoting whether a good or bad 
firmware image is in FLASH.  If good, proceed to code, if bad, go into 
code download mode.

3) CRC your download.  If it is a very long one, CRC each packet and use 
an ACK/NAK to re-transmit.  If the download is only 30K or so, just CRC 
the entire download and check the CRC at the end of the transmission.

4) ACK/NAK each packet to signal reception.  Kill your downloader push 
code so that it can set up for a new transmission if a NAK occurs.

The above is a reasonably paranoid protocol, and it works quite well. 
For TRUE paranoia, you can sequentialize the packets so that you can 
re-transmit missed packets.

have fun,
DLC

mago Umandam wrote:
> awww... you guys scared me huh
> im thinking it may cause problem in the future...
> i'll need a senior engineer beside me to study this...
> thanks you guys for comments and suggestions
> 
> mago
> 
> 
> David VanHorn <microbrix@gmail.com> wrote:                                  On 8/31/06, Dennis Clark <dlc@frii.com> wrote:
>  >
>  > You'd better use a very robust error detection/correction packet scheme.
>  > Wireless is inherently unreliable.  Also, you'll need to be sure that
>  > your device can deal with a corrupted download and still be able to be
>  > put into "update" mode.  There is no reason it can't be done, but I
>  > recommend a very paranoid protocol to handle it!
>  
>  I was about to suggest this, but you beat me to it.
>  
>  In general, the part that does the firmware update should be in the
>  bootloader section, and protected so that it can't be erased.  The general
>  philosophy is that no matter what, the part that does the firmware load (and
>  radio management in your case) can't be vulnerable.
>  
>  [Non-text portions of this message have been removed]
>  
>  
>      
>                        
> 
>  		
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 

-- 
---------------------------------------
Dennis Clark    TTT Enterprises
---------------------------------------

Re: firmware update via wireless

2006-09-01 by stevech11

--- In AVR-Chat@yahoogroups.com, "magzky02" <magzky02@...> wrote:
>
> 
> i wonder if firmware can be updated via wireless connection..i have a
> project that is connected to a rf module..it continously waits query
> and give its status..since these units are placed remotely...i want to
> send firmware updates via wireless too...the mega32 will update its
> firmware after receiving firmware updates...has anyone has idea on how
> to implement this?
> 
> thanks in advance
> 
> mago
>
I have done this using a bootloader designed to be launched remotely
by special serial port data to the application, plus a watchdog.
Wireless that I've used  is (1) WiFi and Lantronix WiPort module; (2)
WiFi and Moxa NPort end-item; (3) MaxStream/Digi XBee - a pair, one at
the AVR and one connected to an on-site PC/server. All of these rely
on infrastructure on the premesis. 

Using public infrastructure like cellular data is a problem and
hopefully you don't need that.

I contributed BLIPS via avrfreaks.net in the Projects section. It can
bootload via IP on wireless or ethernet as well as Serial lines.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.