Sensebender/Dualoptiboot OTA HowTo in Mysensors
-
Great tutorial. It is now more clear for me.
I'll update you with my results within 2 weeks... i hope :) -
@scalz Great tutorial thanks. I plan to give it a try this week end but I was wondering if you had any test sketch to check if the arduino can talk to the flash.
Just a quick way to test, before flashing a new bootloader, if all pins are correctly soldered.
So far I know that ATSHA204A is recognized as I can read the config but no luck finding anything similar for the eeprom.
-
Great I will give it a try tonight!
By the way, is it me or in the current dev branch lost https://github.com/mysensors/Arduino/tree/fb1c542862221f0678485a553b46120bf09c6a91/libraries/MySensors/examples/Sha204Personalizer at some point?
-
Start...Init FAIL!Well I guess something is wrong
-
@emc2
depending on the eeprom you're using, you may need to change the corresponding jedec code in the sketch (I don't remember well). you can find the eeprom jedec code in datasheet if not the same. but in mysensors it should work. or you have a bad wiring perhaps.. -
:thumbsup:
-
I have AT25512N-SH-T SOIC-8 -> http://www.mouser.com/ds/2/36/Atmel-5165-SEEPROM-AT25512-Datasheet-476711.pdf
I so have a different bootloader - http://www.boardstuff.co.uk. I think I can use it with the flash as it does have 8 pins socket.However, I am a complete noob when it comes to the OTA. Is this the way to do it:
- Burn Optiboot onto the Sensebender
- Why do you have external eeprom board? I think the Sensebender has 64kb SPI flash / e2prom onboard.
Thanks for an excellent tutorial.
-
@alexsh1
i don't know for your eeprom, i don't have time right now, but that need to check datasheet, same pin footprint is not enough.- you need to burn DualOptiboot, it's not optiboot. Optiboot does not handle ota.
- The board is an eval board for ota/auth. that's all. it could be used in some diy projects but i integrate the eeprom on my pcbs of course.
-
@alexsh1 yes, no need. thx for feedback. I will modify my howto and add a link to the post relating eeprom compatibility too.
-
Thanks for this incredible tutorial. :thumbsup:
I've found almost all answers here and now I want only confirmation of my thoughts :)
I am prepearing my Wall Socket insertable node for production so I am making latest changes on the board. I decided to add SPI flash to implement OTA ability (see picture - U5). I plan to use dualboot.

As I understand the sketch works during loading firmware over the air, so it doesn't matter how much time it takes because my sketch can send heartbeat impulses to external watchdog during updating. Is it correct?
Second, I didn't want to add spi flash to Wall switch insertable node, but now I am having doubts. If I understand correctly there is no problem to update sleeping node because it will get update messages when it wakes up. Is it true? :)
Thanks! -
@koresh thx i'm glad if it helped you.
- not sure what you mean with "how much time... because external wdt". I was referring about the time it could take for battery powered device. because some sensors lib can have delays for instance, and keeping the readings process during ota could slow ota reception. but I have not checked the behaviour in the new lib yet.
- I think so, depending of the controller used.
-
Thanks for this incredible tutorial. :thumbsup:
I've found almost all answers here and now I want only confirmation of my thoughts :)
I am prepearing my Wall Socket insertable node for production so I am making latest changes on the board. I decided to add SPI flash to implement OTA ability (see picture - U5). I plan to use dualboot.

As I understand the sketch works during loading firmware over the air, so it doesn't matter how much time it takes because my sketch can send heartbeat impulses to external watchdog during updating. Is it correct?
Second, I didn't want to add spi flash to Wall switch insertable node, but now I am having doubts. If I understand correctly there is no problem to update sleeping node because it will get update messages when it wakes up. Is it true? :)
Thanks!Make sure you wait for a little bit (~300 ms) before going back to sleep in the sketch, to give the controller time to send the reboot command to the node. The firmware config request is sent from the node in the begin method.
When I implemented firmware updates in the pymysensors library I made sure to only send the reboot command after receiving a set command from a node. That way the node should be awake to receive the reboot command if it waits a bit before going back to sleep. I'm not sure how the other controllers that support ota firmware updates have solved this.