Wireless Programming Monteino with Mysensors

Started by mrmin24, October 04, 2016, 03:45:21 PM

mrmin24

Hi,

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

Thanks

luisr320


brolly759

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

mrmin24

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

WhiteHare

#4
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?

Felix

People still think a RFM69 bootloader makes sense?  ::)

WhiteHare

The answer doesn't have to be "either/or".  It could be "both".  i.e. why not have it all?

Felix

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 ? :)

joelucid

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

perky

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.