LowPowerLab Forum

Software support => Wireless Programming (aka OTA) => Topic started by: mrmin24 on October 04, 2016, 03:45:21 PM

Title: Wireless Programming Monteino with Mysensors
Post by: mrmin24 on October 04, 2016, 03:45:21 PM
Hi,

Has anyone managed to use the Wireless Programming while running mysensors sketches?

Thanks
Title: Re: Wireless Programming Monteino with Mysensors
Post by: luisr320 on October 07, 2016, 05:22:40 AM
What is a Mysensor?
Title: Re: Wireless Programming Monteino with Mysensors
Post by: brolly759 on October 07, 2016, 11:55:50 PM
Quote from: luisr320 on October 07, 2016, 05:22:40 AM
What is a Mysensor?

mysensors.org is a pretty nifty sensor node site using Arduino/Pi's
Title: Re: Wireless Programming Monteino with Mysensors
Post by: mrmin24 on October 10, 2016, 08:34:46 AM
OK, I got the OTA programming done. Actually very easy, follow this guide:

https://forum.mysensors.org/topic/3503/sensebender-dualoptiboot-ota-howto-in-mysensors/2
- You can skip to the:

In sketch

To enable OTA in your sketch, you need to add

#define MY_OTA_FIRMWARE_FEATURE



part if you have Monteino

Still having trouble running RFM69 on Ethernet Gateway with SOFTSPI
Title: Re: Wireless Programming Monteino with Mysensors
Post by: WhiteHare on October 10, 2016, 03:47:41 PM
Interest link.  It seems to say there's already a totally wireless bootloader for the NRF24L01 that doesn't rely on an additional memory chip  as well as one under development (7 months ago) for the RFM69.  It now being 7 months after that posting, is the RFM69 version now finished, or is it still under development?  Anyone happen to know?
Title: Re: Wireless Programming Monteino with Mysensors
Post by: Felix on October 10, 2016, 04:28:01 PM
People still think a RFM69 bootloader makes sense?  ::)
Title: Re: Wireless Programming Monteino with Mysensors
Post by: WhiteHare on October 10, 2016, 08:03:41 PM
The answer doesn't have to be "either/or".  It could be "both".  i.e. why not have it all?
Title: Re: Wireless Programming Monteino with Mysensors
Post by: Felix on October 10, 2016, 10:17:06 PM
Right, we could suggest the same way the bootloader could do a little of everything else too, like reading sensors etc. Then why not replace the bootloader entirely with the sketch ? :)
Title: Re: Wireless Programming Monteino with Mysensors
Post by: joelucid on October 11, 2016, 02:31:04 AM
QuoteRight, we could suggest the same way the bootloader could do a little of everything else too, like reading sensors etc. Then why not replace the bootloader entirely with the sketch ? :)

I think a bootloader should do no more but also no less than installing sketches over the preferred transport. Of course you can alternatively implement sketch deployment in your app sketch - but that's prone to failure when your sketch breaks.

Joe
Title: Re: Wireless Programming Monteino with Mysensors
Post by: perky on October 11, 2016, 06:14:55 AM
Quote from: joelucid on October 11, 2016, 02:31:04 AM
QuoteRight, we could suggest the same way the bootloader could do a little of everything else too, like reading sensors etc. Then why not replace the bootloader entirely with the sketch ? :)

I think a bootloader should do no more but also no less than installing sketches over the preferred transport. Of course you can alternatively implement sketch deployment in your app sketch - but that's prone to failure when your sketch breaks.

Joe

Yes, the bootloader should only be as big as necessary to take data over its preferred transport medium in a separate part of memory to the sketch that is protected in hardware from being changed. The main sketch itself could have a mechanism to detect bootloader mode and jump to the bootloader and this could be via the radio, that allows OTA upgrading without resetting the device manually. The sketch may have crashed of course so some simple hardware mechanism is needed to enter the bootloader, for example a hard reset switch. The bootloader is always entered by a hard reset and checks the bootloader switch position (e.g. the source of the hard reset) before either jumping to the main application or remaining in bootloader mode. The point is the bootloader is a separate thing to the sketch and is minimal in implementation and is protected in hardware from change.

Mark.