Wireless updating from a gateway node

Started by daemach, June 01, 2015, 01:06:39 PM

daemach

I plan on having 20-30 sensors on my moteino network at minimum.  What is the feasibility of loading a sketch to a gateway's SPI flash and have it distribute the code to all of the nodes based on an internal list of addresses rather than trying to generate a node list from a computer?  A final network may have over 100 nodes.

The internal list of addresses would come from DHCP functionality that still needs to be developed...

Felix

Feasibility?
Depends. If that's all your gateway is doing and the downtime doesn't impact anything else then it's feasible. Also have to account the coding necessary to make it happen. I like to keep a "programmer" moteino that doesn't interfere with the rest of the network and program each node at 1 time. It's not as elegant perhaps but I know exactly what's going on and can fully control it. The 2 nodes talk at a different frequency so they don't create any collisions in the original channel.

daemach

I wonder if it would make sense to have another mega sitting on the network whose sole job is updating programming.  My issue is that most of the nodes on the network will be battery powered and, thusly, sleeping most of the time.  In a perfect world, if an update was available the main gateway would tell the node in an ACK, then the node would contact the programmer and ask for a hex file which would then be returned.

TomWS

#3
Quote from: daemach on June 02, 2015, 12:25:43 PM
<snip>In a perfect world, if an update was available the main gateway would tell the node in an ACK, then the node would contact the programmer and ask for a hex file which would then be returned.
Welcome to my world!   8)

See thread https://lowpowerlab.com/forum/index.php/topic,1092.0.html

Tom
UPDATE: I should add that the notion to have a separate programmer device has some merit.  I hadn't considered this and currently use the gateway for both roles.  Having a separate programmer would keep the gateway from being 'distracted' by the programming task, although, in my case, I've set it up so that the node pulls all programming records from the source (gateway in my case) so there isn't much burden on the part of the programmer, other than managing the image 'file'.  In my case, the server downloads the image file to the gateway where its stored on microSD card, literally as a file.  With a separate programmer, the way I'd probably do it is still use the SD card, but load the card directly on the Server and then plug the SD card in the programmer when I have updates to distribute.  Another nice aspect of this is that it would allow the gateway to stay on the main frequency while the programmer and node could shift the frequency far enough to reduce interference with the main frequency (I don't currently shift the frequency for programming).  Hmmmm...